mate-extra/mate-user-guide: Bump to 1.22.3
[gentoo.git] / mate-extra / mate-screensaver / mate-screensaver-1.22.1.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit mate readme.gentoo-r1
7
8 if [[ ${PV} != 9999 ]]; then
9         KEYWORDS="amd64 ~arm ~arm64 x86"
10 fi
11
12 DESCRIPTION="Replaces xscreensaver, integrating with the MATE desktop"
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 IUSE="X debug consolekit elogind kernel_linux libnotify opengl pam systemd"
17 REQUIRED_USE="?? ( elogind systemd )"
18
19 DOC_CONTENTS="
20         Information for converting screensavers is located in
21         /usr/share/doc/${PF}/xss-conversion.txt*
22 "
23
24 COMMON_DEPEND="
25         >=dev-libs/dbus-glib-0.71:0
26         >=dev-libs/glib-2.50:2
27         gnome-base/dconf
28         >=mate-base/libmatekbd-1.17.0
29         >=mate-base/mate-desktop-1.17.0
30         >=mate-base/mate-menus-1.21.0
31         >=sys-apps/dbus-0.30
32         >=x11-libs/gdk-pixbuf-2.14:2
33         >=x11-libs/libX11-1
34         x11-libs/cairo
35         >=x11-libs/gtk+-3.22:3
36         x11-libs/libXext
37         x11-libs/libXrandr
38         x11-libs/libXScrnSaver
39         x11-libs/libXxf86misc
40         x11-libs/libXxf86vm
41         x11-libs/libxklavier
42         x11-libs/pango
43         virtual/libintl
44         consolekit? ( sys-auth/consolekit )
45         libnotify? ( >=x11-libs/libnotify-0.7:0 )
46         opengl? ( virtual/opengl )
47         pam? ( gnome-base/gnome-keyring sys-libs/pam )
48         !pam? ( kernel_linux? ( sys-apps/shadow ) )
49         elogind? ( sys-auth/elogind )
50         systemd? ( sys-apps/systemd:= )
51         !!<gnome-extra/gnome-screensaver-3"
52
53 RDEPEND="${COMMON_DEPEND}
54         >=mate-base/mate-session-manager-1.6"
55
56 DEPEND="${COMMON_DEPEND}
57         >=dev-util/intltool-0.50.1
58         sys-devel/gettext:*
59         x11-base/xorg-proto
60         virtual/pkgconfig:*"
61
62 src_configure() {
63         local myconf=(
64                 --enable-locking
65                 --with-kbd-layout-indicator
66                 --with-xf86gamma-ext
67                 --with-xscreensaverdir=/usr/share/xscreensaver/config
68                 --with-xscreensaverhackdir=/usr/$(get_libdir)/misc/xscreensaver
69                 $(use_with X x)
70                 $(use_with consolekit console-kit)
71                 $(use_with elogind)
72                 $(use_with libnotify)
73                 $(use_with opengl libgl)
74                 $(use_with systemd)
75                 $(use_enable debug)
76                 $(use_enable pam)
77         )
78
79         mate_src_configure "${myconf[@]}"
80 }
81
82 src_install() {
83         mate_src_install
84
85         # Install the conversion script in the documentation.
86         dodoc "${S}"/data/migrate-xscreensaver-config.sh
87         dodoc "${S}"/data/xscreensaver-config.xsl
88         dodoc "${FILESDIR}"/xss-conversion.txt
89
90         # Non PAM users will need this suid to read the password hashes.
91         # OpenPAM users will probably need this too when
92         # https://bugzilla.gnome.org/show_bug.cgi?id=370847
93         # is fixed.
94         if ! use pam ; then
95                 fperms u+s /usr/libexec/mate-screensaver-dialog
96         fi
97
98         readme.gentoo_create_doc
99 }
100
101 pkg_postinst() {
102         mate_pkg_postinst
103
104         if has_version "<x11-base/xorg-server-1.5.3-r4" ; then
105                 ewarn "You have a too old xorg-server installation. This will cause"
106                 ewarn "mate-screensaver to eat up your CPU. Please consider upgrading."
107                 echo
108         fi
109
110         if has_version "<x11-misc/xscreensaver-4.22-r2" ; then
111                 ewarn "You have xscreensaver installed, you probably want to disable it."
112                 ewarn "To prevent a duplicate screensaver entry in the menu, you need to"
113                 ewarn "build xscreensaver with -gnome in the USE flags."
114                 ewarn "echo \"x11-misc/xscreensaver -gnome\" >> /etc/portage/package.use"
115                 echo
116         fi
117
118         readme.gentoo_print_elog
119 }