Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: gnome-base/gnome-shell/, gnome-base/gnome-shell/files/
Date: Fri, 24 Jun 2022 03:43:17
Message-Id: 1656042162.dea2c90c1aee7d012a467eeb937fc4a7ecae9237.sam@gentoo
1 commit: dea2c90c1aee7d012a467eeb937fc4a7ecae9237
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jun 24 03:42:30 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Fri Jun 24 03:42:42 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dea2c90c
7
8 gnome-base/gnome-shell: restore 42.1-r3 for Polkit fix
9
10 Bug: https://bugs.gentoo.org/844919
11 Bug: https://bugs.gentoo.org/849566
12 Fixes: eed2ee4b79e40099d84db0dde29dced1e3346bb6
13 Signed-off-by: Sam James <sam <AT> gentoo.org>
14
15 .../gnome-shell/files/42.1-polkit-g_autoptr.patch | 53 ++++++
16 gnome-base/gnome-shell/gnome-shell-42.1-r3.ebuild | 206 +++++++++++++++++++++
17 2 files changed, 259 insertions(+)
18
19 diff --git a/gnome-base/gnome-shell/files/42.1-polkit-g_autoptr.patch b/gnome-base/gnome-shell/files/42.1-polkit-g_autoptr.patch
20 new file mode 100644
21 index 000000000000..78d3de086260
22 --- /dev/null
23 +++ b/gnome-base/gnome-shell/files/42.1-polkit-g_autoptr.patch
24 @@ -0,0 +1,53 @@
25 +https://gitlab.gnome.org/GNOME/gnome-shell/-/commit/1d0a08b5e25fea7b0e792ec9798e68a7c5606a75
26 +https://bugs.gentoo.org/844919
27 +
28 +From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@×××××.org>
29 +Date: Tue, 17 May 2022 15:36:43 +0200
30 +Subject: [PATCH] build: Do not redefine polkit autocleanup
31 +
32 +PolkitAgent recently added autocleanup functions itself, so check
33 +for their existence at configure time and only define our own when
34 +they don't exist upstream.
35 +
36 +https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5490
37 +
38 +Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2296>
39 +--- a/config.h.meson
40 ++++ b/config.h.meson
41 +@@ -33,3 +33,6 @@
42 +
43 + /* Define if fdwalk is available in libc */
44 + #mesondefine HAVE_FDWALK
45 ++
46 ++/* Define if polkit defines autocleanup functions */
47 ++#mesondefine HAVE_POLKIT_AUTOCLEANUP
48 +--- a/meson.build
49 ++++ b/meson.build
50 +@@ -169,6 +169,13 @@ cdata.set('HAVE_FDWALK',
51 + cc.has_function('fdwalk')
52 + )
53 +
54 ++polkit_has_autocleanup = cc.compiles(
55 ++ '#define POLKIT_AGENT_I_KNOW_API_IS_SUBJECT_TO_CHANGE
56 ++ #include <polkitagent/polkitagent.h>
57 ++ void main(void) { g_autoptr(PolkitAgentListener) agent = NULL; }',
58 ++ dependencies: polkit_dep)
59 ++cdata.set('HAVE_POLKIT_AUTOCLEANUP', polkit_has_autocleanup)
60 ++
61 + buildtype = get_option('buildtype')
62 + if buildtype != 'plain'
63 + all_warnings = [
64 +--- a/src/shell-polkit-authentication-agent.h
65 ++++ b/src/shell-polkit-authentication-agent.h
66 +@@ -14,8 +14,10 @@
67 +
68 + G_BEGIN_DECLS
69 +
70 ++#ifndef HAVE_POLKIT_AUTOCLEANUP
71 + /* Polkit doesn't have g_autoptr support, thus we have to manually set the autoptr function here */
72 + G_DEFINE_AUTOPTR_CLEANUP_FUNC (PolkitAgentListener, g_object_unref)
73 ++#endif
74 +
75 + #define SHELL_TYPE_POLKIT_AUTHENTICATION_AGENT (shell_polkit_authentication_agent_get_type())
76 +
77 +GitLab
78
79 diff --git a/gnome-base/gnome-shell/gnome-shell-42.1-r3.ebuild b/gnome-base/gnome-shell/gnome-shell-42.1-r3.ebuild
80 new file mode 100644
81 index 000000000000..3bc4781371bb
82 --- /dev/null
83 +++ b/gnome-base/gnome-shell/gnome-shell-42.1-r3.ebuild
84 @@ -0,0 +1,206 @@
85 +# Copyright 1999-2022 Gentoo Authors
86 +# Distributed under the terms of the GNU General Public License v2
87 +
88 +EAPI=8
89 +PYTHON_COMPAT=( python3_{8..10} )
90 +
91 +inherit gnome.org gnome2-utils meson python-single-r1 virtualx xdg
92 +
93 +DESCRIPTION="Provides core UI functions for the GNOME desktop"
94 +HOMEPAGE="https://wiki.gnome.org/Projects/GnomeShell"
95 +
96 +LICENSE="GPL-2+ LGPL-2+"
97 +SLOT="0"
98 +IUSE="+bluetooth +browser-extension elogind gtk-doc +ibus +networkmanager systemd telepathy test"
99 +REQUIRED_USE="${PYTHON_REQUIRED_USE}
100 + ?? ( elogind systemd )"
101 +RESTRICT="!test? ( test )"
102 +
103 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
104 +
105 +# libXfixes-5.0 needed for pointer barriers and #include <X11/extensions/Xfixes.h>
106 +# FIXME:
107 +# * gstreamer/pipewire support is currently automagic
108 +DEPEND="
109 + >=gnome-extra/evolution-data-server-3.33.1:=
110 + >=app-crypt/gcr-3.7.5[introspection]
111 + >=dev-libs/glib-2.68:2
112 + >=dev-libs/gobject-introspection-1.49.1:=
113 + >=dev-libs/gjs-1.71.1
114 + >=x11-libs/gtk+-3.15.0:3[introspection]
115 + >=x11-wm/mutter-42.0:0/10[introspection,test?]
116 + >=sys-auth/polkit-0.120_p20220509[introspection]
117 + >=gnome-base/gsettings-desktop-schemas-42_beta[introspection]
118 + >=x11-libs/startup-notification-0.11
119 + >=app-i18n/ibus-1.5.19
120 + >=gnome-base/gnome-desktop-3.35.90:3=[introspection]
121 + bluetooth? ( net-wireless/gnome-bluetooth:3=[introspection] )
122 + >=media-libs/gstreamer-0.11.92:1.0
123 + media-libs/gst-plugins-base:1.0
124 + >=media-video/pipewire-0.3.0:=
125 + networkmanager? (
126 + >=net-misc/networkmanager-1.10.4:=[introspection]
127 + net-libs/libnma[introspection]
128 + >=app-crypt/libsecret-0.18
129 + dev-libs/dbus-glib )
130 + systemd? ( >=sys-apps/systemd-242
131 + >=gnome-base/gnome-desktop-3.34.2:3=[systemd] )
132 + elogind? ( >=sys-auth/elogind-237 )
133 +
134 + app-arch/gnome-autoar
135 + dev-libs/json-glib
136 +
137 + >=app-accessibility/at-spi2-atk-2.5.3
138 + x11-libs/gdk-pixbuf:2[introspection]
139 + dev-libs/libxml2:2
140 + x11-libs/libX11
141 +
142 + >=media-sound/pulseaudio-2[glib]
143 + >=dev-libs/atk-2[introspection]
144 + dev-libs/libical:=
145 + >=x11-libs/libXfixes-5.0
146 +
147 + gui-libs/gtk:4[introspection]
148 +
149 + ${PYTHON_DEPS}
150 + $(python_gen_cond_dep '
151 + dev-python/pygobject:3[${PYTHON_USEDEP}]
152 + ')
153 + media-libs/mesa[X(+)]
154 +"
155 +# Runtime-only deps are probably incomplete and approximate.
156 +# Introspection deps generated from inspection of the output of:
157 +# for i in `rg -INUo 'const(?s).*imports.gi' |cut -d= -f1 |cut -c7- |sort -u`; do echo $i ;done |cut -d, -f1 |sort -u
158 +# or
159 +# rg -INUo 'const(?s).*imports.gi' |cut -d= -f1 |cut -c7- | sed -e 's:[{}]::g' | awk '{$1=$1; print}' | awk -F',' '{$1=$1;print}' | tr ' ' '\n' | sort -u | sed -e 's/://g'
160 +# These will give a lot of unnecessary things due to greedy matching (TODO), and `(?s).*?` doesn't seem to work as desired.
161 +# Compare with `grep -rhI 'imports.gi.versions' |sort -u` for any SLOT requirements
162 +# Each block:
163 +# 1. Introspection stuff needed via imports.gi (those that build time check may be listed above already)
164 +# 2. gnome-session needed for shutdown/reboot/inhibitors/etc
165 +# 3. Control shell settings
166 +# 4. xdg-utils needed for xdg-open, used by extension tool
167 +# 5. adwaita-icon-theme needed for various icons & arrows (3.26 for new video-joined-displays-symbolic and co icons; review for 3.28+)
168 +# 6. mobile-broadband-provider-info, timezone-data for shell-mobile-providers.c # TODO: Review
169 +# 7. IBus is needed for nls integration
170 +# 8. Optional telepathy chat integration
171 +# 9. Cantarell font used in gnome-shell global CSS (if removing this for some reason, make sure it's pulled in somehow for non-meta users still too)
172 +# 10. xdg-desktop-portal-gtk for various integration, e.g. #764632
173 +# 11. TODO: semi-optional webkit-gtk[introspection] for captive portal helper
174 +RDEPEND="${DEPEND}
175 + >=sys-apps/accountsservice-0.6.14[introspection]
176 + app-accessibility/at-spi2-core:2[introspection]
177 + app-misc/geoclue[introspection]
178 + media-libs/graphene[introspection]
179 + >=dev-libs/libgweather-4.0.0:4[introspection]
180 + x11-libs/pango[introspection]
181 + net-libs/libsoup:2.4[introspection]
182 + >=sys-power/upower-0.99:=[introspection]
183 + gnome-base/librsvg:2[introspection]
184 +
185 + >=gnome-base/gnome-session-2.91.91
186 + >=gnome-base/gnome-settings-daemon-3.8.3
187 +
188 + x11-misc/xdg-utils
189 +
190 + >=x11-themes/adwaita-icon-theme-3.26
191 +
192 + networkmanager? (
193 + net-misc/mobile-broadband-provider-info
194 + sys-libs/timezone-data )
195 + ibus? ( >=app-i18n/ibus-1.5.26[gtk3,gtk4,introspection] )
196 + telepathy? (
197 + >=net-im/telepathy-logger-0.2.4[introspection]
198 + >=net-libs/telepathy-glib-0.19[introspection] )
199 + media-fonts/cantarell
200 +
201 + || ( sys-apps/xdg-desktop-portal-gnome <sys-apps/xdg-desktop-portal-gtk-1.14.0 )
202 +"
203 +# avoid circular dependency, see bug #546134
204 +PDEPEND="
205 + >=gnome-base/gdm-3.5[introspection(+)]
206 + >=gnome-base/gnome-control-center-3.26[bluetooth(+)?,networkmanager(+)?]
207 + browser-extension? ( gnome-extra/chrome-gnome-shell )
208 +"
209 +BDEPEND="
210 + dev-libs/libxslt
211 + >=dev-util/gdbus-codegen-2.45.3
212 + dev-util/glib-utils
213 + gtk-doc? ( >=dev-util/gtk-doc-1.17
214 + app-text/docbook-xml-dtd:4.5 )
215 + >=sys-devel/gettext-0.19.8
216 + virtual/pkgconfig
217 +"
218 +# These are not needed from tarballs, unless stylesheets or manpage get patched with patchset:
219 +# dev-lang/sassc
220 +# app-text/asciidoc
221 +
222 +PATCHES=(
223 + # Fix automagic gnome-bluetooth dep, bug #398145
224 + "${FILESDIR}"/42.0-optional-bluetooth.patch
225 + # Change favorites defaults, bug #479918
226 + "${FILESDIR}"/40.0-defaults.patch
227 +
228 + # Upstream backport, bug #844919
229 + "${FILESDIR}"/42.1-polkit-g_autoptr.patch
230 +)
231 +
232 +src_prepare() {
233 + default
234 + xdg_environment_reset
235 + # Hack in correct python shebang
236 + sed -e "s:python\.full_path():'/usr/bin/env ${EPYTHON}':" -i src/meson.build || die
237 +}
238 +
239 +src_configure() {
240 + local emesonargs=(
241 + $(meson_use bluetooth)
242 + -Dextensions_tool=true
243 + -Dextensions_app=true
244 + $(meson_use gtk-doc gtk_doc)
245 + -Dman=true
246 + $(meson_use test tests)
247 + $(meson_use networkmanager)
248 + $(meson_use systemd) # this controls journald integration and desktop file user services related property only as of 3.34.4
249 + # (structured logging and having gnome-shell launched apps use its own identifier instead of gnome-session)
250 + # suspend support is runtime optional via /run/systemd/seats presence and org.freedesktop.login1.Manager dbus interface; elogind should provide what's necessary
251 + -Dsoup2=true # libslot SLOT needs to match with what libgweather is using
252 + )
253 + meson_src_configure
254 +}
255 +
256 +src_test() {
257 + gnome2_environment_reset # Avoid dconf that looks at XDG_DATA_DIRS, which can sandbox fail if flatpak is installed
258 + virtx meson_src_test
259 +}
260 +
261 +pkg_postinst() {
262 + xdg_pkg_postinst
263 + gnome2_schemas_update
264 +
265 + if ! has_version 'media-libs/gst-plugins-good:1.0' || \
266 + ! has_version 'media-plugins/gst-plugins-vpx:1.0'; then
267 + ewarn "To make use of GNOME Shell's built-in screen recording utility,"
268 + ewarn "you need to either install media-libs/gst-plugins-good:1.0"
269 + ewarn "and media-plugins/gst-plugins-vpx:1.0, or use dconf-editor to change"
270 + ewarn "apps.gnome-shell.recorder/pipeline to what you want to use."
271 + fi
272 +
273 + if ! has_version "media-libs/mesa[llvm]"; then
274 + elog "llvmpipe is used as fallback when no 3D acceleration"
275 + elog "is available. You will need to enable llvm USE for"
276 + elog "media-libs/mesa if you do not have hardware 3D setup."
277 + fi
278 +
279 + # https://bugs.gentoo.org/show_bug.cgi?id=563084
280 + # TODO: Is this still the case after various fixed in 3.28 for detecting non-working KMS for wayland (to fall back to X)?
281 + if has_version "x11-drivers/nvidia-drivers[-kms]"; then
282 + ewarn "You will need to enable kms support in x11-drivers/nvidia-drivers,"
283 + ewarn "otherwise Gnome will fail to start"
284 + fi
285 +}
286 +
287 +pkg_postrm() {
288 + xdg_pkg_postrm
289 + gnome2_schemas_update
290 +}