1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 JAVA_PKG_IUSE="doc source"
7 inherit java-pkg-2 java-ant-2 eutils
10 DESCRIPTION="Utility classes, stream implementations, file filters, and endian classes"
11 HOMEPAGE="http://commons.apache.org/io/"
12 SRC_URI="mirror://apache/commons/io/source/${MY_P}.tar.gz"
16 KEYWORDS="amd64 ~arm64 ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
18 RESTRICT="!test? ( test )"
20 RDEPEND=">=virtual/jre-1.6"
21 DEPEND=">=virtual/jdk-1.6
29 EANT_EXTRA_ARGS="-Dcomponent.version=${PV}"
30 JAVA_ANT_REWRITE_CLASSPATH="yes"
31 JAVA_ANT_ENCODING="ISO-8859-1"
34 # Setting java.io.tmpdir doesn't have effect unless we do this because the vm is forked
35 java-ant_xml-rewrite -f build.xml --change -e junit -a clonevm -v "true"
39 if [[ ${EUID} -ne 0 ]] ; then
40 ANT_OPTS="-Dskip.download=1 -Djava.io.tmpdir=${T} -Duser.home=${T}" \
41 ANT_TASKS="ant-junit" \
43 -Dgentoo.classpath="$(java-pkg_getjars junit-4):${S}/src/test/resources" \
45 -Djava.io.tmpdir="${T}"
47 elog "Tests fail unless userpriv is enabled because they test for"
48 elog "file permissions which doesn't work when run as root."
53 java-pkg_newjar target/${P}.jar
55 dodoc RELEASE-NOTES.txt
56 use doc && java-pkg_dojavadoc target/apidocs
57 use source && java-pkg_dosrc src/main/java/*