diff options
author | Volkmar W. Pogatzki <gentoo@pogatzki.net> | 2024-02-10 11:31:55 +0100 |
---|---|---|
committer | Miroslav Šulc <fordfrog@gentoo.org> | 2024-02-11 13:12:27 +0100 |
commit | 51d423fd6ac15959e34a3958c87c7d78154b6545 (patch) | |
tree | cfd17726804481c6b9e4d0fe509d5638ce4772a3 | |
parent | dev-java/jakartaee-migration: add github upstream metadata (diff) | |
download | gentoo-51d423fd6ac15959e34a3958c87c7d78154b6545.tar.gz gentoo-51d423fd6ac15959e34a3958c87c7d78154b6545.tar.bz2 gentoo-51d423fd6ac15959e34a3958c87c7d78154b6545.zip |
dev-java/jakartaee-migration: add 1.0.8
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
-rw-r--r-- | dev-java/commons-compress/Manifest | 1 | ||||
-rw-r--r-- | dev-java/commons-compress/commons-compress-1.25.0.ebuild | 83 | ||||
-rw-r--r-- | dev-java/jakartaee-migration/Manifest | 1 | ||||
-rw-r--r-- | dev-java/jakartaee-migration/jakartaee-migration-1.0.8.ebuild | 72 |
4 files changed, 81 insertions, 76 deletions
diff --git a/dev-java/commons-compress/Manifest b/dev-java/commons-compress/Manifest index d12369cb098f..9602eaf51057 100644 --- a/dev-java/commons-compress/Manifest +++ b/dev-java/commons-compress/Manifest @@ -1,2 +1,3 @@ DIST commons-compress-1.21-src.tar.gz 15165800 BLAKE2B 3fed32af039860c6b434c485f0c78939ed810a224a12680ddf1d9d6ed540f4e74530edd0e0077fd41af31404c296a607db912465cfd725c31446bc6fa7b8df8a SHA512 8041371b491057435ca62390e70b30031e4d21e80c37d9cb922fdffa794b56aee3b5d60d8241e4db0cecc28c82dfdaafbe52b2175e26062da169fec8efbb17e1 DIST commons-compress-1.25.0-src.tar.gz 48385431 BLAKE2B d0ddf5ebc405355c771532dc64ddcacb6a8eb0053eb64a07890136b9f5a2ab2ae8dec33c64a80ee9d902b4c74295e80b1bf66178c19e19bfd0d4cd31acbbcc44 SHA512 58d9ed8160af2842fe4338ae265d591b9f96293f8997c420721e86f8c8ffce5b3a5dbc83b87b813ea68505b56cbddd02332540f0a4e01bdc7f7f36e357ba2b7a +DIST commons-compress-1.25.0-src.tar.gz.asc 488 BLAKE2B 4a530dee5953e9fa11d99fe7bbfaadd16eef8eb48b50a4edd6c1416766c11d261e9af4632f0601d5cc2d97e73be4e7e0c1a15857e9e5e4a43c54ba9ddaa0e65d SHA512 4ced6e60590ab110c948766cdd86349e66605f9711b650ba8f4514dfd0cfb22c7b8d356a9e4433b3dfa4ceffddc3de53f8a1f174ab33d80e9f77d7469ed916ae diff --git a/dev-java/commons-compress/commons-compress-1.25.0.ebuild b/dev-java/commons-compress/commons-compress-1.25.0.ebuild index 7d48127292c2..9eca7a8afbba 100644 --- a/dev-java/commons-compress/commons-compress-1.25.0.ebuild +++ b/dev-java/commons-compress/commons-compress-1.25.0.ebuild @@ -1,110 +1,41 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 # Not ready for running tests, https://bugs.gentoo.org/839681 JAVA_PKG_IUSE="doc source" -MAVEN_ID="org.apache.commons:commons-compress:1.24" +MAVEN_ID="org.apache.commons:commons-compress:${PV}" JAVA_TESTING_FRAMEWORKS="junit-4" inherit java-pkg-2 java-pkg-simple verify-sig DESCRIPTION="Java API for working with archive files" -# HOMEPAGE="https://commons.apache.org/proper/commons-compress/" -# SRC_URI="mirror://apache/commons/compress/source/${P}-src.tar.gz -# verify-sig? ( https://downloads.apache.org/commons/compress/source/${P}-src.tar.gz.asc )" +HOMEPAGE="https://commons.apache.org/proper/commons-compress/" +SRC_URI="mirror://apache/commons/compress/source/${P}-src.tar.gz + verify-sig? ( https://downloads.apache.org/commons/compress/source/${P}-src.tar.gz.asc )" S="${WORKDIR}/${P}-src" LICENSE="Apache-2.0" SLOT="0" KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" +VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/commons.apache.org.asc" +BDEPEND="verify-sig? ( sec-keys/openpgp-keys-apache-commons )" CP_DEPEND=" dev-java/asm:9 dev-java/brotli-dec:0 dev-java/xz-java:0 dev-java/zstd-jni:0 " - DEPEND="${CP_DEPEND} >=virtual/jdk-11:* dev-java/osgi-core:0" -# test? ( -# dev-java/commons-io:1 -# dev-java/commons-lang:3.6 -# dev-java/felix-framework:0 -# dev-java/hamcrest:0 -# dev-java/javax-inject:0 -# dev-java/junit:5 -# dev-java/memoryfilesystem:0 -# dev-java/mockito:4 -# dev-java/mockito-junit-jupiter:4 -# dev-java/slf4j-api:0 -# ) -#" - RDEPEND="${CP_DEPEND} >=virtual/jre-1.8:*" -# BDEPEND="verify-sig? ( sec-keys/openpgp-keys-apache-commons )" -# VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}/usr/share/openpgp-keys/commons.apache.org.asc" - JAVA_AUTOMATIC_MODULE_NAME="org.apache.commons.compress" JAVA_CLASSPATH_EXTRA="osgi-core" JAVA_ENCODING="iso-8859-1" JAVA_MAIN_CLASS="org.apache.commons.compress.archivers.Lister" JAVA_SRC_DIR="src/main/java" - -JAVA_TEST_GENTOO_CLASSPATH=" - commons-io-1 - commons-lang-3.6 - felix-framework - javax-inject - junit-4 - junit-5 - hamcrest - memoryfilesystem - mockito-4 - mockito-junit-jupiter-4 - slf4j-api -" -JAVA_TEST_RESOURCE_DIRS="src/test/resources" -JAVA_TEST_SRC_DIR="src/test/java" - -src_prepare() { -# default - java-pkg-2_src_prepare - # error: package org.ops4j.pax.exam does not exist - # removing it costs 2 tests - rm src/test/java/org/apache/commons/compress/OsgiITest.java || die - - # java.io.FileNotFoundException: couldn't find zstandard.testdata.zst - # pom.xml lines 420-422 - tar xf src/test/resources/zstd-tests.tar \ - -C src/test/resources || die "cannot unpack zstd-tests.tar" - - # pom.xml lines 518-520 - tar xjf src/test/resources/zip64support.tar.bz2 \ - -C src/test/resources || die "cannot unpack zip64support.tar.bz2" - - JAVA_TEST_EXTRA_ARGS=( -Djava.library.path="${EPREFIX}/usr/$(get_libdir)/zstd-jni/" ) -} - -JAVA_TEST_EXCLUDES=( - # No runnable methods - org.apache.commons.compress.archivers.TestArchiveStreamProvider - org.apache.commons.compress.compressors.TestCompressorStreamProvider - - # fails without useful message - org.apache.commons.compress.compressors.DetectCompressorTestCase # has 8 tests - - # These tests pass but they prevent printing test messages:: -# org.apache.commons.compress.compressors.pack200.Pack200UtilsTest # has 2 tests -# org.apache.commons.compress.compressors.FramedSnappyTestCase # has 5 tests -# org.apache.commons.compress.compressors.XZTestCase # has 4 tests -# org.apache.commons.compress.compressors.Pack200TestCase # has 15 tests -# org.apache.commons.compress.harmony.pack200.tests.PackingOptionsTest # has 12 tests -# org.apache.commons.compress.harmony.pack200.tests.ArchiveTest # has 9 tests -# org.apache.commons.compress.harmony.unpack200.tests.ArchiveTest # has 13 tests -) diff --git a/dev-java/jakartaee-migration/Manifest b/dev-java/jakartaee-migration/Manifest index 085e1f137a17..b2977130e476 100644 --- a/dev-java/jakartaee-migration/Manifest +++ b/dev-java/jakartaee-migration/Manifest @@ -1 +1,2 @@ DIST jakartaee-migration-1.0.7-sources.tar.gz 43381 BLAKE2B 9a1a6bfd217f77890940240c6c860e21e0b72c758a63426a0c63009213738a9322a758d4525a9a8a8c69883c490edf128d8b70a6120ede431da434c4d1408e19 SHA512 f7edd70b997b2ae2a93b14b93c5b6dcb80de04f554125729f89e62eddaecfbfea21b304226887edb029c8a7b255b50a55a38381d017c7d44859f2e56b912f25a +DIST jakartaee-migration-1.0.8-sources.tar.gz 43466 BLAKE2B f9ffbb46ef6a26c9884e1d3eb55f283556cf8dbaf0955c9efe7e9766f77eadaae1e5bd066225948e9d97adac0f2f34fee3d6ad552bbbdad7303a0abb98d3070c SHA512 ecb1db63cb258b1b8c0e8106ea171e80e66622a48cafa62f8fb75e1b1ba6d539cfefc5dfe0ba9536d06b102c599afeba80d094598d2af3fe1d2ca153ef61ced8 diff --git a/dev-java/jakartaee-migration/jakartaee-migration-1.0.8.ebuild b/dev-java/jakartaee-migration/jakartaee-migration-1.0.8.ebuild new file mode 100644 index 000000000000..41b5ca2d7e47 --- /dev/null +++ b/dev-java/jakartaee-migration/jakartaee-migration-1.0.8.ebuild @@ -0,0 +1,72 @@ +# 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_ID="org.apache.tomcat:jakartaee-migration:1.0.8" +JAVA_TESTING_FRAMEWORKS="junit-4" + +inherit java-pkg-2 java-pkg-simple + +DESCRIPTION="Apache Tomcat tool for migration from Java EE 8 to Jakarta EE 9" +HOMEPAGE="https://tomcat.apache.org" +SRC_URI="mirror://apache/tomcat/${PN}/v${PV}/source/${P}-src.tar.gz -> ${P}-sources.tar.gz" +S="${WORKDIR}/${P}" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64" + +CP_DEPEND=" + >=dev-java/ant-1.10.14-r1:0 + dev-java/bcel:0 + dev-java/commons-compress:0 + dev-java/commons-io:1 +" + +# we need jdk-11 just for some tests as those need stuff from newer jdk, +# otherwise the package as of version 1.0.7 compiles fine with jdk 1.8 +# with tests disabled +# see bug https://bugs.gentoo.org/910499 + +DEPEND="${CP_DEPEND} + >=virtual/jdk-11:*" + +RDEPEND="${CP_DEPEND} + >=virtual/jre-1.8:*" + +JAVA_MAIN_CLASS="org.apache.tomcat.jakartaee.MigrationCLI" +JAVA_RESOURCE_DIRS="src/main/resources" +JAVA_SRC_DIR="src/main/java" + +JAVA_TEST_EXCLUDES=( + "org.apache.tomcat.jakartaee.TesterConstants" +) +JAVA_TEST_GENTOO_CLASSPATH="junit-4" +JAVA_TEST_RESOURCE_DIRS="src/test/resources" +JAVA_TEST_SRC_DIR="src/test/java" + +src_prepare() { + java-pkg-2_src_prepare + sed -i "s/\${project.version}/${PV}/g" src/main/resources/info.properties +} + +src_test() { + # we need to create jar files for the tests the same way as it's done using pom.xml + local implementation_version=$(grep Implementation-Version pom.xml | grep -oE "[0-9]+\.[0-9]+\.[0-9]+") + mkdir -p generated-test/META-INF || die + pushd generated-test || die + echo "Implementation-Version: ${implementation_version}" > META-INF/MANIFEST.MF + ejavac -d . -encoding ${JAVA_ENCODING} $(find "${S}/${JAVA_TEST_SRC_DIR}" -name CommonGatewayInterface.java) || die + jar cfm cgi-api.jar META-INF/MANIFEST.MF $(find -name CommonGatewayInterface.class) || die + ejavac -d . -encoding ${JAVA_ENCODING} $(find "${S}/${JAVA_TEST_SRC_DIR}" -name HelloCGI.java) || die + jar cfm hellocgi.jar META-INF/MANIFEST.MF $(find -name HelloCGI.class) || die + for enc in rsa dsa ec; do + cp hellocgi.jar hellocgi-signed-${enc}.jar || die + jarsigner -keystore "${S}/src/test/resources/keystore.p12" -storepass apache hellocgi-signed-${enc}.jar ${enc} || die + done + popd + + java-pkg-simple_src_test +} |