1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 inherit gnome.org gnome2-utils meson xdg
7 DESCRIPTION="Gnome session manager"
8 HOMEPAGE="https://gitlab.gnome.org/GNOME/gnome-session"
12 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris"
13 IUSE="consolekit doc systemd"
16 >=dev-libs/glib-2.46.0:2
17 >=x11-libs/gtk+-3.18.0:3
21 >=gnome-base/gnome-desktop-3.18:3=
22 >=dev-libs/json-glib-0.10
23 media-libs/mesa[egl,gles2]
25 x11-libs/libXcomposite
27 systemd? ( >=sys-apps/systemd-183:0= )
28 consolekit? ( >=dev-libs/dbus-glib-0.76 )
31 # Pure-runtime deps from the session files should *NOT* be added here
32 # Otherwise, things like gdm pull in gnome-shell.
33 # gnome-settings-daemon is assumed to be >=3.27.90, but this is about
34 # removed components, so no need to strictly require it (older just
35 # won't have those daemons loaded by gnome-session).
36 # x11-misc/xdg-user-dirs{,-gtk} are needed to create the various XDG_*_DIRs, and
37 # create .config/user-dirs.dirs which is read by glib to get G_USER_DIRECTORY_*
38 # xdg-user-dirs-update is run during login (see 10-user-dirs-update-gnome below).
39 # sys-apps/dbus[X] is needed for session management.
40 # Our 90-xcursor-theme-gnome reads a setting from gsettings-desktop-schemas.
41 RDEPEND="${COMMON_DEPEND}
42 >=gnome-base/gnome-settings-daemon-3.23.2
43 >=gnome-base/gsettings-desktop-schemas-0.1.7
45 consolekit? ( sys-auth/consolekit )
47 x11-misc/xdg-user-dirs
48 x11-misc/xdg-user-dirs-gtk
50 DEPEND="${COMMON_DEPEND}
52 dev-util/gdbus-codegen
53 >=sys-devel/gettext-0.19.8
57 app-text/docbook-xml-dtd:4.1.2 )
62 # Install USE=doc in $PF if enabled
63 sed -i -e "s:meson\.project_name(), 'dbus':'${PF}', 'dbus':" doc/dbus/meson.build || die
68 -Ddeprecation_flags=false
69 -Dsession_selector=true # gnome-custom-session
71 $(meson_use systemd systemd_journal)
72 $(meson_use consolekit)
73 $(meson_use doc docbook)
82 dodir /etc/X11/Sessions
83 exeinto /etc/X11/Sessions
84 doexe "${FILESDIR}/Gnome"
86 insinto /usr/share/applications
87 newins "${FILESDIR}/defaults.list-r4" gnome-mimeapps.list
89 dodir /etc/X11/xinit/xinitrc.d/
90 exeinto /etc/X11/xinit/xinitrc.d/
91 newexe "${FILESDIR}/15-xdg-data-gnome-r1" 15-xdg-data-gnome
93 # This should be done here as discussed in bug #270852
94 newexe "${FILESDIR}/10-user-dirs-update-gnome-r1" 10-user-dirs-update-gnome
96 # Set XCURSOR_THEME from current dconf setting instead of installing
97 # default cursor symlink globally and affecting other DEs (bug #543488)
98 # https://bugzilla.gnome.org/show_bug.cgi?id=711703
99 newexe "${FILESDIR}/90-xcursor-theme-gnome" 90-xcursor-theme-gnome
104 gnome2_schemas_update
106 if ! has_version gnome-base/gdm && ! has_version x11-misc/sddm; then
107 ewarn "If you use a custom .xinitrc for your X session,"
108 ewarn "make sure that the commands in the xinitrc.d scripts are run."
111 if ! use systemd && ! use consolekit; then
112 ewarn "You are building without systemd and/or consolekit support."
113 ewarn "gnome-session won't be able to correctly track and manage your session."
119 gnome2_schemas_update