summaryrefslogtreecommitdiff
blob: ac675ee33f32720826f722b5becb222bf107becc (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
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/x11-misc/habak/habak-0.2.5-r1.ebuild,v 1.1 2009/08/15 14:58:07 graaff Exp $

EAPI=2

inherit eutils toolchain-funcs

DESCRIPTION="A simple but powerful tool to set desktop wallpaper"
HOMEPAGE="http://www.fvwm-crystal.org/"
SRC_URI="http://download.gna.org/fvwm-crystal/${PN}/${PV}/${P}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86"
IUSE=""

RDEPEND="media-libs/imlib2[X]
	x11-libs/libX11"
DEPEND="${RDEPEND}
	x11-proto/xproto"

# Skip into the src directory so we avoid a recursive make call that
# is going to break parallel make.
S="${WORKDIR}/${P}/src"

src_prepare() {
	sed -i \
		-e '/(LDFLAGS)/s:$: -lImlib2 -lm:' \
		-e 's:gcc:$(CC):' \
		"${S}"/Makefile || die "Makefile fixing failed"
}

src_compile() {
	emake CC="$(tc-getCC)" ${PN} || die "make failed"
}

src_install() {
	dobin ${PN} || die "dobin failed"

	cd "${WORKDIR}/${P}"
	dodoc ChangeLog README TODO "${FILESDIR}"/README.en || die "dodoc failed"
}