/[gentoo-x86]/dev-java/lucene/lucene-3.6.2.ebuild
Gentoo

Contents of /dev-java/lucene/lucene-3.6.2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sun Dec 29 11:31:23 2013 UTC (6 years ago) by patrick
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +2 -2 lines
Whitespace

(Portage version: 2.2.7/cvs/Linux x86_64, unsigned Manifest commit)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-java/lucene/lucene-3.6.2.ebuild,v 1.1 2013/12/28 21:09:15 robbat2 Exp $
4
5 EAPI="3"
6 JAVA_PKG_IUSE="doc source test contrib"
7 JAVA_PKG_BSFIX_ALL="no"
8 JAVA_PKG_BSFIX_NAME="build.xml common-build.xml contrib-build.xml"
9 #JAVA_PKG_DEBUG=1
10
11 inherit java-pkg-2 java-ant-2
12
13 DESCRIPTION="High-performance, full-featured text search engine library
14 written entirely in Java"
15 HOMEPAGE="http://lucene.apache.org"
16 SRC_URI="mirror://apache/lucene/java/${PV}/${P}-src.tgz"
17 LICENSE="Apache-2.0"
18 SLOT="${PV:0:3}"
19 KEYWORDS="~amd64 ~x86"
20 IUSE=""
21 RDEPEND=">=virtual/jdk-1.5
22 contrib? (
23 dev-java/commons-beanutils:1.7
24 >=dev-java/commons-codec-1.6:0
25 dev-java/commons-collections:0
26 dev-java/commons-compress:0
27 dev-java/commons-digester:0
28 dev-java/commons-logging:0
29 dev-java/jakarta-regexp:1.4
30 )"
31 DEPEND="${RDEPEND}
32 dev-java/ant-nodeps:0
33 test? ( =dev-java/junit-4.10*:4
34 dev-java/hamcrest-core )
35 dev-java/ant-junit:0
36 >=dev-java/ant-ivy-2.2.0:2"
37
38 #dev-java/javacc:0 - no longer needed, files are prebuilt
39
40 java_prepare() {
41 #find -name "*.jar" -type f | xargs rm -v
42 sed -i \
43 -e '/-Xmax/ d' \
44 -e '/property="ivy.available"/s,resource="${ivy.resource}",file="." type="dir",g' \
45 -e '/<ivy:retrieve/d' \
46 common-build.xml
47 mkdir -p {.,queries,benchmark,analyzers/phonetic}/lib
48 java-pkg_jar-from --build-only --into lib \
49 ant-core ant.jar ant-1.7.1.jar
50 java-pkg_jar-from --build-only --into lib \
51 ant-junit ant-junit.jar ant-junit-1.7.1.jar
52 java-pkg_jar-from --build-only --into lib \
53 ant-ivy:2
54 java-pkg_jar-from --build-only --into lib \
55 junit-4 junit.jar junit-4.10.jar
56 java-pkg_jar-from --build-only --into lib \
57 hamcrest-core
58 # Always needed anyway
59 cd "${S}"/test-framework/
60 java-pkg_jar-from --build-only --into lib \
61 ant-core ant.jar ant-1.7.1.jar
62 java-pkg_jar-from --build-only --into lib \
63 ant-junit ant-junit.jar ant-junit-1.7.1.jar
64 java-pkg_jar-from --build-only --into lib \
65 junit-4 junit.jar junit-4.10.jar
66 java-pkg_jar-from --build-only --into lib \
67 hamcrest-core
68
69 if use contrib ; then
70 cd "${S}"/contrib/
71 # queries
72 java-pkg_jar-from --build-only --into queries/lib \
73 jakarta-regexp:1.4 jakarta-regexp.jar jakarta-regexp-1.4.jar
74 # benchmark
75 java-pkg_jar-from --build-only --into benchmark/lib \
76 commons-compress commons-compress.jar commons-compress-1.1.jar
77 java-pkg_jar-from --build-only --into benchmark/lib \
78 commons-collections commons-collections.jar commons-collections-3.1.jar
79 java-pkg_jar-from --build-only --into benchmark/lib \
80 commons-digester commons-digester.jar commons-digester-1.7.jar
81 java-pkg_jar-from --build-only --into benchmark/lib \
82 commons-logging commons-logging.jar commons-logging-1.0.4.jar
83 java-pkg_jar-from --build-only --into benchmark/lib \
84 commons-beanutils:1.7 commons-beanutils.jar commons-beanutils-1.7.0.jar
85 # analyzers/phonetic
86 java-pkg_jar-from --build-only --into analyzers/phonetic/lib \
87 commons-codec commons-codec.jar commons-codec-1.6.jar
88 fi
89 }
90
91 src_compile() {
92 # FIXME: docs do not build if behind a proxy, -autoproxy does not work
93 einfo "Building main"
94 ANT_TASKS="none" eant -Dversion=${PV} \
95 -Dfailonjavadocwarning=false \
96 jar-core $(use_doc javadocs-core )
97 if use contrib ; then
98 einfo "Building contrib"
99 ANT_TASKS="none" eant -Dversion=${PV} \
100 -Dfailonjavadocwarning=false \
101 build-contrib $(use_doc javadocs-all )
102 fi
103 }
104
105 src_test() {
106 # FIXME: test does not get run, even when selected
107 java-ant_rewrite-classpath common-build.xml
108 EANT_GENTOO_CLASSPATH="junit ant-core ant-junit" ANT_TASKS="ant-junit" eant test-core
109 }
110
111 src_install() {
112 dodoc CHANGES.txt README.txt NOTICE.txt CHANGES.txt \
113 JRE_VERSION_MIGRATION.txt|| die
114 java-pkg_newjar build/core/${PN}-core-${PV}.jar ${PN}-core.jar
115 if use contrib; then
116 for i in `find build/contrib -name \*-${PV}.jar`
117 do
118 j=${i##*/}
119 java-pkg_newjar $i ${j%%-${PV}.jar}.jar
120 done
121 fi
122 if use doc; then
123 dohtml -r docs/* || die
124 java-pkg_dohtml -r build/docs/api
125 fi
126 if use source; then
127 java-pkg_dosrc core/src/java/org || die
128 if use contrib; then
129 java-pkg_dosrc contrib || die
130 fi
131 fi
132 }

  ViewVC Help
Powered by ViewVC 1.1.20