summaryrefslogtreecommitdiff
path: root/x11-misc/xsecurelock/xsecurelock-1.9.0.ebuild
blob: 8b008fec8e01b3a8a7fa41319d3f132f2fada99e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit autotools

DESCRIPTION="X11 screen lock utility with security in mind"
HOMEPAGE="https://github.com/google/xsecurelock"
SRC_URI="https://github.com/google/xsecurelock/releases/download/v${PV}/${P}.tar.gz"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"
IUSE="mplayer mpv xscreensaver"

DEPEND="
	dev-libs/libbsd
	media-libs/fontconfig
	sys-libs/pam
	x11-libs/libX11
	x11-libs/libXScrnSaver
	x11-libs/libXcomposite
	x11-libs/libXext
	x11-libs/libXfixes
	x11-libs/libXft
	x11-libs/libXmu
	x11-libs/libXrandr
	mplayer? ( media-video/mplayer )
	mpv? ( media-video/mpv )
	xscreensaver? ( x11-misc/xscreensaver )
"
RDEPEND="${DEPEND}
	x11-base/xorg-proto
"
BDEPEND="virtual/pkgconfig"

src_prepare() {
	default
	eautoreconf
}

src_configure() {
	local myeconfargs=(
		--prefix="${EPREFIX}"/usr
		--with-default-auth-module=auth_x11
		--with-default-authproto-module=authproto_pam
		--without-htpasswd
		--without-pamtester
		--without-pandoc
		--with-pam-service-name=system-auth
	)
	use mplayer || myeconfargs+=( --without-mplayer )
	use mpv || myeconfargs+=( --without-mpv )
	if use xscreensaver; then
		myeconfargs+=(
			--with-default-saver-module=saver_xscreensaver
			--with-xscreensaver="${EPREFIX}"/usr/$(get_libdir)/misc/xscreensaver
		)
	else
		myeconfargs+=(
			--with-default-saver-module=saver_blank
			--without-xscreensaver
		)
	fi
	econf "${myeconfargs[@]}"
}