diff options
author | Yuan Liao <liaoyuan@gmail.com> | 2022-01-15 11:02:32 -0800 |
---|---|---|
committer | Miroslav Šulc <fordfrog@gentoo.org> | 2022-01-16 09:32:35 +0100 |
commit | 7d14b292281458826b2292aa75a2380cb710cc0d (patch) | |
tree | 200c7bce5a05acf616ab57afc05a165ae792eb19 /dev-java | |
parent | dev-java/snappy: Drop 1.0.3_rc3 (diff) | |
download | gentoo-7d14b292281458826b2292aa75a2380cb710cc0d.tar.gz gentoo-7d14b292281458826b2292aa75a2380cb710cc0d.tar.bz2 gentoo-7d14b292281458826b2292aa75a2380cb710cc0d.zip |
dev-java/cpptasks: Use EAPI 8, min Java 1.8, enable tests
Signed-off-by: Yuan Liao <liaoyuan@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/23812
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'dev-java')
-rw-r--r-- | dev-java/cpptasks/cpptasks-1.0_beta5-r1.ebuild | 63 | ||||
-rw-r--r-- | dev-java/cpptasks/files/cpptasks-1.0_beta5-test-classpath.patch | 33 |
2 files changed, 96 insertions, 0 deletions
diff --git a/dev-java/cpptasks/cpptasks-1.0_beta5-r1.ebuild b/dev-java/cpptasks/cpptasks-1.0_beta5-r1.ebuild new file mode 100644 index 000000000000..f754a3db0200 --- /dev/null +++ b/dev-java/cpptasks/cpptasks-1.0_beta5-r1.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +JAVA_PKG_IUSE="doc examples source test" + +inherit java-pkg-2 java-ant-2 + +DESCRIPTION="Ant-tasks to compile various source languages and produce executables" +HOMEPAGE="http://ant-contrib.sourceforge.net/" +SRC_URI="mirror://sourceforge/ant-contrib/ant-contrib/${P/_/-}/${P/_beta/b}.tar.gz" +S="${WORKDIR}/${P/_beta/b}" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~x86" + +CP_DEPEND=" + dev-java/ant-core:0 + dev-java/xerces:2 +" + +DEPEND=" + >=virtual/jdk-1.8:* + ${CP_DEPEND} + test? ( + dev-java/ant-junit:0 + dev-java/junit:0 + ) +" + +RDEPEND=" + >=virtual/jre-1.8:* + ${CP_DEPEND} +" + +JAVA_ANT_REWRITE_CLASSPATH="yes" + +EANT_BUILD_TARGET="jars" +EANT_TEST_TARGET="run-tests -Djunit-available=true" +EANT_DOC_TARGET="javadocs -Dbuild.javadocs=build/api" + +src_prepare() { + java-pkg_clean + use test && eapply "${FILESDIR}/${P}-test-classpath.patch" + java-pkg-2_src_prepare +} + +src_test() { + java-pkg-2_src_test +} + +src_install() { + java-pkg_dojar target/lib/${PN}.jar + + java-pkg_register-ant-task + + dodoc NOTICE + use doc && java-pkg_dojavadoc build/api + use examples && java-pkg_doexamples src/samples/* + use source && java-pkg_dosrc src/main/java/* +} diff --git a/dev-java/cpptasks/files/cpptasks-1.0_beta5-test-classpath.patch b/dev-java/cpptasks/files/cpptasks-1.0_beta5-test-classpath.patch new file mode 100644 index 000000000000..02754ce7f1ed --- /dev/null +++ b/dev-java/cpptasks/files/cpptasks-1.0_beta5-test-classpath.patch @@ -0,0 +1,33 @@ +From 732e296e780633e3dce1bace28a4abae04f506c7 Mon Sep 17 00:00:00 2001 +From: Yuan Liao <liaoyuan@gmail.com> +Date: Sat, 15 Jan 2022 10:58:28 -0800 +Subject: [PATCH] Prevent test classpath from being overwritten by + java-ant-2.eclass + +Signed-off-by: Yuan Liao <liaoyuan@gmail.com> +--- + build.xml | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/build.xml b/build.xml +index ed3a0f7..24a3114 100644 +--- a/build.xml ++++ b/build.xml +@@ -176,8 +176,12 @@ + deprecation="false" + target="${javac.target}" + source="${javac.source}" +- optimize="false" +- classpath="${build.lib}/${name}.jar;${java.class.path}"/> ++ optimize="false"> ++ <classpath> ++ <pathelement location="${build.lib}/${name}.jar" /> ++ <pathelement location="${java.class.path}" /> ++ </classpath> ++ </javac> + <jar jarfile="${tests.build.lib}/${name}_test.jar"> + <fileset dir="." includes="NOTICE LICENSE"/> + <fileset dir="${tests.build.classes}"/> +-- +2.34.1 + |