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

inherit toolchain-funcs

MY_PN="RemenDeKO"
DESCRIPTION="File corruption detection and repair program"
HOMEPAGE="http://rdko.sourceforge.net/"
SRC_URI="mirror://sourceforge/rdko/${MY_PN}-${PV}.tar.bz2"

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

RDEPEND="gtk? ( >=x11-libs/gtk+-2.4.0 )"

DEPEND="${RDEPEND}
	>=dev-util/pkgconfig-0.15"

S=${WORKDIR}/${MY_PN}

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

	sed -i \
		-e "s:^\(CC   = \).*$:\1$(tc-getCC):" \
		-e "s:^\(CFLAGS = \).*$:\1${CFLAGS} -Wall:" \
		-e "s:^\(CFLAGSGUI = \).*$:\1${CFLAGS} -DUSEGUI -Wall \
			`pkg-config gtk+-2.0 gthread-2.0 --cflags`:" \
		Makefile || die "sed Makefile failed"

}

src_compile() {
	if use gtk; then
		emake || die "emake failed"
	else
		emake rdko || die "emake rdko failed"
	fi
}

src_install() {
	dodoc CHANGELOG
	dobin rdko
	use gtk && dobin gredeko
}