Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 315347 - x11-base/xorg-server: support building without the opengl subsystem switch
Summary: x11-base/xorg-server: support building without the opengl subsystem switch
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-14 21:40 UTC by Michał Górny
Modified: 2010-05-15 21:11 UTC (History)
0 users

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


Attachments
The xorg-server patch (xorg-server-9999-opengl-includes.diff,1.20 KB, patch)
2010-04-14 21:41 UTC, Michał Górny
Details | Diff
The glproto patch (glproto-9999-GL-subdir.diff,717 bytes, patch)
2010-04-14 21:41 UTC, Michał Górny
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-04-14 21:40:20 UTC
The proposed solution is to use C_INCLUDE_PATH to prepend the include locations with real xorg-x11 include location (/usr/$(get_libdir)/opengl/xorg-x11/include) as it doesn't require patching the sourcecode and shouldn't cause problems with cross-compiling (like pkg-config hacking would).

Additionally, it is required for the include location to contain a 'GL' subdirectory. The second attached patch makes 'x11-proto/glproto' create a symlink for that directory to 'exist'. However, I think the best solution would be to install files onto that subdirectory and make eselect-opengl aware of that.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-04-14 21:41:27 UTC
Created attachment 227813 [details, diff]
The xorg-server patch
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-04-14 21:41:40 UTC
Created attachment 227815 [details, diff]
The glproto patch
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-04-18 18:25:20 UTC
The new versions of related ebuilds can be found on:
http://git.mgorny.alt.pl/x11/
(which is a clone of the x11 overlay).

I've made the following changes:
1) added eselect-opengl with patch to support installing headers inside 'GL' subdirectory,
2) modified and revbumped glproto and mesa to install their headers inside the 'GL' subdirectory,
3) modified mesa and xorg-server to use the OpenGL headers from /usr/$(get_libdir)/opengl instead of relying on eselect-opengl to provide xorg-x11 implementation.
Comment 4 Rémi Cardona (RETIRED) gentoo-dev 2010-05-15 21:11:03 UTC
Ok, I've managed to "fix" xorg-server to do all the work on its own without requiring modifications anywhere else.

I'm pretty sure this could be further improved, but this is at least a good first step. If anyone wants to do this with a fake .pc file instead, be my guest :)

Like Michał, I've managed to build this with /usr/include/GL files hacked to contain #error (meaning they are effectively ignored, otherwise the build would fail). Bottom line, the currenly selected opengl implementation with eselect-opengl no longer matters.

With this done, eselect-opengl should be cleaned up to what it used to do. No other patches are needed.

Many thanks to Michał for doing most of the work I've committed :)

Cheers