summaryrefslogtreecommitdiff
blob: de4c5a2c0beb05fc315acebf1f3eda8470ba0390 (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
68
69
70
71
72
73
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit l10n autotools systemd

DESCRIPTION="LXDE Display Manager"
HOMEPAGE="https://wiki.lxde.org/en/LXDM"
SRC_URI="mirror://sourceforge/lxde/${P}.tar.xz"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="amd64 arm ~arm64 ~ppc x86"

IUSE="debug elogind nls pam systemd"

DEPEND="
	x11-libs/libxcb
	x11-libs/gtk+:3
	pam? ( sys-libs/pam )"
# We only use the pam modules and not actually link to the code
RDEPEND="${DEPEND}
	elogind? ( sys-auth/elogind[pam] )
	systemd? ( sys-apps/systemd[pam] )
"
BDEPEND=">=dev-util/intltool-0.40
	virtual/pkgconfig
	nls? ( sys-devel/gettext )
"
DOCS=( AUTHORS README TODO )

REQUIRED_USE="?? ( elogind systemd ) elogind? ( pam ) systemd? ( pam )"

src_prepare() {
	# Upstream bug, tarball contains pre-made lxdm.conf
	rm "${S}"/data/lxdm.conf || die

	# Fix consolekit and selinux
	eapply "${FILESDIR}/${P}-pam.patch"
	# Apply all upstream fixes in git until 2016-11-11
	eapply "${FILESDIR}/lxdm-0.5.3-upstream-fixes.patch"
	eapply_user

	# this replaces the bootstrap/autogen script in most packages
	eautoreconf

	# process LINGUAS
	if use nls; then
		einfo "Running intltoolize ..."
		intltoolize --force --copy --automake || die
		strip-linguas -i "${S}/po" || die
	fi
}
src_configure() {
	econf	--enable-password \
		--with-x \
		--with-xconn=xcb \
		--with-systemdsystemunitdir=$(systemd_get_systemunitdir) \
		--disable-consolekit \
		--enable-gtk3 \
		$(use_enable nls) \
		$(use_enable debug) \
		$(use_with pam)
}

src_install() {
	default_src_install

	#Use Gentoo specific Xsession startup file
	exeinto /etc/${PN}
	doexe "${FILESDIR}"/Xsession
}