summaryrefslogtreecommitdiff
blob: 568813b05fdec1e113a3c359a047a83edf5bf72f (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
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=6

inherit pam toolchain-funcs user

COMMIT="f2afd55704bfe0a2d66e6b270d247e9b8a7b1664"

DESCRIPTION="A console screen locker"
HOMEPAGE="https://github.com/WorMzy/vlock"
SRC_URI="https://github.com/WorMzy/vlock/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="alpha amd64 ~arm hppa ia64 ~mips ppc ppc64 sparc x86"
IUSE="pam test"

RDEPEND="
	!>=sys-apps/kbd-2.1.0[pam]
	pam? ( sys-libs/pam )"

DEPEND="
	${RDEPEND}
	test? ( dev-util/cunit )"

DOCS=( ChangeLog PLUGINS README README.X11 SECURITY STYLE TODO )

PATCHES=(
	"${FILESDIR}/${PN}-2.2.2-asneeded.patch"
	"${FILESDIR}/${PN}-2.2.2-test_process.patch"
)

pkg_setup() {
	enewgroup "${PN}"
}

src_configure() {
	local myconf="--enable-shadow"
	use pam && myconf="--enable-pam"

	# this package has handmade configure system which fails with econf...
	./configure \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--libdir=/usr/$(get_libdir) \
		${myconf} \
		CC="$(tc-getCC)" \
		LD="$(tc-getLD)" \
		CFLAGS="${CFLAGS} -pedantic -std=gnu99" \
		LDFLAGS="${LDFLAGS}" || die "configure failed"
}

src_install() {
	default
	use pam && pamd_mimic_system vlock auth
}