gnome-base/gnome-session: amd64 stable, bug 566378
[gentoo.git] / gnome-base / gnome-session / gnome-session-3.18.1.2.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI="5"
6 GCONF_DEBUG="yes"
7
8 inherit gnome2
9
10 DESCRIPTION="Gnome session manager"
11 HOMEPAGE="https://git.gnome.org/browse/gnome-session"
12
13 LICENSE="GPL-2 LGPL-2 FDL-1.1"
14 SLOT="0"
15 KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x86-solaris"
16 IUSE="doc elibc_FreeBSD ipv6 systemd"
17
18 # x11-misc/xdg-user-dirs{,-gtk} are needed to create the various XDG_*_DIRs, and
19 # create .config/user-dirs.dirs which is read by glib to get G_USER_DIRECTORY_*
20 # xdg-user-dirs-update is run during login (see 10-user-dirs-update-gnome below).
21 # gdk-pixbuf used in the inhibit dialog
22 COMMON_DEPEND="
23         >=dev-libs/glib-2.46.0:2[dbus]
24         x11-libs/gdk-pixbuf:2
25         >=x11-libs/gtk+-3.18.0:3
26         >=dev-libs/json-glib-0.10
27         >=gnome-base/gnome-desktop-3.18:3=
28         elibc_FreeBSD? ( dev-libs/libexecinfo )
29
30         virtual/opengl
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/gnome-themes-standard-2.91.92
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-lang/perl-5
61         >=sys-devel/gettext-0.10.40
62         dev-libs/libxslt
63         >=dev-util/intltool-0.40.6
64         virtual/pkgconfig
65         !<gnome-base/gdm-2.20.4
66         doc? (
67                 app-text/xmlto
68                 dev-libs/libxslt )
69 "
70 # gnome-common needed for eautoreconf
71 # gnome-base/gdm does not provide gnome.desktop anymore
72
73 src_configure() {
74         # 1. Avoid automagic on old upower releases
75         # 2. xsltproc is always checked due to man configure
76         #    switch, even if USE=-doc
77         # 3. Disable old gconf support as other distributions did long time
78         #    ago
79         gnome2_src_configure \
80                 --disable-deprecation-flags \
81                 --disable-gconf \
82                 --enable-session-selector \
83                 $(use_enable doc docbook-docs) \
84                 $(use_enable ipv6) \
85                 $(use_enable systemd) \
86                 $(use_enable !systemd consolekit) \
87                 UPOWER_CFLAGS="" \
88                 UPOWER_LIBS=""
89                 # gnome-session-selector pre-generated man page is missing
90                 #$(usex !doc XSLTPROC=$(type -P true))
91 }
92
93 src_install() {
94         gnome2_src_install
95
96         dodir /etc/X11/Sessions
97         exeinto /etc/X11/Sessions
98         doexe "${FILESDIR}/Gnome"
99
100         insinto /usr/share/applications
101         newins "${FILESDIR}/defaults.list-r3" gnome-mimeapps.list
102
103         dodir /etc/X11/xinit/xinitrc.d/
104         exeinto /etc/X11/xinit/xinitrc.d/
105         newexe "${FILESDIR}/15-xdg-data-gnome-r1" 15-xdg-data-gnome
106
107         # This should be done here as discussed in bug #270852
108         newexe "${FILESDIR}/10-user-dirs-update-gnome-r1" 10-user-dirs-update-gnome
109
110         # Set XCURSOR_THEME from current dconf setting instead of installing
111         # default cursor symlink globally and affecting other DEs (bug #543488)
112         # https://bugzilla.gnome.org/show_bug.cgi?id=711703
113         newexe "${FILESDIR}/90-xcursor-theme-gnome" 90-xcursor-theme-gnome
114 }
115
116 pkg_postinst() {
117         gnome2_pkg_postinst
118
119         if ! has_version gnome-base/gdm && ! has_version kde-base/kdm; then
120                 ewarn "If you use a custom .xinitrc for your X session,"
121                 ewarn "make sure that the commands in the xinitrc.d scripts are run."
122         fi
123 }