1 |
commit: f7cbaff73571787a03c54ceb8a7d1a2449ec341c |
2 |
Author: Mart Raudsepp <leio <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Feb 28 22:33:24 2019 +0000 |
4 |
Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Feb 28 22:37:50 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f7cbaff7 |
7 |
|
8 |
x11-wm/mutter: require gles2 for wayland, try to fix non-gles2 builds |
9 |
|
10 |
Native backend makes use of gles3 for some features, and I'm not sure if |
11 |
these gracefully degrade or not without gles3. So require gles2 with |
12 |
wayland (which is when we enable build of native backend), which also |
13 |
allows for a simpler hacky patch for fixing non-gles2 builds when system |
14 |
doesn't have USE=gles2 on mesa. |
15 |
I consider this quite ugly, but |
16 |
1) this is ~arch |
17 |
2) this will be better in the meson port in mutter-3.32 |
18 |
3) it hopefully works well enough anyways, sans potentially unnecessary |
19 |
mesa[gles2] dep and full gles2 cogl builds. |
20 |
People who mind the gles2 requirement are welcome to come up with |
21 |
something better. It should somehow express the feature dependency of |
22 |
this, even if just metadata.xml descriptions. |
23 |
|
24 |
Closes: https://bugs.gentoo.org/679074 |
25 |
Package-Manager: Portage-2.3.52, Repoman-2.3.12 |
26 |
Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org> |
27 |
|
28 |
x11-wm/mutter/files/3.28.3-no-gles2-fix.patch | 43 ++++++++ |
29 |
x11-wm/mutter/mutter-3.28.3-r1.ebuild | 152 ++++++++++++++++++++++++++ |
30 |
2 files changed, 195 insertions(+) |
31 |
|
32 |
diff --git a/x11-wm/mutter/files/3.28.3-no-gles2-fix.patch b/x11-wm/mutter/files/3.28.3-no-gles2-fix.patch |
33 |
new file mode 100644 |
34 |
index 00000000000..43bb05f5245 |
35 |
--- /dev/null |
36 |
+++ b/x11-wm/mutter/files/3.28.3-no-gles2-fix.patch |
37 |
@@ -0,0 +1,43 @@ |
38 |
+From 259544c4f4b47418885075c9531ce593c600401c Mon Sep 17 00:00:00 2001 |
39 |
+From: Mart Raudsepp <leio@g.o> |
40 |
+Date: Fri, 1 Mar 2019 00:02:47 +0200 |
41 |
+Subject: [PATCH] build: Fix build without gles headers |
42 |
+ |
43 |
+This is an ugly quick fix to hopefully fix non-wayland builds against |
44 |
+mesa[-gles2]. |
45 |
+It assumes gnome-shell package USE=wayland requires USE=gles2, which it |
46 |
+sort of does already at runtime already for hybrid graphics support, but |
47 |
+we ensure with REQUIRED_USE. |
48 |
+In meson upstream port for 3.32 this will be more properly conditional |
49 |
+on the gles2 option instead. |
50 |
+--- |
51 |
+ src/Makefile.am | 6 +++--- |
52 |
+ 1 file changed, 3 insertions(+), 3 deletions(-) |
53 |
+ |
54 |
+diff --git a/src/Makefile.am b/src/Makefile.am |
55 |
+index bcb3505c7..a68661b21 100644 |
56 |
+--- a/src/Makefile.am |
57 |
++++ b/src/Makefile.am |
58 |
+@@ -118,9 +118,6 @@ libmutter_@LIBMUTTER_API_VERSION@_la_SOURCES = \ |
59 |
+ backends/meta-egl.c \ |
60 |
+ backends/meta-egl.h \ |
61 |
+ backends/meta-egl-ext.h \ |
62 |
+- backends/meta-gles3.c \ |
63 |
+- backends/meta-gles3.h \ |
64 |
+- backends/meta-gles3-table.h \ |
65 |
+ backends/meta-gpu.c \ |
66 |
+ backends/meta-gpu.h \ |
67 |
+ backends/meta-display-config-shared.h \ |
68 |
+@@ -472,6 +469,9 @@ endif |
69 |
+ |
70 |
+ if HAVE_NATIVE_BACKEND |
71 |
+ libmutter_@LIBMUTTER_API_VERSION@_la_SOURCES += \ |
72 |
++ backends/meta-gles3.c \ |
73 |
++ backends/meta-gles3.h \ |
74 |
++ backends/meta-gles3-table.h \ |
75 |
+ backends/native/meta-backend-native.c \ |
76 |
+ backends/native/meta-backend-native.h \ |
77 |
+ backends/native/meta-backend-native-private.h \ |
78 |
+-- |
79 |
+2.17.0 |
80 |
+ |
81 |
|
82 |
diff --git a/x11-wm/mutter/mutter-3.28.3-r1.ebuild b/x11-wm/mutter/mutter-3.28.3-r1.ebuild |
83 |
new file mode 100644 |
84 |
index 00000000000..3a7b5381459 |
85 |
--- /dev/null |
86 |
+++ b/x11-wm/mutter/mutter-3.28.3-r1.ebuild |
87 |
@@ -0,0 +1,152 @@ |
88 |
+# Copyright 1999-2019 Gentoo Authors |
89 |
+# Distributed under the terms of the GNU General Public License v2 |
90 |
+ |
91 |
+EAPI=6 |
92 |
+GNOME2_EAUTORECONF="yes" |
93 |
+inherit gnome2 virtualx |
94 |
+ |
95 |
+DESCRIPTION="GNOME 3 compositing window manager based on Clutter" |
96 |
+HOMEPAGE="https://gitlab.gnome.org/GNOME/mutter/" |
97 |
+SRC_URI+=" https://dev.gentoo.org/~leio/distfiles/${P}-patchset.tar.xz" |
98 |
+ |
99 |
+LICENSE="GPL-2+" |
100 |
+SLOT="0/2" # 0/libmutter_api_version - ONLY gnome-shell (or anything using mutter-clutter-<api_version>.pc) should use the subslot |
101 |
+ |
102 |
+IUSE="debug elogind gles2 input_devices_wacom +introspection systemd test udev wayland" |
103 |
+# native backend requires gles3 for hybrid graphics blitting support and a logind provider |
104 |
+# gles2 may be avoidable, but probably not worth the effort before switching to meson; without it, it seems it'll have subtle lost features as well that isn't explained to user atm. |
105 |
+REQUIRED_USE=" |
106 |
+ wayland? ( |
107 |
+ ?? ( elogind systemd ) |
108 |
+ gles2 |
109 |
+ )" |
110 |
+ |
111 |
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86" |
112 |
+ |
113 |
+# libXi-1.7.4 or newer needed per: |
114 |
+# https://bugzilla.gnome.org/show_bug.cgi?id=738944 |
115 |
+# gl.pc package is required, which is only installed by mesa if glx is enabled; pre-emptively requiring USE=X on mesa, as hopefully eventually it'll support disabling glx for wayland-only systems |
116 |
+RDEPEND=" |
117 |
+ >=dev-libs/atk-2.5.3 |
118 |
+ >=x11-libs/gdk-pixbuf-2:2 |
119 |
+ >=dev-libs/json-glib-0.12.0 |
120 |
+ >=x11-libs/pango-1.30[introspection?] |
121 |
+ >=x11-libs/cairo-1.14[X] |
122 |
+ >=x11-libs/gtk+-3.19.8:3[X,introspection?] |
123 |
+ >=dev-libs/glib-2.53.2:2 |
124 |
+ >=media-libs/libcanberra-0.26[gtk3] |
125 |
+ >=x11-libs/startup-notification-0.7 |
126 |
+ >=x11-libs/libXcomposite-0.2 |
127 |
+ >=gnome-base/gsettings-desktop-schemas-3.21.4[introspection?] |
128 |
+ gnome-base/gnome-desktop:3= |
129 |
+ >sys-power/upower-0.99:= |
130 |
+ |
131 |
+ x11-libs/libICE |
132 |
+ x11-libs/libSM |
133 |
+ x11-libs/libX11 |
134 |
+ >=x11-libs/libXcomposite-0.4 |
135 |
+ x11-libs/libXcursor |
136 |
+ x11-libs/libXdamage |
137 |
+ x11-libs/libXext |
138 |
+ >=x11-libs/libXfixes-3 |
139 |
+ >=x11-libs/libXi-1.7.4 |
140 |
+ x11-libs/libXinerama |
141 |
+ >=x11-libs/libXrandr-1.5 |
142 |
+ x11-libs/libXrender |
143 |
+ x11-libs/libxcb |
144 |
+ x11-libs/libxkbfile |
145 |
+ >=x11-libs/libxkbcommon-0.4.3[X] |
146 |
+ x11-misc/xkeyboard-config |
147 |
+ |
148 |
+ gnome-extra/zenity |
149 |
+ media-libs/mesa[X(+),egl,gles2?] |
150 |
+ |
151 |
+ input_devices_wacom? ( >=dev-libs/libwacom-0.13 ) |
152 |
+ introspection? ( >=dev-libs/gobject-introspection-1.42:= ) |
153 |
+ udev? ( >=virtual/libgudev-232:= ) |
154 |
+ wayland? ( |
155 |
+ >=dev-libs/libinput-1.4 |
156 |
+ >=dev-libs/wayland-1.13.0 |
157 |
+ >=dev-libs/wayland-protocols-1.12 |
158 |
+ >=media-libs/mesa-10.3[egl,gbm,wayland] |
159 |
+ systemd? ( sys-apps/systemd ) |
160 |
+ elogind? ( sys-auth/elogind ) |
161 |
+ >=virtual/libgudev-232:= |
162 |
+ >=virtual/libudev-136:= |
163 |
+ x11-base/xorg-server[wayland] |
164 |
+ x11-libs/libdrm:= |
165 |
+ ) |
166 |
+" |
167 |
+DEPEND="${RDEPEND} |
168 |
+ dev-util/glib-utils |
169 |
+ >=sys-devel/gettext-0.19.6 |
170 |
+ virtual/pkgconfig |
171 |
+ x11-base/xorg-proto |
172 |
+ test? ( app-text/docbook-xml-dtd:4.5 ) |
173 |
+ wayland? ( >=sys-kernel/linux-headers-4.4 ) |
174 |
+" |
175 |
+ |
176 |
+PATCHES=( |
177 |
+ # Lots of patches from gnome-3-28 branch on top of 3.28.3 |
178 |
+ "${WORKDIR}"/patches/ |
179 |
+ # Hack to not fail USE="-wayland,-gles2" builds with no mesa[gles2] |
180 |
+ "${FILESDIR}"/${PV}-no-gles2-fix.patch |
181 |
+) |
182 |
+ |
183 |
+src_prepare() { |
184 |
+ # Disable building of noinst_PROGRAM for tests |
185 |
+ if ! use test; then |
186 |
+ sed -e '/^noinst_PROGRAMS/d' \ |
187 |
+ -i cogl/tests/conform/Makefile.{am,in} || die |
188 |
+ sed -e '/noinst_PROGRAMS += testboxes/d' \ |
189 |
+ -i src/Makefile-tests.am || die |
190 |
+ sed -e '/noinst_PROGRAMS/ s/testboxes$(EXEEXT)//' \ |
191 |
+ -i src/Makefile.in || die |
192 |
+ fi |
193 |
+ |
194 |
+ gnome2_src_prepare |
195 |
+ |
196 |
+ # Leave the damn CFLAGS alone |
197 |
+ sed -e 's/$CFLAGS -g/$CFLAGS /' \ |
198 |
+ -i clutter/configure || die |
199 |
+ sed -e 's/$CFLAGS -g -O0/$CFLAGS /' \ |
200 |
+ -i cogl/configure || die |
201 |
+ sed -e 's/$CFLAGS -g -O/$CFLAGS /' \ |
202 |
+ -i configure || die |
203 |
+} |
204 |
+ |
205 |
+src_configure() { |
206 |
+ # TODO: pipewire remote desktop support; --disable-remote-desktop actually enables it due to upstream autotools bug in 3.26.2 (omitted means disabled) |
207 |
+ # TODO: nvidia EGLDevice support |
208 |
+ # TODO: elogind vs systemd is automagic in 3.28.3 - if elogind is found, it's used instead of systemd; but not a huge problem as elogind package blocks systemd package |
209 |
+ # TODO: lack of --with-xwayland-grab-default-access-rules relies on default settings, but in Gentoo we might have some more packages we want to give Xgrab access (mostly virtual managers and remote desktops) |
210 |
+ # Prefer gl driver by default |
211 |
+ # GLX is forced by mutter but optional in clutter |
212 |
+ # xlib-egl-platform required by mutter x11 backend |
213 |
+ # native backend without wayland is useless |
214 |
+ gnome2_src_configure \ |
215 |
+ --disable-static \ |
216 |
+ --enable-compile-warnings=minimum \ |
217 |
+ --enable-gl \ |
218 |
+ --enable-glx \ |
219 |
+ --enable-sm \ |
220 |
+ --enable-startup-notification \ |
221 |
+ --enable-verbose-mode \ |
222 |
+ --enable-xlib-egl-platform \ |
223 |
+ --with-default-driver=gl \ |
224 |
+ --with-libcanberra \ |
225 |
+ $(usex debug --enable-debug=yes "") \ |
226 |
+ $(use_enable gles2) \ |
227 |
+ $(use_enable gles2 cogl-gles2) \ |
228 |
+ $(use_enable introspection) \ |
229 |
+ $(use_enable wayland) \ |
230 |
+ $(use_enable wayland kms-egl-platform) \ |
231 |
+ $(use_enable wayland native-backend) \ |
232 |
+ $(use_enable wayland wayland-egl-server) \ |
233 |
+ $(use_with input_devices_wacom libwacom) \ |
234 |
+ $(use_with udev gudev) |
235 |
+} |
236 |
+ |
237 |
+src_test() { |
238 |
+ virtx emake check |
239 |
+} |