1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 JAVA_PKG_IUSE="doc examples source test"
8 # Registers as split-ant task.
11 # Rewrites examples otherwise... bad.
12 JAVA_PKG_BSFIX_ALL="no"
14 inherit java-pkg-2 java-ant-2 eutils
19 DESCRIPTION="Ivy is a free java based dependency manager"
20 HOMEPAGE="https://ant.apache.org/ivy/"
21 SRC_URI="http://www.jaya.free.fr/downloads/ivy/${PV}/${MY_P}-src.zip"
25 KEYWORDS="amd64 ppc64 x86 ~amd64-linux ~x86-linux ~x86-macos"
29 dev-java/commons-cli:1
30 dev-java/commons-httpclient:3
31 dev-java/commons-vfs:0
32 dev-java/jakarta-oro:2.0
38 test? ( dev-java/ant-junit:0 )
41 RDEPEND=">=virtual/jre-1.4
44 S="${WORKDIR}/${MY_P}"
47 epatch "${FILESDIR}/1.4.1-javadoc.patch"
49 # init-ivy expects existing ivy.jar, but we don't need actually it
50 sed -i -e 's/depends="init-ivy, prepare"/depends="prepare"/' build.xml \
53 rm -v src/java/fr/jayasoft/ivy/repository/vfs/IvyWebdav* || die
54 java-ant_rewrite-classpath
58 EANT_GENTOO_CLASSPATH="
59 ant-core,commons-cli-1,commons-httpclient-3
60 commons-vfs,jakarta-oro-2.0,jsch"
62 EANT_BUILD_TARGET="offline jar"
65 # TODO: find out why a couple of these fail
66 java-pkg_jar-from --into lib junit
67 ANT_TASKS="ant-junit" eant offline test
71 java-pkg_dojar build/artifact/${MY_PN}.jar
73 use doc && java-pkg_dojavadoc doc/ivy/api
74 use examples && java-pkg_doexamples src/example
75 use source && java-pkg_dosrc src/java/*
77 java-pkg_register-ant-task