summaryrefslogtreecommitdiff
blob: 18bf7b67636388e97b34cad33f00ff81899d668a (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-text/hyperestraier/hyperestraier-1.2.2.ebuild,v 1.4 2006/09/24 09:33:42 hansmi Exp $

inherit java-pkg

IUSE="bzip2 debug java ruby"

DESCRIPTION="a full-text search system for communities"
HOMEPAGE="http://hyperestraier.sf.net/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"

LICENSE="LGPL-2.1"
KEYWORDS="ppc x86"
SLOT="0"

DEPEND=">=dev-db/qdbm-1.8.48
	sys-libs/zlib
	bzip2? ( app-arch/bzip2 )"

src_unpack() {

	unpack ${A}
	cd ${S}

	sed -i -e "/^LDENV/d" Makefile.in

}

src_compile() {

	econf \
		`use_enable bzip2 bzip` \
		`use_enable debug` \
		|| die
	emake || die

	local binding

	for binding in java ruby; do
		if ! use ${binding}; then
			continue
		fi

		local dir

		for dir in ${binding}native ${binding}pure; do
			cd ${dir}
			econf || die
			emake || die
			cd ..
		done
	done

}

src_test() {

	make -s check || die

	local binding

	for binding in java ruby; do
		if ! use ${binding}; then
			continue
		fi

		local dir

		for dir in ${binding}native; do
			cd ${dir}
			make -s check || die
			cd ..
		done
	done

}

src_install() {

	make DESTDIR=${D} MYDATADIR=/usr/share/doc/${P} install || die
	dodoc README* ChangeLog THANKS

	if use java; then
		cd javanative
		make DESTDIR=${D} install || die
		rm -f ${D}/usr/lib/*.jar
		cd ..
		java-pkg_dojar java*/*.jar || die

	else
		rm -rf ${D}/usr/share/doc/${P}/doc/java*

	fi

	if use ruby; then
		for dir in rubynative rubypure; do
			cd ${dir}
			make DESTDIR=${D} install || die
			cd ..
		done

	else
		rm -rf ${D}/usr/share/doc/${P}/doc/ruby*

	fi

	rm -f ${D}/usr/bin/*test

}