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

inherit eutils

DESCRIPTION="A GTK IRC stats generator"
HOMEPAGE="http://upsilon.free.fr/xstat/"
SRC_URI="http://upsilon.free.fr/xstat/download/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE="gtk"

DEPEND="gtk? ( x11-libs/gtk+ )"
RDEPEND="$DEPEND"

src_unpack() {
	unpack "${A}"
	cp "${FILESDIR}"/makefile "${S}"/makefile
	epatch "${FILESDIR}"/${PV}-compile-fix.patch
}

src_compile() {
	local target
	if ! use gtk; then
		target=statistics
	else
		target=all
	fi
	emake ${target} || die "emake failed"
}

src_install() {
	use gtk || target=-statistics
	emake install${target} DESTDIR="$D" || die "emake install failed"
}