summaryrefslogtreecommitdiff
blob: 697ea88745401c4ee82fda4de306a9615e86b0b0 (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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI="2"

WANT_AUTOMAKE="1.12" #493996
inherit eutils autotools systemd

DESCRIPTION="LXDE Display Manager"
HOMEPAGE="http://lxde.org"
SRC_URI="mirror://sourceforge/lxde/${P}.tar.gz"

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

IUSE="consolekit debug gtk3 nls pam"

RDEPEND="consolekit? ( sys-auth/consolekit )
	x11-libs/libxcb
	gtk3? ( x11-libs/gtk+:3 )
	!gtk3? ( x11-libs/gtk+:2 )
	nls? ( sys-devel/gettext )
	pam? ( virtual/pam )"
DEPEND="${RDEPEND}
	>=dev-util/intltool-0.40
	virtual/pkgconfig"

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

	# There is consolekit
	epatch "${FILESDIR}/${P}-pam_console-disable.patch"
	# Fix null pointer dereference, backported from git
	epatch "${FILESDIR}/${P}-git-fix-null-pointer-deref.patch"

	epatch "${FILESDIR}"/${P}-configure-add-pam.patch

	# 403999
	epatch "${FILESDIR}"/${P}-missing-pam-defines.patch

	# 412025
	epatch "${FILESDIR}"/${P}-event-check.patch

	# 393329 Selinux support
	epatch "${FILESDIR}"/${P}-selinux-support.patch

	# See https://bugs.launchpad.net/ubuntu/+source/lxdm/+bug/922363
	epatch "${FILESDIR}/${P}-fix-pam-100-cpu.patch"

	# Optional Consolekit support. bug #443666
	epatch "${FILESDIR}"/${P}-optional-consolekit.patch

	# 469512
	epatch "${FILESDIR}"/${P}-fix-optional-pam.patch

	# 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 \
		$(use_enable consolekit) \
		$(use_enable gtk3) \
		$(use_enable nls) \
		$(use_enable debug) \
		$(use_with pam)
}

src_install() {
	emake DESTDIR="${D}" install || die
	dodoc AUTHORS README TODO || die
	systemd_dounit "${FILESDIR}"/${PN}.service
}

pkg_postinst() {
	echo
	elog "Take into consideration that LXDM is in the early stages of development!"
	echo
}