summaryrefslogtreecommitdiff
blob: c068b3fcfb699bee6f1531911c15a9561ebd08ac (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
50
51
52
53
54
55
56
57
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils

DESCRIPTION="Finnish text indexing tool"
HOMEPAGE="http://joyds1.joensuu.fi/sukija/sukija.html"
SRC_URI="http://joyds1.joensuu.fi/sukija/${P}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="-x86" # flex borkage, CXX?
IUSE="qt doc boost"

DEPEND="=sci-misc/suomi-malaga-0.9*
	|| ( sys-devel/bison dev-util/yacc )
	boost? ( >=dev-libs/boost-1.34 )
	sys-libs/db
	x11-libs/qt
	doc? ( app-doc/doxygen )"
RDEPEND="=sci-misc/suomi-malaga-0.9*
	boost? ( >=dev-libs/boost-1.34 )
	sys-libs/db
	x11-libs/qt"

pkg_setup() {
	if built_with_use sys-libs/db nocxx; then
		die "sys-libs/db must be built with USE=-nocxx for sukija to work"
	fi
}

src_compile() {
	econf $(use_with boost ) $(use_with qt x ) || die "configure failed"
	emake || die "make failed"
	if use doc ; then
		doxygen doc/Doxyfile
	fi
}

src_install() {
	emake DESTDIR="${D}" install || die "make install failed"
	dodoc AUTHORS ILMOITUS INSTALL LUE.MINUT NEWS README || die "docs missing"
	dohtml sukija.html || die "docs missing"
	insinto /usr/share/doc/${PF}
	doins kuva1.png malaga{1,2}.png || die "docs missing"
	if use doc ; then
		doins -r doc
	fi
	insinto /usr/share/${PN}
	doins init/rc.*
}

pkg_postinst() {
	elog "sample configurations are in ${ROOT}/usr/share/${PN},"
	elog "you should copy one in to ~/.sukija/ before use"
}