app-text/ghostscript-gpl-9.02 uses byteswap.h, even though it seems to have code in place to use GCC's built-in byte swapping functions. FreeBSD's libc does not come with byteswap.h. Reproducible: Always Steps to Reproduce: 1. emerge ghostscript-gpl Actual Results: i686-gentoo-freebsd8.0-gcc -DHAVE_MKSTEMP -DHAVE_HYPOT -DHAVE_FONTCONFIG -DHAVE_SETLOCALE -DHAVE_SSE2 -fPIC -O2 -fPIC -Wall -Wstrict-prototypes -Wundef -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings -Wno-strict-aliasing -Wdeclaration-after-statement -fno-builtin -fno-common -DHAVE_STDINT_H -DGX_COLOR_INDEX_TYPE="unsigned long long" -march=pentium4 -O2 -pipe -fomit-frame-pointer -DUSE_LIBICONV_GNU -DUSE_LIBPAPER -DGS_DEVS_SHARED -DGS_DEVS_SHARED_DIR=\"/usr/lib/ghostscript/9.02\" -I./psi -I./obj/../soobj -I./obj/../soobj -I./base -o ./obj/../soobj/zchar1.o -c ./psi/zchar1.c In file included from ./base/gxdevcli.h:27:0, from ./base/gxdevice.h:21, from ./psi/zchar1.c:22: ./base/gsropt.h:386:22: fatal error: byteswap.h: No such file or directory compilation terminated. Expected Results: ghostscript-gpl merged. Attached patch addresses the problem. The issue appears to be present in upstream's repository as well, but I haven't been in touch with them. I can do that if you wish.
Created attachment 273125 [details, diff] Fix include of byteswap.h, non-existant on FreeBSD
It would be better to fix the code to work not only on FreeBSD but also any system (including FreeBSD). And it is great to contact with upstream people. It help our work a lot.
(In reply to comment #2) > It would be better to fix the code to work not only on FreeBSD but also any > system (including FreeBSD). Tested the patch on amd64 and ~x86-linux. > And it is great to contact with upstream people. It help our work a lot. Done, it's at http://bugs.ghostscript.com/show_bug.cgi?id=692211
Created attachment 281105 [details, diff] files/ghostscript-gpl-9.02-byteswap.patch patch to solve this problem on 9.02 (a little modified version of the above upstream bug's patch)
Created attachment 281107 [details, diff] ghostscript-gpl-9.02.ebuild.patch printing team, I'd like to have this patch applied to the ebuild. This patch apply the above patch to the source tree. As it's mentioned, the patch is based on upstream patch. Any comments?
(In reply to comment #5) > I'd like to have this patch applied to the ebuild. This patch apply > the above patch to the source tree. As it's mentioned, the patch is > based on upstream patch. Any comments? Looks good to me, thanks, especially for taking this upstream! Feel free to commit your changes.
Applied in CVS. Thanks!