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