1 |
commit: 6d0297870ace46f17905f7440cee1614ce2ffb9b |
2 |
Author: Nick Sarnie <sarnex <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat May 5 18:55:53 2018 +0000 |
4 |
Commit: Nick Sarnie <sarnex <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat May 5 19:04:06 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6d029787 |
7 |
|
8 |
x11-base/xorg-server: Backport patch to fix colors on Intel GPUs |
9 |
|
10 |
Colors are broken on Intel GPUs with Mesa 18.0, let's backport the fix |
11 |
|
12 |
Bug: https://bugs.gentoo.org/653688 |
13 |
Package-Manager: Portage-2.3.36, Repoman-2.3.9 |
14 |
|
15 |
...t-pick-sRGB-config-for-32-bit-RGBA-visual.patch | 39 ++++ |
16 |
x11-base/xorg-server/xorg-server-1.19.5-r2.ebuild | 251 +++++++++++++++++++++ |
17 |
2 files changed, 290 insertions(+) |
18 |
|
19 |
diff --git a/x11-base/xorg-server/files/xorg-server-1.19.5-glx-do-not-pick-sRGB-config-for-32-bit-RGBA-visual.patch b/x11-base/xorg-server/files/xorg-server-1.19.5-glx-do-not-pick-sRGB-config-for-32-bit-RGBA-visual.patch |
20 |
new file mode 100644 |
21 |
index 00000000000..d7e5e511e5d |
22 |
--- /dev/null |
23 |
+++ b/x11-base/xorg-server/files/xorg-server-1.19.5-glx-do-not-pick-sRGB-config-for-32-bit-RGBA-visual.patch |
24 |
@@ -0,0 +1,39 @@ |
25 |
+From c2954b16c8730c7ed8441fd8dba25900f3aed265 Mon Sep 17 00:00:00 2001 |
26 |
+From: =?UTF-8?q?Tapani=20P=C3=A4lli?= <tapani.palli@×××××.com> |
27 |
+Date: Tue, 28 Nov 2017 09:23:29 +0200 |
28 |
+Subject: [PATCH] glx: do not pick sRGB config for 32-bit RGBA visual |
29 |
+MIME-Version: 1.0 |
30 |
+Content-Type: text/plain; charset=UTF-8 |
31 |
+Content-Transfer-Encoding: 8bit |
32 |
+ |
33 |
+This fixes blending issues seen with kwin and gnome-shell when |
34 |
+32bit visual has sRGB capability set. |
35 |
+ |
36 |
+Reviewed-by: Adam Jackson <ajax@××××××.com> |
37 |
+Signed-off-by: Tapani Pälli <tapani.palli@×××××.com> |
38 |
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103699 |
39 |
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103646 |
40 |
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103655 |
41 |
+--- |
42 |
+ glx/glxscreens.c | 5 +++++ |
43 |
+ 1 file changed, 5 insertions(+) |
44 |
+ |
45 |
+diff --git a/glx/glxscreens.c b/glx/glxscreens.c |
46 |
+index 73444152a..596d972e0 100644 |
47 |
+--- a/glx/glxscreens.c |
48 |
++++ b/glx/glxscreens.c |
49 |
+@@ -271,6 +271,11 @@ pickFBConfig(__GLXscreen * pGlxScreen, VisualPtr visual) |
50 |
+ /* If it's the 32-bit RGBA visual, demand a 32-bit fbconfig. */ |
51 |
+ if (visual->nplanes == 32 && config->rgbBits != 32) |
52 |
+ continue; |
53 |
++ /* If it's the 32-bit RGBA visual, do not pick sRGB capable config. |
54 |
++ * This can cause issues with compositors that are not sRGB aware. |
55 |
++ */ |
56 |
++ if (visual->nplanes == 32 && config->sRGBCapable == GL_TRUE) |
57 |
++ continue; |
58 |
+ /* Can't use the same FBconfig for multiple X visuals. I think. */ |
59 |
+ if (config->visualID != 0) |
60 |
+ continue; |
61 |
+-- |
62 |
+2.17.0 |
63 |
+ |
64 |
|
65 |
diff --git a/x11-base/xorg-server/xorg-server-1.19.5-r2.ebuild b/x11-base/xorg-server/xorg-server-1.19.5-r2.ebuild |
66 |
new file mode 100644 |
67 |
index 00000000000..4b366b21c80 |
68 |
--- /dev/null |
69 |
+++ b/x11-base/xorg-server/xorg-server-1.19.5-r2.ebuild |
70 |
@@ -0,0 +1,251 @@ |
71 |
+# Copyright 1999-2018 Gentoo Foundation |
72 |
+# Distributed under the terms of the GNU General Public License v2 |
73 |
+ |
74 |
+EAPI=5 |
75 |
+ |
76 |
+XORG_DOC=doc |
77 |
+inherit xorg-2 multilib versionator flag-o-matic |
78 |
+EGIT_REPO_URI="https://anongit.freedesktop.org/git/xorg/xserver.git" |
79 |
+ |
80 |
+DESCRIPTION="X.Org X servers" |
81 |
+SLOT="0/${PV}" |
82 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux" |
83 |
+ |
84 |
+IUSE_SERVERS="dmx kdrive wayland xephyr xnest xorg xvfb" |
85 |
+IUSE="${IUSE_SERVERS} debug +glamor ipv6 libressl minimal selinux +suid systemd tslib +udev unwind xcsecurity" |
86 |
+ |
87 |
+CDEPEND=">=app-eselect/eselect-opengl-1.3.0 |
88 |
+ !libressl? ( dev-libs/openssl:0= ) |
89 |
+ libressl? ( dev-libs/libressl:0= ) |
90 |
+ >=x11-apps/iceauth-1.0.2 |
91 |
+ >=x11-apps/rgb-1.0.3 |
92 |
+ >=x11-apps/xauth-1.0.3 |
93 |
+ x11-apps/xkbcomp |
94 |
+ >=x11-libs/libdrm-2.4.46 |
95 |
+ >=x11-libs/libpciaccess-0.12.901 |
96 |
+ >=x11-libs/libXau-1.0.4 |
97 |
+ >=x11-libs/libXdmcp-1.0.2 |
98 |
+ >=x11-libs/libXfont2-2.0.1 |
99 |
+ >=x11-libs/libxkbfile-1.0.4 |
100 |
+ >=x11-libs/libxshmfence-1.1 |
101 |
+ >=x11-libs/pixman-0.27.2 |
102 |
+ >=x11-libs/xtrans-1.3.5 |
103 |
+ >=x11-misc/xbitmaps-1.0.1 |
104 |
+ >=x11-misc/xkeyboard-config-2.4.1-r3 |
105 |
+ dmx? ( |
106 |
+ x11-libs/libXt |
107 |
+ >=x11-libs/libdmx-1.0.99.1 |
108 |
+ >=x11-libs/libX11-1.1.5 |
109 |
+ >=x11-libs/libXaw-1.0.4 |
110 |
+ >=x11-libs/libXext-1.0.99.4 |
111 |
+ >=x11-libs/libXfixes-5.0 |
112 |
+ >=x11-libs/libXi-1.2.99.1 |
113 |
+ >=x11-libs/libXmu-1.0.3 |
114 |
+ x11-libs/libXrender |
115 |
+ >=x11-libs/libXres-1.0.3 |
116 |
+ >=x11-libs/libXtst-1.0.99.2 |
117 |
+ ) |
118 |
+ glamor? ( |
119 |
+ media-libs/libepoxy[X] |
120 |
+ >=media-libs/mesa-10.3.4-r1[egl,gbm] |
121 |
+ !x11-libs/glamor |
122 |
+ ) |
123 |
+ kdrive? ( |
124 |
+ >=x11-libs/libXext-1.0.5 |
125 |
+ x11-libs/libXv |
126 |
+ ) |
127 |
+ xephyr? ( |
128 |
+ x11-libs/libxcb[xkb] |
129 |
+ x11-libs/xcb-util |
130 |
+ x11-libs/xcb-util-image |
131 |
+ x11-libs/xcb-util-keysyms |
132 |
+ x11-libs/xcb-util-renderutil |
133 |
+ x11-libs/xcb-util-wm |
134 |
+ ) |
135 |
+ !minimal? ( |
136 |
+ >=x11-libs/libX11-1.1.5 |
137 |
+ >=x11-libs/libXext-1.0.5 |
138 |
+ >=media-libs/mesa-10.3.4-r1 |
139 |
+ ) |
140 |
+ tslib? ( >=x11-libs/tslib-1.0 ) |
141 |
+ udev? ( >=virtual/udev-150 ) |
142 |
+ unwind? ( sys-libs/libunwind ) |
143 |
+ wayland? ( |
144 |
+ >=dev-libs/wayland-1.3.0 |
145 |
+ media-libs/libepoxy |
146 |
+ >=dev-libs/wayland-protocols-1.1 |
147 |
+ ) |
148 |
+ >=x11-apps/xinit-1.3.3-r1 |
149 |
+ systemd? ( |
150 |
+ sys-apps/dbus |
151 |
+ sys-apps/systemd |
152 |
+ )" |
153 |
+ |
154 |
+DEPEND="${CDEPEND} |
155 |
+ sys-devel/flex |
156 |
+ >=x11-proto/bigreqsproto-1.1.0 |
157 |
+ >=x11-proto/compositeproto-0.4 |
158 |
+ >=x11-proto/damageproto-1.1 |
159 |
+ >=x11-proto/fixesproto-5.0 |
160 |
+ >=x11-proto/fontsproto-2.1.3 |
161 |
+ >=x11-proto/glproto-1.4.17-r1 |
162 |
+ >=x11-proto/inputproto-2.3 |
163 |
+ >=x11-proto/kbproto-1.0.3 |
164 |
+ >=x11-proto/randrproto-1.5.0 |
165 |
+ >=x11-proto/recordproto-1.13.99.1 |
166 |
+ >=x11-proto/renderproto-0.11 |
167 |
+ >=x11-proto/resourceproto-1.2.0 |
168 |
+ >=x11-proto/scrnsaverproto-1.1 |
169 |
+ >=x11-proto/trapproto-3.4.3 |
170 |
+ >=x11-proto/videoproto-2.2.2 |
171 |
+ >=x11-proto/xcmiscproto-1.2.0 |
172 |
+ >=x11-proto/xextproto-7.2.99.901 |
173 |
+ >=x11-proto/xf86dgaproto-2.0.99.1 |
174 |
+ >=x11-proto/xf86vidmodeproto-2.2.99.1 |
175 |
+ >=x11-proto/xineramaproto-1.1.3 |
176 |
+ >=x11-proto/xproto-7.0.31 |
177 |
+ >=x11-proto/presentproto-1.0 |
178 |
+ >=x11-proto/dri2proto-2.8 |
179 |
+ >=x11-proto/dri3proto-1.0 |
180 |
+ dmx? ( |
181 |
+ >=x11-proto/dmxproto-2.2.99.1 |
182 |
+ doc? ( |
183 |
+ || ( |
184 |
+ www-client/links |
185 |
+ www-client/lynx |
186 |
+ www-client/w3m |
187 |
+ ) |
188 |
+ ) |
189 |
+ ) |
190 |
+ !minimal? ( |
191 |
+ >=x11-proto/xf86driproto-2.1.0 |
192 |
+ )" |
193 |
+ |
194 |
+RDEPEND="${CDEPEND} |
195 |
+ selinux? ( sec-policy/selinux-xserver ) |
196 |
+ !x11-drivers/xf86-video-modesetting |
197 |
+" |
198 |
+ |
199 |
+PDEPEND=" |
200 |
+ xorg? ( >=x11-base/xorg-drivers-$(get_version_component_range 1-2) )" |
201 |
+ |
202 |
+REQUIRED_USE="!minimal? ( |
203 |
+ || ( ${IUSE_SERVERS} ) |
204 |
+ ) |
205 |
+ xephyr? ( kdrive )" |
206 |
+ |
207 |
+#UPSTREAMED_PATCHES=( |
208 |
+# "${WORKDIR}/patches/" |
209 |
+#) |
210 |
+ |
211 |
+PATCHES=( |
212 |
+ "${UPSTREAMED_PATCHES[@]}" |
213 |
+ "${FILESDIR}"/${PN}-1.12-unloadsubmodule.patch |
214 |
+ # needed for new eselect-opengl, bug #541232 |
215 |
+ "${FILESDIR}"/${PN}-1.18-support-multiple-Files-sections.patch |
216 |
+ "${FILESDIR}"/${PN}-1.19.4-sysmacros.patch #633530 |
217 |
+ "${FILESDIR}"/${PN}-1.19.5-glx-do-not-pick-sRGB-config-for-32-bit-RGBA-visual.patch #653688 |
218 |
+) |
219 |
+ |
220 |
+pkg_pretend() { |
221 |
+ # older gcc is not supported |
222 |
+ [[ "${MERGE_TYPE}" != "binary" && $(gcc-major-version) -lt 4 ]] && \ |
223 |
+ die "Sorry, but gcc earlier than 4.0 will not work for xorg-server." |
224 |
+} |
225 |
+ |
226 |
+pkg_setup() { |
227 |
+ if use wayland && ! use glamor; then |
228 |
+ ewarn "glamor is necessary for acceleration under Xwayland." |
229 |
+ ewarn "Performance may be unacceptable without it." |
230 |
+ fi |
231 |
+} |
232 |
+ |
233 |
+src_configure() { |
234 |
+ # localstatedir is used for the log location; we need to override the default |
235 |
+ # from ebuild.sh |
236 |
+ # sysconfdir is used for the xorg.conf location; same applies |
237 |
+ # NOTE: fop is used for doc generating; and I have no idea if Gentoo |
238 |
+ # package it somewhere |
239 |
+ XORG_CONFIGURE_OPTIONS=( |
240 |
+ $(use_enable ipv6) |
241 |
+ $(use_enable debug) |
242 |
+ $(use_enable dmx) |
243 |
+ $(use_enable glamor) |
244 |
+ $(use_enable kdrive) |
245 |
+ $(use_enable kdrive kdrive-kbd) |
246 |
+ $(use_enable kdrive kdrive-mouse) |
247 |
+ $(use_enable kdrive kdrive-evdev) |
248 |
+ $(use_enable suid install-setuid) |
249 |
+ $(use_enable tslib) |
250 |
+ $(use_enable unwind libunwind) |
251 |
+ $(use_enable wayland xwayland) |
252 |
+ $(use_enable !minimal record) |
253 |
+ $(use_enable !minimal xfree86-utils) |
254 |
+ $(use_enable !minimal dri) |
255 |
+ $(use_enable !minimal dri2) |
256 |
+ $(use_enable !minimal glx) |
257 |
+ $(use_enable xcsecurity) |
258 |
+ $(use_enable xephyr) |
259 |
+ $(use_enable xnest) |
260 |
+ $(use_enable xorg) |
261 |
+ $(use_enable xvfb) |
262 |
+ $(use_enable udev config-udev) |
263 |
+ $(use_with doc doxygen) |
264 |
+ $(use_with doc xmlto) |
265 |
+ $(use_with systemd systemd-daemon) |
266 |
+ $(use_enable systemd systemd-logind) |
267 |
+ --enable-libdrm |
268 |
+ --sysconfdir="${EPREFIX}"/etc/X11 |
269 |
+ --localstatedir="${EPREFIX}"/var |
270 |
+ --with-fontrootdir="${EPREFIX}"/usr/share/fonts |
271 |
+ --with-xkb-output="${EPREFIX}"/var/lib/xkb |
272 |
+ --disable-config-hal |
273 |
+ --disable-linux-acpi |
274 |
+ --without-dtrace |
275 |
+ --without-fop |
276 |
+ --with-os-vendor=Gentoo |
277 |
+ --with-sha1=libcrypto |
278 |
+ ) |
279 |
+ |
280 |
+ xorg-2_src_configure |
281 |
+} |
282 |
+ |
283 |
+src_install() { |
284 |
+ xorg-2_src_install |
285 |
+ |
286 |
+ server_based_install |
287 |
+ |
288 |
+ if ! use minimal && use xorg; then |
289 |
+ # Install xorg.conf.example into docs |
290 |
+ dodoc "${AUTOTOOLS_BUILD_DIR}"/hw/xfree86/xorg.conf.example |
291 |
+ fi |
292 |
+ |
293 |
+ newinitd "${FILESDIR}"/xdm-setup.initd-1 xdm-setup |
294 |
+ newinitd "${FILESDIR}"/xdm.initd-11 xdm |
295 |
+ newconfd "${FILESDIR}"/xdm.confd-4 xdm |
296 |
+ |
297 |
+ # install the @x11-module-rebuild set for Portage |
298 |
+ insinto /usr/share/portage/config/sets |
299 |
+ newins "${FILESDIR}"/xorg-sets.conf xorg.conf |
300 |
+} |
301 |
+ |
302 |
+pkg_postinst() { |
303 |
+ # sets up libGL and DRI2 symlinks if needed (ie, on a fresh install) |
304 |
+ eselect opengl set xorg-x11 --use-old |
305 |
+} |
306 |
+ |
307 |
+pkg_postrm() { |
308 |
+ # Get rid of module dir to ensure opengl-update works properly |
309 |
+ if [[ -z ${REPLACED_BY_VERSION} && -e ${EROOT}/usr/$(get_libdir)/xorg/modules ]]; then |
310 |
+ rm -rf "${EROOT}"/usr/$(get_libdir)/xorg/modules |
311 |
+ fi |
312 |
+} |
313 |
+ |
314 |
+server_based_install() { |
315 |
+ if ! use xorg; then |
316 |
+ rm "${ED}"/usr/share/man/man1/Xserver.1x \ |
317 |
+ "${ED}"/usr/$(get_libdir)/xserver/SecurityPolicy \ |
318 |
+ "${ED}"/usr/$(get_libdir)/pkgconfig/xorg-server.pc \ |
319 |
+ "${ED}"/usr/share/man/man1/Xserver.1x |
320 |
+ fi |
321 |
+} |