summaryrefslogtreecommitdiff
blob: 596726b1b7f8d5edbc1a407bfd10cc0a51ac5da5 (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
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/lxde-base/lxdm/lxdm-0.3.0-r3.ebuild,v 1.2 2012/05/04 05:50:38 jdhore Exp $

EAPI="2"

inherit eutils autotools

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

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

IUSE="+consolekit nls"

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

src_configure() {
	econf --with-x $(use_enable nls) || die "econf failed"
}

src_prepare() {
	# There is consolekit
	epatch "${FILESDIR}/${P}-pam_console-disable.patch"
	use consolekit || epatch "${FILESDIR}/${P}-consolekit-disable.patch"

	epatch "${FILESDIR}"/${P}-properly-load-session-settings-using-dmrc-entry-as-pointer-for-xsessions-dir-file.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_install() {
	emake DESTDIR="${D}" install || die
	dodoc AUTHORS README TODO || die
	# install xinitrc
	exeinto /etc/lxdm
	doexe "${FILESDIR}"/xinitrc || die
}

pkg_postinst() {
	echo
	elog "LXDM is in early stage of development."
	echo
}