1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 GNOME2_EAUTORECONF="yes"
8 DESCRIPTION="Gnome session manager"
9 HOMEPAGE="https://git.gnome.org/browse/gnome-session"
11 LICENSE="GPL-2 LGPL-2 FDL-1.1"
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"
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
21 >=dev-libs/glib-2.46.0:2[dbus]
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 )
28 media-libs/mesa[egl,gles2]
35 x11-libs/libXcomposite
39 x11-misc/xdg-user-dirs
40 x11-misc/xdg-user-dirs-gtk
43 systemd? ( >=sys-apps/systemd-183:0= )
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
56 >=dev-libs/dbus-glib-0.76
59 DEPEND="${COMMON_DEPEND}
61 >=dev-util/intltool-0.40.6
62 >=sys-devel/gettext-0.10.40
64 !<gnome-base/gdm-2.20.4
68 gnome-base/gnome-common
70 # gnome-common needed for eautoreconf
71 # gnome-base/gdm does not provide gnome.desktop anymore
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"
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
87 gnome2_src_configure \
88 --disable-deprecation-flags \
90 --enable-session-selector \
91 $(use_enable doc docbook-docs) \
93 $(use_enable systemd) \
94 $(use_enable !systemd consolekit) \
97 # gnome-session-selector pre-generated man page is missing
98 #$(usex !doc XSLTPROC=$(type -P true))
104 dodir /etc/X11/Sessions
105 exeinto /etc/X11/Sessions
106 doexe "${FILESDIR}/Gnome"
108 insinto /usr/share/applications
109 newins "${FILESDIR}/defaults.list-r3" gnome-mimeapps.list
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
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
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
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."
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."