A few multilib cleanups in the ebuild to support MULTILIB_ABIS. Behavior unchanged...
authorJeremy Huddleston <eradicator@gentoo.org>
Mon, 10 Jan 2005 22:52:41 +0000 (22:52 +0000)
committerJeremy Huddleston <eradicator@gentoo.org>
Mon, 10 Jan 2005 22:52:41 +0000 (22:52 +0000)
sys-apps/portage/Manifest
sys-apps/portage/portage-2.0.51-r8.ebuild

index a28b6fef63887182d345b2d40a509620d951dbe3..a9c76fe31dc0eaa8285e9c561663447887184cbc 100644 (file)
@@ -6,7 +6,7 @@ MD5 ba4ae80e5e6cf58aac9c5aa1cc5f777e ChangeLog 411
 MD5 792bf823d26f12bc03b4c9c7a370374c portage-2.0.51-r3.ebuild 12546
 MD5 45d685c485d82a914b924ba6ace963e1 portage-2.0.51_rc7.ebuild 11767
 MD5 45cd332af1ba186c050ec9eeafe9e915 portage-2.0.51-r7.ebuild 12278
-MD5 167e7d5cdfc499ae08f5ce2604b94f50 portage-2.0.51-r8.ebuild 12728
+MD5 0fe2d69f1f9af4f46e826fbd296cce2e portage-2.0.51-r8.ebuild 13061
 MD5 2200865f3cd8ee0f4bfbd91c3de84181 portage-2.0.51-r2.ebuild 12263
 MD5 63cadb5f6ef798aaa8b95a899fdea82f portage-2.0.50-r11.ebuild 11572
 MD5 a754ca9e2eea9f8484bf5f93d339043a files/README.RESCUE 1911
@@ -18,9 +18,9 @@ MD5 b002fc7e6251c2417311857ded4ddc11 files/digest-portage-2.0.51-r7 70
 MD5 30e618b070e4b7e13f3dd9b3f1db6140 files/digest-portage-2.0.51-r8 70
 MD5 5375f0805d4d56dc961ad81162854790 files/digest-portage-2.0.50-r11 71
 -----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.2.6 (GNU/Linux)
+Version: GnuPG v1.4.0 (GNU/Linux)
 
-iD8DBQFByf+XArHZZzCEUG0RAr9wAJ98XGQqzEDVFSY/5Xqkr7xgveu/0wCfd+TK
-X6zTa0b8KpBugDi3VGOJutc=
-=RAK/
+iD8DBQFB4wdEArHZZzCEUG0RAnDQAJ484qO1jwLmkjWokoTCCs5lGnddggCeOeym
+pVOdE3+6k1nt8JhaXs6DWV0=
+=jDod
 -----END PGP SIGNATURE-----
index 2eadca44386fb573b28dedaba4a441a3491385c2..c4bcc80d7ba2f161e2c5e8a9d38602392d867834 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.0.51-r8.ebuild,v 1.5 2004/12/22 23:13:06 eradicator Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.0.51-r8.ebuild,v 1.6 2005/01/10 22:52:41 eradicator Exp $
 
 inherit flag-o-matic eutils toolchain-funcs
 
@@ -58,31 +58,29 @@ src_unpack() {
 src_compile() {
        export CC="$(tc-getCC)"
        cd ${S}/src; ${CC} ${CFLAGS} tbz2tool.c -o tbz2tool
+
        cd ${S}/src/sandbox-1.1
-       case ${ARCH} in
-               "x86")
-                       make CFLAGS="-march=i386 -O1 -pipe" || die
-                       ;;
-               "amd64")
-                       check_multilib
-                       make CFLAGS="-O1 -pipe" HAVE_64BIT_ARCH="${MULTILIB}" || die
-                       ;;
-               "sparc")
-                       if [ "${PROFILE_ARCH}" = "sparc64-multilib" ]; then
-                               check_multilib
-                               make CFLAGS="-O1 -pipe" HAVE_64BIT_ARCH="${MULTILIB}" || die
-                       else
-                               make CFLAGS="-O1 -pipe" || die
-                       fi
-                       ;;
-               *)
-                       if useq ppc-macos || useq x86-fbsd; then
-                               ewarn "NOT BUILDING SANDBOX ON $ARCH"
-                       else
-                               make CFLAGS="-O1 -pipe" || die
-                       fi
-                       ;;
-       esac
+       if use ppc-macos || use x86-fbsd; then
+               ewarn "NOT BUILDING SANDBOX ON ${ARCH}"
+       elif [ -n "${MULTILIB_ABIS}" ] && ! hasq ${FEATURES}; then
+               for ABI in ${MULTILIB_ABIS}; do
+                       export ABI
+                       make clean
+                       make CFLAGS="-O1 -pipe" libsandbox.so || die
+                       mv libsandbox.so libsandbox.so.${ABI}
+               done
+               make clean
+               export ABI="${DEFAULT_ABI}"
+               make CFLAGS="-O1 -pipe" || die
+       elif [ "${ARCH}" == "amd64" ]; then
+               check_multilib
+               make CFLAGS="-O1 -pipe" HAVE_64BIT_ARCH="${MULTILIB}" || die
+       elif [ "${ARCH}" == "x86" ]; then
+               make CFLAGS="-march=i386 -O1 -pipe" || die
+       else
+               make CFLAGS="-O1 -pipe" || die
+       fi
+
        cd ${S}/bin
 }
 
@@ -129,19 +127,30 @@ src_install() {
        doexe *
        doexe ${S}/src/tbz2tool
 
+       #install sandbox
+       cd ${S}/src/sandbox-1.1
        if use ppc-macos || use x86-fbsd; then
                ewarn "Not installing sandbox on ${ARCH}"
-       else
-               #install sandbox
-               cd ${S}/src/sandbox-1.1
-               if [ "$ARCH" == "amd64" -o "${PROFILE_ARCH}" = "sparc64-multilib" ]; then
-                       check_multilib
-                       make DESTDIR="${D}" HAVE_64BIT_ARCH="${MULTILIB}" install || \
-                       die "Failed to compile sandbox"
-               else
+       elif [ -n "${MULTILIB_ABIS}" ]; then
+               for ABI in ${MULTILIB_ABIS}; do
+                       cp libsandbox.so.${ABI} libsandbox.so
                        make DESTDIR="${D}" install || \
-                       die "Failed to compile sandbox"
-               fi
+                       die "Failed to install sandbox"
+                       if [ "$(get_libdir)" = "lib" ]; then
+                               mv ${D}/lib/libsandbox.so ${D}/lib/libsandbox.so.real 
+                       else
+                               dodir /$(get_libdir)
+                               mv ${D}/lib/libsandbox.so ${D}/$(get_libdir)
+                       fi
+               done
+               [ -f "${D}/lib/libsandbox.so.real" ] && mv ${D}/lib/libsandbox.so.real ${D}/lib/libsandbox.so
+       elif [ "${ARCH}" == "amd64" -a -z "${MULTILIB_ABIS}" ]; then
+               check_multilib
+               make DESTDIR="${D}" HAVE_64BIT_ARCH="${MULTILIB}" install || \
+               die "Failed to install sandbox"
+       else
+               make DESTDIR="${D}" install || \
+               die "Failed to install sandbox"
        fi
 
        #symlinks
@@ -181,13 +190,6 @@ src_install() {
 
        #documentation
        dodoc ${S}/ChangeLog
-
-       # Fix dumb placement of libsandbox
-       if [ "${PROFILE_ARCH}" = "sparc64-multilib" -a "${MULTILIB}" = "1" ]; then
-               dodir /lib64
-               mv ${D}/lib/lib* ${D}/lib64
-               mv ${D}/lib32/lib* ${D}/lib
-       fi
 }