1 |
commit: 0850b6be2e2af915701fc80b2d2c6e1892c074e8 |
2 |
Author: Matthew S. Turnbull <sparky <AT> bluefang-logic <DOT> com> |
3 |
AuthorDate: Sun Feb 27 20:02:24 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Feb 27 23:49:55 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0850b6be |
7 |
|
8 |
gnome-extra/cinnamon: Meson fixes |
9 |
|
10 |
Closes: https://bugs.gentoo.org/833861 |
11 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
12 |
Signed-off-by: Matthew S. Turnbull <sparky <AT> bluefang-logic.com> |
13 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
14 |
|
15 |
gnome-extra/cinnamon/cinnamon-5.2.7-r2.ebuild | 186 +++++++++++++++++++++ |
16 |
.../files/cinnamon-5.2.7-meson-0.61-fix.patch | 41 +++++ |
17 |
.../cinnamon-5.2.7-revert-meson-0.60-fix.patch | 55 ++++++ |
18 |
3 files changed, 282 insertions(+) |
19 |
|
20 |
diff --git a/gnome-extra/cinnamon/cinnamon-5.2.7-r2.ebuild b/gnome-extra/cinnamon/cinnamon-5.2.7-r2.ebuild |
21 |
new file mode 100644 |
22 |
index 000000000000..5237a3b90b2a |
23 |
--- /dev/null |
24 |
+++ b/gnome-extra/cinnamon/cinnamon-5.2.7-r2.ebuild |
25 |
@@ -0,0 +1,186 @@ |
26 |
+# Copyright 1999-2022 Gentoo Authors |
27 |
+# Distributed under the terms of the GNU General Public License v2 |
28 |
+ |
29 |
+EAPI=7 |
30 |
+ |
31 |
+PYTHON_COMPAT=( python3_{7,8,9,10} ) |
32 |
+PYTHON_REQ_USE="xml" |
33 |
+ |
34 |
+inherit meson gnome2-utils pax-utils python-single-r1 xdg |
35 |
+ |
36 |
+DESCRIPTION="A fork of GNOME Shell with layout similar to GNOME 2" |
37 |
+HOMEPAGE="https://projects.linuxmint.com/cinnamon/ https://github.com/linuxmint/cinnamon" |
38 |
+SRC_URI="https://github.com/linuxmint/cinnamon/archive/${PV}.tar.gz -> ${P}.tar.gz" |
39 |
+ |
40 |
+LICENSE="GPL-2+" |
41 |
+SLOT="0" |
42 |
+IUSE="+eds +gstreamer gtk-doc +nls +networkmanager" |
43 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
44 |
+KEYWORDS="~amd64 ~arm64 ~riscv ~x86" |
45 |
+ |
46 |
+DEPEND=" |
47 |
+ ${PYTHON_DEPS} |
48 |
+ app-accessibility/at-spi2-atk:2 |
49 |
+ >=dev-libs/glib-2.52.0:2[dbus] |
50 |
+ >=dev-libs/gobject-introspection-1.29.15:= |
51 |
+ dev-libs/libxml2:2 |
52 |
+ >=gnome-extra/cinnamon-desktop-5.2:0= |
53 |
+ >=gnome-extra/cinnamon-menus-5.2 |
54 |
+ >=gnome-extra/cjs-5.2[cairo] |
55 |
+ net-libs/libsoup:2.4[introspection] |
56 |
+ sys-apps/dbus |
57 |
+ >=sys-auth/polkit-0.100[introspection] |
58 |
+ virtual/opengl |
59 |
+ x11-libs/gdk-pixbuf:2[introspection] |
60 |
+ >=x11-libs/gtk+-3.12.0:3[introspection] |
61 |
+ >=x11-libs/libnotify-0.7.3:0=[introspection] |
62 |
+ x11-libs/libX11 |
63 |
+ >=x11-libs/libXfixes-5.0 |
64 |
+ x11-libs/pango[introspection] |
65 |
+ >=x11-libs/startup-notification-0.11 |
66 |
+ >=x11-wm/muffin-5.2[introspection] |
67 |
+ |
68 |
+ eds? ( |
69 |
+ gnome-extra/evolution-data-server |
70 |
+ ) |
71 |
+ gstreamer? ( |
72 |
+ media-libs/gst-plugins-base:1.0 |
73 |
+ media-libs/gstreamer:1.0 |
74 |
+ ) |
75 |
+ networkmanager? ( |
76 |
+ net-misc/networkmanager[introspection] |
77 |
+ ) |
78 |
+" |
79 |
+# caribou used by onscreen keyboard |
80 |
+# libtimezonemap used by datetime settings |
81 |
+# iso-flag-png (unpackaged) used by keyboard layout settings |
82 |
+RDEPEND=" |
83 |
+ ${DEPEND} |
84 |
+ >=app-accessibility/caribou-0.3 |
85 |
+ dev-libs/keybinder:3[introspection] |
86 |
+ dev-libs/libtimezonemap |
87 |
+ $(python_gen_cond_dep ' |
88 |
+ dev-python/dbus-python[${PYTHON_USEDEP}] |
89 |
+ dev-python/distro[${PYTHON_USEDEP}] |
90 |
+ dev-python/pexpect[${PYTHON_USEDEP}] |
91 |
+ dev-python/pillow[${PYTHON_USEDEP}] |
92 |
+ dev-python/pycairo[${PYTHON_USEDEP}] |
93 |
+ dev-python/pygobject:3[${PYTHON_USEDEP}] |
94 |
+ dev-python/pyinotify[${PYTHON_USEDEP}] |
95 |
+ dev-python/pypam[${PYTHON_USEDEP}] |
96 |
+ dev-python/pytz[${PYTHON_USEDEP}] |
97 |
+ dev-python/requests[${PYTHON_USEDEP}] |
98 |
+ dev-python/setproctitle[${PYTHON_USEDEP}] |
99 |
+ dev-python/tinycss2[${PYTHON_USEDEP}] |
100 |
+ >=dev-python/python3-xapp-2.2.1-r1[${PYTHON_USEDEP}] |
101 |
+ ') |
102 |
+ >=gnome-base/dconf-0.4.1 |
103 |
+ >=gnome-base/gsettings-desktop-schemas-2.91.91 |
104 |
+ >=gnome-base/libgnomekbd-2.91.4 |
105 |
+ >=gnome-extra/cinnamon-control-center-5.2[networkmanager=] |
106 |
+ >=gnome-extra/cinnamon-screensaver-5.2 |
107 |
+ >=gnome-extra/cinnamon-session-5.2 |
108 |
+ >=gnome-extra/cinnamon-settings-daemon-5.2 |
109 |
+ >=gnome-extra/nemo-5.2 |
110 |
+ gnome-extra/polkit-gnome |
111 |
+ net-misc/wget |
112 |
+ sys-apps/accountsservice[introspection] |
113 |
+ sys-power/upower[introspection] |
114 |
+ >=x11-libs/xapp-2.2.8[introspection] |
115 |
+ x11-misc/xdg-utils |
116 |
+ x11-themes/adwaita-icon-theme |
117 |
+ x11-themes/gnome-themes-standard |
118 |
+ |
119 |
+ nls? ( |
120 |
+ >=gnome-extra/cinnamon-translations-5.2 |
121 |
+ ) |
122 |
+" |
123 |
+BDEPEND=" |
124 |
+ >=dev-util/intltool-0.40 |
125 |
+ >=sys-devel/gettext-0.17 |
126 |
+ virtual/pkgconfig |
127 |
+ |
128 |
+ gtk-doc? ( dev-util/gtk-doc ) |
129 |
+" |
130 |
+ |
131 |
+PATCHES=( |
132 |
+ # Fix backgrounds path as cinnamon doesn't provide them |
133 |
+ # https://github.com/linuxmint/Cinnamon/issues/3575 |
134 |
+ "${FILESDIR}"/${PN}-3.8.0-gnome-background-compatibility.patch |
135 |
+ |
136 |
+ # Use wheel group instead of sudo (from Fedora/Arch) |
137 |
+ # https://github.com/linuxmint/Cinnamon/issues/3576 |
138 |
+ "${FILESDIR}"/${PN}-3.6.6-wheel-sudo.patch |
139 |
+ |
140 |
+ # Make evolution-data-server integration optional |
141 |
+ "${FILESDIR}"/${PN}-5.2.7-eds-detection.patch |
142 |
+ |
143 |
+ # Meson fixes |
144 |
+ "${FILESDIR}"/${PN}-5.2.7-revert-meson-0.60-fix.patch |
145 |
+ "${FILESDIR}"/${PN}-5.2.7-meson-0.61-fix.patch |
146 |
+) |
147 |
+ |
148 |
+src_prepare() { |
149 |
+ xdg_src_prepare |
150 |
+ |
151 |
+ # Add polkit agent to required components |
152 |
+ # https://github.com/linuxmint/Cinnamon/issues/3579 |
153 |
+ sed -i "s/'REQUIRED', '/&polkit-cinnamon-authentication-agent-1;/" meson.build || die |
154 |
+ |
155 |
+ # shebang fixing craziness |
156 |
+ local p |
157 |
+ for p in $(grep -rl '#!.*python3' || die); do |
158 |
+ python_fix_shebang "${p}" |
159 |
+ done |
160 |
+} |
161 |
+ |
162 |
+src_configure() { |
163 |
+ local emesonargs=( |
164 |
+ $(meson_use gstreamer build_recorder) |
165 |
+ $(meson_use gtk-doc docs) |
166 |
+ -Ddisable_networkmanager=$(usex networkmanager false true) |
167 |
+ -Dpy3modules_dir="$(python_get_sitedir)" |
168 |
+ ) |
169 |
+ meson_src_configure |
170 |
+} |
171 |
+ |
172 |
+src_install() { |
173 |
+ meson_src_install |
174 |
+ |
175 |
+ python_optimize "${D}$(python_get_sitedir)" |
176 |
+ python_optimize "${ED}"/usr/share/cinnamon/ |
177 |
+ |
178 |
+ # Required for gnome-shell on hardened/PaX, bug #398941 |
179 |
+ pax-mark mr "${ED}"/usr/bin/cinnamon |
180 |
+ |
181 |
+ # Doesn't exist on Gentoo, causing this to be a dead symlink |
182 |
+ rm "${ED}/etc/xdg/menus/cinnamon-applications-merged" || die |
183 |
+ |
184 |
+ # Ensure authentication-agent is started, bug #523958 |
185 |
+ # https://github.com/linuxmint/Cinnamon/issues/3579 |
186 |
+ insinto /etc/xdg/autostart/ |
187 |
+ doins "${FILESDIR}"/polkit-cinnamon-authentication-agent-1.desktop |
188 |
+} |
189 |
+ |
190 |
+pkg_postinst() { |
191 |
+ xdg_pkg_postinst |
192 |
+ gnome2_schemas_update |
193 |
+ |
194 |
+ if use gstreamer; then |
195 |
+ if ! has_version 'media-libs/gst-plugins-good:1.0' || \ |
196 |
+ ! has_version 'media-plugins/gst-plugins-vpx:1.0'; then |
197 |
+ ewarn "To make use of Cinnamon's built-in screen recording utility," |
198 |
+ ewarn "you need to either install media-libs/gst-plugins-good:1.0" |
199 |
+ ewarn "and media-plugins/gst-plugins-vpx:1.0, or use dconf-editor to change" |
200 |
+ ewarn "org.cinnamon.recorder/pipeline to what you want to use." |
201 |
+ fi |
202 |
+ else |
203 |
+ ewarn "Cinnamon's built-in screen recording utility is not installed" |
204 |
+ ewarn "because gstreamer support is disabled." |
205 |
+ fi |
206 |
+} |
207 |
+ |
208 |
+pkg_postrm() { |
209 |
+ xdg_pkg_postinst |
210 |
+ gnome2_schemas_update |
211 |
+} |
212 |
|
213 |
diff --git a/gnome-extra/cinnamon/files/cinnamon-5.2.7-meson-0.61-fix.patch b/gnome-extra/cinnamon/files/cinnamon-5.2.7-meson-0.61-fix.patch |
214 |
new file mode 100644 |
215 |
index 000000000000..3645221cc7a3 |
216 |
--- /dev/null |
217 |
+++ b/gnome-extra/cinnamon/files/cinnamon-5.2.7-meson-0.61-fix.patch |
218 |
@@ -0,0 +1,41 @@ |
219 |
+https://github.com/linuxmint/cinnamon/commit/9ccce54c29f7c78404e8819d7be7a051efff4df1 |
220 |
+ |
221 |
+From 9ccce54c29f7c78404e8819d7be7a051efff4df1 Mon Sep 17 00:00:00 2001 |
222 |
+From: Eli Schwartz <eschwartz@×××××××××.org> |
223 |
+Date: Thu, 3 Feb 2022 09:09:24 -0500 |
224 |
+Subject: [PATCH] gtkdoc: remove dependencies on custom target files (#10606) |
225 |
+ |
226 |
+Sadly, the `dependencies` kwarg does not actually do what it seems to be |
227 |
+trying to be used for, here. It is for listing dependency or library |
228 |
+objects whose compiler flags should be added to gtkdoc-scangobj. |
229 |
+ |
230 |
+It will not actually add ninja target dependencies. The similar kwarg in |
231 |
+other meson functions (e.g. genmarshal and compile_schemas) that *do* |
232 |
+allow adding target dependencies, is `depend_files`. |
233 |
+ |
234 |
+Older versions of meson simply did nothing in an if/elif/elif block |
235 |
+where these custom_targets never matched anything, and were thus |
236 |
+silently ignored. |
237 |
+ |
238 |
+Meson 0.61 type-validates the arguments and rejects CustomTarget as |
239 |
+invalid: |
240 |
+ |
241 |
+``` |
242 |
+docs/reference/cinnamon-js/meson.build:11:6: ERROR: gnome.gtkdoc keyword argument 'dependencies' was of type array[CustomTarget] but should have been array[Dependency | SharedLibrary | StaticLibrary] |
243 |
+``` |
244 |
+--- |
245 |
+ docs/reference/cinnamon-js/meson.build | 1 - |
246 |
+ 1 file changed, 1 deletion(-) |
247 |
+ |
248 |
+diff --git a/docs/reference/cinnamon-js/meson.build b/docs/reference/cinnamon-js/meson.build |
249 |
+index 7c96c875a0..66a5e156eb 100644 |
250 |
+--- a/docs/reference/cinnamon-js/meson.build |
251 |
++++ b/docs/reference/cinnamon-js/meson.build |
252 |
+@@ -12,7 +12,6 @@ gnome.gtkdoc( |
253 |
+ 'cinnamon-js', |
254 |
+ mode: 'xml', |
255 |
+ main_xml: 'cinnamon-js-docs.sgml', |
256 |
+- dependencies: parts_files, |
257 |
+ src_dir: meson.current_build_dir(), |
258 |
+ install: true, |
259 |
+ ) |
260 |
|
261 |
diff --git a/gnome-extra/cinnamon/files/cinnamon-5.2.7-revert-meson-0.60-fix.patch b/gnome-extra/cinnamon/files/cinnamon-5.2.7-revert-meson-0.60-fix.patch |
262 |
new file mode 100644 |
263 |
index 000000000000..aa5503517ec7 |
264 |
--- /dev/null |
265 |
+++ b/gnome-extra/cinnamon/files/cinnamon-5.2.7-revert-meson-0.60-fix.patch |
266 |
@@ -0,0 +1,55 @@ |
267 |
+https://github.com/linuxmint/cinnamon/commit/aac7baf119dc48b685aefb3438e5ba3e61c8cb09 |
268 |
+ |
269 |
+From aac7baf119dc48b685aefb3438e5ba3e61c8cb09 Mon Sep 17 00:00:00 2001 |
270 |
+From: Eli Schwartz <eschwartz@×××××××××.org> |
271 |
+Date: Thu, 3 Feb 2022 09:11:39 -0500 |
272 |
+Subject: [PATCH] Revert "build: disable gir install via list to pacify meson |
273 |
+ >= 0.60.2 (#10489)" (#10596) |
274 |
+ |
275 |
+This reverts commit 8fc2df08b40aa3e1958ed2fde853c50676d8cf48. |
276 |
+ |
277 |
+This commit was wrong, because it tried to work around a bug in a single |
278 |
+version of meson by using something that isn't, wasn't, and won't be a |
279 |
+valid value. |
280 |
+ |
281 |
+The fixed version of meson 0.60.x has been out for a while now, which |
282 |
+once again accepts `false`, and 0.61.0 also accepts `false` but was |
283 |
+known at the time of this workaround to not work in meson-git master |
284 |
+(now meson 0.61.0). |
285 |
+ |
286 |
+Using `false` is acceptable and the failure to accept it has been |
287 |
+qualified as a meson regression. Using `[false]` is just... trying to |
288 |
+fuzz meson with random objects until you get something that slips its |
289 |
+way through the argument checker and produces desired effects on the |
290 |
+python implementation level. |
291 |
+--- |
292 |
+ src/meson.build | 2 +- |
293 |
+ src/st/meson.build | 2 +- |
294 |
+ 2 files changed, 2 insertions(+), 2 deletions(-) |
295 |
+ |
296 |
+diff --git a/src/meson.build b/src/meson.build |
297 |
+index 7999c0a67b..34b130d50f 100644 |
298 |
+--- a/src/meson.build |
299 |
++++ b/src/meson.build |
300 |
+@@ -196,7 +196,7 @@ cinnamon_gir = gnome.generate_gir( |
301 |
+ includes: cinnamon_gir_includes, |
302 |
+ install: true, |
303 |
+ install_dir_typelib: pkglibdir, |
304 |
+- install_dir_gir: [false], |
305 |
++ install_dir_gir: false, |
306 |
+ extra_args: [ |
307 |
+ '-DST_COMPILATION', |
308 |
+ '--quiet', |
309 |
+diff --git a/src/st/meson.build b/src/st/meson.build |
310 |
+index d299727d06..ec7d7b30a1 100644 |
311 |
+--- a/src/st/meson.build |
312 |
++++ b/src/st/meson.build |
313 |
+@@ -213,7 +213,7 @@ st_gir = gnome.generate_gir( |
314 |
+ includes: st_gir_includes, |
315 |
+ install: true, |
316 |
+ install_dir_typelib: pkglibdir, |
317 |
+- install_dir_gir: [false], |
318 |
++ install_dir_gir: false, |
319 |
+ extra_args: [ |
320 |
+ '-DST_COMPILATION', |
321 |
+ '--quiet', |