]> Pileus Git - ~andy/sunrise/blob - sys-apps/remendeko/remendeko-0.3.0.ebuild
net-misc/wolman: Fix qt deps
[~andy/sunrise] / sys-apps / remendeko / remendeko-0.3.0.ebuild
1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=4
6
7 inherit toolchain-funcs
8
9 MY_PN="RemenDeKO"
10 DESCRIPTION="File corruption detection and repair program"
11 HOMEPAGE="http://rdko.sourceforge.net/"
12 SRC_URI="mirror://sourceforge/rdko/${MY_PN}-${PV}.tar.bz2"
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS="~amd64 ~ppc ~x86"
17 IUSE="gtk"
18
19 RDEPEND="gtk? ( x11-libs/gtk+:2 )"
20 DEPEND="${RDEPEND}
21         gtk? ( virtual/pkgconfig )"
22
23 S=${WORKDIR}/${MY_PN}
24
25 src_prepare() {
26         sed -i \
27                 -e 's: -s::g' \
28                 -e 's:$(CC) $(LINKOBJ:$(CC) $(LDFLAGS) $(LINKOBJ:g' \
29                 -e "s:^\(CC   = \).*$:\1$(tc-getCC):" \
30                 -e "s:^\(CFLAGS = \).*$:\1${CFLAGS} -Wall:" \
31                 Makefile || die "sed Makefile failed"
32
33         if use gtk;     then
34                 sed -i \
35                         -e "s:^\(CFLAGSGUI = \).*$:\1${CFLAGS} -DUSEGUI -Wall \
36                                 `pkg-config gtk+-2.0 gthread-2.0 --cflags`:" \
37                         Makefile || die "sed Makefile failed"
38         else
39                 sed -i \
40                         -e "s:^\(CFLAGSGUI = \).*$:\1${CFLAGS} -Wall:" \
41                         Makefile || die "sed Makefile failed"
42         fi
43 }
44
45 src_compile() {
46         if use gtk; then
47                 emake || die "emake failed"
48         else
49                 emake rdko || die "emake rdko failed"
50         fi
51 }
52
53 src_install() {
54         dobin rdko
55         use gtk && dobin gredeko
56         dodoc CHANGELOG
57 }