summaryrefslogtreecommitdiff
blob: 0c2f8f7ccae19d6a190973f1e47f1660234d913b (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
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/x11-misc/tint2/tint2-0.10_beta1.ebuild,v 1.1 2010/05/17 13:51:07 idl0r Exp $

EAPI="2"

inherit eutils autotools

MY_P="${PN}-${PV/_/-}"

DESCRIPTION="A lightweight panel/taskbar"
HOMEPAGE="http://code.google.com/p/tint2/"
SRC_URI="http://tint2.googlecode.com/files/${MY_P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="battery examples tint2conf"

COMMON_DEPEND="dev-libs/glib:2
	x11-libs/cairo
	x11-libs/pango
	x11-libs/libX11
	x11-libs/libXinerama
	x11-libs/libXdamage
	x11-libs/libXcomposite
	x11-libs/libXrender
	x11-libs/libXrandr
	media-libs/imlib2[X]"
# autoconf >= 2.61 for --docdir, bug 296890
DEPEND="${COMMON_DEPEND}
	dev-util/pkgconfig
	x11-proto/xineramaproto
	>=sys-devel/autoconf-2.61"
RDEPEND="${COMMON_DEPEND}
	tint2conf? ( x11-misc/tintwizard )"

S="${WORKDIR}/${MY_P}"

src_prepare() {
	epatch "${FILESDIR}/${MY_P}-install_examples.patch"
	sed -i -e 's:python /usr/bin/tintwizard.py:tintwizard:' src/tint2conf/main.c || die
	eautoreconf
}

src_configure() {
	econf --docdir=/usr/share/doc/${PF} \
		$(use_enable battery) \
		$(use_enable examples) \
		$(use_enable tint2conf)
}

src_install() {
	emake DESTDIR="${D}" install || die
	rm -f "${D}/usr/bin/tintwizard.py"
}