scummvm-tools ebuild uses find with -printf as argument which isn't supported on bsd find. Attached patch uses a more portable way to do the same.
Created attachment 101271 [details, diff] scummvm-tools-bsd.patch patch to the ebuild.
> src_install() { >+ cd "${S}" src_install always starts in $S, no need to cd there. > local f >- for f in $(find -type f -perm +1 -printf '%f ') ; do >- newgamesbin $f ${PN}-$f || die "newgamesbin $f failed" >+ find . -type f -perm +1 -print | while read f; do >+ newgamesbin $f ${PN}-$(basename $f) || die "newgamesbin $f failed" > done You're calling die in a subshell. This will not abort the installation if anything goes wrong.
(In reply to comment #2) > > src_install() { > >+ cd "${S}" > > src_install always starts in $S, no need to cd there. > Hmm somehow this one started in ${WORKDIR} instead. > > local f > >- for f in $(find -type f -perm +1 -printf '%f ') ; do > >- newgamesbin $f ${PN}-$f || die "newgamesbin $f failed" > >+ find . -type f -perm +1 -print | while read f; do > >+ newgamesbin $f ${PN}-$(basename $f) || die "newgamesbin $f failed" > > done > > You're calling die in a subshell. This will not abort the installation if > anything goes wrong. > I've just replaced - newgamesbin $f ${PN}-$(basename $f) || die "newgamesbin $f failed" with + false || die "false" and it dies pretty well. which subshell are you referring to? (cos we have two here, but die isn't called in any of them)
(In reply to comment #3) > (In reply to comment #2) > > > src_install() { > > >+ cd "${S}" > > > > src_install always starts in $S, no need to cd there. > > > Hmm somehow this one started in ${WORKDIR} instead. From /usr/lib/portage/bin/ebuild.sh: dyn_install() { [...] if [ -d "${S}" ]; then cd "${S}" fi vecho vecho ">>> Install ${PF} into ${D} category ${CATEGORY}" #our custom version of libtool uses $S and $D to fix #invalid paths in .la files export S D #some packages uses an alternative to $S to build in, cause #our libtool to create problematic .la files export PWORKDIR="$WORKDIR" src_install [...] } > > > local f > > >- for f in $(find -type f -perm +1 -printf '%f ') ; do > > >- newgamesbin $f ${PN}-$f || die "newgamesbin $f failed" > > >+ find . -type f -perm +1 -print | while read f; do > > >+ newgamesbin $f ${PN}-$(basename $f) || die "newgamesbin $f failed" > > > done > > > > You're calling die in a subshell. This will not abort the installation if > > anything goes wrong. > > > I've just replaced > - newgamesbin $f ${PN}-$(basename $f) || die "newgamesbin $f failed" > with > + false || die "false" > > and it dies pretty well. which subshell are you referring to? (cos we have two > here, but die isn't called in any of them) The subshell used for the while loop. In bash, all piped commands are evaluated in a subshell. Just try : | exit in a bash command prompt. Or from a test ebuild: KEYWORDS=~x86 src_unpack() { echo line | while read f do die done } >>> Emerging (1 of 1) test/test-1.0 to / * checking ebuild checksums ;-) ... [ ok ] * checking auxfile checksums ;-) ... [ ok ] * checking miscfile checksums ;-) ... [ ok ] >>> Unpacking source... !!! ERROR: test/test-1.0 failed. Call stack: ebuild.sh, line 1568: Called dyn_unpack ebuild.sh, line 708: Called src_unpack test-1.0.ebuild, line 5: Called die !!! (no error message) !!! If you need support, post the topmost build error, and the call stack if relevant. >>> Source unpacked. >>> Compiling source in /var/tmp/portage/test/test-1.0 ... >>> Source compiled. >>> Test phase [not enabled]: test/test-1.0 >>> Install test-1.0 into /var/tmp/portage/test/test-1.0/image/ cate gory test >>> Completed installing test-1.0 into /var/tmp/portage/test/test-1. 0/image/ man: >>> Merging test/test-1.0 to / >>> test/test-1.0 merged. >>> Recording test/test in "world" favorites file...
Created attachment 101279 [details, diff] scummvm-tools-bsd-v2.patch replaced while with for, and removed the cd ${S}, thanks Harald for the corrections.
dont use basename if you dont have to ... ${f##*/} works just as well
ok, in portage.