sci-mathematics/rstudio: Thanks to tomboy-64 for fixing bug Bug 534152 - sci-mathemat...
[gentoo.git] / dev-java / lucene / lucene-2.3.0.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 JAVA_PKG_IUSE="doc source test"
6 JAVA_PKG_BSFIX_ALL="no"
7 JAVA_PKG_BSFIX_NAME="build.xml common-build.xml"
8
9 inherit java-pkg-2 java-ant-2
10
11 DESCRIPTION="High-performance, full-featured text search engine written entirely in Java"
12 HOMEPAGE="http://lucene.apache.org"
13 # when doing version bump, SRC_URI of the previous version should most probably
14 # be changed to java/archive/ !
15 SRC_URI="mirror://apache/lucene/java/archive/${P}-src.tar.gz
16                  mirror://apache/lucene/java/${P}-src.tar.gz"
17 LICENSE="Apache-2.0"
18 SLOT="2.3"
19 KEYWORDS="~amd64 ~x86 ~x86-fbsd"
20 IUSE=""
21 DEPEND=">=virtual/jdk-1.4
22         dev-java/ant-nodeps
23         dev-java/javacc
24         test? ( dev-java/ant-junit =dev-java/junit-3* )"
25 RDEPEND=">=virtual/jdk-1.4"
26
27 src_compile() {
28         # regenerate javacc files just because we can
29         # put javacc.jar on ant's classpath here even when <javacc> task
30         # doesn't use it - it's to fool the <available> test, first time
31         # it's useful not to have ignoresystemclasses=true...
32         ANT_TASKS="ant-nodeps javacc" eant \
33                 -Djavacc.home=/usr/share/javacc/lib javacc
34         ANT_TASKS="none" eant -Dversion=${PV} jar-core jar-demo $(use_doc javadocs-core javadocs-demo)
35 }
36
37 src_test() {
38         java-ant_rewrite-classpath common-build.xml
39         EANT_GENTOO_CLASSPATH="junit ant-core" ANT_TASKS="ant-junit" eant test-core
40 }
41
42 src_install() {
43         dodoc CHANGES.txt README.txt || die
44         java-pkg_newjar build/${PN}-core-${PV}.jar ${PN}-core.jar
45         java-pkg_newjar build/${PN}-demos-${PV}.jar ${PN}-demos.jar
46
47         if use doc; then
48                 dohtml -r docs/* || die
49                 # for the core and demo subdirs
50                 java-pkg_dohtml -r build/docs/api
51         fi
52         use source && java-pkg_dosrc src/java/org
53 }