dev-java/icedtea: drop old
[gentoo.git] / dev-java / commons-chain / commons-chain-1.2.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5 JAVA_PKG_IUSE="doc source"
6
7 inherit java-pkg-2 java-ant-2
8
9 MY_P="${P}-src"
10 DESCRIPTION="API exposing the Chain of Responsability design pattern - by the ASF"
11 HOMEPAGE="http://commons.apache.org/proper/commons-chain/"
12 SRC_URI="mirror://apache/commons/chain/source/${MY_P}.zip"
13
14 LICENSE="Apache-2.0"
15 SLOT="0"
16 KEYWORDS="amd64 x86"
17
18 # Too many missing imports from javax.servlet.* which causes the
19 # "compile-tests" target to fail compiling.
20 # I gave up on them after wasting nearly half a day.
21 RESTRICT="test"
22
23 IUSE=""
24
25 CDEPEND="dev-java/commons-digester:0
26         dev-java/mojarra:2.2
27         dev-java/portletapi:2.0
28         dev-java/commons-logging:0
29         java-virtuals/servlet-api:3.0"
30
31 RDEPEND=">=virtual/jre-1.6
32         ${CDEPEND}"
33
34 DEPEND=">=virtual/jdk-1.6
35         ${CDEPEND}"
36
37 S="${WORKDIR}/${MY_P}"
38
39 JAVA_ANT_REWRITE_CLASSPATH="true"
40 EANT_GENTOO_CLASSPATH="
41         commons-logging
42         commons-digester
43         portletapi-2.0
44         mojarra-2.2
45         servlet-api-3.0
46 "
47
48 EANT_BUILD_TARGET="package"
49 EANT_BUILD_XML="build.xml"
50
51 java_prepare() {
52         cp "${FILESDIR}"/${P}-build.xml build.xml
53 }
54
55 src_install() {
56         java-pkg_newjar "${S}"/target/${P}.jar commons-chain.jar
57
58         if use doc; then
59                 java-pkg_dohtml -r "${S}"/target/site/apidocs/
60         fi
61
62         if use source; then
63                 java-pkg_dosrc "${S}"/src/*
64         fi
65 }