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

inherit toolchain-funcs

DESCRIPTION="Utility to find italian CAP"
HOMEPAGE="http://www.digitazero.org/?p=41"
SRC_URI="http://www.digitazero.org/download/${P}_src.tar.gz"

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

RDEPEND="x11-libs/fltk
	=dev-db/sqlite-3*"
DEPEND="${RDEPEND}
	dev-util/pkgconfig"

S="${WORKDIR}"/${PN}

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

	# Fix Makefile
	sed -i -e '/^CPP = /d' \
		-e 's/^LIBS = .*$/LIBS = `fltk-config --ldflags` `pkg-config sqlite3 xpm --libs`/' \
		-e 's/^CXXFLAGS = .*$/CXXFLAGS += `pkg-config sqlite3 xpm --cflags` `fltk-config --cflags`/' \
		-e 's/$(CPP)/$(CXX)/' Makefile || die

	# Change relative paths to an absolutes
	sed -i -e 's:./trovacap.db:/usr/share/trovacap/trovacap.db:' src/trovacap.cxx || die
	sed -i -e "s:./docs/trovacap.html:/usr/share/doc/${PF}/html/trovacap.html:" src/dlg_help.cxx || die
}

src_compile() {
	tc-export CXX
	emake || die
}

src_install() {
	dobin ${PN}
	insinto /usr/share/${PN}
	doins ${PN}.db
	dohtml docs/*
	dodoc README ChangeLog
}