gnome-base/nautilus: bump to 3.34.3, drop USE=packagekit
[gentoo.git] / gnome-base / gnome-shell / gnome-shell-3.34.4.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 PYTHON_COMPAT=( python3_{6,7,8} )
6
7 inherit gnome.org gnome2-utils meson pax-utils python-single-r1 virtualx xdg
8
9 DESCRIPTION="Provides core UI functions for the GNOME 3 desktop"
10 HOMEPAGE="https://wiki.gnome.org/Projects/GnomeShell"
11 SRC_URI+=" https://dev.gentoo.org/~leio/distfiles/${P}-patchset.tar.xz"
12
13 LICENSE="GPL-2+ LGPL-2+"
14 SLOT="0"
15 IUSE="+bluetooth +browser-extension elogind gtk-doc +ibus +networkmanager systemd telepathy"
16 REQUIRED_USE="${PYTHON_REQUIRED_USE}
17         ?? ( elogind systemd )"
18
19 KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
20
21 # libXfixes-5.0 needed for pointer barriers and #include <X11/extensions/Xfixes.h>
22 # FIXME:
23 #  * gstreamer support is currently automagic
24 DEPEND="
25         >=dev-libs/libcroco-0.6.8:0.6
26         >=gnome-extra/evolution-data-server-3.33.1:=
27         >=app-crypt/gcr-3.7.5[introspection]
28         >=dev-libs/glib-2.57.2:2
29         >=dev-libs/gobject-introspection-1.49.1:=
30         >=dev-libs/gjs-1.57.3
31         >=x11-libs/gtk+-3.15.0:3[introspection]
32         >=x11-wm/mutter-3.34.0:0/5[introspection]
33         >=sys-auth/polkit-0.100[introspection]
34         >=gnome-base/gsettings-desktop-schemas-3.33.1
35         >=x11-libs/startup-notification-0.11
36         >=app-i18n/ibus-1.5.2
37         >=gnome-base/gnome-desktop-3.32:3=[introspection]
38         bluetooth? ( >=net-wireless/gnome-bluetooth-3.9[introspection] )
39         >=media-libs/gstreamer-0.11.92:1.0
40         media-libs/gst-plugins-base:1.0
41         networkmanager? (
42                 >=net-misc/networkmanager-1.10.4:=[introspection]
43                 >=app-crypt/libsecret-0.18
44                 dev-libs/dbus-glib )
45         systemd? ( >=sys-apps/systemd-31
46                 >=gnome-base/gnome-desktop-3.34.2:3=[systemd] )
47         elogind? ( >=sys-auth/elogind-237 )
48         app-arch/gnome-autoar
49         dev-libs/json-glib
50
51         >=app-accessibility/at-spi2-atk-2.5.3
52         x11-libs/gdk-pixbuf:2[introspection]
53         dev-libs/libxml2:2
54         x11-libs/libX11
55
56         >=media-sound/pulseaudio-2[glib]
57         >=dev-libs/atk-2[introspection]
58         dev-libs/libical:=
59         >=x11-libs/libXfixes-5.0
60
61         ${PYTHON_DEPS}
62         $(python_gen_cond_dep '
63                 dev-python/pygobject:3[${PYTHON_MULTI_USEDEP}]
64         ')
65         media-libs/mesa[X(+)]
66 "
67 # Runtime-only deps are probably incomplete and approximate.
68 # Introspection deps generated using:
69 #  grep -roe "imports.gi.*" gnome-shell-* | cut -f2 -d: | sort | uniq
70 # Each block:
71 # 1. Introspection stuff needed via imports.gi.*
72 # 2. gnome-session needed for shutdown/reboot/inhibitors/etc
73 # 3. Control shell settings
74 # 4. logind interface needed for suspending support
75 # 5. xdg-utils needed for xdg-open, used by extension tool
76 # 6. adwaita-icon-theme needed for various icons & arrows (3.26 for new video-joined-displays-symbolic and co icons; review for 3.28+)
77 # 7. mobile-broadband-provider-info, timezone-data for shell-mobile-providers.c  # TODO: Review
78 # 8. IBus is needed for nls integration
79 # 9. Optional telepathy chat integration
80 # 10. 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)
81 # 11. TODO: semi-optional webkit-gtk[introspection] for captive portal helper
82 RDEPEND="${DEPEND}
83         >=sys-apps/accountsservice-0.6.14[introspection]
84         app-accessibility/at-spi2-core:2[introspection]
85         app-misc/geoclue[introspection]
86         >=dev-libs/libgweather-3.26:2[introspection]
87         >=sys-power/upower-0.99:=[introspection]
88         x11-libs/pango[introspection]
89         gnome-base/librsvg:2[introspection]
90
91         >=gnome-base/gnome-session-2.91.91
92         >=gnome-base/gnome-settings-daemon-3.8.3
93
94         x11-misc/xdg-utils
95
96         >=x11-themes/adwaita-icon-theme-3.26
97
98         networkmanager? (
99                 net-misc/mobile-broadband-provider-info
100                 sys-libs/timezone-data )
101         ibus? ( >=app-i18n/ibus-1.4.99[dconf(+),gtk,introspection] )
102         telepathy? (
103                 >=net-im/telepathy-logger-0.2.4[introspection]
104                 >=net-libs/telepathy-glib-0.19[introspection] )
105         media-fonts/cantarell
106 "
107 # avoid circular dependency, see bug #546134
108 PDEPEND="
109         >=gnome-base/gdm-3.5[introspection]
110         >=gnome-base/gnome-control-center-3.26[bluetooth(+)?,networkmanager(+)?]
111         browser-extension? ( gnome-extra/chrome-gnome-shell )
112 "
113 BDEPEND="
114         dev-lang/sassc
115         dev-libs/libxslt
116         app-text/asciidoc
117         >=dev-util/gdbus-codegen-2.45.3
118         dev-util/glib-utils
119         gtk-doc? ( >=dev-util/gtk-doc-1.17
120                 app-text/docbook-xml-dtd:4.3 )
121         >=sys-devel/gettext-0.19.8
122         virtual/pkgconfig
123 "
124
125 PATCHES=(
126         # Patches from gnome-3-34 branch on top of 3.34.4
127         "${WORKDIR}"/patches/
128         # Fix automagic gnome-bluetooth dep, bug #398145
129         "${FILESDIR}"/3.34-optional-bluetooth.patch
130         # Change favorites defaults, bug #479918
131         "${FILESDIR}"/3.28.3-defaults.patch
132 )
133
134 src_prepare() {
135         xdg_src_prepare
136         # Hack in correct python shebang
137         sed -e "s:python\.path():'/usr/bin/env ${EPYTHON}':" -i src/meson.build || die
138 }
139
140 src_configure() {
141         local emesonargs=(
142                 $(meson_use bluetooth)
143                 -Dextensions_tool=true
144                 $(meson_use gtk-doc gtk_doc)
145                 -Dman=true
146                 $(meson_use networkmanager)
147                 $(meson_use systemd) # this controls journald integration and desktop file user services related property only as of 3.34.4
148                 # (structured logging and having gnome-shell launched apps use its own identifier instead of gnome-session)
149                 # suspend support is runtime optional via /run/systemd/seats presence and org.freedesktop.login1.Manager dbus interface; elogind should provide what's necessary
150         )
151         meson_src_configure
152 }
153
154 src_install() {
155         meson_src_install
156
157         # Required for gnome-shell on hardened/PaX, bug #398941; FIXME: Is this still relevant?
158         pax-mark m "${ED}/usr/bin/gnome-shell"{,-extension-prefs}
159 }
160
161 src_test() {
162         virtx meson_src_test
163 }
164
165 pkg_postinst() {
166         xdg_pkg_postinst
167         gnome2_schemas_update
168
169         if ! has_version 'media-libs/gst-plugins-good:1.0' || \
170            ! has_version 'media-plugins/gst-plugins-vpx:1.0'; then
171                 ewarn "To make use of GNOME Shell's built-in screen recording utility,"
172                 ewarn "you need to either install media-libs/gst-plugins-good:1.0"
173                 ewarn "and media-plugins/gst-plugins-vpx:1.0, or use dconf-editor to change"
174                 ewarn "apps.gnome-shell.recorder/pipeline to what you want to use."
175         fi
176
177         if ! has_version "media-libs/mesa[llvm]"; then
178                 elog "llvmpipe is used as fallback when no 3D acceleration"
179                 elog "is available. You will need to enable llvm USE for"
180                 elog "media-libs/mesa if you do not have hardware 3D setup."
181         fi
182
183         # https://bugs.gentoo.org/show_bug.cgi?id=563084
184         # TODO: Is this still the case after various fixed in 3.28 for detecting non-working KMS for wayland (to fall back to X)?
185         if has_version "x11-drivers/nvidia-drivers[-kms]"; then
186                 ewarn "You will need to enable kms support in x11-drivers/nvidia-drivers,"
187                 ewarn "otherwise Gnome will fail to start"
188         fi
189 }
190
191 pkg_postrm() {
192         xdg_pkg_postrm
193         gnome2_schemas_update
194 }