x11-misc/mozo: Stabilize 1.22.2 for amd64,x86
[gentoo.git] / x11-misc / light-locker / light-locker-1.8.0-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit autotools gnome2-utils
7
8 DESCRIPTION="A simple locker using lightdm"
9 HOMEPAGE="https://github.com/the-cavalry/light-locker"
10 SRC_URI="https://github.com/the-cavalry/light-locker/releases/download/v${PV}/${P}.tar.bz2"
11
12 LICENSE="GPL-2 LGPL-2"
13 SLOT="0"
14 KEYWORDS="~amd64 ~x86"
15 IUSE="consolekit +dpms elogind gtk3 +screensaver systemd +upower"
16
17 BDEPEND="dev-lang/perl
18         dev-perl/XML-Parser
19         dev-util/intltool
20         sys-devel/gettext"
21 DEPEND="dev-libs/dbus-glib
22         dev-libs/glib
23         sys-apps/dbus
24         x11-libs/cairo
25         x11-libs/libX11
26         x11-libs/pango
27         x11-libs/libXxf86vm
28         consolekit? ( sys-auth/consolekit )
29         dpms? ( x11-libs/libXext )
30         elogind? ( sys-auth/elogind )
31         !gtk3? ( x11-libs/gtk+:2 )
32         gtk3? ( x11-libs/gtk+:3 )
33         screensaver? ( x11-libs/libXScrnSaver )
34         systemd? ( sys-apps/systemd )
35         upower? ( sys-power/upower )"
36 RDEPEND="${DEPEND}
37         x11-misc/lightdm"
38
39 REQUIRED_USE="?? ( consolekit elogind systemd )"
40
41 DOCS=( AUTHORS HACKING NEWS README )
42
43 PATCHES=(
44         "${FILESDIR}/${PN}-${PV}-elogind.patch"
45 )
46
47 src_prepare() {
48         default
49         # remove xdt-autogen specific macro (just like upstream do) as we need to autoreconf
50         sed -si -e "/XDT_I18N/d" configure.ac || die
51         eautoreconf
52 }
53
54 src_configure() {
55         local myeconfargs=(
56                 $(use_with consolekit console-kit)
57                 $(use_with dpms dpms-ext)
58                 $(use_with !gtk3 gtk2)
59                 $(use_with screensaver x)
60                 $(use_with screensaver mit-ext)
61                 $(use_with systemd)
62                 $(use_with elogind)
63                 $(use_with upower)
64         )
65         econf "${myeconfargs[@]}"
66 }
67
68 pkg_postinst() {
69         gnome2_schemas_update
70 }
71
72 pkg_postrm() {
73         gnome2_schemas_update
74 }