From 6c988f4ed171aed46326587a0ec0d64297b20f49 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 11 Mar 2024 00:45:39 +0000 Subject: gentoo auto-resync : 11:03:2024 - 00:45:38 --- dev-java/ant/Manifest | 5 +- dev-java/ant/ant-1.10.14-r2.ebuild | 396 ------------------------------------- dev-java/ant/ant-1.10.14-r3.ebuild | 394 ++++++++++++++++++++++++++++++++++++ dev-java/ant/ant-1.10.9.ebuild | 47 ----- dev-java/ant/metadata.xml | 1 + 5 files changed, 397 insertions(+), 446 deletions(-) delete mode 100644 dev-java/ant/ant-1.10.14-r2.ebuild create mode 100644 dev-java/ant/ant-1.10.14-r3.ebuild delete mode 100644 dev-java/ant/ant-1.10.9.ebuild (limited to 'dev-java/ant') diff --git a/dev-java/ant/Manifest b/dev-java/ant/Manifest index 77c98c4ac071..278ca320c4da 100644 --- a/dev-java/ant/Manifest +++ b/dev-java/ant/Manifest @@ -6,6 +6,5 @@ AUX ant-1.10.14-LinkTest.patch 4329 BLAKE2B d4165d378dd63cab2a9d813c9d26c1ef7404 AUX ant-1.10.14-PathTest.patch 1114 BLAKE2B 870f35f250b4cd31317972c09f4a90eb26b71a8f198d1e96a085f99e0d6e41fd06c0598bcdae35c400aa8ba9b65e52b7dc0d7119308c60c8573a185907f2b7ba SHA512 9847fb3f6f3c2a37ac1e483ca7ac5685cc3d296b92ae35816fc4c58bb4de57d89196c50fabfa546efbec2303ea360066658507be0b4bdaeae3d5ff00e023f498 DIST apache-ant-1.10.14-src.tar.gz 4692736 BLAKE2B b07a2e61fecd4f10056ca2688615ccf02c551bba0f5749f50c2be710e90306e8044b7c557359300654d93971d94520e92f593da44b1c20626db4701d499cddff SHA512 435f97a276d88a86022c5f0680f3c2a16dc36be95adac3d797a2609d96921840a57393c8f5ef8313193146115bd6a87bd4790a4a272c44f7beec892fd6528c10 DIST apache-ant-1.10.14-src.tar.gz.asc 833 BLAKE2B d9a4b4b3cb22762f25b34651dc81c2f13af38e73fdca27bc2de562539cd8f1692744ac5ccf535a2c61d3035a129f30bafac133872f9ba0ed7b259393b0f4cdf6 SHA512 ff2e79c991f68a5c38c0b47556ca5f5301c1a8be219a9eddf8d2e17b09eed7f0426770c2dc18114ea432f0200ac824d71da633ad7881025692ce5ad4baa899ee -EBUILD ant-1.10.14-r2.ebuild 12955 BLAKE2B 89d15461574257fed1a8c5c4e0ebe4551c13b164a61a640c197faf552cae961240530ea65c190dc11f53a9b72fffcee4eaeffc557c9d2f1956f7408f9a136e3a SHA512 d713ff2d38ac8644ab95f7a3d971b5c1fdbcd0828fd567a7fa9d25b08c98014d321790e318f2f44f5db7b3ec5a86e6b6f5ef7bc88ca02b0751a5d46909195de7 -EBUILD ant-1.10.9.ebuild 1586 BLAKE2B d88da0b36e9dfb92586b1701f2535a96c1ec9857db67ed7c8d148f24f609c784dedec1820ee4dd3d69910d37455f82e1dd7eb5f95dc5535c96312d052b9bd77c SHA512 9df6451a03b308dac45fa8d11ea18c5ff842ec6da245f39a2804b9788877cac2af65088d833787bf51406841703bc5f0823bdf037358cdc6f0be21c89df2aec4 -MISC metadata.xml 1871 BLAKE2B 506545257db2a93e15fa3c36105453c6efa3c6505dff98d558bea9434637676df7fbf8a4db6e9a6fe04a54c913ad012226ce5e7eb682a8732f140fd6f676c194 SHA512 807240f5312ffa9c7ae789697c4f2ef481ec8819bd800eaa83639129f5bff16ab7c7e80cbe07a57c171faf5efa439c3d45d8e26514418c32ca1764e2c4163b36 +EBUILD ant-1.10.14-r3.ebuild 13056 BLAKE2B 10d9035afc8e89f418deafede5119eb1942eb40f13b88944ba85455fe0ba861a84b1fbeda703a838f1f7743672a5db9e46911c8f72f00f8f2d3957e8de801960 SHA512 9fdd8664f751c606cffc8836c7ea551a0b397ffe0b043556251ebaa3224b4b3a427095cf3ba53801ef6c4caa89627c89ff9df86816582d7805e08ac764eb748e +MISC metadata.xml 1928 BLAKE2B b48dbca1bf2ab76b0107466c68489722f4ceed5fa53f2a26d983dfd36c74efad96fce9f58d0e6bb5ba1e02d8e44135bcf96bd77b2db7491fd260da907c02fbab SHA512 9313f5e0914d9c64482c4897e659313480630316ca29b57190e976248a63a17b3c293198f82d4143bd25be0766cd4ce9556d2489d76adf74b0203a9dc4998726 diff --git a/dev-java/ant/ant-1.10.14-r2.ebuild b/dev-java/ant/ant-1.10.14-r2.ebuild deleted file mode 100644 index 9a6c7aacc165..000000000000 --- a/dev-java/ant/ant-1.10.14-r2.ebuild +++ /dev/null @@ -1,396 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -JAVA_PKG_IUSE="doc source test" -MAVEN_PROVIDES=" - org.apache.ant:ant:${PV} - org.apache.ant:ant-launcher:${PV} -" -JAVA_TESTING_FRAMEWORKS="junit-4" - -inherit java-pkg-2 java-pkg-simple verify-sig prefix - -DESCRIPTION="Java-based build tool similar to 'make' that uses XML configuration files" -HOMEPAGE="https://ant.apache.org/" -SRC_URI="mirror://apache/ant/source/apache-${P}-src.tar.gz - verify-sig? ( https://downloads.apache.org/ant/source/apache-${P}-src.tar.gz.asc )" -S="${WORKDIR}/apache-${P}" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="amd64 ~arm arm64 ppc64 x86" -IUSE="bcel bsf commonslogging commonsnet jai jakartamail javamail jdepend jsch junit junit4 - junitlauncher log4j oro regexp resolver testutil xalan xz" - -# At least 10 test cases would fail without network -PROPERTIES="test_network" -RESTRICT="test" - -REQUIRED_USE=" - junit4? ( junit ) - test? ( bsf ) - testutil? ( junit ) -" - -VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/ant.apache.org.asc" -BDEPEND="verify-sig? ( sec-keys/openpgp-keys-apache-ant )" -# jdk-11:* because it needs java/util/spi/ToolProvider, available since Java 9. -DEPEND=" - >=virtual/jdk-11:* - bcel? ( dev-java/bcel:0 ) - bsf? ( dev-java/bsf:2.3 ) - commonslogging? ( dev-java/commons-logging:0 ) - commonsnet? ( dev-java/commons-net:0 ) - jai? ( dev-java/sun-jai-bin:0 ) - jakartamail? ( dev-java/jakarta-mail:0 ) - javamail? ( - dev-java/jakarta-activation-api:1 - dev-java/javax-mail:0 - ) - jdepend? ( >=dev-java/jdepend-2.10-r1:0 ) - jsch? ( dev-java/jsch:0 ) - junit4? ( dev-java/junit:4 ) - junit? ( dev-java/junit:4 ) - junitlauncher? ( dev-java/junit:5[vintage] ) - log4j? ( dev-java/log4j-12-api:2 ) - oro? ( dev-java/jakarta-oro:2.0 ) - regexp? ( dev-java/jakarta-regexp:1.4 ) - resolver? ( dev-java/xml-commons-resolver:0 ) - test? ( - dev-java/antunit:0 - dev-java/bsf:2.3[javascript] - dev-java/bsh:0 - dev-java/hamcrest-library:1.3 - dev-java/xerces:2 - ) - xalan? ( - dev-java/xalan:0 - dev-java/xalan-serializer:0 - ) - xz? ( dev-java/xz-java:0 ) -" -PDEPEND="~dev-java/ant-core-${PV}:0" -RDEPEND=" - !=virtual/jre-1.8:* -" - -DOCS=( CONTRIBUTORS INSTALL NOTICE README WHATSNEW ) -PATCHES=( - "${FILESDIR}/1.10.9-launch.patch" # reusing this patch since the script has not changed - "${FILESDIR}/ant-1.10.14-AntlibTest.patch" # skips 1 of 6 tests - "${FILESDIR}/ant-1.10.14-AntTest.patch" # skips 1 of 32 tests - "${FILESDIR}/ant-1.10.14-JavaTest.patch" # skips 12 of 38 tests - "${FILESDIR}/ant-1.10.14-LinkTest.patch" # skips 4 of 67 tests - "${FILESDIR}/ant-1.10.14-PathTest.patch" # skips 1 of 33 tests -) - -JAVADOC_SRC_DIRS=( - ant - ant-launcher/src/main -) -JAVA_TEST_GENTOO_CLASSPATH=" - bsh - hamcrest-library-1.3 - junit-4 - xerces-2 -" -JAVA_TEST_RESOURCE_DIRS=( - "src/etc/testcases" - "src/main" -) -JAVA_TEST_SRC_DIR="src/tests/junit" - -# $1 ant-apache-bsf (source directory) -# $2 bsf-2.3 (classpath of external dependency) -taskdeps() { - if [[ ${task} == $1 ]]; then - JAVA_CLASSPATH_EXTRA="${2}" - JAVADOC_CLASSPATH+=" ${2}" - JAVADOC_SRC_DIRS+=( "${task}/src/main" ) - JAVA_RESOURCE_DIRS="${3}" - fi -} - -src_prepare() { - default #780585 - java-pkg-2_src_prepare - java-pkg_clean ! -path "./src/etc/*" # keep test resources - - eprefixify "src/script/ant" - - ANT_TASKS=( - ant-antlr # no dependencies - $(use bcel && echo ant-apache-bcel) - $(use bsf && echo ant-apache-bsf) # REQUIRED_USE for tests - $(use log4j && echo ant-apache-log4j) - $(use oro && echo ant-apache-oro) # ORO is retired - replace with java.util.regex? - $(use regexp && echo ant-apache-regexp) - $(use resolver && echo ant-apache-resolver) - $(use xalan && echo ant-apache-xalan2) - $(use commonslogging && echo ant-commons-logging) - $(use commonsnet && echo ant-commons-net) - ant-imageio # no dependencies - $(use jai && echo ant-jai) - $(use jakartamail && echo ant-jakartamail) - $(use javamail && echo ant-javamail) - $(use jdepend && echo ant-jdepend) - ant-jmf # no dependencies - $(use jsch && echo ant-jsch) - $(use junit && echo ant-junit) # REQUIRED_USE for junit4 and for testutil - $(use junit4 && echo ant-junit4) - $(use junitlauncher && echo ant-junitlauncher) - # depends on "com.ibm.netrexx:netrexx:2.0.5" which is - # available on https://www.netrexx.org/downloads.nsp and states: - # "IBM's last NetRexx release, suitable for JVM versions 1.5 and below [...]" - # $(use netrexx && echo ant-netrexx) # src/etc/poms/ant-netrexx/pom.xml - ant-swing # no dependencies - $(use testutil && echo ant-testutil) - $(use xz && echo ant-xz) - ) - - # defaultManifest.mf - sed -e "s:\${project.version}:${PV}:" \ - -i src/main/org/apache/tools/ant/defaultManifest.mf || die - - # version.txt - local mydate="$(date '+%B %d %Y')" - echo "VERSION=${PV}" > src/main/org/apache/tools/ant/version.txt || die - echo "DATE=${mydate}" >> src/main/org/apache/tools/ant/version.txt || die - - # src directory for ant.jar - mkdir ant || die "cannot create src directory for ant" - cp -r {src/main/,ant}/org || die "cannot copy ant sources" - - # resources directory for ant.jar according to lines 317-325 src/etc/poms/ant/pom.xml - local INCLUDES=( $( - sed -n '//,/<\/resources>/p' \ - src/etc/poms/ant/pom.xml \ - | grep org \ - | sed -e 's:.*\(.*\):\1:' || die - )) - cp -r {src/,ant}/resources || die "cannot copy ant resources" - pushd src/main > /dev/null || die "pushd src/main" - cp --parents -v "${INCLUDES[@]}" ../../ant/resources || die "CANNOT" - popd > /dev/null || die "popd" - - # Remove sources according to lines 158-187 src/etc/poms/ant/pom.xml - # We don't remove anything from src/main/org - local EXCLUDES=$( - sed -n '//,/<\/excludes/p' \ - src/etc/poms/ant/pom.xml \ - | grep org \ - | sed -e 's:\(.*\):ant/\1:' || die - ) - rm -r ${EXCLUDES} || die - # Remove one more file directly, could not get it with sed. - rm ant/org/apache/tools/ant/taskdefs/optional/ANTLR.java || die - - # Same handling for everything between - # Removing non-existing files is not possible: We ignore them ( grep -v ). - local TEST_EXCLUDES=$( - sed -n '//,/<\/testExcludes/p' \ - src/etc/poms/ant/pom.xml \ - | grep org \ - | grep -v CommonsLoggingListener \ - | grep -v Log4jListener \ - | sed -e 's:\(.*\):src/tests/junit/\1:' || die - ) - rm -r ${TEST_EXCLUDES} || die - - # Prepare a separate JAVA_SRC_DIR directory for each jar file to be created. - einfo "Copy source files of ant-tasks" - local task - for task in ant-launcher "${ANT_TASKS[@]}"; do - # "${task}/src/main" will be JAVA_SRC_DIR - mkdir -p "${task}/src/main" || die "mkdir ${task}" - # Read from pom.xml the file names which can still contain wildcards - local INCLUDES=( $( - sed -n '//,/<\/includes>/p' "src/etc/poms/${task}/pom.xml" \ - | grep org \ - | sed -e 's:.*\(.*\):\1:' || die - )) - local sourcefile - # Resolve wildcards in file names using find and copy the files to the corresponding - # "${task}"/src/main directory - # echo "${INCLUDES[@]}" - for sourcefile in "${INCLUDES[@]}"; do - # einfo "${task}: ${sourcefile}" - # Parameter substitution % to remove trailing slash from ${sourcefile}. - # Applies to ant-jdepend and ant-junitlauncher where find would otherwise fail. - find \ - -path "./src/*/${sourcefile%/}" \ - -exec cp -r --parents "{}" \ - "${task}/src/main" \; - done - # tree "${task}" - done - - # JAVA_RESOURCE_DIRS for ant-junit - mkdir -p ant-junit/src/resources/org/apache/tools/ant/taskdefs/optional/junit/xsl \ - || die "junit resource dir" - cp src/etc/{junit-frames,junit-noframes,junit-frames-saxon,junit-noframes-saxon}.xsl \ - ant-junit/src/resources/org/apache/tools/ant/taskdefs/optional/junit/xsl \ - || die "junit resources" -} - -src_compile() { - einfo "Compiling ant-launcher.jar" - JAVA_JAR_FILENAME="ant-launcher.jar" - JAVA_MAIN_CLASS="org.apache.tools.ant.launch.Launcher" - JAVA_SRC_DIR="ant-launcher/src/main" - java-pkg-simple_src_compile - JAVA_GENTOO_CLASSPATH_EXTRA+=":ant-launcher.jar" - rm -r target || die - - einfo "Compiling ant.jar" - JAVA_JAR_FILENAME="ant.jar" - JAVA_LAUNCHER_FILENAME="ant" - JAVA_MAIN_CLASS="org.apache.tools.ant.Main" - JAVA_RESOURCE_DIRS="ant/resources" - JAVA_SRC_DIR="ant" - java-pkg-simple_src_compile - JAVA_GENTOO_CLASSPATH_EXTRA+=":ant.jar" - rm -r target || die - - local task - for task in "${ANT_TASKS[@]}"; do - einfo "Compiling ${task}" - JAVA_JAR_FILENAME="${task}.jar" - JAVA_MAIN_CLASS="" - JAVA_RESOURCE_DIRS="" - JAVA_SRC_DIR="" - - JAVA_SRC_DIR="${task}/src/main" - taskdeps ant-apache-bcel bcel - taskdeps ant-apache-bsf bsf-2.3 - taskdeps ant-apache-log4j log4j-12-api-2 - taskdeps ant-apache-oro jakarta-oro-2.0 - taskdeps ant-apache-regexp jakarta-regexp-1.4 - taskdeps ant-apache-resolver xml-commons-resolver - taskdeps ant-apache-xalan2 xalan - taskdeps ant-commons-logging commons-logging - taskdeps ant-commons-net commons-net - taskdeps ant-jai sun-jai-bin - taskdeps ant-jakartamail jakarta-mail - taskdeps ant-javamail 'javax-mail jakarta-activation-api-1' - taskdeps ant-jdepend jdepend - taskdeps ant-jsch jsch - taskdeps ant-junit junit-4 ant-junit/src/resources - taskdeps ant-junit4 junit-4 - taskdeps ant-junitlauncher junit-5 - # $(use netrexx && echo ant-netrexx) - taskdeps ant-xz xz-java - - java-pkg-simple_src_compile - JAVA_GENTOO_CLASSPATH_EXTRA+=":${task}.jar" - rm -fr target || die - done - use doc && ejavadoc -} - -src_test() { - # Avoid "--with-dependencies" as used by JAVA_TEST_GENTOO_CLASSPATH. - # dev-java/antunit has a circular dependency with dev-java/ant[test] - JAVA_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjars --build-only antunit)" - # according to line 115 src/etc/poms/ant/pom.xml - jar -cvf src/etc/testcases/org/apache/tools/ant/taskdefs/test2-antlib.jar \ - -C src/etc/testcases taskdefs/test.antlib.xml || die "cannot test2-antlib.jar" - - JAVA_TEST_EXCLUDES=( - # according to lines 1956-1964 build.xml (abstract classes, not testcases) - org.apache.tools.ant.taskdefs.TaskdefsTest - org.apache.tools.ant.BuildFileTest - org.apache.tools.ant.util.regexp.RegexpMatcherTest - org.apache.tools.ant.util.regexp.RegexpTest - org.apache.tools.ant.types.selectors.BaseSelectorTest - # according to line 1970 build.xml (helper classes, not testcases) - org.apache.tools.ant.TestHelper - # lines 2097-2102 build.xml (interactive tests) - org.apache.tools.ant.taskdefs.TestProcess # 1. No runnable methods - # 1) testAll(org.apache.tools.ant.taskdefs.InitializeClassTest) - # /var/tmp/portage/dev-java/ant-1.10.14/work/apache-ant-1.10.14/ - # src/etc/testcases/taskdefs/initializeclass.xml:24: Java returned: 1 - # - # - org.apache.tools.ant.taskdefs.InitializeClassTest # Tests run: 1, Failures: 1 - ) - -# tests with patches to be revisited -# JAVA_TEST_RUN_ONLY=( -# org.apache.tools.ant.taskdefs.AntlibTest # Tests run: 6, Failures: 1 test2-antlib.jar? -# org.apache.tools.ant.taskdefs.AntTest # Tests run: 32, Failures: 1 -# org.apache.tools.ant.taskdefs.JavaTest # Tests run: 38, Failures: 12 -# org.apache.tools.ant.taskdefs.modules.LinkTest # Tests run: 67, Failures: 4 -# org.apache.tools.ant.types.PathTest # Tests run: 33, Failures: 1 -# ) - - # according to lines 276-297 src/etc/poms/ant/pom.xml - JAVA_TEST_EXTRA_ARGS=( - -Dant.home="${ANT_HOME}" - -Dbuild.classes.value=../../../target/test-classes # needed for org.apache.tools.ant.taskdefs.SignJarTest - -Dbuild.tests.value=target/test-classes - -Doffline=true - -Dant.test.basedir.ignore=true - ) - java-pkg-simple_src_test -} - -src_install() { - java-pkg_dojar ant.jar ant-launcher.jar - - # Compatibility symlink, should be removed after transition period. - dosym -r /usr/share/ant{,-core}/lib/ant.jar - - for task in "${ANT_TASKS[@]}"; do - java-pkg_dojar "${task}.jar" - java-pkg_register-ant-task --version "${PV}" "${task}" - done - - dobin src/script/ant - - dodir /usr/share/ant/bin - for each in antRun antRun.pl runant.pl runant.py ; do - dobin "${S}/src/script/${each}" - done - - insinto /usr/share/ant/etc - doins -r src/etc/*.xsl - insinto /usr/share/ant/etc/checkstyle - doins -r src/etc/checkstyle/*.xsl - - echo "ANT_HOME=\"${EPREFIX}/usr/share/ant\"" > "${T}/20ant" - doenvd "${T}/20ant" - - einstalldocs - if use doc; then - java-pkg_dojavadoc target/api - docinto html - dodoc -r manual - fi - - use source && java-pkg_dosrc src/main/* -} diff --git a/dev-java/ant/ant-1.10.14-r3.ebuild b/dev-java/ant/ant-1.10.14-r3.ebuild new file mode 100644 index 000000000000..d1d0486dd712 --- /dev/null +++ b/dev-java/ant/ant-1.10.14-r3.ebuild @@ -0,0 +1,394 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +JAVA_PKG_IUSE="doc source test" +MAVEN_PROVIDES=" + org.apache.ant:ant:${PV} + org.apache.ant:ant-launcher:${PV} +" +JAVA_TESTING_FRAMEWORKS="junit-4" + +inherit java-pkg-2 java-pkg-simple verify-sig prefix + +DESCRIPTION="Java-based build tool similar to 'make' that uses XML configuration files" +HOMEPAGE="https://ant.apache.org/" +SRC_URI="mirror://apache/ant/source/apache-${P}-src.tar.gz + verify-sig? ( https://downloads.apache.org/ant/source/apache-${P}-src.tar.gz.asc )" +S="${WORKDIR}/apache-${P}" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="amd64 ~arm arm64 ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris" +IUSE="antlr bcel bsf commonslogging commonsnet imageio jai jakartamail javamail jdepend + jmf jsch junit junit4 junitlauncher log4j oro regexp resolver swing testutil xalan xz" + +# At least 10 test cases would fail without network +PROPERTIES="test_network" +RESTRICT="test" + +REQUIRED_USE=" + junit4? ( junit ) + test? ( bsf ) + testutil? ( junit ) +" + +VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/ant.apache.org.asc" +BDEPEND="verify-sig? ( sec-keys/openpgp-keys-apache-ant )" +# jdk-11:* because it needs java/util/spi/ToolProvider, available since Java 9. +DEPEND=" + >=virtual/jdk-11:* + bcel? ( dev-java/bcel:0 ) + bsf? ( dev-java/bsf:2.3 ) + commonslogging? ( dev-java/commons-logging:0 ) + commonsnet? ( dev-java/commons-net:0 ) + jai? ( dev-java/sun-jai-bin:0 ) + jakartamail? ( dev-java/jakarta-mail:0 ) + javamail? ( + dev-java/jakarta-activation-api:1 + dev-java/javax-mail:0 + ) + jdepend? ( >=dev-java/jdepend-2.10-r1:0 ) + jsch? ( dev-java/jsch:0 ) + junit4? ( dev-java/junit:4 ) + junit? ( dev-java/junit:4 ) + junitlauncher? ( dev-java/junit:5[vintage] ) + log4j? ( dev-java/log4j-12-api:2 ) + oro? ( dev-java/jakarta-oro:2.0 ) + regexp? ( dev-java/jakarta-regexp:1.4 ) + resolver? ( dev-java/xml-commons-resolver:0 ) + test? ( + dev-java/antunit:0 + dev-java/bsf:2.3[javascript] + dev-java/bsh:0 + dev-java/hamcrest-library:1.3 + dev-java/xerces:2 + ) + xalan? ( + dev-java/xalan:0 + dev-java/xalan-serializer:0 + ) + xz? ( dev-java/xz-java:0 ) +" +RDEPEND=" + !dev-java/ant-apache-regexp + !dev-java/ant-apache-log4j + !dev-java/ant-apache-xalan2 + !dev-java/ant-commons-logging + !dev-java/ant-swing + !dev-java/ant-junit4 + !dev-java/ant-testutil + !dev-java/ant-junitlauncher + !dev-java/ant-jai + !dev-java/ant-commons-net + !dev-java/ant-apache-bsf + !dev-java/ant-jmf + !dev-java/ant-apache-oro + !dev-java/ant-javamail + !dev-java/ant-junit + !dev-java/ant-jdepend + !dev-java/ant-antlr + !dev-java/ant-apache-bcel + !dev-java/ant-apache-resolver + !dev-java/ant-jsch + !dev-java/ant-xz + >=virtual/jre-1.8:* +" + +DOCS=( CONTRIBUTORS INSTALL NOTICE README WHATSNEW ) +PATCHES=( + "${FILESDIR}/1.10.9-launch.patch" # reusing this patch since the script has not changed + "${FILESDIR}/ant-1.10.14-AntlibTest.patch" # skips 1 of 6 tests + "${FILESDIR}/ant-1.10.14-AntTest.patch" # skips 1 of 32 tests + "${FILESDIR}/ant-1.10.14-JavaTest.patch" # skips 12 of 38 tests + "${FILESDIR}/ant-1.10.14-LinkTest.patch" # skips 4 of 67 tests + "${FILESDIR}/ant-1.10.14-PathTest.patch" # skips 1 of 33 tests +) + +JAVADOC_SRC_DIRS=( + ant + ant-launcher/src/main +) +JAVA_TEST_GENTOO_CLASSPATH=" + bsh + hamcrest-library-1.3 + junit-4 + xerces-2 +" +JAVA_TEST_RESOURCE_DIRS=( + "src/etc/testcases" + "src/main" +) +JAVA_TEST_SRC_DIR="src/tests/junit" + +# $1 ant-apache-bsf (source directory) +# $2 bsf-2.3 (classpath of external dependency) +taskdeps() { + if [[ ${task} == $1 ]]; then + JAVA_CLASSPATH_EXTRA="${2}" + JAVADOC_CLASSPATH+=" ${2}" + JAVADOC_SRC_DIRS+=( "${task}/src/main" ) + JAVA_RESOURCE_DIRS="${3}" + fi +} + +src_prepare() { + default #780585 + java-pkg-2_src_prepare + java-pkg_clean ! -path "./src/etc/*" # keep test resources + + eprefixify "src/script/ant" + + ANT_TASKS=( + $(use antlr && echo ant-antlr) # no dependencies + $(use bcel && echo ant-apache-bcel) + $(use bsf && echo ant-apache-bsf) # REQUIRED_USE for tests + $(use log4j && echo ant-apache-log4j) + $(use oro && echo ant-apache-oro) # ORO is retired - replace with java.util.regex? + $(use regexp && echo ant-apache-regexp) + $(use resolver && echo ant-apache-resolver) + $(use xalan && echo ant-apache-xalan2) + $(use commonslogging && echo ant-commons-logging) + $(use commonsnet && echo ant-commons-net) + $(use imageio && echo ant-imageio) # no dependencies + $(use jai && echo ant-jai) + $(use jakartamail && echo ant-jakartamail) + $(use javamail && echo ant-javamail) + $(use jdepend && echo ant-jdepend) + $(use jmf && echo ant-jmf) # no dependencies + $(use jsch && echo ant-jsch) + $(use junit && echo ant-junit) # REQUIRED_USE for junit4 and for testutil + $(use junit4 && echo ant-junit4) + $(use junitlauncher && echo ant-junitlauncher) + # depends on "com.ibm.netrexx:netrexx:2.0.5" which is + # available on https://www.netrexx.org/downloads.nsp and states: + # "IBM's last NetRexx release, suitable for JVM versions 1.5 and below [...]" + # $(use netrexx && echo ant-netrexx) # src/etc/poms/ant-netrexx/pom.xml + $(use swing && echo ant-swing) # no dependencies + $(use testutil && echo ant-testutil) + $(use xz && echo ant-xz) + ) + + # defaultManifest.mf + sed -e "s:\${project.version}:${PV}:" \ + -i src/main/org/apache/tools/ant/defaultManifest.mf || die + + # version.txt + local mydate="$(date '+%B %d %Y')" + echo "VERSION=${PV}" > src/main/org/apache/tools/ant/version.txt || die + echo "DATE=${mydate}" >> src/main/org/apache/tools/ant/version.txt || die + + # src directory for ant.jar + mkdir ant || die "cannot create src directory for ant" + cp -r {src/main/,ant}/org || die "cannot copy ant sources" + + # resources directory for ant.jar according to lines 317-325 src/etc/poms/ant/pom.xml + local INCLUDES=( $( + sed -n '//,/<\/resources>/p' \ + src/etc/poms/ant/pom.xml \ + | grep org \ + | sed -e 's:.*\(.*\):\1:' || die + )) + cp -r {src/,ant}/resources || die "cannot copy ant resources" + pushd src/main > /dev/null || die "pushd src/main" + cp --parents -v "${INCLUDES[@]}" ../../ant/resources || die "CANNOT" + popd > /dev/null || die "popd" + + # Remove sources according to lines 158-187 src/etc/poms/ant/pom.xml + # We don't remove anything from src/main/org + local EXCLUDES=$( + sed -n '//,/<\/excludes/p' \ + src/etc/poms/ant/pom.xml \ + | grep org \ + | sed -e 's:\(.*\):ant/\1:' || die + ) + rm -r ${EXCLUDES} || die + # Remove one more file directly, could not get it with sed. + rm ant/org/apache/tools/ant/taskdefs/optional/ANTLR.java || die + + # Same handling for everything between + # Removing non-existing files is not possible: We ignore them ( grep -v ). + local TEST_EXCLUDES=$( + sed -n '//,/<\/testExcludes/p' \ + src/etc/poms/ant/pom.xml \ + | grep org \ + | grep -v CommonsLoggingListener \ + | grep -v Log4jListener \ + | sed -e 's:\(.*\):src/tests/junit/\1:' || die + ) + rm -r ${TEST_EXCLUDES} || die + + # Prepare a separate JAVA_SRC_DIR directory for each jar file to be created. + einfo "Copy source files of ant-tasks" + local task + for task in ant-launcher "${ANT_TASKS[@]}"; do + # "${task}/src/main" will be JAVA_SRC_DIR + mkdir -p "${task}/src/main" || die "mkdir ${task}" + # Read from pom.xml the file names which can still contain wildcards + local INCLUDES=( $( + sed -n '//,/<\/includes>/p' "src/etc/poms/${task}/pom.xml" \ + | grep org \ + | sed -e 's:.*\(.*\):\1:' || die + )) + local sourcefile + # Resolve wildcards in file names using find and copy the files to the corresponding + # "${task}"/src/main directory + # echo "${INCLUDES[@]}" + for sourcefile in "${INCLUDES[@]}"; do + # einfo "${task}: ${sourcefile}" + # Parameter substitution % to remove trailing slash from ${sourcefile}. + # Applies to ant-jdepend and ant-junitlauncher where find would otherwise fail. + find \ + -path "./src/*/${sourcefile%/}" \ + -exec cp -r --parents "{}" \ + "${task}/src/main" \; + done + # tree "${task}" + done + + # JAVA_RESOURCE_DIRS for ant-junit + mkdir -p ant-junit/src/resources/org/apache/tools/ant/taskdefs/optional/junit/xsl \ + || die "junit resource dir" + cp src/etc/{junit-frames,junit-noframes,junit-frames-saxon,junit-noframes-saxon}.xsl \ + ant-junit/src/resources/org/apache/tools/ant/taskdefs/optional/junit/xsl \ + || die "junit resources" +} + +src_compile() { + einfo "Compiling ant-launcher.jar" + JAVA_JAR_FILENAME="ant-launcher.jar" + JAVA_MAIN_CLASS="org.apache.tools.ant.launch.Launcher" + JAVA_SRC_DIR="ant-launcher/src/main" + java-pkg-simple_src_compile + JAVA_GENTOO_CLASSPATH_EXTRA+=":ant-launcher.jar" + rm -r target || die + + einfo "Compiling ant.jar" + JAVA_JAR_FILENAME="ant.jar" + JAVA_LAUNCHER_FILENAME="ant" + JAVA_MAIN_CLASS="org.apache.tools.ant.Main" + JAVA_RESOURCE_DIRS="ant/resources" + JAVA_SRC_DIR="ant" + java-pkg-simple_src_compile + JAVA_GENTOO_CLASSPATH_EXTRA+=":ant.jar" + rm -r target || die + + local task + for task in "${ANT_TASKS[@]}"; do + einfo "Compiling ${task}" + JAVA_JAR_FILENAME="${task}.jar" + JAVA_MAIN_CLASS="" + JAVA_RESOURCE_DIRS="" + JAVA_SRC_DIR="" + + JAVA_SRC_DIR="${task}/src/main" + taskdeps ant-apache-bcel bcel + taskdeps ant-apache-bsf bsf-2.3 + taskdeps ant-apache-log4j log4j-12-api-2 + taskdeps ant-apache-oro jakarta-oro-2.0 + taskdeps ant-apache-regexp jakarta-regexp-1.4 + taskdeps ant-apache-resolver xml-commons-resolver + taskdeps ant-apache-xalan2 xalan + taskdeps ant-commons-logging commons-logging + taskdeps ant-commons-net commons-net + taskdeps ant-jai sun-jai-bin + taskdeps ant-jakartamail jakarta-mail + taskdeps ant-javamail 'javax-mail jakarta-activation-api-1' + taskdeps ant-jdepend jdepend + taskdeps ant-jsch jsch + taskdeps ant-junit junit-4 ant-junit/src/resources + taskdeps ant-junit4 junit-4 + taskdeps ant-junitlauncher junit-5 + # $(use netrexx && echo ant-netrexx) + taskdeps ant-xz xz-java + + java-pkg-simple_src_compile + JAVA_GENTOO_CLASSPATH_EXTRA+=":${task}.jar" + rm -fr target || die + done + use doc && ejavadoc +} + +src_test() { + # Avoid "--with-dependencies" as used by JAVA_TEST_GENTOO_CLASSPATH. + # dev-java/antunit has a circular dependency with dev-java/ant[test] + JAVA_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjars --build-only antunit)" + # according to line 115 src/etc/poms/ant/pom.xml + jar -cvf src/etc/testcases/org/apache/tools/ant/taskdefs/test2-antlib.jar \ + -C src/etc/testcases taskdefs/test.antlib.xml || die "cannot test2-antlib.jar" + + JAVA_TEST_EXCLUDES=( + # according to lines 1956-1964 build.xml (abstract classes, not testcases) + org.apache.tools.ant.taskdefs.TaskdefsTest + org.apache.tools.ant.BuildFileTest + org.apache.tools.ant.util.regexp.RegexpMatcherTest + org.apache.tools.ant.util.regexp.RegexpTest + org.apache.tools.ant.types.selectors.BaseSelectorTest + # according to line 1970 build.xml (helper classes, not testcases) + org.apache.tools.ant.TestHelper + # lines 2097-2102 build.xml (interactive tests) + org.apache.tools.ant.taskdefs.TestProcess # 1. No runnable methods + # 1) testAll(org.apache.tools.ant.taskdefs.InitializeClassTest) + # /var/tmp/portage/dev-java/ant-1.10.14/work/apache-ant-1.10.14/ + # src/etc/testcases/taskdefs/initializeclass.xml:24: Java returned: 1 + # + # + org.apache.tools.ant.taskdefs.InitializeClassTest # Tests run: 1, Failures: 1 + ) + +# tests with patches to be revisited +# JAVA_TEST_RUN_ONLY=( +# org.apache.tools.ant.taskdefs.AntlibTest # Tests run: 6, Failures: 1 test2-antlib.jar? +# org.apache.tools.ant.taskdefs.AntTest # Tests run: 32, Failures: 1 +# org.apache.tools.ant.taskdefs.JavaTest # Tests run: 38, Failures: 12 +# org.apache.tools.ant.taskdefs.modules.LinkTest # Tests run: 67, Failures: 4 +# org.apache.tools.ant.types.PathTest # Tests run: 33, Failures: 1 +# ) + + # according to lines 276-297 src/etc/poms/ant/pom.xml + JAVA_TEST_EXTRA_ARGS=( + -Dant.home="${ANT_HOME}" + -Dbuild.classes.value=../../../target/test-classes # needed for org.apache.tools.ant.taskdefs.SignJarTest + -Dbuild.tests.value=target/test-classes + -Doffline=true + -Dant.test.basedir.ignore=true + ) + java-pkg-simple_src_test +} + +src_install() { + java-pkg_dojar ant.jar ant-launcher.jar + + # Compatibility symlink, should be removed after transition period. + dosym -r /usr/share/ant{,-core}/lib/ant.jar + + for task in "${ANT_TASKS[@]}"; do + java-pkg_dojar "${task}.jar" + java-pkg_register-ant-task --version "${PV}" "${task}" + done + + dobin src/script/ant + + dodir /usr/share/ant/bin + for each in antRun antRun.pl runant.pl runant.py ; do + dobin "${S}/src/script/${each}" + done + + insinto /usr/share/ant/etc + doins -r src/etc/*.xsl + insinto /usr/share/ant/etc/checkstyle + doins -r src/etc/checkstyle/*.xsl + + echo "ANT_HOME=\"${EPREFIX}/usr/share/ant\"" > "${T}/20ant" + doenvd "${T}/20ant" + + einstalldocs + if use doc; then + java-pkg_dojavadoc target/api + docinto html + dodoc -r manual + fi + + use source && java-pkg_dosrc src/main/* +} diff --git a/dev-java/ant/ant-1.10.9.ebuild b/dev-java/ant/ant-1.10.9.ebuild deleted file mode 100644 index e68c9948a493..000000000000 --- a/dev-java/ant/ant-1.10.9.ebuild +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DESCRIPTION="Java-based build tool similar to 'make' that uses XML configuration files" -HOMEPAGE="https://ant.apache.org/" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="amd64 ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris" - -IUSE="X +antlr +bcel +bsf +commonslogging +commonsnet jai +javamail +jdepend jmf - +jsch +junit +junit4 +junitlauncher +log4j +oro +regexp +resolver swing testutil xz" - -DEPEND="~dev-java/ant-core-${PV}" - -RDEPEND="${DEPEND} - ~dev-java/ant-core-${PV} - ~dev-java/ant-junit-${PV} - ~dev-java/ant-apache-xalan2-${PV} - antlr? ( ~dev-java/ant-antlr-${PV} ) - bcel? ( ~dev-java/ant-apache-bcel-${PV} ) - bsf? ( ~dev-java/ant-apache-bsf-${PV} ) - commonslogging? ( ~dev-java/ant-commons-logging-${PV} ) - commonsnet? ( ~dev-java/ant-commons-net-${PV} ) - jai? ( ~dev-java/ant-jai-${PV} ) - javamail? ( ~dev-java/ant-javamail-${PV} ) - jdepend? ( ~dev-java/ant-jdepend-${PV} ) - jmf? ( ~dev-java/ant-jmf-${PV} ) - jsch? ( ~dev-java/ant-jsch-${PV} ) - junit? ( ~dev-java/ant-junit-${PV} ) - junit4? ( ~dev-java/ant-junit4-${PV} ) - junitlauncher? ( ~dev-java/ant-junitlauncher-${PV} ) - log4j? ( ~dev-java/ant-apache-log4j-${PV} ) - oro? ( ~dev-java/ant-apache-oro-${PV} ) - regexp? ( ~dev-java/ant-apache-regexp-${PV} ) - resolver? ( ~dev-java/ant-apache-resolver-${PV} ) - swing? ( ~dev-java/ant-swing-${PV} ) - testutil? ( ~dev-java/ant-testutil-${PV} ) - X? ( ~dev-java/ant-swing-${PV} ) - xz? ( ~dev-java/ant-xz-${PV} ) -" - -S="${WORKDIR}" - -src_compile() { :; } diff --git a/dev-java/ant/metadata.xml b/dev-java/ant/metadata.xml index fbae5fba582e..1c03ec86e251 100644 --- a/dev-java/ant/metadata.xml +++ b/dev-java/ant/metadata.xml @@ -12,6 +12,7 @@ (dev-java/bsf) Enable commons-logging Ant tasks Enable commons-net Ant tasks + Enable imageio Ant tasks Enable JAI (Java Imaging) Ant task Enable Jakartamail Ant task Enable JavaMail Ant task -- cgit v1.2.3