Check the attached build log under Gentoo/FreeBSD. The configure script checks for XdbeQueryExtension in that library (which is found) but the code never uses it; the library results not linked in with --as-needed (means it's unneeded). It should probably be patched to not try to link against it, but since right now it'll fail if libXext is not installed I'm going to add it to the dependencies to workaround the issue. Thanks, Diego
Created attachment 192929 [details] Build log
Uhm just noticed that it's in the deps already and I have no X USE enabled on my g/fbsd box so it's an automagic dep it seems!
Something similar is still going on in recent versions: app-text/ghostscript-gpl-9.04-r4 after build with USE=-X pinacolada bin # scanelf -n *|grep x11 ET_EXEC libgs.so.9,libgtk-x11-2.0.so.0,libgdk-x11-2.0.so.0,libgobject-2.0.so.0,libglib-2.0.so.0,libpthread.so.0,libc.so.6 gsx
Ghostscript has about the most convoluted and absurd build system that I have ever seen. This is a mostly-cantfix, unless one of the real gurus takes a shot.
This is not reproducible with versions 9.10 and 9.15 currently in tree any more. I.e. both versions correctly refrain from testing X11 symbols as well as from linking against X11 libraries is USE="-X".