--- mongodb-1.6.0.ebuild.orig 2011-02-16 20:54:19.000000000 +0100 +++ mongodb-1.6.0.ebuild 2011-02-15 12:52:04.000000000 +0100 @@ -15,7 +15,7 @@ LICENSE="AGPL-3" SLOT="0" -KEYWORDS="~amd64 ~x86" +KEYWORDS="~x86-macos" IUSE="v8" RDEPEND="!v8? ( dev-lang/spidermonkey[unicode] ) @@ -36,6 +36,24 @@ enewuser mongodb -1 -1 /var/lib/${PN} mongodb scons_opts="${MAKEOPTS}" + + # Use target arch detection logic from bug #296917. + local myarch="$ABI" + [[ $myarch = "" ]] && myarch="$ARCH" + + if [[ $myarch =~ 64 ]] ; then + scons_opts+=" --64" + elif [[ $myarch =~ 32 ]] ; then + scons_opts+=" --32" + elif [[ $myarch =~ x86 ]] ; then + scons_opts+=" --32" + else + die "Failed to determine target arch, got '$myarch'." + fi + + # Pass paths for Gentoo Prefix + scons_opts+=" --cpppath ${EPREFIX}/usr/include --libpath ${EPREFIX}/usr/lib" + if use v8; then scons_opts+=" --usev8" else @@ -59,7 +77,7 @@ } src_install() { - scons ${scons_opts} --full --nostrip install --prefix="${D}"/usr || die "Install failed" + scons ${scons_opts} --full --nostrip install --prefix="${ED}"/usr || die "Install failed" for x in /var/{lib,log,run}/${PN}; do dodir "${x}" || die "Install failed"