gnome-base/gnome-settings-daemon: remove old
[gentoo.git] / gnome-base / gnome-shell / gnome-shell-3.22.3-r2.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 GNOME2_LA_PUNT="yes"
6 GNOME2_EAUTORECONF="yes"
7 PYTHON_COMPAT=( python{3_4,3_5} )
8
9 inherit gnome2 multilib pax-utils python-r1 systemd
10
11 DESCRIPTION="Provides core UI functions for the GNOME 3 desktop"
12 HOMEPAGE="https://wiki.gnome.org/Projects/GnomeShell"
13
14 LICENSE="GPL-2+ LGPL-2+"
15 SLOT="0"
16 IUSE="+bluetooth +browser-extension +ibus +networkmanager nsplugin -openrc-force"
17 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
18
19 KEYWORDS="amd64 ~ia64 x86"
20
21 # libXfixes-5.0 needed for pointer barriers
22 # FIXME:
23 #  * gstreamer support is currently automagic
24 COMMON_DEPEND="
25         >=app-accessibility/at-spi2-atk-2.5.3
26         >=dev-libs/atk-2[introspection]
27         >=app-crypt/gcr-3.7.5[introspection]
28         >=dev-libs/glib-2.45.3:2[dbus]
29         >=dev-libs/gjs-1.39
30         >=dev-libs/gobject-introspection-1.49.1:=
31         dev-libs/libical:=
32         >=x11-libs/gtk+-3.15.0:3[introspection]
33         >=dev-libs/libcroco-0.6.8:0.6
34         >=gnome-base/gnome-desktop-3.7.90:3=[introspection]
35         >=gnome-base/gsettings-desktop-schemas-3.21.3
36         >=gnome-extra/evolution-data-server-3.17.2:=
37         >=media-libs/gstreamer-0.11.92:1.0
38         >=net-im/telepathy-logger-0.2.4[introspection]
39         >=net-libs/telepathy-glib-0.19[introspection]
40         >=sys-auth/polkit-0.100[introspection]
41         >=x11-libs/libXfixes-5.0
42         x11-libs/libXtst
43         >=x11-wm/mutter-3.22.1[introspection]
44         >=x11-libs/startup-notification-0.11
45
46         ${PYTHON_DEPS}
47         dev-python/pygobject:3[${PYTHON_USEDEP}]
48
49         dev-libs/dbus-glib
50         dev-libs/libxml2:2
51         media-libs/libcanberra[gtk3]
52         media-libs/mesa
53         >=media-sound/pulseaudio-2
54         >=net-libs/libsoup-2.40:2.4[introspection]
55         x11-libs/libX11
56         x11-libs/gdk-pixbuf:2[introspection]
57
58         x11-apps/mesa-progs
59
60         bluetooth? ( >=net-wireless/gnome-bluetooth-3.9[introspection] )
61         networkmanager? (
62                 app-crypt/libsecret
63                 >=gnome-extra/nm-applet-0.9.8
64                 >=net-misc/networkmanager-0.9.8:=[introspection] )
65         nsplugin? ( >=dev-libs/json-glib-0.13.2 )
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 is needed for gnome-session-quit
73 # 3. Control shell settings
74 # 4. Systemd needed for suspending support
75 # 5. xdg-utils needed for xdg-open, used by extension tool
76 # 6. adwaita-icon-theme and dejavu font neeed for various icons & arrows
77 # 7. mobile-broadband-provider-info, timezone-data for shell-mobile-providers.c
78 # 8. IBus is needed for nls integration
79 RDEPEND="${COMMON_DEPEND}
80         app-accessibility/at-spi2-core:2[introspection]
81         >=app-accessibility/caribou-0.4.8
82         dev-libs/libgweather:2[introspection]
83         >=sys-apps/accountsservice-0.6.14[introspection]
84         >=sys-power/upower-0.99:=[introspection]
85         x11-libs/pango[introspection]
86
87         >=gnome-base/gnome-session-2.91.91
88         >=gnome-base/gnome-settings-daemon-3.8.3
89
90         !openrc-force? ( >=sys-apps/systemd-31 )
91
92         x11-misc/xdg-utils
93
94         media-fonts/dejavu
95         >=x11-themes/adwaita-icon-theme-3.19.90
96
97         networkmanager? (
98                 net-misc/mobile-broadband-provider-info
99                 sys-libs/timezone-data )
100         ibus? ( >=app-i18n/ibus-1.4.99[dconf(+),gtk,introspection] )
101 "
102 # avoid circular dependency, see bug #546134
103 PDEPEND="
104         >=gnome-base/gdm-3.5[introspection]
105         >=gnome-base/gnome-control-center-3.8.3[bluetooth(+)?,networkmanager(+)?]
106         browser-extension? ( gnome-extra/chrome-gnome-shell )
107 "
108 DEPEND="${COMMON_DEPEND}
109         dev-libs/libxslt
110         >=dev-util/gdbus-codegen-2.45.3
111         >=dev-util/gtk-doc-am-1.17
112         gnome-base/gnome-common
113         sys-devel/autoconf-archive
114         >=sys-devel/gettext-0.19.6
115         virtual/pkgconfig
116 "
117
118 PATCHES=(
119         # Change favorites defaults, bug #479918
120         "${FILESDIR}"/${PN}-3.22.0-defaults.patch
121         # Fix automagic gnome-bluetooth dep, bug #398145
122         "${FILESDIR}"/${PN}-3.12-bluetooth-flag.patch
123         # Add missing path to libmutter-clutter when building .gir, bug #597842
124         "${FILESDIR}"/${PN}-3.22.0-gir-build-fix.patch
125         # Little bug when user has toggled version validation in the session, bug #616698
126         "${FILESDIR}"/${PV}-CVE-2017-8288.patch
127 )
128
129 src_configure() {
130         # Do not error out on warnings
131         gnome2_src_configure \
132                 --enable-man \
133                 $(use_enable !openrc-force systemd) \
134                 $(use_with bluetooth) \
135                 $(use_enable networkmanager) \
136                 $(use_enable nsplugin browser-plugin) \
137                 BROWSER_PLUGIN_DIR="${EPREFIX}"/usr/$(get_libdir)/nsbrowser/plugins
138 }
139
140 src_install() {
141         gnome2_src_install
142         python_replicate_script "${ED}/usr/bin/gnome-shell-extension-tool"
143         python_replicate_script "${ED}/usr/bin/gnome-shell-perf-tool"
144
145         # Required for gnome-shell on hardened/PaX, bug #398941
146         # Future-proof for >=spidermonkey-1.8.7 following polkit's example
147         if has_version '<dev-lang/spidermonkey-1.8.7'; then
148                 pax-mark mr "${ED}usr/bin/gnome-shell"{,-extension-prefs}
149         elif has_version '>=dev-lang/spidermonkey-1.8.7[jit]'; then
150                 pax-mark m "${ED}usr/bin/gnome-shell"{,-extension-prefs}
151         # Required for gnome-shell on hardened/PaX #457146 and #457194
152         # PaX EMUTRAMP need to be on
153         elif has_version '>=dev-libs/libffi-3.0.13[pax_kernel]'; then
154                 pax-mark E "${ED}usr/bin/gnome-shell"{,-extension-prefs}
155         else
156                 pax-mark m "${ED}usr/bin/gnome-shell"{,-extension-prefs}
157         fi
158 }
159
160 pkg_postinst() {
161         gnome2_pkg_postinst
162
163         if ! has_version 'media-libs/gst-plugins-good:1.0' || \
164            ! has_version 'media-plugins/gst-plugins-vpx:1.0'; then
165                 ewarn "To make use of GNOME Shell's built-in screen recording utility,"
166                 ewarn "you need to either install media-libs/gst-plugins-good:1.0"
167                 ewarn "and media-plugins/gst-plugins-vpx:1.0, or use dconf-editor to change"
168                 ewarn "apps.gnome-shell.recorder/pipeline to what you want to use."
169         fi
170
171         if ! has_version "media-libs/mesa[llvm]"; then
172                 elog "llvmpipe is used as fallback when no 3D acceleration"
173                 elog "is available. You will need to enable llvm USE for"
174                 elog "media-libs/mesa."
175         fi
176
177         # https://bugs.gentoo.org/show_bug.cgi?id=563084
178         if has_version "x11-drivers/nvidia-drivers[-kms]"; then
179                 ewarn "You will need to enable kms support in x11-drivers/nvidia-drivers,"
180                 ewarn "otherwise Gnome will fail to start"
181         fi
182
183         if ! systemd_is_booted; then
184                 ewarn "${PN} needs Systemd to be *running* for working"
185                 ewarn "properly. Please follow this guide to migrate:"
186                 ewarn "https://wiki.gentoo.org/wiki/Systemd"
187         fi
188
189         if use openrc-force; then
190                 ewarn "You are enabling 'openrc-force' USE flag to skip systemd requirement,"
191                 ewarn "this can lead to unexpected problems and is not supported neither by"
192                 ewarn "upstream neither by Gnome Gentoo maintainers. If you suffer any problem,"
193                 ewarn "you will need to disable this USE flag system wide and retest before"
194                 ewarn "opening any bug report."
195         fi
196 }