From d2bcdab82e5f5f38a8ab54026e8aa94edb1b77a6 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 21 Dec 2024 06:30:52 +0000 Subject: gentoo auto-resync : 21:12:2024 - 06:30:51 --- dev-java/fop/Manifest | 2 +- dev-java/fop/fop-2.10-r1.ebuild | 211 ++++++++++++++++++++++++++++++++++++++++ dev-java/fop/fop-2.10.ebuild | 211 ---------------------------------------- 3 files changed, 212 insertions(+), 212 deletions(-) create mode 100644 dev-java/fop/fop-2.10-r1.ebuild delete mode 100644 dev-java/fop/fop-2.10.ebuild (limited to 'dev-java/fop') diff --git a/dev-java/fop/Manifest b/dev-java/fop/Manifest index f64d1dfbd4dd..ba63d8573224 100644 --- a/dev-java/fop/Manifest +++ b/dev-java/fop/Manifest @@ -4,5 +4,5 @@ DIST fop-2.10-jars.tar.xz 7696 BLAKE2B aa5db0a4ee8b96e54e7beccccc21bd4559f2f2284 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-hyph-2.0.jar 6655933 BLAKE2B bfbefcc2ebd9a9a467c23a70d7cef256f83cf2335f6e17db6bbefceaf8a3cee78de0302f269d096eb3238b3f4883429e09cc640bed11a42da4ef67ab9f0cb164 SHA512 3d5f27623008c7beba5332387bd42c501b7ae1dddfc98014b3fb35273394ca5f0a4ce69e7726090ec468c9b4f7983fb8b1a5759f49e81ea342c81c61311d87b3 -EBUILD fop-2.10.ebuild 6336 BLAKE2B fba863641b645bbcf9668514ec8d42f444f1c35ce041f4be4f29ee4099ec9f2869f7d6d99738149765cc57207c440099104a35822e62dda3bd855a64b2e03b8a SHA512 1f4fd78803b0ccd9ffddfefc9037c8cfdde0ff97e6f0ff051d0c59cc152f5561e01d2673261ee8905c77c46131bfeaf8f13a3d99989b98dd0f7f422061124530 +EBUILD fop-2.10-r1.ebuild 6326 BLAKE2B dfc80ff80e322d6612c3797220c4b31c3a6d32bdc31b25a2383ee3caf4a666eff654571d0adfbfb1a13081abc6eb4ebacd2f26e9b0d9035a4ca5b8e802cf9a2b SHA512 64feba329830c658de657cdd46d197e7cf446debc104dd2386526eba4225b7ffa4cde340097a8a6eeef0d589988dbd82950b1c57ebd3d9dcd93f3595878c2bb0 MISC metadata.xml 449 BLAKE2B 91dd2fd3b50581a408755aade7aa37406c527e9298bd0156cb18d363fef88cf60eb85f259ba443022fbd6c5377be0e0fc990cb2826d418347dc92bf7b6ff5ca9 SHA512 cf49f03d1ed992a7df7deebb7c00721895be45ff144da8c4b1777aecba5e17d86a7353a83ad8df8b356f70afda5fadcdc53350b2c5732a0f0469b18f501959d4 diff --git a/dev-java/fop/fop-2.10-r1.ebuild b/dev-java/fop/fop-2.10-r1.ebuild new file mode 100644 index 000000000000..7f308bf708e0 --- /dev/null +++ b/dev-java/fop/fop-2.10-r1.ebuild @@ -0,0 +1,211 @@ +# 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.xmlgraphics:fop:${PV}" +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 + https://dev.gentoo.org/~fordfrog/distfiles/fop-2.10-jars.tar.xz + verify-sig? ( https://downloads.apache.org/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" + +VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/xmlgraphics-fop.apache.org.asc" + +BDEPEND=" + dev-java/xalan:0 + verify-sig? ( sec-keys/openpgp-keys-apache-xmlgraphics-fop ) +" + +CP_DEPEND=" + >=dev-java/ant-1.10.14-r3:0 + dev-java/batik:0 + dev-java/bcprov:0 + dev-java/bcpkix:0 + dev-java/commons-io:1 + dev-java/commons-logging:0 + dev-java/fontbox:0 + dev-java/jakarta-servlet-api:6.1 + dev-java/qdox:1.12 + dev-java/sun-jai-bin:0 + dev-java/xmlgraphics-commons:0 +" + +DEPEND=" + ${CP_DEPEND} + >=virtual/jdk-1.8:* + test? ( + dev-java/mockito:2 + dev-java/pdfbox: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.10-java23.patch" +) + +src_unpack() { + if use verify-sig; then + verify-sig_verify_detached "${DISTDIR}"/${P}-src.tar.gz{,.asc} + fi + default +} + +src_prepare() { + java-pkg_clean + default #780585 + java-pkg-2_src_prepare +} + +src_compile() { + # while ant could install multiple jar files we only need ant.jar + JAVA_GENTOO_CLASSPATH_EXTRA=":$(java-pkg_getjar ant ant.jar)" + + 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_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_JAR_FILENAME="fop-core.jar" + JAVA_MAIN_CLASS=$( sed -n 's:.*\(.*\):\1:p' fop-core/pom.xml ) + JAVA_RESOURCE_DIRS="fop-core/src/main/resources" + JAVA_SRC_DIR="fop-core/src/main/java" + # Code generation according to + # https://github.com/apache/xmlgraphics-fop/blob/fop-2_8/fop-core/pom.xml#L156-L225 + pushd fop-core/src/main/codegen/fonts > /dev/null || die + local fonts=$(find . -name "Courier*.xml" \ + -o -name "Helvetica*.xml" \ + -o -name "Times*.xml" \ + -o -name "Symbol.xml" \ + -o -name "ZapfDingbats.xml" + ) + 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 + popd > /dev/null || die + + # Update JAVA_RESOURCE_DIRS with "event-mode.xml" files + # produced manually by running "mvn package". + # Upstream does this with maven-antrun-plugin, fop-core/pom.xml lines 285-308 + pushd "${JAVA_RESOURCE_DIRS}" > /dev/null || die + jar -xf "${WORKDIR}/fop-2.10-core-event-models.jar" + popd > /dev/null || die + +# einfo "Code generation according to fop-events/pom.xml lines 80-92" +# mkdir -p test/java || die +# mkdir -p fop-core/target/classes || die +# local cp=fop-events.jar:"$(java-pkg_getjar ant ant.jar):$(java-pkg_getjars qdox-1.12)" +# "$(java-config -J)" -cp "${cp}" \ +# org.apache.fop.eventtools.EventProducerCollectorTask \ +# fop-core/target/classes \ +# fop-core/src/main/java/org/apache/fop/afp/AFPEventProducer.java || die + + java-pkg-simple_src_compile + + rm -r target || die + + if use doc; then \ + JAVA_SRC_DIR=( + "fop-util/src/main/java" + "fop-events/src/main/java" + "fop-core/src/main/java" + ) + JAVA_JAR_FILENAME="ignoreme.jar" + java-pkg-simple_src_compile + fi +} + +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_SRC_DIR="fop-events/src/test/java" + # This jar file was created manually from the output of "mvn test". + # Upstream does this with maven-antrun-plugin + jar -xf "${WORKDIR}/fop-2.10-test-event-model.jar" || die + mkdir generated-test || die + mv {target/test-classes,generated-test}/org || die + java-pkg-simple_src_test + + einfo "Testing fop-core" + pushd fop-core/src/test/java > /dev/null || die + # Excluding one test, see https://bugs.gentoo.org/903880 + local JAVA_TEST_RUN_ONLY=$(find * -type f \ + -name "*TestCase.java" \ + ) + JAVA_TEST_RUN_ONLY="${JAVA_TEST_RUN_ONLY//.java}" + JAVA_TEST_RUN_ONLY="${JAVA_TEST_RUN_ONLY//\//.}" + local vm_version="$(java-config -g PROVIDES_VERSION)" + # these tests would fail with java.lang.NoSuchMethodError if compiled with jdk-1.8 + if ver_test "${vm_version}" -eq "1.8"; then + JAVA_TEST_RUN_ONLY=${JAVA_TEST_RUN_ONLY//org.apache.fop.render.pdf.PDFEncodingTestCase} + JAVA_TEST_RUN_ONLY=${JAVA_TEST_RUN_ONLY//org.apache.fop.fonts.truetype.OTFToType1TestCase} +# org.apache.fop.render.pdf.PDFEncodingTestCase +# org.apache.fop.fonts.truetype.OTFToType1TestCase + fi + popd > /dev/null || die + # https://github.com/apache/xmlgraphics-fop/blob/fop-2_8/fop-core/pom.xml#L297-L307 + # ../fop + pushd fop > /dev/null || die + 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_TEST_RESOURCE_DIRS="../fop-core/src/test/resources" + JAVA_TEST_SRC_DIR="../fop-core/src/test/java" + java-pkg-simple_src_test + popd > /dev/null || die +} + +src_install() { + local module + for module in fop-util fop-events fop-core ; do + java-pkg_dojar "${module}.jar" + if use source; then + java-pkg_dosrc "${module}/src/main/java/*" + fi + done + if use doc; then + java-pkg_dojavadoc target/api + fi + java-pkg_dolauncher "fop" --main "org.apache.fop.cli.Main" + einstalldocs +} diff --git a/dev-java/fop/fop-2.10.ebuild b/dev-java/fop/fop-2.10.ebuild deleted file mode 100644 index 07e4bc1319a9..000000000000 --- a/dev-java/fop/fop-2.10.ebuild +++ /dev/null @@ -1,211 +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_ID="org.apache.xmlgraphics:fop:${PV}" -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 - https://dev.gentoo.org/~fordfrog/distfiles/fop-2.10-jars.tar.xz - verify-sig? ( https://downloads.apache.org/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="2.8" -KEYWORDS="amd64 ~arm64 ~ppc64" - -VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/xmlgraphics-fop.apache.org.asc" - -BDEPEND=" - dev-java/xalan:0 - verify-sig? ( sec-keys/openpgp-keys-apache-xmlgraphics-fop ) -" - -CP_DEPEND=" - >=dev-java/ant-1.10.14-r3:0 - dev-java/batik:0 - dev-java/bcprov:0 - dev-java/bcpkix:0 - dev-java/commons-io:1 - dev-java/commons-logging:0 - dev-java/fontbox:0 - dev-java/jakarta-servlet-api:6.1 - dev-java/qdox:1.12 - dev-java/sun-jai-bin:0 - dev-java/xmlgraphics-commons:0 -" - -DEPEND=" - ${CP_DEPEND} - >=virtual/jdk-1.8:* - test? ( - dev-java/mockito:2 - dev-java/pdfbox: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.10-java23.patch" -) - -src_unpack() { - if use verify-sig; then - verify-sig_verify_detached "${DISTDIR}"/${P}-src.tar.gz{,.asc} - fi - default -} - -src_prepare() { - java-pkg_clean - default #780585 - java-pkg-2_src_prepare -} - -src_compile() { - # while ant could install multiple jar files we only need ant.jar - JAVA_GENTOO_CLASSPATH_EXTRA=":$(java-pkg_getjar ant ant.jar)" - - 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_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_JAR_FILENAME="fop-core.jar" - JAVA_MAIN_CLASS=$( sed -n 's:.*\(.*\):\1:p' fop-core/pom.xml ) - JAVA_RESOURCE_DIRS="fop-core/src/main/resources" - JAVA_SRC_DIR="fop-core/src/main/java" - # Code generation according to - # https://github.com/apache/xmlgraphics-fop/blob/fop-2_8/fop-core/pom.xml#L156-L225 - pushd fop-core/src/main/codegen/fonts > /dev/null || die - local fonts=$(find . -name "Courier*.xml" \ - -o -name "Helvetica*.xml" \ - -o -name "Times*.xml" \ - -o -name "Symbol.xml" \ - -o -name "ZapfDingbats.xml" - ) - 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 - popd > /dev/null || die - - # Update JAVA_RESOURCE_DIRS with "event-mode.xml" files - # produced manually by running "mvn package". - # Upstream does this with maven-antrun-plugin, fop-core/pom.xml lines 285-308 - pushd "${JAVA_RESOURCE_DIRS}" > /dev/null || die - jar -xf "${WORKDIR}/fop-2.10-core-event-models.jar" - popd > /dev/null || die - -# einfo "Code generation according to fop-events/pom.xml lines 80-92" -# mkdir -p test/java || die -# mkdir -p fop-core/target/classes || die -# local cp=fop-events.jar:"$(java-pkg_getjar ant ant.jar):$(java-pkg_getjars qdox-1.12)" -# "$(java-config -J)" -cp "${cp}" \ -# org.apache.fop.eventtools.EventProducerCollectorTask \ -# fop-core/target/classes \ -# fop-core/src/main/java/org/apache/fop/afp/AFPEventProducer.java || die - - java-pkg-simple_src_compile - - rm -r target || die - - if use doc; then \ - JAVA_SRC_DIR=( - "fop-util/src/main/java" - "fop-events/src/main/java" - "fop-core/src/main/java" - ) - JAVA_JAR_FILENAME="ignoreme.jar" - java-pkg-simple_src_compile - fi -} - -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_SRC_DIR="fop-events/src/test/java" - # This jar file was created manually from the output of "mvn test". - # Upstream does this with maven-antrun-plugin - jar -xf "${WORKDIR}/fop-2.10-test-event-model.jar" || die - mkdir generated-test || die - mv {target/test-classes,generated-test}/org || die - java-pkg-simple_src_test - - einfo "Testing fop-core" - pushd fop-core/src/test/java > /dev/null || die - # Excluding one test, see https://bugs.gentoo.org/903880 - local JAVA_TEST_RUN_ONLY=$(find * -type f \ - -name "*TestCase.java" \ - ) - JAVA_TEST_RUN_ONLY="${JAVA_TEST_RUN_ONLY//.java}" - JAVA_TEST_RUN_ONLY="${JAVA_TEST_RUN_ONLY//\//.}" - local vm_version="$(java-config -g PROVIDES_VERSION)" - # these tests would fail with java.lang.NoSuchMethodError if compiled with jdk-1.8 - if ver_test "${vm_version}" -eq "1.8"; then - JAVA_TEST_RUN_ONLY=${JAVA_TEST_RUN_ONLY//org.apache.fop.render.pdf.PDFEncodingTestCase} - JAVA_TEST_RUN_ONLY=${JAVA_TEST_RUN_ONLY//org.apache.fop.fonts.truetype.OTFToType1TestCase} -# org.apache.fop.render.pdf.PDFEncodingTestCase -# org.apache.fop.fonts.truetype.OTFToType1TestCase - fi - popd > /dev/null || die - # https://github.com/apache/xmlgraphics-fop/blob/fop-2_8/fop-core/pom.xml#L297-L307 - # ../fop - pushd fop > /dev/null || die - 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_TEST_RESOURCE_DIRS="../fop-core/src/test/resources" - JAVA_TEST_SRC_DIR="../fop-core/src/test/java" - java-pkg-simple_src_test - popd > /dev/null || die -} - -src_install() { - local module - for module in fop-util fop-events fop-core ; do - java-pkg_dojar "${module}.jar" - if use source; then - java-pkg_dosrc "${module}/src/main/java/*" - fi - done - if use doc; then - java-pkg_dojavadoc target/api - fi - java-pkg_dolauncher "fop-${SLOT}" --main "org.apache.fop.cli.Main" - einstalldocs -} -- cgit v1.2.3