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