summaryrefslogtreecommitdiff
blob: 02ec3673fcc2a4b4cb7bb654d97d62f5de5333f2 (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-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="1"

inherit eutils

DESCRIPTION="BMPanel (BitMap Panel) is a lightweight, NETWM compliant panel for
X11 Window System."
HOMEPAGE="http://nsf.110mb.com/bmpanel"
SRC_URI="http://nsf.110mb.com/${PN}/${P}.tar.gz"

LICENSE="as-is"
SLOT="0"
KEYWORDS="~amd64"
IUSE="debug libev libevent"

DEPEND=">=media-libs/imlib2-1.4.0
	media-libs/freetype:2
	x11-libs/libX11
	x11-libs/libXrender
	x11-libs/libXcomposite
	x11-libs/libXfixes
	media-libs/fontconfig
	libev? ( dev-libs/libev  )
	libevent? ( dev-libs/libevent )"
RDEPEND="${DEPEND}"

pkg_setup() {
	# event loop stuff in glibc-2.8_p20080602 seems to be broken
	if ! use libev && ! use libevent ; then
		eerror "you need at least the libev or libevent useflag"
		die "no libev or libevent useflag defined"
	fi
}

src_unpack() {
	unpack ${A}
	cd "${S}"

	epatch "${FILESDIR}/Makefile-no-strip.patch"
}

src_compile() {
	# the provided configure script is broken.
	# it doesn't provide --disable-foo etc. so we can't use econf here.
	local myconf="--prefix=/usr --ugly"

	use debug && myconf="${myconf} --debug"
	use libev && myconf="${myconf} --with-ev"
	use libevent && myconf="${myconf} --with-event"

	./configure ${myconf} || die "configure failed"

	emake || die "emake failed"
}

src_install() {
	emake install DESTDIR="${D}" || die "emake install failed"

	dodoc AUTHORS README
}