diff options
Diffstat (limited to 'dev-java')
23 files changed, 874 insertions, 14 deletions
diff --git a/dev-java/asm/Manifest b/dev-java/asm/Manifest index bb9860d239f6..9f5db4140608 100644 --- a/dev-java/asm/Manifest +++ b/dev-java/asm/Manifest @@ -1,2 +1,3 @@ DIST asm-ASM_9_10_1.tar.bz2 1387133 BLAKE2B d7c74c3504cc269f6b2cf1ad1718ac19db25c34b27abece797c5d094dacd0e1c5ed4457cbbd7d0a3c95d3d72149090e558187bf8a8649d7e3ef92bb59811f313 SHA512 5f89d2bb560cfd282a4e347f436cdccd44b63fbd9b2c56c9a8dbd51604b271bb655b9ad8a25bd05c474171f09d428f2ebc3f0275b1438c06dffb880e1ef1941f +DIST asm-ASM_9_11_1.tar.bz2 1426605 BLAKE2B defbb7835beb1c6dc3e41876847fba0313e1cbf2234dccc4c6e76e6fd6e55afc339b876f29b36c7ea1755a9f033a3013dd1942513a788d6328a8f0c5aac4923a SHA512 475712248dae496141a1399d7e2a52f22b96f32d54cb46ecb2d28ad549b4e560970a0dc2296b36af41660e69072dd0048865d4b495af5ab4ed93343c196104bd DIST asm-ASM_9_7_1.tar.bz2 1378103 BLAKE2B f7da3a9c1bcf76398c9e9b9b86d60f8854e5248632a8b2d76605851e29ee1807713fb28c9e76012ec8f9444c44e3a151ed409cd120c34ab8d3495fdc9c84edcb SHA512 77ae76464eec97dbc8129c4a746d13f0d286d2033f909b65e0e34858e1785616b7bee22faa92128b91eb39cbd849e262efe574b73ed2859920add457d6422dd0 diff --git a/dev-java/asm/asm-9.10.1.ebuild b/dev-java/asm/asm-9.10.1.ebuild index 4355f903c923..cf386030a5b4 100644 --- a/dev-java/asm/asm-9.10.1.ebuild +++ b/dev-java/asm/asm-9.10.1.ebuild @@ -6,9 +6,6 @@ EAPI=9 JAVA_PKG_IUSE="doc source test" JAVA_TESTING_FRAMEWORKS="junit-jupiter" -# Avoid circular dependency -JAVA_DISABLE_DEPEND_ON_JAVA_DEP_CHECK="true" - inherit java-pkg-2 java-pkg-simple junit5 MY_P="ASM_${PV//./_}" diff --git a/dev-java/asm/asm-9.11.1.ebuild b/dev-java/asm/asm-9.11.1.ebuild new file mode 100644 index 000000000000..d48da71cdae0 --- /dev/null +++ b/dev-java/asm/asm-9.11.1.ebuild @@ -0,0 +1,102 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=9 + +JAVA_PKG_IUSE="doc source test" +JAVA_TESTING_FRAMEWORKS="junit-jupiter" + +inherit java-pkg-2 java-pkg-simple junit5 + +MY_P="ASM_${PV//./_}" + +DESCRIPTION="Bytecode manipulation framework for Java" +HOMEPAGE="https://asm.ow2.io" +SRC_URI="https://gitlab.ow2.org/asm/asm/-/archive/${MY_P}/asm-${MY_P}.tar.bz2" +S="${WORKDIR}/asm-${MY_P}" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x64-macos" + +DEPEND=" + >=virtual/jdk-11:* + test? ( + >=dev-java/janino-3.1.9:0 + >=dev-java/opentest4j-1.3.0-r1:0 + ) +" +RDEPEND=">=virtual/jre-1.8:*" + +PATCHES=( + "${FILESDIR}"/asm-9.10-gentoo.patch + "${FILESDIR}"/asm-9.11.1-skipFailingTests.patch +) + +ASM_MODULES=( "asm" "asm-tree" "asm-analysis" "asm-commons" "asm-util" ) +JAVADOC_SRC_DIRS=( asm{-analysis,-commons,,-tree,-util}/src/main/java ) +JAVA_TEST_GENTOO_CLASSPATH="janino opentest4j" +JAVA_TEST_RESOURCE_DIRS=( asm{-analysis,-commons,,-tree,-util}/src/test/resources ) + +# The junit:5 version is too old, compilation of LambdaRemapTest.java fails with: +# asm-commons/src/test/java/org/objectweb/asm/commons/LambdaRemapTest.java:9: error: cannot find symbol +# import org.junit.jupiter.params.Parameter; +# ^ +# symbol: class Parameter + +JAVA_TEST_SRC_DIR=( asm{-analysis,-commons,,-test,-tree,-util}/src/test/java \ + ! -name LambdaRemapTest.java ) + +src_compile() { + local module + for module in "${ASM_MODULES[@]}"; do + einfo "Compiling ${module}" + JAVA_GENTOO_CLASSPATH_EXTRA+=":${module}.jar" + JAVA_INTERMEDIATE_JAR_NAME="org.objectweb.${module/-/.}" + JAVA_JAR_FILENAME="${module}.jar" + JAVA_MODULE_INFO_OUT="${module}/src/main" + JAVA_MODULE_INFO_RELEASE=9 + JAVA_SRC_DIR="${module}/src/main/java" + java-pkg-simple_src_compile + rm -r target || die + done + + # upstream generates module-info into root of the jars + for module in "${ASM_MODULES[@]}"; do + einfo "Adjust mudule-info in ${module}" + mkdir target || die + pushd target >/dev/null || die + jar xf ../${module}.jar || die + rm -v ../${module}.jar || die + mv {META-INF/versions/9/,}module-info.class || die + rm -rv META-INF || die + popd >/dev/null || die + jar cf ${module}.jar -C target . || die + rm -r target || die + done + + use doc && ejavadoc +} + +src_test() { + JAVAC_ARGS="-g" + JAVA_CLASSPATH_EXTRA="junit-5" + JAVA_GENTOO_CLASSPATH_EXTRA+=":asm-test.jar" + JAVA_JAR_FILENAME="asm-test.jar" + JAVA_RESOURCE_DIRS=( asm-test/src/main/resources ) + JAVA_SRC_DIR=( asm-test/src/main/java ) + java-pkg-simple_src_compile + junit5_src_test +} + +src_install() { + JAVA_JAR_FILENAME="asm.jar" + java-pkg-simple_src_install + local module + for module in asm-{analysis,commons,tree,util}; do + java-pkg_dojar ${module}.jar + if use source; then + java-pkg_dosrc "${module}/src/main/java/*" + fi + done +} diff --git a/dev-java/asm/asm-9.7.1-r1.ebuild b/dev-java/asm/asm-9.7.1-r1.ebuild index 67a1e694913e..9d17e57bcd8a 100644 --- a/dev-java/asm/asm-9.7.1-r1.ebuild +++ b/dev-java/asm/asm-9.7.1-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2025 Gentoo Authors +# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -14,9 +14,6 @@ MAVEN_PROVIDES=" org.ow2.asm:asm-util:${PV} " -# Avoid circular dependency -JAVA_DISABLE_DEPEND_ON_JAVA_DEP_CHECK="true" - inherit java-pkg-2 java-pkg-simple DESCRIPTION="Bytecode manipulation framework for Java" diff --git a/dev-java/asm/files/asm-9.11.1-skipFailingTests.patch b/dev-java/asm/files/asm-9.11.1-skipFailingTests.patch new file mode 100644 index 000000000000..e488a19dd309 --- /dev/null +++ b/dev-java/asm/files/asm-9.11.1-skipFailingTests.patch @@ -0,0 +1,68 @@ + +Failures (2): + JUnit Jupiter:AnalyzerTest:testAnalyze_simpleNestedFinally() + MethodSource [className = 'org.objectweb.asm.tree.analysis.AnalyzerTest', methodName = 'testAnalyze_simpleNestedFinally', methodParameterTypes = ''] + => org.opentest4j.AssertionFailedError: Unexpected exception thrown: java.lang.LinkageError: Illegal class file encountered. Try running with -Xverify:all in method m + org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:152) + org.junit.jupiter.api.AssertDoesNotThrow.createAssertionFailedError(AssertDoesNotThrow.java:84) + org.junit.jupiter.api.AssertDoesNotThrow.assertDoesNotThrow(AssertDoesNotThrow.java:75) + org.junit.jupiter.api.AssertDoesNotThrow.assertDoesNotThrow(AssertDoesNotThrow.java:58) + org.junit.jupiter.api.Assertions.assertDoesNotThrow(Assertions.java:3228) + [...] + Caused by: java.lang.LinkageError: Illegal class file encountered. Try running with -Xverify:all in method m + java.base/java.lang.Class.getDeclaredConstructors0(Native Method) + java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:2988) + java.base/java.lang.Class.getDeclaredConstructors(Class.java:2357) + org.objectweb.asm.test.ClassFile.newInstance(ClassFile.java:200) + org.objectweb.asm.test.ClassFile.newInstance(ClassFile.java:170) + [...] + JUnit Jupiter:ClassWriterComputeMaxsTest:testVisitMaxs_simpleNestedFinally() + MethodSource [className = 'org.objectweb.asm.ClassWriterComputeMaxsTest', methodName = 'testVisitMaxs_simpleNestedFinally', methodParameterTypes = ''] + => org.opentest4j.AssertionFailedError: Unexpected exception thrown: java.lang.LinkageError: Illegal class file encountered. Try running with -Xverify:all in method m + org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:152) + org.junit.jupiter.api.AssertDoesNotThrow.createAssertionFailedError(AssertDoesNotThrow.java:84) + org.junit.jupiter.api.AssertDoesNotThrow.assertDoesNotThrow(AssertDoesNotThrow.java:75) + org.junit.jupiter.api.AssertDoesNotThrow.assertDoesNotThrow(AssertDoesNotThrow.java:58) + org.junit.jupiter.api.Assertions.assertDoesNotThrow(Assertions.java:3228) + [...] + Caused by: java.lang.LinkageError: Illegal class file encountered. Try running with -Xverify:all in method m + java.base/java.lang.Class.getDeclaredConstructors0(Native Method) + java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:2988) + java.base/java.lang.Class.getDeclaredConstructors(Class.java:2357) + org.objectweb.asm.test.ClassFile.newInstance(ClassFile.java:200) + org.objectweb.asm.test.ClassFile.newInstance(ClassFile.java:170) + [...] + +Failures happen with openjdk-27_p35 and openjdk-28_alpha18. +With openjdk:25 all tests pass. + +--- a/asm-analysis/src/test/java/org/objectweb/asm/tree/analysis/AnalyzerTest.java ++++ b/asm-analysis/src/test/java/org/objectweb/asm/tree/analysis/AnalyzerTest.java +@@ -513,7 +514,7 @@ class AnalyzerTest extends AsmTest { + * + * @throws AnalyzerException if the test fails + */ +- @Test ++ @Test @Disabled + void testAnalyze_simpleNestedFinally() throws AnalyzerException { + MethodNode methodNode = + new MethodNodeBuilder(5, 6) +--- a/asm/src/test/java/org/objectweb/asm/ClassWriterComputeMaxsTest.java ++++ b/asm/src/test/java/org/objectweb/asm/ClassWriterComputeMaxsTest.java +@@ -40,6 +40,7 @@ import java.util.Set; + import java.util.StringTokenizer; + import java.util.concurrent.atomic.AtomicReference; + import org.junit.jupiter.api.Test; ++import org.junit.jupiter.api.Disabled; + import org.junit.jupiter.params.ParameterizedTest; + import org.junit.jupiter.params.provider.ValueSource; + import org.objectweb.asm.test.ClassFile; +@@ -241,7 +242,7 @@ class ClassWriterComputeMaxsTest { + * } + * </pre> + */ +- @Test ++ @Test @Disabled + void testVisitMaxs_simpleNestedFinally() { + TestCaseBuilder testCase = + new TestCaseBuilder() diff --git a/dev-java/asm/metadata.xml b/dev-java/asm/metadata.xml index b489fb846277..ce9c2de80c67 100644 --- a/dev-java/asm/metadata.xml +++ b/dev-java/asm/metadata.xml @@ -25,7 +25,7 @@ </longdescription> <upstream> <doc>https://asm.ow2.io/documentation.html</doc> - <bugs-to>https://gitlab.ow2.org/asm/asm/-/issues</bugs-to> + <bugs-to>https://gitlab.ow2.org/asm/asm/-/work_items</bugs-to> </upstream> <origin>srcux</origin> </pkgmetadata> diff --git a/dev-java/batik/Manifest b/dev-java/batik/Manifest index 654726319316..a84a96a8c143 100644 --- a/dev-java/batik/Manifest +++ b/dev-java/batik/Manifest @@ -1,2 +1,4 @@ DIST batik-src-1.18.tar.gz 13699469 BLAKE2B 003a467b6948b902f56f004bf5c7d41f369bf49520d55fd70af3d3b8edef02d04557fdad5e4da70395a30c755f777791c89714edaa094eaa2964972eb81bdbf1 SHA512 209c6f4c76769cf1db616c5fe43c71d23c92afeb62e11bc7605baaa18bf9177efbb7a91a98bf03c3b4cd917bd7b7bd83e87083d16b11b3e57d3f31beeb8e1d7b DIST batik-src-1.18.tar.gz.asc 833 BLAKE2B a779b94a666edcab5b4c69866b4e7388ce6b8d9869d59773b084d870152cffd8c8cfd74df0f2a4ef06e5d598acb3b7bc00ec841871411b379f514b3fe2019765 SHA512 2fe6de9394f89c90e5ad2ede241c57bfbe5da4627b3730d445b2daa06b1ae71945bd65cda0d7a6bd46db536f318f755778a5b5a5b52080872a3143acd0d4677d +DIST batik-src-1.20.tar.gz 14157209 BLAKE2B 122e5deb6831472481f6d2681f7acf7167aece6d264f0fb76be0883a34f27e28cdc6764d29ff0ea0205eefb80201b115b8a69ec337d1da53b5a15632b38eef92 SHA512 b9387551551d2846a8b7039c80cacc4860487abd450218e300441a734bc836aab68abfb50b240f97d56d7317d1e98532e6bd60f6d95d77d790fb7e07eed01264 +DIST batik-src-1.20.tar.gz.asc 833 BLAKE2B 7e0ff9ed06838a37d553de90245e3f6df5b08955b098257f49815a8553bb4185f535127df4c8fc2b3f09dce4365b0ae8d4b73b633e6bfcd3294827711cb30f71 SHA512 824bddc0825cb9d2790c1f1ea43390e1d8d79410fe9ec4c1303a7fee114e5568ae1311ed428076c1b9aae9b9f0b857cfa40d9f4711a98e03b5026502c0d5d19d diff --git a/dev-java/batik/batik-1.18-r2.ebuild b/dev-java/batik/batik-1.18-r3.ebuild index f9ae5259b2f1..7441bef36394 100644 --- a/dev-java/batik/batik-1.18-r2.ebuild +++ b/dev-java/batik/batik-1.18-r3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2025 Gentoo Authors +# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -29,7 +29,7 @@ CP_DEPEND=" >=dev-java/rhino-1.8.0:0 dev-java/xalan:0 dev-java/xml-commons-external:1.4 - dev-java/xmlgraphics-commons:0 + ~dev-java/xmlgraphics-commons-2.10:0 " DEPEND=" diff --git a/dev-java/batik/batik-1.20.ebuild b/dev-java/batik/batik-1.20.ebuild new file mode 100644 index 000000000000..19460d62ebc3 --- /dev/null +++ b/dev-java/batik/batik-1.20.ebuild @@ -0,0 +1,134 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +JAVA_PKG_IUSE="doc source test" +JAVA_TESTING_FRAMEWORKS="junit-4" + +inherit desktop java-pkg-2 java-pkg-simple verify-sig xdg + +DESCRIPTION="XML Graphics Batik" +HOMEPAGE="https://xmlgraphics.apache.org/batik/" +SRC_URI="mirror://apache/xmlgraphics/batik/source/batik-src-${PV}.tar.gz + verify-sig? ( mirror://apache/xmlgraphics/batik/source/batik-src-${PV}.tar.gz.asc )" +S="${WORKDIR}/${P}" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~ppc64" + +BDEPEND="verify-sig? ( sec-keys/openpgp-keys-apache-xmlgraphics )" + +CP_DEPEND=" + >=dev-java/rhino-1.9.1:0 + dev-java/xml-commons-external:1.4 + ~dev-java/xmlgraphics-commons-2.12:0 +" + +DEPEND=" + ${CP_DEPEND} + >=virtual/jdk-11:* +" + +RDEPEND=" + ${CP_DEPEND} + >=virtual/jre-1.8:* +" + +DOCS=( CHANGES NOTICE README ) + +JAVA_RESOURCE_DIRS="resources" +JAVA_SRC_DIR=( ! -path '*test*/src/*' ! -path '*/jacl/*' -path '*/src/main/java/**.java' ) +JAVA_TEST_EXCLUDES=( + # JAXP00010003: The length of entity "%SVG.Presentation.attrib" is "15,002" + # that exceeds the "15,000" limit set by "jdk.xml.maxParameterEntitySizeLimit". + org.apache.batik.svg.ValidateDTDTestCase + # org.apache.batik.test.TestException: Cannot build Test instance of class : . Got exception of class : + # java.lang.IllegalArgumentException with messages test-references/samples/anne.png and stack trace : + # java.lang.IllegalArgumentException: test-references/samples/anne.png + org.apache.batik.test.xml.JUnitRunnerTestCase +) +JAVA_TEST_GENTOO_CLASSPATH="junit-4" +JAVA_TEST_RESOURCE_DIRS=( batik-util/src/test/resources test-resources ) +JAVA_TEST_SRC_DIR=( -path '*/src/test/java/**/*TestCase*.java' ) +VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/apache-xmlgraphics.asc" + +src_prepare() { + java-pkg_clean + java-pkg-2_src_prepare + # We drop support for jython due to bug #825486. + rm batik-script/src/main/java/org/apache/batik/script/jpython/JPythonInterpreter.java || die + rm batik-script/src/main/java/org/apache/batik/script/jpython/JPythonInterpreterFactory.java || die + + cat > "batik-squiggle.desktop" <<-EOF || die + [Desktop Entry] + Name=Squiggle + Comment=SVG browser + Exec=batik-squiggle + Icon=init + Terminal=false + Type=Application + Categories=Graphics;VectorGraphics; + MimeType=image/svg+xml + EOF + + mkdir resources || die "mkdir" + # collect resources from all those modules' directories + local module + for module in $(find ! -path '*test*/src/*' -path '*/src/main/resources'); do + pushd "${module}" >/dev/null || die + find -type f ! -name '*.java' ! -name 'LICENSE' -printf '%P\n' | + xargs cp --parent -t "${S}"/resources || die "copy resources" + popd >/dev/null || die + done + + mkdir -p src/test/resources || die "test-resources" + mv {batik-bridge/,}src/test/resources/circular.svg || die "circular.svg" +} + +src_test() { + einfo "building batik-test.jar" + JAVA_GENTOO_CLASSPATH_EXTRA="batik.jar:batik-test.jar" + JAVA_JAR_FILENAME="batik-test.jar" + JAVA_SRC_DIR=( -path '**/*test*/**/*.java' ) + java-pkg-simple_src_compile + + einfo "compiling and running tests" + java-pkg-simple_src_test + + # a mistake in java-pkg-simple.eclass suppresses this test-class + # but we can run it separately + JAVA_TEST_RUN_ONLY=( org.apache.batik.util.Base64TestCases ) + java-pkg-simple_src_test +} + +src_install() { + JAVA_JAR_FILENAME="batik.jar" # avoid installing 'batik-test.jar' + JAVA_SRC_DIR=( batik-* ) + java-pkg-simple_src_install + domenu "batik-squiggle.desktop" + newicon -s scalable \ + batik-svgbrowser/src/main/resources/org/apache/batik/apps/svgbrowser/resources/init.svg \ + squiggle.svg + + grep mainClass */pom.xml | + sed -n 's:.*<mainClass>\(.*\)</mainClass>:\1:p' | + sort | uniq | while read line + do + local launcher=$(echo "${line}" | cut -d. -f 5) || die + java-pkg_dolauncher "batik-${launcher}" --main "${line}" + done + + # java_policy_file is copied from previous version + local java_policy_file="${JAVA_PKG_SHAREPATH}/etc/${PN}.policy" + insinto "$(dirname "${java_policy_file}")" + newins - "$(basename "${java_policy_file}")" <<- _EOF_ + grant codeBase "file:${EPREFIX}${JAVA_PKG_JARDEST}/-" { + permission java.security.AllPermission; + }; + _EOF_ + java-pkg_register-environment-variable \ + gjl_java_args \ + "\$gjl_java_args -Djava.security.policy=file:${EPREFIX}${java_policy_file}" +} diff --git a/dev-java/byte-buddy/Manifest b/dev-java/byte-buddy/Manifest index 8f2b5f02b292..45bdfc0a3f99 100644 --- a/dev-java/byte-buddy/Manifest +++ b/dev-java/byte-buddy/Manifest @@ -1 +1,2 @@ DIST byte-buddy-1.18.10.tar.gz 2176379 BLAKE2B 7a406662e40d1081981cbc7ae9e461a5c67043c54442a6e9cf099c28bfc0817a44490f3d51f4412cb906633bacebfc7ae5acc3db56089979758808c80163bb4f SHA512 b1d17965a9a57eed847105d8cd350c5373a2eb2caf0ae0021cbaf556705c28741a7d796fcac6c561dc991bac248b2ff0408abeda0df68f0a9d72c222a517d336 +DIST byte-buddy-1.18.15.tar.gz 2215458 BLAKE2B 69caf08394f5d0b01dd20d50e2f9fb303d5f6b83005e6e20bc2c35879ccddc5c4af5b82f1bf1e781bcee0919a7ce23256a17943ca2193f8b507a86049fbc56b5 SHA512 951bb9fdb045549eb565bce24e586db8ad3a9ad82e5ca71dac2ad9ff9ecffffedd4cc4db87ac9167afa1fdcb906b308a1c1dbac3de1b73f6f94dad20a7a67e08 diff --git a/dev-java/byte-buddy/byte-buddy-1.18.15.ebuild b/dev-java/byte-buddy/byte-buddy-1.18.15.ebuild new file mode 100644 index 000000000000..18846c3abcff --- /dev/null +++ b/dev-java/byte-buddy/byte-buddy-1.18.15.ebuild @@ -0,0 +1,103 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=9 + +JAVA_PKG_IUSE="doc source test" +JAVA_TESTING_FRAMEWORKS="junit-4" + +inherit java-pkg-2 java-pkg-simple + +DESCRIPTION="Offers convenience for attaching an agent to the local or a remote VM" +HOMEPAGE="https://bytebuddy.net" +SRC_URI="https://github.com/raphw/byte-buddy/archive/${P}.tar.gz" +S="${WORKDIR}/byte-buddy-${P}" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~ppc64" + +# Min java 11 because of module-info. +DEPEND=" + >=dev-java/asm-9.11:0 + >=dev-java/asm-jdk-bridge-0.0.13:0 + >=dev-java/findbugs-annotations-3.0.1:0 + >=dev-java/jna-5.19.1:0 + >=dev-java/jsr305-3.0.2-r1:0 + >=virtual/jdk-11:* + test? ( + >=dev-java/mockito-2.28.2-r1:2 + ) +" +RDEPEND=">=virtual/jre-1.8:*" + +JAVA_CLASSPATH_EXTRA="asm asm-jdk-bridge findbugs-annotations jna jsr305" +JAVADOC_CLASSPATH="${JAVA_CLASSPATH_EXTRA}" +JAVADOC_SRC_DIRS=( byte-buddy{,-agent}/src/main/java ) + +src_prepare() { + java-pkg_clean ! -path "./byte-buddy-dep/src/test/*" # Keep test-classes + java-pkg-2_src_prepare + + # instead of shading byte-buddy-dep we move it into byte-buddy. + mv byte-buddy{-dep,}/src/main/java || die "cannot move sources" +} + +src_compile() { + einfo "Compiling byte-buddy-agent.jar" + JAVA_INTERMEDIATE_JAR_NAME="net.bytebuddy.agent" + JAVA_JAR_FILENAME="byte-buddy-agent.jar" + JAVA_MODULE_INFO_OUT="byte-buddy-agent/src/main" + JAVA_RESOURCE_DIRS="byte-buddy-agent/src/main/resources" + JAVA_SRC_DIR="byte-buddy-agent/src/main/java" + java-pkg-simple_src_compile + JAVA_GENTOO_CLASSPATH_EXTRA+=":byte-buddy-agent.jar" + rm -r target || die + + einfo "Compiling byte-buddy.jar" + JAVA_INTERMEDIATE_JAR_NAME="net.bytebuddy" + JAVA_JAR_FILENAME="byte-buddy.jar" + JAVA_MODULE_INFO_OUT="byte-buddy/src/main" + JAVA_MAIN_CLASS="net.bytebuddy.build.Plugin\$Engine\$Default" + JAVA_RESOURCE_DIRS=() + JAVA_SRC_DIR="byte-buddy/src/main/java" + java-pkg-simple_src_compile + JAVA_GENTOO_CLASSPATH_EXTRA+=":byte-buddy.jar" + rm -r target || die + + use doc && ejavadoc +} + +src_test() { + # instead of shading byte-buddy-dep we move it into byte-buddy. + mv byte-buddy{-dep,}/src/test || die "cannot move tests" + + JAVAC_ARGS="-g" + JAVA_TEST_GENTOO_CLASSPATH="asm asm-jdk-bridge junit-4 mockito-2" + + einfo "Testing byte-buddy-agent" + # https://github.com/raphw/byte-buddy/issues/1321#issuecomment-1252776459 + JAVA_TEST_EXTRA_ARGS=( -Dnet.bytebuddy.test.jnapath="${EPREFIX}/usr/$(get_libdir)/jna/" ) + JAVA_TEST_SRC_DIR="byte-buddy-agent/src/test/java" + java-pkg-simple_src_test + + einfo "Testing byte-buddy" + JAVA_TEST_RESOURCE_DIRS=( byte-buddy/src/test/{resources,precompiled*} ) + JAVA_TEST_SRC_DIR="byte-buddy/src/test/java" + + JAVA_TEST_EXCLUDES=( + # all tests in this class fail, https://bugs.gentoo.org/863386 + net.bytebuddy.build.CachedReturnPluginTest + ) + java-pkg-simple_src_test +} + +src_install() { + java-pkg_dojar "byte-buddy-agent.jar" + java-pkg-simple_src_install + + if use source; then + java-pkg_dosrc "byte-buddy-agent/src/main/java/*" + java-pkg_dosrc "byte-buddy/src/main/java/*" + fi +} diff --git a/dev-java/fop/Manifest b/dev-java/fop/Manifest index 22c0a4d70524..befe2fd7820f 100644 --- a/dev-java/fop/Manifest +++ b/dev-java/fop/Manifest @@ -1,4 +1,6 @@ DIST fop-2.10-jars.tar.xz 7696 BLAKE2B aa5db0a4ee8b96e54e7beccccc21bd4559f2f228476ab65a12935fbbd69924e23296c1dfcf6e717b6031b9e21efd3aeed4df130ba5f8717ae47a1b0628013d59 SHA512 7c9d14f71e94e6a706c845d71a95adcbf0c77934618d9ce070dfd677adf8d2f171ab6e16954db684dc1781f91719e194382a629274435ecef3d3fbf0e5c7bae3 DIST fop-2.10-src.tar.gz 20903590 BLAKE2B 5217edbabc255b2e37c6198ea7cdfb1344db0726c7156f73bdc5ac452c4c233c5280d263e65656cde92ce6aa52c8ea94e346d9d14535ca802fc37fe1475ba255 SHA512 c5ae25be3e3a4da01195e108dec66743ab6017967220db1f4e4300f79594d8144de23876eeac07b2068db75a60e1b25d10ddad48533bd0cd6cb9e110b519fcf6 DIST fop-2.10-src.tar.gz.asc 833 BLAKE2B 70b200af6f3611b3dcd6da9d8728b12ee9a7bd4882919965c641e822cdd21510669cc98ace5d8caaa42e05347ae0d9b07384365377bbd4c5ca0b1edc07e2ff80 SHA512 ae9628cf9ca84d9c2ac1bfddcb4aec786985d3fdca16c2541e45690c81695ec5361dc1641a30572fc2d95defa69cab61a1992ab0d16843344411acb77835a73c +DIST fop-2.12-src.tar.gz 20980392 BLAKE2B 6d635fe7a17a2926ad2f099fcf3c81d13e4a4ec1f9709a70b6736889f7a8c798d8ab9696011f491a3ccee4b5474a89e1325a293df372a9619385051bed57c8e3 SHA512 d4c7b27d9c6f5856b7766126dca021e22c23b8d0ba2fea24261be5544df0736309f5ad6866b8e97f8941eb23327315deca7d46205757287efc2ed5e0ce8e9a1d +DIST fop-2.12-src.tar.gz.asc 833 BLAKE2B a64e4df0fa1281c9b1782afa9eb32d927cabb4d98e4ace424b3f416ae1df5baeee3115bd40e758b7a48b9a76541a40cf7324b0290311c73fa9133a5909e900ee SHA512 96aa127916930b79a2874b3da9e5b62ef197283a08f781a501e6c5ead97e45f20409c559f3f9452413ddb52f1886a32786bc57b46391af013105c88816b9b5dd DIST fop-hyph-2.0.jar 6655933 BLAKE2B bfbefcc2ebd9a9a467c23a70d7cef256f83cf2335f6e17db6bbefceaf8a3cee78de0302f269d096eb3238b3f4883429e09cc640bed11a42da4ef67ab9f0cb164 SHA512 3d5f27623008c7beba5332387bd42c501b7ae1dddfc98014b3fb35273394ca5f0a4ce69e7726090ec468c9b4f7983fb8b1a5759f49e81ea342c81c61311d87b3 diff --git a/dev-java/fop/files/fop-2.11-PDFDocumentInformationElementTestCase.patch b/dev-java/fop/files/fop-2.11-PDFDocumentInformationElementTestCase.patch new file mode 100644 index 000000000000..e6f24ec652c4 --- /dev/null +++ b/dev-java/fop/files/fop-2.11-PDFDocumentInformationElementTestCase.patch @@ -0,0 +1,30 @@ +3) standardKeyword(org.apache.fop.render.pdf.extensions.PDFDocumentInformationElementTestCase) +java.lang.AssertionError: Did not receive expected event: org.apache.fop.render.pdf.extensions.PDFExtensionEventProducer.reservedKeyword + at org.junit.Assert.fail(Assert.java:89) + at org.apache.fop.events.EventChecker.end(EventChecker.java:56) + at org.apache.fop.render.pdf.extensions.PDFDocumentInformationElementTestCase.runTest(PDFDocumentInformationElementTestCase.java:69) + at org.apache.fop.render.pdf.extensions.PDFDocumentInformationElementTestCase.standardKeyword(PDFDocumentInformationElementTestCase.java:59) + +Tests were run with +openjdk-26_beta34 +openjdk-25.0.2_p10 + +--- a/fop-core/src/test/java/org/apache/fop/render/pdf/extensions/PDFDocumentInformationElementTestCase.java ++++ b/fop-core/src/test/java/org/apache/fop/render/pdf/extensions/PDFDocumentInformationElementTestCase.java +@@ -24,6 +24,7 @@ import java.util.HashMap; + import java.util.Map; + + import org.junit.Test; ++import org.junit.Ignore; + + import org.apache.xmlgraphics.util.QName; + +@@ -52,7 +53,7 @@ public class PDFDocumentInformationElementTestCase { + runTest("invalid-child.fo", FOValidationEventProducer.class.getName() + ".invalidChild", expectedParams); + } + +- @Test ++ @Test @Ignore + public void standardKeyword() throws Exception { + Map<String, Object> expectedParams = new HashMap<String, Object>(); + expectedParams.put("keyword", "Creator"); diff --git a/dev-java/fop/files/fop-2.11-PDFLinearizationTestCase.patch b/dev-java/fop/files/fop-2.11-PDFLinearizationTestCase.patch new file mode 100644 index 000000000000..16dc0ddee615 --- /dev/null +++ b/dev-java/fop/files/fop-2.11-PDFLinearizationTestCase.patch @@ -0,0 +1,40 @@ +1) testAccessibility(org.apache.fop.pdf.PDFLinearizationTestCase) +javax.xml.transform.TransformerException: java.util.MissingResourceException: Error reading event-model.xml: org.xml.sax.SAXException: FWK005 parse may not be called while parsing. + at java.xml/com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:790) + at java.xml/com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:395) + at org.apache.fop.pdf.PDFLinearizationTestCase.testAccessibility(PDFLinearizationTestCase.java:106) + ... 31 trimmed +Caused by: java.util.MissingResourceException: Error reading event-model.xml: org.xml.sax.SAXException: FWK005 parse may not be called while parsing. + at org.apache.fop.events.DefaultEventBroadcaster.loadModel(DefaultEventBroadcaster.java:91) + at org.apache.fop.events.DefaultEventBroadcaster.getEventProducerModel(DefaultEventBroadcaster.java:113) + at org.apache.fop.events.DefaultEventBroadcaster.createProxyFor(DefaultEventBroadcaster.java:141) + at org.apache.fop.events.DefaultEventBroadcaster.getEventProducerFor(DefaultEventBroadcaster.java:128) + at org.apache.fop.render.pdf.PDFEventProducer$Provider.get(PDFEventProducer.java:45) + at org.apache.fop.render.pdf.PDFPainter$LanguageAvailabilityChecker.checkLanguageAvailability(PDFPainter.java:105) + at org.apache.fop.render.pdf.PDFPainter$LanguageAvailabilityChecker.access$000(PDFPainter.java:90) + at org.apache.fop.render.pdf.PDFPainter.drawText(PDFPainter.java:429) + at org.apache.fop.render.pdf.PDFPainter.drawText(PDFPainter.java:464) + +Tests were run with +openjdk-26_beta34 +openjdk-25.0.2_p10 + +--- a/fop-core/src/test/java/org/apache/fop/pdf/PDFLinearizationTestCase.java ++++ b/fop-core/src/test/java/org/apache/fop/pdf/PDFLinearizationTestCase.java +@@ -41,6 +41,7 @@ import javax.xml.transform.stream.StreamSource; + + import org.junit.Assert; + import org.junit.Test; ++import org.junit.Ignore; + + import org.apache.fop.apps.FOUserAgent; + import org.apache.fop.apps.Fop; +@@ -77,7 +78,7 @@ public class PDFLinearizationTestCase { + checkPDF(data, 5, 6); + } + +- @Test ++ @Test @Ignore + public void testAccessibility() throws Exception { + String fopxconf = "<fop version=\"1.0\">" + + "<accessibility>true</accessibility>" diff --git a/dev-java/fop/files/fop-2.11-PDFStructureTreeTestCase.patch b/dev-java/fop/files/fop-2.11-PDFStructureTreeTestCase.patch new file mode 100644 index 000000000000..00fe37671351 --- /dev/null +++ b/dev-java/fop/files/fop-2.11-PDFStructureTreeTestCase.patch @@ -0,0 +1,31 @@ +2) testRemoveUnusedStructs(org.apache.fop.pdf.PDFStructureTreeTestCase) +java.lang.AssertionError: expected:<1> but was:<2> + at org.junit.Assert.fail(Assert.java:89) + at org.junit.Assert.failNotEquals(Assert.java:835) + at org.junit.Assert.assertEquals(Assert.java:647) + at org.junit.Assert.assertEquals(Assert.java:633) + at org.apache.fop.pdf.PDFStructureTreeTestCase.testRemoveUnusedStructs(PDFStructureTreeTestCase.java:77) + +Tests were run with +openjdk-26_beta34 +openjdk-25.0.2_p10 + +--- a/fop-core/src/test/java/org/apache/fop/pdf/PDFStructureTreeTestCase.java ++++ b/fop-core/src/test/java/org/apache/fop/pdf/PDFStructureTreeTestCase.java +@@ -33,6 +33,7 @@ import javax.xml.transform.stream.StreamSource; + + import org.junit.Assert; + import org.junit.Test; ++import org.junit.Ignore; + import org.xml.sax.SAXException; + + import org.apache.fop.apps.FOUserAgent; +@@ -41,7 +42,7 @@ import org.apache.fop.apps.FopFactory; + import org.apache.fop.apps.MimeConstants; + + public class PDFStructureTreeTestCase { +- @Test ++ @Test @Ignore + public void testRemoveUnusedStructs() throws Exception { + String fo = "<fo:root xmlns:fo=\"http://www.w3.org/1999/XSL/Format\">\n" + + " <fo:layout-master-set>\n" diff --git a/dev-java/fop/files/fop-2.12-IFRendererTestCase.patch b/dev-java/fop/files/fop-2.12-IFRendererTestCase.patch new file mode 100644 index 000000000000..9ff589d1805c --- /dev/null +++ b/dev-java/fop/files/fop-2.12-IFRendererTestCase.patch @@ -0,0 +1,29 @@ +There was 1 failure: +1) testSoftHyphen(org.apache.fop.render.intermediate.IFRendererTestCase) +java.lang.AssertionError: PDF files are able to handle the soft hyphen, so must not replace with normal hyphen + at org.junit.Assert.fail(Assert.java:89) + at org.junit.Assert.assertTrue(Assert.java:42) + at org.apache.fop.render.intermediate.IFRendererTestCase.testSoftHyphen(IFRendererTestCase.java:93) + +FAILURES!!! +Tests run: 2, Failures: 1 + +--- a/fop-core/src/test/java/org/apache/fop/render/intermediate/IFRendererTestCase.java ++++ b/fop-core/src/test/java/org/apache/fop/render/intermediate/IFRendererTestCase.java +@@ -34,6 +34,7 @@ import javax.xml.transform.sax.SAXResult; + import javax.xml.transform.stream.StreamSource; + + import org.junit.Test; ++import org.junit.Ignore; + import static org.junit.Assert.assertFalse; + import static org.junit.Assert.assertTrue; + +@@ -86,7 +87,7 @@ public class IFRendererTestCase { + assertFalse(wordAreas.get(1).isNextIsSpace()); + } + +- @Test ++ @Test @Ignore + public void testSoftHyphen() throws FOPException, TransformerException { + String fo = getSoftHyphenTestFO("­"); + foToOutput(new ByteArrayInputStream(fo.getBytes())); diff --git a/dev-java/fop/files/fop-2.12-PDFPainterTestCase.patch b/dev-java/fop/files/fop-2.12-PDFPainterTestCase.patch new file mode 100644 index 000000000000..b4d407bead3b --- /dev/null +++ b/dev-java/fop/files/fop-2.12-PDFPainterTestCase.patch @@ -0,0 +1,28 @@ +There was 1 failure: +1) testSoftHyphenNotReplaced(org.apache.fop.render.pdf.PDFPainterTestCase) +org.junit.ComparisonFailure: Soft hyphen must not be replaced by a normal hyphen expected:<[]> but was:<[#]> + at org.junit.Assert.assertEquals(Assert.java:117) + at org.apache.fop.render.pdf.PDFPainterTestCase.testSoftHyphenNotReplaced(PDFPainterTestCase.java:386) + +FAILURES!!! +Tests run: 25, Failures: 1 + +--- a/fop-core/src/test/java/org/apache/fop/render/pdf/PDFPainterTestCase.java ++++ b/fop-core/src/test/java/org/apache/fop/render/pdf/PDFPainterTestCase.java +@@ -39,6 +39,7 @@ import javax.xml.transform.stream.StreamResult; + + import org.junit.Assert; + import org.junit.Test; ++import org.junit.Ignore; + import org.mockito.invocation.InvocationOnMock; + import org.mockito.stubbing.Answer; + import static org.junit.Assert.assertEquals; +@@ -352,7 +353,7 @@ public class PDFPainterTestCase { + verify(pdfContentGenerator).add("2 Tr 0.63086 w\n"); + } + +- @Test ++ @Test @Ignore + public void testSoftHyphenNotReplaced() throws IFException { + pdfDocumentHandler = makePDFDocumentHandler(new StringBuilder()); + diff --git a/dev-java/fop/fop-2.10-r2.ebuild b/dev-java/fop/fop-2.10-r3.ebuild index 6036e9128063..0235457eaf8e 100644 --- a/dev-java/fop/fop-2.10-r2.ebuild +++ b/dev-java/fop/fop-2.10-r3.ebuild @@ -32,7 +32,7 @@ BDEPEND=" CP_DEPEND=" >=dev-java/ant-1.10.14-r3:0 - dev-java/batik:0 + ~dev-java/batik-1.18:0 dev-java/bcprov:0 dev-java/bcpkix:0 dev-java/commons-io:1 @@ -41,7 +41,7 @@ CP_DEPEND=" dev-java/jakarta-servlet-api:6.1 dev-java/qdox:1.12 dev-java/sun-jai-bin:0 - dev-java/xmlgraphics-commons:0 + ~dev-java/xmlgraphics-commons-${PV}:0 " DEPEND=" diff --git a/dev-java/fop/fop-2.12.ebuild b/dev-java/fop/fop-2.12.ebuild new file mode 100644 index 000000000000..6cf56865d455 --- /dev/null +++ b/dev-java/fop/fop-2.12.ebuild @@ -0,0 +1,236 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=9 + +JAVA_PKG_IUSE="doc source test" +JAVA_TESTING_FRAMEWORKS="junit-4" + +inherit java-pkg-2 java-pkg-simple verify-sig + +DESCRIPTION="XML Graphics Format Object Processor All-In-One" +HOMEPAGE="https://xmlgraphics.apache.org/fop/" +SRC_URI=" + mirror://apache/xmlgraphics/fop/source/${P}-src.tar.gz + verify-sig? ( mirror://apache/xmlgraphics/fop/source/${P}-src.tar.gz.asc ) + test? ( https://repo1.maven.org/maven2/net/sf/offo/fop-hyph/2.0/fop-hyph-2.0.jar ) +" +S="${WORKDIR}/${P}" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~ppc64" + +BDEPEND=" + >=dev-java/xalan-2.7.3-r3:0 + verify-sig? ( sec-keys/openpgp-keys-apache-xmlgraphics ) +" + +CP_DEPEND=" + >=dev-java/ant-1.10.15-r1:0 + ~dev-java/batik-1.20:0 + >=dev-java/bcpkix-1.84:0 + >=dev-java/bcprov-1.84:0 + >=dev-java/bcutil-1.84:0 + dev-java/commons-io:1 + >=dev-java/commons-logging-1.3.6:0 + >=dev-java/fontbox-3.0.6:0 + dev-java/jakarta-servlet-api:6.1 + dev-java/qdox:1.12 + dev-java/sun-jai-bin:0 + dev-java/xml-commons-external:1.4 + ~dev-java/xmlgraphics-commons-2.12:0 +" + +# Min jdk-11 in order to avoid test failures like: +# java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer; +DEPEND=" + ${CP_DEPEND} + >=virtual/jdk-11:* + test? ( + dev-java/mockito:2 + >=dev-java/pdfbox-3.0.6:0 + dev-java/xmlunit:1 + ) +" + +RDEPEND=" + ${CP_DEPEND} + >=virtual/jre-1.8:* +" + +DOCS=( NOTICE README ) +PATCHES=( + "${FILESDIR}/fop-2.9-PDFEncodingTestCase.patch" + "${FILESDIR}/fop-2.11-PDFDocumentInformationElementTestCase.patch" + "${FILESDIR}/fop-2.11-PDFLinearizationTestCase.patch" + "${FILESDIR}/fop-2.11-PDFStructureTreeTestCase.patch" + "${FILESDIR}/fop-2.12-IFRendererTestCase.patch" + "${FILESDIR}/fop-2.12-PDFPainterTestCase.patch" +) + +JAVADOC_SRC_DIRS=( fop-{util,events,core}/src/main/java ) +VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/apache-xmlgraphics.asc" + +src_unpack() { + if use verify-sig; then + verify-sig_verify_detached "${DISTDIR}"/${P}-src.tar.gz{,.asc} + fi + unpack ${P}-src.tar.gz +} + +src_prepare() { + java-pkg_clean + java-pkg-2_src_prepare + + einfo "prepare fop-events/build-gentoo.xml" + # ant-task to create "event-model.xml" file directly into fop-events/src/test/resources + local extract_events="$(sed -n '/taskdef/,/\/collectEvents/p' fop-events/pom.xml | + sed -e 's:${project.basedir}\/::' \ + -e 's:${project.build.testOutputDirectory}:src/test/resources:' \ + -e '/maven.test.classpath/d' | + cut -d' ' -f 15-25 ; pipestatus || die)" + # The first three lines are manually copied headers needed for a build.xml + # but are not given in the pom.xml. + # The 'path' element, also not from the pom.xml, creates the classpath + # needed to run this ant-task using eant(). + cat <<- FOP-EVENTS > fop-events/build-gentoo.xml || die "FOP-EVENTS" + <?xml version="1.0" encoding="UTF-8" ?> + <project default="main"> + <target name="main"> + <path id="maven.compile.classpath"> + <fileset dir="../"> + <include name="commons-io.jar"/> + <include name="fop-events.jar"/> + <include name="qdox.jar"/> + <include name="xmlgraphics-commons.jar"/> + </fileset> + </path> + ${extract_events} + </target> + </project> + FOP-EVENTS + + einfo "prepare fop-core/build-gentoo.xml" + # ant-task to create "event-model.xml" files directly into target/classes + local extract_core="$(sed -n '/taskdef/,/\/collectEvents/p' fop-core/pom.xml | + sed -e 's:${project.basedir}\/::' \ + -e 's:${project.build.outputDirectory}:../target/classes:' \ + -e '/maven.test.classpath/d' | + cut -d' ' -f 15-25 ; pipestatus || die)" + # The first three lines are manually copied headers needed for a build.xml + # but are not given in the pom.xml. + # The 'path' element, also not from the pom.xml, creates the classpath + # needed to run this ant-task using eant(). + cat <<- FOP-CORE > fop-core/build-gentoo.xml || die "FOP-CORE" + <?xml version="1.0" encoding="UTF-8" ?> + <project default="main"> + <target name="main"> + <path id="maven.compile.classpath"> + <fileset dir="../"> + <include name="commons-io.jar"/> + <include name="commons-logging.jar"/> + <include name="fop-core.jar"/> + <include name="fop-events.jar"/> + <include name="qdox.jar"/> + <include name="xmlgraphics-commons.jar"/> + </fileset> + </path> + ${extract_core} + </target> + </project> + FOP-CORE + + einfo "generate Java code according to fop-core/pom.xml lines 172-243" + local fonts=$(find fop-core/src/main/codegen/fonts \( -name "Courier*.xml" \ + -o -name "Helvetica*.xml" \ + -o -name "Times*.xml" \ + -o -name "Symbol.xml" \ + -o -name "ZapfDingbats.xml" \) -printf '%P\n' + ) + cd fop-core/src/main/codegen/fonts || die "change dir" + for font in ${fonts}; do + xalan -XSLTC \ + -IN $font \ + -XSL font-file.xsl \ + -OUT ../../java/org/apache/fop/fonts/base14/${font//.xml}.java || die + done + + xalan -XSLTC \ + -IN encodings.xml \ + -XSL code-point-mapping.xsl \ + -OUT ../../java/org/apache/fop/fonts/base14/CodePointMapping.java || die +} + +src_compile() { + # while ant could install multiple jar files we only need ant.jar + JAVA_GENTOO_CLASSPATH_EXTRA=":$(java-pkg_getjar --build-only ant ant.jar)" + + JAVA_AUTOMATIC_MODULE_NAME="org.apache.xmlgraphics.fop.util" + JAVA_JAR_FILENAME="fop-util.jar" + JAVA_SRC_DIR="fop-util/src/main/java" + java-pkg-simple_src_compile + JAVA_GENTOO_CLASSPATH_EXTRA+=":fop-util.jar" + rm -r target || die + + JAVA_AUTOMATIC_MODULE_NAME="org.apache.xmlgraphics.fop.events" + JAVA_JAR_FILENAME="fop-events.jar" + JAVA_RESOURCE_DIRS="fop-events/src/main/resources" + JAVA_SRC_DIR="fop-events/src/main/java" + java-pkg-simple_src_compile + JAVA_GENTOO_CLASSPATH_EXTRA+=":fop-events.jar" + rm -r target || die + + JAVA_AUTOMATIC_MODULE_NAME="org.apache.xmlgraphics.fop.core" + JAVA_JAR_FILENAME="fop-core.jar" + JAVA_MAIN_CLASS=$( sed -n 's:.*<mainClass>\(.*\)</mainClass>:\1:p' fop-core/pom.xml ) + JAVA_RESOURCE_DIRS="fop-core/src/main/resources" + JAVA_SRC_DIR="fop-core/src/main/java" + + java-pkg-simple_src_compile + + java-pkg_jar-from commons-io-1,commons-logging,qdox-1.12,xmlgraphics-commons + eant -f fop-core/build-gentoo.xml # this creates the *event-model.xml files + jar cf fop-core.jar -C target/classes . || die "add event-model.xml files" + + JAVADOC_CLASSPATH="${JAVA_GENTOO_CLASSPATH}" + use doc && ejavadoc +} + +src_test() { + JAVA_TEST_GENTOO_CLASSPATH="junit-4,mockito-2,pdfbox,xmlunit-1" + + einfo "Testing fop-events" + JAVA_TEST_EXCLUDES="org.apache.fop.events.TestEventProducer" + JAVA_TEST_RESOURCE_DIRS=( fop-events/src/test/resources ) + JAVA_TEST_SRC_DIR=( fop-events/src/test/java ) + mkdir fop-events/src/test/resources || die "mkdir events" + eant -f fop-events/build-gentoo.xml # this creates the *event-model.xml file + java-pkg-simple_src_test + + einfo "Building the core-test.jar" + cd fop || die "cd fop" # fop-core/pom.xml line 322 + JAVA_GENTOO_CLASSPATH_EXTRA="${DISTDIR}/fop-hyph-2.0.jar" + JAVA_GENTOO_CLASSPATH_EXTRA+=":../fop-util.jar" + JAVA_GENTOO_CLASSPATH_EXTRA+=":../fop-events.jar" + JAVA_GENTOO_CLASSPATH_EXTRA+=":../fop-core.jar" + JAVA_JAR_FILENAME="core-test.jar" + JAVA_RESOURCE_DIRS=( ../fop-core/src/test/resources ) + JAVA_SRC_DIR=( ../fop-core -path */src/test/java/**.java ) + java-pkg-simple_src_compile + JAVA_GENTOO_CLASSPATH_EXTRA+=":core-test.jar" + + einfo "Testing fop-core" + JAVA_TEST_RESOURCE_DIRS=( ../fop-core/src/test/resources ) + # **TestCase.java according to fop-core/pom.xml line 319 + JAVA_TEST_SRC_DIR=( ../fop-core -path */src/test/java/**TestCase.java ) + java-pkg-simple_src_test +} + +src_install() { + java-pkg_dojar fop-{util,events}.jar # omit fop-core.jar + JAVA_JAR_FILENAME="fop-core.jar" # it will be installed by the eclass + JAVA_SRC_DIR=( fop-{util,events,core}/src/main/java ) # for 'use source' + java-pkg-simple_src_install + java-pkg_dolauncher "fop" --main "org.apache.fop.cli.Main" +} diff --git a/dev-java/openjdk-bin/openjdk-bin-28_alpha20.ebuild b/dev-java/openjdk-bin/openjdk-bin-28_alpha20.ebuild index eff740190099..cac869e6ec8d 100644 --- a/dev-java/openjdk-bin/openjdk-bin-28_alpha20.ebuild +++ b/dev-java/openjdk-bin/openjdk-bin-28_alpha20.ebuild @@ -71,7 +71,7 @@ S="${WORKDIR}/jdk-${MY_PV}" LICENSE="GPL-2-with-classpath-exception" SLOT=$(ver_cut 1) -# KEYWORDS="" # Not an LTS candidate +KEYWORDS="~amd64" # Not an LTS candidate IUSE="alsa cups headless-awt selinux source static-libs" RDEPEND=" diff --git a/dev-java/openjdk/openjdk-28_alpha20.ebuild b/dev-java/openjdk/openjdk-28_alpha20.ebuild index 05d1ee1ab663..1b8c48c55b17 100644 --- a/dev-java/openjdk/openjdk-28_alpha20.ebuild +++ b/dev-java/openjdk/openjdk-28_alpha20.ebuild @@ -68,7 +68,7 @@ S="${WORKDIR}/${JDK_REPO}-jdk-${MY_PV//+/-}" LICENSE="GPL-2-with-classpath-exception" SLOT="$(ver_cut 1)" -# KEYWORDS="" # Not an LTS candidate +KEYWORDS="~amd64" # Not an LTS candidate IUSE="alsa big-endian cups debug doc examples headless-awt +jbootstrap selinux source static-libs +system-bootstrap systemtap" diff --git a/dev-java/xmlgraphics-commons/Manifest b/dev-java/xmlgraphics-commons/Manifest index 0e4e361500e7..aee415a44092 100644 --- a/dev-java/xmlgraphics-commons/Manifest +++ b/dev-java/xmlgraphics-commons/Manifest @@ -1,2 +1,4 @@ DIST xmlgraphics-commons-2.10-src.tar.gz 1618901 BLAKE2B 4ce0bda4715d8d9326f2c42f4d2f0eac65ea59dd527c42927f1a0096526cd54e90e0d71087060a05bf9819f4bac17b14eee08dfce41b950edd26c7a4dcc9669a SHA512 49b055891e6b76f3c357b616c34f152033ccf807432d55dd57ac83c41234c224d1a716f77ae7ef24ff49d9f376dfa6b161cde18b258d94438a467a4ad91be21d DIST xmlgraphics-commons-2.10-src.tar.gz.asc 833 BLAKE2B 15a9aa963695863bf27624f3f1afc6f3b1277bc58a01a103f76a4c25060e31f38e3e155bf240c816839cc216834ee0d4e639c3b60a91de9a4dde39c29c54af12 SHA512 5f44396867501ab2ab58c1da8e6212d873457eb6d4de545058f84530f05f0bfddf319b2c4bb5a711bf48cca402d7c68e5efae3a0ada71742a706f3b14290dec3 +DIST xmlgraphics-commons-2.12-src.tar.gz 2102951 BLAKE2B 86add6a79b4d9a7357d2c6f43e27a6dd57a8e44738510576613a32f97bff3a7f42e0cb8a2d13d41bbcb7f0774d958c4792205bb0d7ed77412e9c3f3ebf8c3fb3 SHA512 46c9171ee6be8776bb7bee0ceb0684e811557b6b3be82f4a39b0389f554d0978bc6e73f532e85ba35ae1e81a44f487f079f8aed858244f1105b94f4fb8aa9401 +DIST xmlgraphics-commons-2.12-src.tar.gz.asc 833 BLAKE2B 96e903a6377a74bf80abdeef60f64d45ede1b5d028e9f2f152ea0a7ebe6af103ea4180f19b0720b46f7c861714dd7e7f9bfbab59b68aecff2a0c70a962cf3e28 SHA512 dcf0f92a2efbfe292acf17070a8aaf38e1e1b48c9cb850453c038be71cb110421d7341970724e0a950d0ec61b3413b26be30b2fbef949a214e77a39bab7539cd diff --git a/dev-java/xmlgraphics-commons/xmlgraphics-commons-2.12.ebuild b/dev-java/xmlgraphics-commons/xmlgraphics-commons-2.12.ebuild new file mode 100644 index 000000000000..fa3013afdb04 --- /dev/null +++ b/dev-java/xmlgraphics-commons/xmlgraphics-commons-2.12.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=9 + +JAVA_PKG_IUSE="doc source test" +JAVA_TESTING_FRAMEWORKS="junit-4" + +inherit java-pkg-2 java-pkg-simple verify-sig + +DESCRIPTION="XML Graphics Commons" +HOMEPAGE="https://xmlgraphics.apache.org/commons/" +SRC_URI="mirror://apache/xmlgraphics/commons/source/${P}-src.tar.gz + verify-sig? ( mirror://apache/xmlgraphics/commons/source/${P}-src.tar.gz.asc )" +S="${WORKDIR}/${P}" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~ppc64" + +BDEPEND="verify-sig? ( sec-keys/openpgp-keys-apache-xmlgraphics )" + +# Using older commons-io because of compilation error with newer versions: +# src/main/java/org/apache/xmlgraphics/image/loader/impl/ImageLoaderRawJPEG.java:231: +# error: exception IOException is never thrown in body of corresponding try statement +# } catch (IOException ioe) { +# ^ +CP_DEPEND=" + dev-java/commons-io:1 + >=dev-java/commons-logging-1.3.6:0 +" + +DEPEND=" + ${CP_DEPEND} + >=virtual/jdk-1.8:* + test? ( + >=dev-java/mockito-4.11.0:4 + dev-java/xml-commons-resolver:0 + ) +" + +RDEPEND=" + ${CP_DEPEND} + >=virtual/jre-1.8:* +" + +DOCS=( NOTICE README ) + +JAVA_AUTOMATIC_MODULE_NAME="org.apache.xmlgraphics.commons" +JAVA_RESOURCE_DIRS="src/main/resources" +JAVA_SRC_DIR="src/main/java" +JAVA_TEST_EXTRA_ARGS=( -ea ) +JAVA_TEST_GENTOO_CLASSPATH="junit-4,mockito-4,xml-commons-resolver" +# Some *.{png,tiff,txt,xmp} are misplaced in "src/test/java". +JAVA_TEST_RESOURCE_DIRS=( "src/test/resources" "src/test/java" ) +JAVA_TEST_SRC_DIR="src/test/java" +VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/apache-xmlgraphics.asc" |
