sys-process/glances: 3.1.4.1-r1 amd64 stable, bug #720368
[gentoo.git] / mate-extra / mate-screensaver / mate-screensaver-1.22.2.ebuild
1 # Copyright 1999-2020 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+ HPND LGPL-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/libXxf86vm
40         x11-libs/libxklavier
41         x11-libs/pango
42         virtual/libintl
43         consolekit? ( sys-auth/consolekit )
44         libnotify? ( >=x11-libs/libnotify-0.7:0 )
45         opengl? ( virtual/opengl )
46         pam? ( gnome-base/gnome-keyring sys-libs/pam )
47         !pam? ( kernel_linux? ( sys-apps/shadow ) )
48         elogind? ( sys-auth/elogind )
49         systemd? ( sys-apps/systemd:= )
50         !!<gnome-extra/gnome-screensaver-3"
51
52 RDEPEND="${COMMON_DEPEND}
53         >=mate-base/mate-session-manager-1.6"
54
55 DEPEND="${COMMON_DEPEND}
56         >=dev-util/intltool-0.50.1
57         sys-devel/gettext:*
58         x11-base/xorg-proto
59         virtual/pkgconfig:*"
60
61 src_configure() {
62         local myconf=(
63                 --enable-locking
64                 --with-kbd-layout-indicator
65                 --with-xf86gamma-ext
66                 --with-xscreensaverdir=/usr/share/xscreensaver/config
67                 --with-xscreensaverhackdir=/usr/$(get_libdir)/misc/xscreensaver
68                 $(use_with X x)
69                 $(use_with consolekit console-kit)
70                 $(use_with elogind)
71                 $(use_with libnotify)
72                 $(use_with opengl libgl)
73                 $(use_with systemd)
74                 $(use_enable debug)
75                 $(use_enable pam)
76         )
77
78         mate_src_configure "${myconf[@]}"
79 }
80
81 src_install() {
82         mate_src_install
83
84         # Install the conversion script in the documentation.
85         dodoc "${S}"/data/migrate-xscreensaver-config.sh
86         dodoc "${S}"/data/xscreensaver-config.xsl
87         dodoc "${FILESDIR}"/xss-conversion.txt
88
89         # Non PAM users will need this suid to read the password hashes.
90         # OpenPAM users will probably need this too when
91         # https://bugzilla.gnome.org/show_bug.cgi?id=370847
92         # is fixed.
93         if ! use pam ; then
94                 fperms u+s /usr/libexec/mate-screensaver-dialog
95         fi
96
97         readme.gentoo_create_doc
98 }
99
100 pkg_postinst() {
101         mate_pkg_postinst
102
103         if has_version "<x11-base/xorg-server-1.5.3-r4" ; then
104                 ewarn "You have a too old xorg-server installation. This will cause"
105                 ewarn "mate-screensaver to eat up your CPU. Please consider upgrading."
106                 echo
107         fi
108
109         if has_version "<x11-misc/xscreensaver-4.22-r2" ; then
110                 ewarn "You have xscreensaver installed, you probably want to disable it."
111                 ewarn "To prevent a duplicate screensaver entry in the menu, you need to"
112                 ewarn "build xscreensaver with -gnome in the USE flags."
113                 ewarn "echo \"x11-misc/xscreensaver -gnome\" >> /etc/portage/package.use"
114                 echo
115         fi
116
117         readme.gentoo_print_elog
118 }