1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python3_{6,7} )
7 inherit gnome.org gnome2-utils meson pax-utils python-single-r1 virtualx xdg
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"
13 LICENSE="GPL-2+ LGPL-2+"
15 IUSE="+bluetooth +browser-extension elogind gtk-doc +ibus +networkmanager systemd telepathy"
16 REQUIRED_USE="${PYTHON_REQUIRED_USE}
17 ?? ( elogind systemd )"
19 KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 x86"
21 # libXfixes-5.0 needed for pointer barriers and #include <X11/extensions/Xfixes.h>
23 # * gstreamer support is currently automagic
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:=
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
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
43 >=net-misc/networkmanager-1.10.4:=[introspection]
44 >=app-crypt/libsecret-0.18
46 systemd? ( >=sys-apps/systemd-31 )
47 elogind? ( >=sys-auth/elogind-237 )
49 >=app-accessibility/at-spi2-atk-2.5.3
50 x11-libs/gdk-pixbuf:2[introspection]
54 >=media-sound/pulseaudio-2[glib]
55 >=dev-libs/atk-2[introspection]
57 >=x11-libs/libXfixes-5.0
60 $(python_gen_cond_dep '
61 dev-python/pygobject:3[${PYTHON_MULTI_USEDEP}]
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
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
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]
89 >=gnome-base/gnome-session-2.91.91
90 >=gnome-base/gnome-settings-daemon-3.8.3
94 >=x11-themes/adwaita-icon-theme-3.26
97 net-misc/mobile-broadband-provider-info
98 sys-libs/timezone-data )
99 ibus? ( >=app-i18n/ibus-1.4.99[dconf(+),gtk,introspection] )
101 >=net-im/telepathy-logger-0.2.4[introspection]
102 >=net-libs/telepathy-glib-0.19[introspection] )
103 media-fonts/cantarell
105 # avoid circular dependency, see bug #546134
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 )
114 >=dev-util/gdbus-codegen-2.45.3
116 gtk-doc? ( >=dev-util/gtk-doc-1.17
117 app-text/docbook-xml-dtd:4.3 )
118 >=sys-devel/gettext-0.19.8
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
133 # Hack in correct python shebang
134 sed -e "s:python\.path():'/usr/bin/env ${EPYTHON}':" -i src/meson.build || die
139 $(meson_use bluetooth)
140 $(meson_use gtk-doc gtk_doc)
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
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}
162 gnome2_schemas_update
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."
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."
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"
188 gnome2_schemas_update