[patch] Allow compiling against newer X11 headers
caster at gentoo.org
Mon Nov 2 08:14:38 PST 2009
Mark Wielaard wrote:
> I added a configure check to see whether or not it is necessary to apply
> the patch. This makes icedtea6 build out of the box on older (fedora 11)
> and newer (fedora 12/rawhide) systems.
> Let me know if it looks sane and I will update Hacking and the wiki with
> the info.
I was solving this problem in gentoo recently and I found the fedora
patch a bit dangerous as it defines a structure from XShm.h manually.
I've created another patch that is applied not to awt_GraphicsEnv.h but
awt_GraphicsEnv.c (where the missing constant is actually used) and it
just includes Xmd.h and shmproto.h to get the constant (surrounded by a
MITSHM ifdef, as is the place of the actual constant usage). The
awt_GraphicsEnv.h still includes Xshm.h with the struct that Fedora
patch defines manually.
But I have to admit I'm not an expert on this, maybe there were reasons
behind the Fedora patch I don't know, but this one seems to work. I'm
I however didn't create configure check (mostly for lack of skills there
:), we apply the patch conditionally in the gentoo ebuild for now.
But I believe the logic of the check should go like this:
- check if libXext (xext in pkg-config) is of version >= 1.1.1 - if it
is, we know that we need also the shmproto.h
- if yes, check that shmproto.h is present (or that xextproto is of
version >=7.1.1), fail if it isn't
If we check just for the existence of shmproto.h, it will fail in case
libXext is of the new version (and the constant is no longer in XShm.h)
but there is no xextproto and thus shmproto.h (it's only a build dep
AFAIK so might not be present on all systems?).
Hope it helps,
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the distro-pkg-dev