summaryrefslogtreecommitdiff
blob: b12825320d994d71c9ffc22f014d120f828ba7b5 (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
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit subversion toolchain-funcs

DESCRIPTION="a general purpose messaging, notification and menuing program for
X11."
HOMEPAGE="http://gotmor.googlepages.com/dzen"
SRC_URI=""
ESVN_REPO_URI="http://dzen.googlecode.com/svn/trunk/"

LICENSE="MIT"
SLOT="2"
KEYWORDS=""
IUSE="minimal xinerama xpm"

DEPEND="x11-libs/libX11
		xinerama? ( x11-libs/libXinerama )
		xpm? ( x11-libs/libXpm )"
RDEPEND="${DEPEND}"

src_unpack() {
	subversion_src_unpack

	cd "${S}"
	sed -e "s/\/usr\/local/\/usr/g" -e "s/-Os/${CFLAGS}/g" \
		-e "s/CC =.*/CC = $(tc-getCC | sed -e 's/\//\\\//g')/g" \
		-e "s/LD =.*/LD = $(tc-getCC | sed -e 's/\//\\\//g')/g" \
		-i config.mk || die "sed failed"

	if use xinerama ; then
		sed -e "/^LIBS/s/$/\ -lXinerama/" \
			-e "/^CFLAGS/s/$/\ -DDZEN_XINERAMA/" \
			-i config.mk || die "sed failed"
	fi
	if use xpm ; then
		sed -e "/^LIBS/s/$/\ -lXpm/" \
			-e "/^CFLAGS/s/$/\ -DDZEN_XPM/" \
			-i config.mk || die "sed failed"
	fi
}

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