Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 367119 - app-text/ghostscript-gpl-9.02 includes byteswap.h which does not exist on FreeBSD
Summary: app-text/ghostscript-gpl-9.02 includes byteswap.h which does not exist on Fre...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: FreeBSD (show other bugs)
Hardware: x86 FreeBSD
: Normal normal (vote)
Assignee: Gentoo/BSD Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-13 18:08 UTC by Johan Hattne
Modified: 2011-08-05 10:57 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fix include of byteswap.h, non-existant on FreeBSD (ghostscript-gpl-9.02-bswap.patch,451 bytes, patch)
2011-05-13 18:11 UTC, Johan Hattne
Details | Diff
files/ghostscript-gpl-9.02-byteswap.patch (ghostscript-gpl-9.02-byteswap.patch,3.12 KB, patch)
2011-07-27 08:31 UTC, Naohiro Aota
Details | Diff
ghostscript-gpl-9.02.ebuild.patch (ghostscript-gpl-9.02.ebuild.patch,710 bytes, patch)
2011-07-27 08:35 UTC, Naohiro Aota
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Johan Hattne 2011-05-13 18:08:40 UTC
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.
Comment 1 Johan Hattne 2011-05-13 18:11:01 UTC
Created attachment 273125 [details, diff]
Fix include of byteswap.h, non-existant on FreeBSD
Comment 2 Naohiro Aota gentoo-dev 2011-05-18 02:25:22 UTC
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.
Comment 3 Johan Hattne 2011-05-18 15:49:55 UTC
(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
Comment 4 Naohiro Aota gentoo-dev 2011-07-27 08:31:09 UTC
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)
Comment 5 Naohiro Aota gentoo-dev 2011-07-27 08:35:37 UTC
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?
Comment 6 Timo Gurr (RETIRED) gentoo-dev 2011-07-27 10:27:30 UTC
(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.
Comment 7 Naohiro Aota gentoo-dev 2011-08-05 10:57:37 UTC
Applied in CVS. Thanks!