use epatch #42060
authorMike Frysinger <vapier@gentoo.org>
Wed, 21 Sep 2005 23:19:08 +0000 (23:19 +0000)
committerMike Frysinger <vapier@gentoo.org>
Wed, 21 Sep 2005 23:19:08 +0000 (23:19 +0000)
eclass/cvs.eclass
eclass/toolchain-binutils.eclass

index 1ebd1234902500a2c3d7e98d9549642e6fc7f926..911b974de058b0420c458c85bf8a98d0cacd1c07 100644 (file)
@@ -1,15 +1,8 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.59 2005/08/13 08:10:53 phreak Exp $
-
-# Current Maintainer: Tal Peer <coredumb@gentoo.org>
-# Original Author:    Dan Armak <danarmak@gentoo.org>
-
-# SSH auth code by Danny <danny.milo@gmx.net>
-
-# SSH password authentication support and host key verification
-# support by Jeremy Maitin-Shepard <jbms@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.60 2005/09/21 23:19:08 vapier Exp $
 
+inherit eutils
 
 # This eclass provides the generic cvs fetching functions.  To use
 # this from an ebuild, set the `ebuild-configurable settings' as
@@ -535,10 +528,7 @@ cvs_src_unpack() {
        if [ -n "$PATCHES" ]; then
                debug-print "$FUNCNAME: PATCHES=$PATCHES, S=$S, autopatching"
                cd "$S"
-               for x in $PATCHES; do
-                       debug-print "patching from $x"
-                       patch -p0 < "$x"
-               done
+               epatch ${PATCHES}
                # Make sure we don't try to apply patches more than once,
                # since cvs_src_unpack is usually called several times from
                # e.g. kde-source_src_unpack
index 578396bd8a27317f5202ade5488db36efd9413fe..4edb14a2841a3b66d094dd30a8214a8f2024ef95 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-binutils.eclass,v 1.43 2005/08/05 03:37:45 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-binutils.eclass,v 1.44 2005/09/21 23:19:08 vapier Exp $
 
 # We install binutils into CTARGET-VERSION specific directories.  This lets
 # us easily merge multiple versions for multiple targets (if we wish) and
@@ -101,6 +101,7 @@ toolchain-binutils_src_compile() {
 
        cd "${MY_BUILDDIR}"
        local myconf=""
+       is_cross && myconf="${myconf} --with-sysroot=/usr/${CTARGET}"
        use nls \
                && myconf="${myconf} --without-included-gettext" \
                || myconf="${myconf} --disable-nls"
@@ -116,8 +117,8 @@ toolchain-binutils_src_compile() {
                --libdir=${LIBPATH} \
                --libexecdir=${LIBPATH} \
                --includedir=${INCPATH} \
-               --enable-shared \
                --enable-64-bit-bfd \
+               --enable-shared \
                --disable-werror \
                ${myconf} ${EXTRA_ECONF}"
        echo ./configure ${myconf}
@@ -163,9 +164,11 @@ toolchain-binutils_src_install() {
                        mv ${x} ${x/${CTARGET}-}
                done
 
-               mv "${D}"/usr/${CHOST}/${CTARGET}/include "${D}"/${INCPATH}
-               mv "${D}"/usr/${CHOST}/${CTARGET}/lib/* "${D}"/${LIBPATH}/
-               rm -r "${D}"/usr/${CHOST}
+               if [[ -d ${D}/usr/${CHOST}/${CTARGET} ]] ; then
+                       mv "${D}"/usr/${CHOST}/${CTARGET}/include "${D}"/${INCPATH}
+                       mv "${D}"/usr/${CHOST}/${CTARGET}/lib/* "${D}"/${LIBPATH}/
+                       rm -r "${D}"/usr/${CHOST}
+               fi
        else
                insinto ${INCPATH}
                doins "${S}/include/libiberty.h"