1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 JAVA_PKG_IUSE="doc source test"
6 JAVA_PKG_BSFIX_ALL="no"
7 JAVA_PKG_BSFIX_NAME="build.xml common-build.xml"
9 inherit java-pkg-2 java-ant-2
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"
19 KEYWORDS="~amd64 ~x86 ~x86-fbsd"
21 DEPEND=">=virtual/jdk-1.4
24 test? ( dev-java/ant-junit =dev-java/junit-3* )"
25 RDEPEND=">=virtual/jdk-1.4"
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)
38 java-ant_rewrite-classpath common-build.xml
39 EANT_GENTOO_CLASSPATH="junit ant-core" ANT_TASKS="ant-junit" eant test-core
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
48 dohtml -r docs/* || die
49 # for the core and demo subdirs
50 java-pkg_dohtml -r build/docs/api
52 use source && java-pkg_dosrc src/java/org