summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolkmar W. Pogatzki <gentoo@pogatzki.net>2022-01-31 21:10:54 +0100
committerMiroslav Šulc <fordfrog@gentoo.org>2023-12-09 19:43:22 +0100
commitd67ced528545df741ecec5ee197959afcf710065 (patch)
tree39672c815c29dcb0cfc2cddfb5de9c37cf7e7d65 /dev-java
parentsec-keys/openpgp-keys-apache-ant: new package, add 20230104 (diff)
downloadgentoo-d67ced528545df741ecec5ee197959afcf710065.tar.gz
gentoo-d67ced528545df741ecec5ee197959afcf710065.tar.bz2
gentoo-d67ced528545df741ecec5ee197959afcf710065.zip
dev-java/antunit: new package, add 1.4.1
Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net> Closes: https://github.com/gentoo/gentoo/pull/34193 Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'dev-java')
-rw-r--r--dev-java/antunit/Manifest2
-rw-r--r--dev-java/antunit/antunit-1.4.1.ebuild69
-rw-r--r--dev-java/antunit/files/antunit-1.4.1-AntUnitTest.patch28
-rw-r--r--dev-java/antunit/metadata.xml10
4 files changed, 109 insertions, 0 deletions
diff --git a/dev-java/antunit/Manifest b/dev-java/antunit/Manifest
new file mode 100644
index 000000000000..765c72b8f4c9
--- /dev/null
+++ b/dev-java/antunit/Manifest
@@ -0,0 +1,2 @@
+DIST apache-ant-antunit-1.4.1-src.tar.bz2 125017 BLAKE2B 2c092d22eaf716c52bd6c6ce43d1e33c1f599621ee383303c97553f9dc2d0708cf58420338184f8877cd2b0fc053c9742b04cd869583db7b2fc2dedfb4a2dddd SHA512 7c59f0e918f5ec8edbf10bdbcdca1c9bd2ba2a7b27ade69aa4ca92c0c058c434be517799ce795309c0f1c00726a1c77650101b0d1cbe189db5379b15d29ad305
+DIST apache-ant-antunit-1.4.1-src.tar.bz2.asc 224 BLAKE2B c56e3d8005b1a39e42b85fad3c542aa4dd894d9e6cc61a8ea34bce33a8fb3f56d142cb77372fd4d664d46427365d24078b7429480f689245eb31d771c525f90e SHA512 3ad2cca4240e2714d7c435828b3a3d3cbe1e57647400237ce2a96a714d877605199ccf54a2266ff35081ed9f3e23ca46306b30293c1981e55ccbbc61591ad760
diff --git a/dev-java/antunit/antunit-1.4.1.ebuild b/dev-java/antunit/antunit-1.4.1.ebuild
new file mode 100644
index 000000000000..aa30e14edbec
--- /dev/null
+++ b/dev-java/antunit/antunit-1.4.1.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+JAVA_PKG_IUSE="doc source test"
+MAVEN_ID="org.apache.ant:ant-antunit:${PV}"
+JAVA_TESTING_FRAMEWORKS="junit-4"
+
+inherit java-pkg-2 java-pkg-simple verify-sig
+
+DESCRIPTION="An Antlib that provides a test framework for Apache Ant tasks and types"
+HOMEPAGE="https://ant.apache.org/antlibs/antunit/"
+SRC_URI="mirror://apache/ant/antlibs/${PN}/source/apache-ant-${P}-src.tar.bz2
+ verify-sig? ( https://downloads.apache.org/ant/antlibs/antunit/source/apache-ant-${P}-src.tar.bz2.asc )"
+S="${WORKDIR}/apache-ant-${P}"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+
+VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/ant.apache.org.asc"
+BDEPEND="verify-sig? ( sec-keys/openpgp-keys-apache-ant )"
+# reset to ant-core:0 when ready
+CP_DEPEND="
+ dev-java/ant-core:0
+ dev-java/junit:4
+"
+DEPEND="${CP_DEPEND}
+ >=virtual/jdk-1.8:*
+ test? (
+ dev-java/ant-testutil:0
+ )
+"
+RDEPEND="${CP_DEPEND}
+ >=virtual/jre-1.8:*"
+
+DOCS=( NOTICE README WHATSNEW )
+HTML_DOCS=( README.html )
+
+JAVA_RESOURCE_DIRS="res"
+JAVA_SRC_DIR="src/main"
+
+JAVA_TEST_GENTOO_CLASSPATH="ant-testutil"
+JAVA_TEST_SRC_DIR="src/tests/junit"
+
+src_prepare() {
+ java-pkg-2_src_prepare
+ mkdir -p "res/org/apache/ant/antunit" || die
+ cp {src/main,res}/org/apache/ant/antunit/antlib.xml || die
+
+ # Some tests expect classes in "build" instead in "target" directory.
+ sed -e 's:build\(/classes\):target\1:' \
+ -i src/etc/testcases/assert.xml \
+ -i src/tests/junit/org/apache/ant/antunit/AssertTest.java || die
+ sed -e 's:build\(/test-classes\):target\1:' \
+ -i src/etc/testcases/antunit/java-io.xml || die
+}
+
+src_test() {
+ local vm_version="$(java-config -g PROVIDES_VERSION)"
+ if ver_test "${vm_version}" -ge 21; then
+ eapply "${FILESDIR}/antunit-1.4.1-AntUnitTest.patch"
+ # java.lang.UnsupportedOperationException:
+ # The Security Manager is deprecated and will be removed in a future release
+ JAVA_TEST_EXCLUDES="org.apache.ant.antunit.junit3.EatYourOwnDogFoodTest"
+ fi
+ java-pkg-simple_src_test
+}
diff --git a/dev-java/antunit/files/antunit-1.4.1-AntUnitTest.patch b/dev-java/antunit/files/antunit-1.4.1-AntUnitTest.patch
new file mode 100644
index 000000000000..896ccfee3d24
--- /dev/null
+++ b/dev-java/antunit/files/antunit-1.4.1-AntUnitTest.patch
@@ -0,0 +1,28 @@
+There was 1 failure:
+1) testSystemIoHandling(org.apache.ant.antunit.AntUnitTest)
+/var/tmp/portage/dev-java/antunit-1.4.1/work/apache-ant-antunit-1.4.1/src/etc/testcases/antunit.xml:84: Tests failed with 0 failures and 1 error
+ at org.apache.ant.antunit.AntUnit.execute(AntUnit.java:231)
+ at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
+ at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
+ at java.base/java.lang.reflect.Method.invoke(Method.java:580)
+ at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
+ at org.apache.tools.ant.Task.perform(Task.java:350)
+ at org.apache.tools.ant.Target.execute(Target.java:449)
+ at org.apache.tools.ant.Target.performTasks(Target.java:470)
+ at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)
+ at org.apache.tools.ant.Project.executeTarget(Project.java:1374)
+ at org.apache.ant.antunit.AntUnitTest.testSystemIoHandling(AntUnitTest.java:103)
+
+FAILURES!!!
+Tests run: 126, Failures: 1
+--- a/src/tests/junit/org/apache/ant/antunit/AntUnitTest.java
++++ b/src/tests/junit/org/apache/ant/antunit/AntUnitTest.java
+@@ -91,7 +91,7 @@ public class AntUnitTest extends BuildFileTest {
+ executeTarget("testNewProject");
+ }
+
+- public void testSystemIoHandling() {
++ public void noTestSystemIoHandling() {
+ PrintStream savedErr = System.err;
+ PrintStream savedOut = System.out;
+ try {
diff --git a/dev-java/antunit/metadata.xml b/dev-java/antunit/metadata.xml
new file mode 100644
index 000000000000..8c6f551aec20
--- /dev/null
+++ b/dev-java/antunit/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>java@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">apache/ant-antlibs-antunit</remote-id>
+ </upstream>
+</pkgmetadata>