When trying to cross compile media-gfx/fbgrab-1.0-r2 sed in src_prepare() fail with the following error : >>> Preparing source in /var/tmp/armv6jl-hardfloat-linux-gnueabi/portage/media-gfx/fbgrab-1.0-r2/work/fbgrab-1.0 ... sed: -e expression #4, char 119: unknown option to `s' * ERROR: media-gfx/fbgrab-1.0-r2 failed (prepare phase): * sed failed * * Call stack: * ebuild.sh, line 93: Called src_prepare * environment, line 2214: Called die * The specific snippet of code: * sed -i -e "s/gcc/\$(CC)/" -e "s/-g//" -e "s/splint/#splint/" -e "s/-Wall/-Wall ${CPPFLAGS} ${CFLAGS} ${LDFLAGS}/" Makefile || die "sed failed"; The usage of '/' should be deprecated as in the current situation LDFLAGS can contain '/' LDFLAGS="-L/usr/armv6jl-hardfloat-linux-gnueabi/lib -L/usr/armv6jl-hardfloat-linux-gnueabi/usr/lib" Attached emerge --info and build.log Reproducible: Always Steps to Reproduce: 1. crossdev -t armv6jl-hardfloat-linux-gnueabi 2. armv6jl-hardfloat-linux-gnueabi-emerge -vat fbgrab 3.
Created attachment 351848 [details] build.log
Created attachment 351850 [details] emerge --info
Created attachment 351852 [details, diff] fbgrab-1.0-r2.ebuild-BJA-sed.patch patch proposal for ebuild. This also remove more tabs than needed for epatch and fix $(CC) quoting to avoid the usage of '\'
Created attachment 351854 [details, diff] fbgrab-1.0-r2.ebuild-BJA-sed.patch patch proposal for ebuild. This also remove more tabs than needed for epatch and fix $(CC) quoting to avoid the usage of '\'
Better yet, since you're fixing a Makefile, it is preferable to fix stuff by actually injecting new make variables instead of their values. This is already done in the first expression of the very same sed call. Additionally, the 1.0-r0 ebuild actually used colons as sed's s command's separator. Why was this changed?
fixed in cvs.