gnome-base/gnome-session: bump to 3.24.2, revert to Xorg default
[gentoo.git] / gnome-base / gnome-session / gnome-session-3.22.3.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_EAUTORECONF="yes"
6 inherit gnome2
7
8 DESCRIPTION="Gnome session manager"
9 HOMEPAGE="https://git.gnome.org/browse/gnome-session"
10
11 LICENSE="GPL-2 LGPL-2 FDL-1.1"
12 SLOT="0"
13 KEYWORDS="~alpha amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris"
14 IUSE="doc elibc_FreeBSD ipv6 systemd"
15
16 # x11-misc/xdg-user-dirs{,-gtk} are needed to create the various XDG_*_DIRs, and
17 # create .config/user-dirs.dirs which is read by glib to get G_USER_DIRECTORY_*
18 # xdg-user-dirs-update is run during login (see 10-user-dirs-update-gnome below).
19 # gdk-pixbuf used in the inhibit dialog
20 COMMON_DEPEND="
21         >=dev-libs/glib-2.46.0:2[dbus]
22         x11-libs/gdk-pixbuf:2
23         >=x11-libs/gtk+-3.18.0:3
24         >=dev-libs/json-glib-0.10
25         >=gnome-base/gnome-desktop-3.18:3=
26         elibc_FreeBSD? ( dev-libs/libexecinfo )
27
28         media-libs/mesa[egl,gles2]
29
30         media-libs/libepoxy
31         x11-libs/libSM
32         x11-libs/libICE
33         x11-libs/libXau
34         x11-libs/libX11
35         x11-libs/libXcomposite
36         x11-libs/libXext
37         x11-libs/libXrender
38         x11-libs/libXtst
39         x11-misc/xdg-user-dirs
40         x11-misc/xdg-user-dirs-gtk
41         x11-apps/xdpyinfo
42
43         systemd? ( >=sys-apps/systemd-183:0= )
44 "
45 # Pure-runtime deps from the session files should *NOT* be added here
46 # Otherwise, things like gdm pull in gnome-shell
47 # gnome-themes-standard is needed for the failwhale dialog themeing
48 # sys-apps/dbus[X] is needed for session management
49 RDEPEND="${COMMON_DEPEND}
50         gnome-base/gnome-settings-daemon
51         >=gnome-base/gsettings-desktop-schemas-0.1.7
52         x11-themes/adwaita-icon-theme
53         sys-apps/dbus[X]
54         !systemd? (
55                 sys-auth/consolekit
56                 >=dev-libs/dbus-glib-0.76
57         )
58 "
59 DEPEND="${COMMON_DEPEND}
60         dev-libs/libxslt
61         >=dev-util/intltool-0.40.6
62         >=sys-devel/gettext-0.10.40
63         virtual/pkgconfig
64         !<gnome-base/gdm-2.20.4
65         doc? (
66                 app-text/xmlto
67                 dev-libs/libxslt )
68         gnome-base/gnome-common
69 "
70 # gnome-common needed for eautoreconf
71 # gnome-base/gdm does not provide gnome.desktop anymore
72
73 PATCHES=(
74         # Make gnome wayland session launch inside a login shell for /etc/env.d and other stuff to work, bug 604110
75         "${FILESDIR}/${PV}-wayland-login-shell.patch"
76         # Restore Xorg as the default GNOME session instead of Wayland for the 3.22 release, bug 611146
77         "${FILESDIR}/${PV}-xorg-default.patch" # remove ewarn about this below when removing for 3.24
78         "${FILESDIR}/${PV}-xorg-default-translations.patch"
79 )
80
81 src_configure() {
82         # 1. Avoid automagic on old upower releases
83         # 2. xsltproc is always checked due to man configure
84         #    switch, even if USE=-doc
85         # 3. Disable old gconf support as other distributions did long time
86         #    ago
87         gnome2_src_configure \
88                 --disable-deprecation-flags \
89                 --disable-gconf \
90                 --enable-session-selector \
91                 $(use_enable doc docbook-docs) \
92                 $(use_enable ipv6) \
93                 $(use_enable systemd) \
94                 $(use_enable !systemd consolekit) \
95                 UPOWER_CFLAGS="" \
96                 UPOWER_LIBS=""
97                 # gnome-session-selector pre-generated man page is missing
98                 #$(usex !doc XSLTPROC=$(type -P true))
99 }
100
101 src_install() {
102         gnome2_src_install
103
104         dodir /etc/X11/Sessions
105         exeinto /etc/X11/Sessions
106         doexe "${FILESDIR}/Gnome"
107
108         insinto /usr/share/applications
109         newins "${FILESDIR}/defaults.list-r3" gnome-mimeapps.list
110
111         dodir /etc/X11/xinit/xinitrc.d/
112         exeinto /etc/X11/xinit/xinitrc.d/
113         newexe "${FILESDIR}/15-xdg-data-gnome-r1" 15-xdg-data-gnome
114
115         # This should be done here as discussed in bug #270852
116         newexe "${FILESDIR}/10-user-dirs-update-gnome-r1" 10-user-dirs-update-gnome
117
118         # Set XCURSOR_THEME from current dconf setting instead of installing
119         # default cursor symlink globally and affecting other DEs (bug #543488)
120         # https://bugzilla.gnome.org/show_bug.cgi?id=711703
121         newexe "${FILESDIR}/90-xcursor-theme-gnome" 90-xcursor-theme-gnome
122 }
123
124 pkg_postinst() {
125         gnome2_pkg_postinst
126
127         ewarn "The Gentoo GNOME team has decided to retain Xorg session default instead of"
128         ewarn "Wayland for GNOME 3.22 stable version, even if USE=wayland is set on applicable"
129         ewarn "packages. You can still choose the 'GNOME on Wayland' session explicitly, if"
130         ewarn "desired. GNOME 3.24 will default to Wayland again as upstream GNOME does, if"
131         ewarn "USE=wayland is used globally, but 'GNOME on Xorg' session will be a choice."
132
133         if ! has_version gnome-base/gdm && ! has_version x11-misc/sddm; then
134                 ewarn "If you use a custom .xinitrc for your X session,"
135                 ewarn "make sure that the commands in the xinitrc.d scripts are run."
136         fi
137 }