--- /usr/lib/portage/bin/ebuild.sh.orig 2004-01-06 21:30:20.000000000 +0100 +++ /usr/lib/portage/bin/ebuild.sh 2004-01-12 21:21:53.000000000 +0100 @@ -343,6 +343,42 @@ } einstall() { + local ancient_install_style=true + eval $( + find -name Makefile 2>/dev/null | + while read file ; do + if fgrep -q DESTDIR "$file" ; then + echo ancient_install_style=false + break + fi + done + ) + if $ancient_install_style ; then + ewarn "*** Package is not compatible with DESTDIR einstall style." + ewarn "*** Please use einstall_ancient() instead of einstall()." + einstall_ancient "$@" + else +# FIXME. Remove this line after finishing of tests. + ewarn "*** Using DESTDIR einstall() style." + einstall_destdir "$@" + fi +} + +# FIXME: This should be renamed in future to einstall() +einstall_destdir() { + if [ -f ./Makefile ] ; then + if [ ! -z "${PORTAGE_DEBUG}" ]; then + make -n DESTDIR=${D} \ + "$@" install + fi + make DESTDIR=${D} \ + "$@" install || die "einstall failed" + else + die "no Makefile found" + fi +} + +einstall_ancient() { if [ -f ./[mM]akefile -o -f ./GNUmakefile ] ; then if [ ! -z "${PORTAGE_DEBUG}" ]; then make -n prefix=${D}/usr \