Line 61 of the ebuild fails if RAR is not compiled into p7zip on OSX: sed -i -e '/^PROG=/s/\.so/.bundle/' \ CPP/7zip/Bundles/Format7zFree/makefile \ CPP/7zip/Compress/Rar/makefile || die The CPP/7zip/Compress/Rar/ directory is deleted earlier in the .ebuild, unless the rar USE flag is set. Reproducible: Always Steps to Reproduce: 1. USE=-rar emerge p7zip Actual Results: >>> Verifying ebuild manifests >>> Emerging (1 of 1) app-arch/p7zip-9.04 * p7zip_9.04_src_all.tar.bz2 RMD160 SHA1 SHA256 size ;-) ... [ ok ] * checking ebuild checksums ;-) ... [ ok ] * checking auxfile checksums ;-) ... [ ok ] * checking miscfile checksums ;-) ... [ ok ] * CPV: app-arch/p7zip-9.04 * REPO: gentoo_prefix * USE: elibc_Darwin kernel_Darwin prefix userland_GNU x86-macos >>> Unpacking source... >>> Unpacking p7zip_9.04_src_all.tar.bz2 to /Users/mds/Gentoo/var/tmp/portage/app-arch/p7zip-9.04/work >>> Source unpacked in /Users/mds/Gentoo/var/tmp/portage/app-arch/p7zip-9.04/work >>> Preparing source in /Users/mds/Gentoo/var/tmp/portage/app-arch/p7zip-9.04/work/p7zip_9.04 ... * Applying 9.04-makefile.patch ... [ ok ] sed: can't read CPP/7zip/Compress/Rar/makefile: No such file or directory * ERROR: app-arch/p7zip-9.04 failed: * (no error message) * * Call stack: * ebuild.sh, line 54: Called call-ebuildshell 'src_prepare' * environment, line 261: Called src_prepare * environment, line 2524: Called die * The specific snippet of code: * sed -i -e '/^PROG=/s/\.so/.bundle/' CPP/7zip/Bundles/Format7zFree/makefile CPP/7zip/Compress/Rar/makefile || die; * * If you need support, post the output of 'emerge --info =app-arch/p7zip-9.04', * the complete build log and the output of 'emerge -pqv =app-arch/p7zip-9.04'. * The complete build log is located at '/Users/mds/Gentoo/var/tmp/portage/app-arch/p7zip-9.04/temp/build.log'. * The ebuild environment file is located at '/Users/mds/Gentoo/var/tmp/portage/app-arch/p7zip-9.04/temp/environment'. * S: '/Users/mds/Gentoo/var/tmp/portage/app-arch/p7zip-9.04/work/p7zip_9.04' >>> Failed to emerge app-arch/p7zip-9.04, Log file: >>> '/Users/mds/Gentoo/var/tmp/portage/app-arch/p7zip-9.04/temp/build.log' Expected Results: Successful build. I *think* the following patch to the .ebuild would fix it: --- p7zip-9.04.ebuild-old 2010-04-09 17:23:42 -0500 +++ p7zip-9.04.ebuild 2010-04-09 17:25:29 -0500 @@ -56,9 +56,14 @@ && cp -f makefile.macosx_64bits makefile.machine \ || cp -f makefile.macosx_32bits makefile.machine # bundles have extension .bundle - sed -i -e '/^PROG=/s/\.so/.bundle/' \ - CPP/7zip/Bundles/Format7zFree/makefile \ - CPP/7zip/Compress/Rar/makefile || die + if use rar; then + sed -i -e '/^PROG=/s/\.so/.bundle/' \ + CPP/7zip/Bundles/Format7zFree/makefile \ + CPP/7zip/Compress/Rar/makefile || die + else + sed -i -e '/^PROG=/s/\.so/.bundle/' \ + CPP/7zip/Bundles/Format7zFree/makefile || die + fi elif use x86-fbsd; then # FreeBSD needs this special makefile, because it hasn't -ldl sed -e 's/-lc_r/-pthread/' makefile.freebsd > makefile.machine
This sed statement does not die anymore. Thanks.