--- portage-2.0.50_pre20.ebuild.old 2004-01-29 00:25:02.547833368 -0500 +++ portage-2.0.50_pre20.ebuild 2004-01-28 23:51:37.000000000 -0500 @@ -33,17 +33,23 @@ src_unpack() { unpack ${A} - cd ${S} + cd ${S}/src/sandbox-1.1 + epatch ${FILESDIR}/sandbox-amd64.patch } src_compile() { + SB_CFLAGS="$(echo "${CFLAGS}" | \ + sed -e 's:.*\(-march=[^[:space:]\"]*\).*:\1:p; t exit; s:.*\(-mcpu=[^[:space:]\"]*\).*:\1:p; :exit; D')" + cd ${S}/src; ${CC:-gcc} ${CFLAGS} tbz2tool.c -o tbz2tool cd ${S}/src/sandbox-1.1 - if [ "${ARCH}" = "x86" ]; then - make CFLAGS="-march=i386 -O1 -pipe" || die - else - make || die - fi +# if [ "${ARCH}" = "x86" ]; then +# make CFLAGS="-march=i386 -O1 -pipe" || die +# else +# make || die +# fi + make CFLAGS="${SB_CFLAGS} -O1 -pipe" \ + HAVE_64BIT_ARCH="$(use amd64 && use multilib)" || die cd ${S}/bin } @@ -112,8 +118,10 @@ #install sandbox cd ${S}/src/sandbox-1.1 make clean - make DESTDIR=${D} install || die "Failed to compile sandbox" - +# make DESTDIR=${D} install || die "Failed to compile sandbox" + make DESTDIR=${D} \ + HAVE_64BIT_ARCH="$(use amd64 && use multilib)" \ + install || die "Failed to compile sandbox" #symlinks dodir /usr/bin /usr/sbin dosym ../lib/portage/bin/emerge /usr/bin/emerge