summaryrefslogtreecommitdiff
blob: c8adeba47830fce368d0143383ffa39f007d70d8 (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-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/kde-misc/kload/kload-0.9.4-r1.ebuild,v 1.2 2009/08/08 22:16:28 ssuominen Exp $

inherit eutils

DESCRIPTION="A performance monitoring program for KDE/Linux"
HOMEPAGE="http://www.richard-schneider.de/uwe/kde/"
SRC_URI="http://www.richard-schneider.de/uwe/kde/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="kde"

RDEPEND="kde? ( =kde-frameworks/kdelibs-3* )"
DEPEND="${RDEPEND}"

src_unpack() {
	unpack ${A}
	cd "${S}"
	epatch "${FILESDIR}"/${P}-gcc43.diff
	epatch "${FILESDIR}"/${P}-glibc-2.10.patch
}

src_compile() {
	local TARGET="\$(SERVER)"
	use kde && TARGET="${TARGET} \$(CLIENT)"

	emake \
		QTDIR="${QTDIR}" \
		TARGET="${TARGET}" \
		KDEDIR="$(kde-config --prefix)" \
		CXXFLAGS="${CXXFLAGS} \$(KDEDEF) \$(QTDEF)" \
		CFLAGS="${CFLAGS}" || die "emake failed"
}

src_install() {
	dosbin kloadd
	newinitd "${FILESDIR}/kloadd.initd" kloadd
	newconfd "${FILESDIR}/kloadd.confd" kloadd
	if use kde; then
		dobin kload
		make_desktop_entry kload "Performace Monitor" ksysguard
	fi
	dodoc ChangeLog README
}