* [gentoo-commits] repo/gentoo:master commit in: dev-java/fop/files/, dev-java/fop/
@ 2016-01-13 20:58 James Le Cuirot
0 siblings, 0 replies; 6+ messages in thread
From: James Le Cuirot @ 2016-01-13 20:58 UTC (permalink / raw
To: gentoo-commits
commit: eb31649bd0c09b4b195f8fb1204bee517d87a703
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 13 20:57:05 2016 +0000
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Wed Jan 13 20:58:30 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb31649b
dev-java/fop: Set headless flag in launcher, except when -awt given
fop will die if the value of DISPLAY is invalid. This was breaking
other package builds for some users. A real display is needed when the
-awt option is given though so make this conditional. See bug #569808.
Package-Manager: portage-2.2.26
dev-java/fop/files/headless-launcher.bash | 1 +
dev-java/fop/fop-2.0-r2.ebuild | 130 ++++++++++++++++++++++++++++++
2 files changed, 131 insertions(+)
diff --git a/dev-java/fop/files/headless-launcher.bash b/dev-java/fop/files/headless-launcher.bash
new file mode 100644
index 0000000..a01c56f
--- /dev/null
+++ b/dev-java/fop/files/headless-launcher.bash
@@ -0,0 +1 @@
+[[ "${!#}" = "-awt" ]] || gjl_java_args="-Djava.awt.headless=true"
diff --git a/dev-java/fop/fop-2.0-r2.ebuild b/dev-java/fop/fop-2.0-r2.ebuild
new file mode 100644
index 0000000..af0e1c7
--- /dev/null
+++ b/dev-java/fop/fop-2.0-r2.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# TODO: if 'doc' use flag is used then should build also extra docs ('docs' ant target), currently it cannot
+# be built as it needs forrest which we do not have
+# TODO: package and use optional dependency jeuclid
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc examples source test"
+
+inherit eutils java-pkg-2 java-ant-2
+
+DESCRIPTION="Formatting Objects Processor is a print formatter driven by XSL"
+HOMEPAGE="http://xmlgraphics.apache.org/fop/"
+SRC_URI="mirror://apache/xmlgraphics/${PN}/source/${P}-src.zip"
+
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE=""
+
+# Tests are broken even in 2.0
+RESTRICT="test"
+
+CDEPEND="dev-java/batik:1.8
+ dev-java/ant-core:0
+ dev-java/fontbox:1.7
+ dev-java/commons-io:1
+ dev-java/commons-logging:0
+ java-virtuals/servlet-api:3.0
+ dev-java/avalon-framework:4.2
+ dev-java/xmlgraphics-commons:2
+ dev-java/xml-commons-external:1.3
+ dev-java/qdox:1.12"
+
+RDEPEND=">=virtual/jre-1.6
+ ${CDEPEND}"
+
+DEPEND=">=virtual/jdk-1.6
+ app-arch/unzip
+ ${CDEPEND}"
+
+# test? (
+# dev-java/ant-junit:0
+# dev-java/junit:4
+# dev-java/xmlunit:1
+# dev-java/mockito:0
+# )"
+
+JAVA_ANT_ENCODING="ISO-8859-1"
+JAVA_ANT_REWRITE_CLASSPATH="true"
+
+EANT_GENTOO_CLASSPATH="
+ ant-core
+ batik-1.8
+ fontbox-1.7
+ commons-io-1
+ commons-logging
+ servlet-api-3.0
+ avalon-framework-4.2
+ xmlgraphics-commons-2
+ xml-commons-external-1.3
+"
+
+TARGETS=(
+ resourcegen
+ jar-hyphenation
+ jar-sandbox
+ jar-main
+)
+
+java_prepare() {
+ find "${S}"/lib -type f | xargs rm -v
+}
+
+src_compile() {
+ # https://bugs.gentoo.org/show_bug.cgi?id=554386
+ # http://wiki.apache.org/xmlgraphics-fop/HowTo/BuildFOPAlternatively
+ java-pkg_jar-from --into lib qdox-1.12 qdox.jar
+ java-pkg_jar-from --into lib xmlgraphics-commons-2 xmlgraphics-commons.jar
+ java-pkg_jar-from --into lib commons-logging commons-logging.jar
+ java-pkg_jar-from --into lib commons-io-1 commons-io.jar
+ java-pkg_jar-from --into lib fontbox-1.7 fontbox.jar
+ java-pkg_jar-from --into lib xml-commons-external-1.3 xml-apis-ext.jar
+ java-pkg_jar-from --into lib xml-commons-external-1.3 xml-apis.jar
+ java-pkg_jar-from --into lib avalon-framework-4.2 avalon-framework.jar
+ java-pkg_jar-from --virtual --into lib servlet-api-3.0 servlet-api.jar
+
+ for target in ${TARGETS[@]}; do
+ EANT_BUILD_TARGET="${target}" \
+ java-pkg-2_src_compile
+ done
+
+ if use doc; then
+ sed -i -e 's/failonerror=\"true\"/failonerror=\"false\"/;' ./build.xml
+ EANT_BUILD_TARGET="javadocs" \
+ java-pkg-2_src_compile
+ fi
+}
+
+src_install() {
+ java-pkg_dojar \
+ build/${PN}.jar \
+ build/${PN}-sandbox.jar \
+ build/${PN}-hyph.jar
+
+ java-pkg_dolauncher \
+ ${PN} --main org.apache.fop.cli.Main \
+ -pre "${FILESDIR}/headless-launcher.bash"
+
+ dodoc NOTICE README
+
+ if use doc; then
+ java-pkg_dojavadoc \
+ build/javadocs
+ fi
+
+ if use examples; then
+ java-pkg_doexamples \
+ examples/* conf
+ fi
+
+ if use source; then
+ java-pkg_dosrc \
+ src/java/org \
+ src/sandbox/org
+ fi
+}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-java/fop/files/, dev-java/fop/
@ 2022-04-17 22:27 Florian Schmaus
0 siblings, 0 replies; 6+ messages in thread
From: Florian Schmaus @ 2022-04-17 22:27 UTC (permalink / raw
To: gentoo-commits
commit: 8a1a75d34f4cd056daa686de3d8ba643d8e5e3ed
Author: Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 17 22:24:40 2022 +0000
Commit: Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Sun Apr 17 22:27:07 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a1a75d3
dev-java/fop: remove binaries out of files/
Closes: https://bugs.gentoo.org/839042
Fixes: 55f3ec5078e3 ("dev-java/fop: Bump to 2.7")
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>
dev-java/fop/Manifest | 1 +
dev-java/fop/files/fop-2.7-core-event-models.jar | Bin 8835 -> 0 bytes
dev-java/fop/files/fop-2.7-test-event-model.jar | Bin 428 -> 0 bytes
dev-java/fop/fop-2.7.ebuild | 9 ++++++---
4 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/dev-java/fop/Manifest b/dev-java/fop/Manifest
index b65582322b79..27bd73277440 100644
--- a/dev-java/fop/Manifest
+++ b/dev-java/fop/Manifest
@@ -1,2 +1,3 @@
DIST fop-2.0-src.zip 26381859 BLAKE2B 8500de6a23e93c14fdb4f27c59bafba27a64e6aaffb7a761f16de5bd523e2fdb83593ab53a66de79bf7b7d6c2b887ab97a34accb18be416b26448753babe2395 SHA512 428793303fcf143cffaecadc22cfdb8a065bad0108cceebcabc479d92dbe9834b4f81fd27f3e0314546d848e1960b2fe1a9d443999d8f336f7e87fce771beb7a
+DIST fop-2.7-jars.tar.xz 7348 BLAKE2B 79a5b4f1948bbc9628e571a9873494e2d2088d7a90296e81e03cafa6ecd8f9d1c8dd6779d15c47a0e110304aa07e706c56412e3766a84e0a66c8224fdd92f61c SHA512 71c39cbb20416dc29beb8628ae8bac2a663c0b0d1f0418a241f3795a2d5e01159572c210b5a2d2eff8274247dc3631980de50fea4f94182ddde095d0e5e605c6
DIST fop-2.7-src.tar.gz 26799877 BLAKE2B 00bcbd4cc915aad67c0dac54e85b7c5d10576115a0a8a16517846af249137c73b10c8b0ff161c9957f7c49686eefbf9777dc452b038573c996e29cbad951176a SHA512 bffbc0a97db8bbc826cf9af89fbf4a7e6f705585ea4915c0954df57c6d7af50d323387bb4bb9e2d13047826352d9eb7cbf4f23d5146ce246965b4c531e015633
diff --git a/dev-java/fop/files/fop-2.7-core-event-models.jar b/dev-java/fop/files/fop-2.7-core-event-models.jar
deleted file mode 100644
index 49bece365d93..000000000000
Binary files a/dev-java/fop/files/fop-2.7-core-event-models.jar and /dev/null differ
diff --git a/dev-java/fop/files/fop-2.7-test-event-model.jar b/dev-java/fop/files/fop-2.7-test-event-model.jar
deleted file mode 100644
index 7c2fff6a088d..000000000000
Binary files a/dev-java/fop/files/fop-2.7-test-event-model.jar and /dev/null differ
diff --git a/dev-java/fop/fop-2.7.ebuild b/dev-java/fop/fop-2.7.ebuild
index e6aa1be68d31..5c30a5a49912 100644
--- a/dev-java/fop/fop-2.7.ebuild
+++ b/dev-java/fop/fop-2.7.ebuild
@@ -11,7 +11,10 @@ inherit java-pkg-2 java-pkg-simple
DESCRIPTION="XML Graphics Format Object Processor All-In-One"
HOMEPAGE="https://xmlgraphics.apache.org/fop/"
-SRC_URI="mirror://apache/xmlgraphics/fop/source/fop-${PV}-src.tar.gz"
+SRC_URI="
+ mirror://apache/xmlgraphics/fop/source/${P}-src.tar.gz
+ https://dev.gentoo.org/~flow/distfiles/fop/${P}-jars.tar.xz
+"
LICENSE="Apache-2.0"
SLOT="2.7"
@@ -95,7 +98,7 @@ src_compile() {
# Update "fop-core.jar" with "event-mode.xml" files produced manually
# by running "mvn package".
mkdir event-model && pushd $_ >/dev/null || die
- jar -xf "${FILESDIR}/fop-2.7-core-event-models.jar"
+ jar -xf "${WORKDIR}/fop-2.7-core-event-models.jar"
popd
jar -uf "fop-core.jar" -C event-model . || die
# Upstream does this with maven-antrun-plugin:
@@ -126,7 +129,7 @@ src_test() {
# This jar file was created manually from the output of "mvn test".
# Upstream does this with maven-antrun-plugin
- jar -xf ${FILESDIR}/fop-2.7-test-event-model.jar || die
+ jar -xf "${WORKDIR}/fop-2.7-test-event-model.jar" || die
java-pkg-simple_src_test
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-java/fop/files/, dev-java/fop/
@ 2022-05-09 17:21 Arthur Zamarin
0 siblings, 0 replies; 6+ messages in thread
From: Arthur Zamarin @ 2022-05-09 17:21 UTC (permalink / raw
To: gentoo-commits
commit: c10da10bc5d295f20ed764377f3e1ca63ff77b95
Author: Volkmar W. Pogatzki <gentoo <AT> pogatzki <DOT> net>
AuthorDate: Thu May 5 16:19:59 2022 +0000
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Mon May 9 17:21:20 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c10da10b
dev-java/fop: drop 2.0-r3
Closes: https://bugs.gentoo.org/834482
Closes: https://bugs.gentoo.org/634744
Signed-off-by: Volkmar W. Pogatzki <gentoo <AT> pogatzki.net>
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
dev-java/fop/Manifest | 1 -
dev-java/fop/files/headless-launcher.bash | 1 -
dev-java/fop/fop-2.0-r3.ebuild | 129 ------------------------------
3 files changed, 131 deletions(-)
diff --git a/dev-java/fop/Manifest b/dev-java/fop/Manifest
index 27bd73277440..0cbe07fc9d42 100644
--- a/dev-java/fop/Manifest
+++ b/dev-java/fop/Manifest
@@ -1,3 +1,2 @@
-DIST fop-2.0-src.zip 26381859 BLAKE2B 8500de6a23e93c14fdb4f27c59bafba27a64e6aaffb7a761f16de5bd523e2fdb83593ab53a66de79bf7b7d6c2b887ab97a34accb18be416b26448753babe2395 SHA512 428793303fcf143cffaecadc22cfdb8a065bad0108cceebcabc479d92dbe9834b4f81fd27f3e0314546d848e1960b2fe1a9d443999d8f336f7e87fce771beb7a
DIST fop-2.7-jars.tar.xz 7348 BLAKE2B 79a5b4f1948bbc9628e571a9873494e2d2088d7a90296e81e03cafa6ecd8f9d1c8dd6779d15c47a0e110304aa07e706c56412e3766a84e0a66c8224fdd92f61c SHA512 71c39cbb20416dc29beb8628ae8bac2a663c0b0d1f0418a241f3795a2d5e01159572c210b5a2d2eff8274247dc3631980de50fea4f94182ddde095d0e5e605c6
DIST fop-2.7-src.tar.gz 26799877 BLAKE2B 00bcbd4cc915aad67c0dac54e85b7c5d10576115a0a8a16517846af249137c73b10c8b0ff161c9957f7c49686eefbf9777dc452b038573c996e29cbad951176a SHA512 bffbc0a97db8bbc826cf9af89fbf4a7e6f705585ea4915c0954df57c6d7af50d323387bb4bb9e2d13047826352d9eb7cbf4f23d5146ce246965b4c531e015633
diff --git a/dev-java/fop/files/headless-launcher.bash b/dev-java/fop/files/headless-launcher.bash
deleted file mode 100644
index a01c56f5e6ef..000000000000
--- a/dev-java/fop/files/headless-launcher.bash
+++ /dev/null
@@ -1 +0,0 @@
-[[ "${!#}" = "-awt" ]] || gjl_java_args="-Djava.awt.headless=true"
diff --git a/dev-java/fop/fop-2.0-r3.ebuild b/dev-java/fop/fop-2.0-r3.ebuild
deleted file mode 100644
index 6265183f67ad..000000000000
--- a/dev-java/fop/fop-2.0-r3.ebuild
+++ /dev/null
@@ -1,129 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# TODO: if 'doc' use flag is used then should build also extra docs ('docs' ant target), currently it cannot
-# be built as it needs forrest which we do not have
-# TODO: package and use optional dependency jeuclid
-
-EAPI="5"
-
-JAVA_PKG_IUSE="doc examples source test"
-
-inherit java-pkg-2 java-ant-2
-
-DESCRIPTION="Formatting Objects Processor is a print formatter driven by XSL"
-HOMEPAGE="https://xmlgraphics.apache.org/fop/"
-SRC_URI="mirror://apache/xmlgraphics/${PN}/source/${P}-src.zip"
-
-KEYWORDS="amd64 ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
-LICENSE="Apache-2.0"
-SLOT="0"
-
-# Tests are broken even in 2.0
-RESTRICT="test"
-
-CDEPEND="
- dev-java/batik:1.9
- dev-java/ant-core:0
- dev-java/fontbox:1.7
- dev-java/commons-io:1
- dev-java/commons-logging:0
- java-virtuals/servlet-api:3.0
- dev-java/avalon-framework:4.2
- dev-java/xmlgraphics-commons:2
- dev-java/xml-commons-external:1.3
- dev-java/qdox:1.12"
-
-RDEPEND=">=virtual/jre-1.6
- ${CDEPEND}"
-
-DEPEND=">=virtual/jdk-1.6
- app-arch/unzip
- ${CDEPEND}"
-
-# test? (
-# dev-java/ant-junit:0
-# dev-java/junit:4
-# dev-java/xmlunit:1
-# dev-java/mockito:0
-# )"
-
-JAVA_ANT_ENCODING="ISO-8859-1"
-JAVA_ANT_REWRITE_CLASSPATH="true"
-
-EANT_GENTOO_CLASSPATH="
- ant-core
- batik-1.9
- fontbox-1.7
- commons-io-1
- commons-logging
- servlet-api-3.0
- avalon-framework-4.2
- xmlgraphics-commons-2
- xml-commons-external-1.3
-"
-
-TARGETS=(
- resourcegen
- jar-hyphenation
- jar-sandbox
- jar-main
-)
-
-java_prepare() {
- find "${S}"/lib -type f | xargs rm -v
-}
-
-src_compile() {
- # https://bugs.gentoo.org/show_bug.cgi?id=554386
- # http://wiki.apache.org/xmlgraphics-fop/HowTo/BuildFOPAlternatively
- java-pkg_jar-from --into lib qdox-1.12 qdox.jar
- java-pkg_jar-from --into lib xmlgraphics-commons-2 xmlgraphics-commons.jar
- java-pkg_jar-from --into lib commons-logging commons-logging.jar
- java-pkg_jar-from --into lib commons-io-1 commons-io.jar
- java-pkg_jar-from --into lib fontbox-1.7 fontbox.jar
- java-pkg_jar-from --into lib xml-commons-external-1.3 xml-apis-ext.jar
- java-pkg_jar-from --into lib xml-commons-external-1.3 xml-apis.jar
- java-pkg_jar-from --into lib avalon-framework-4.2 avalon-framework.jar
- java-pkg_jar-from --virtual --into lib servlet-api-3.0 servlet-api.jar
-
- for target in ${TARGETS[@]}; do
- EANT_BUILD_TARGET="${target}" \
- java-pkg-2_src_compile
- done
-
- if use doc; then
- sed -i -e 's/failonerror=\"true\"/failonerror=\"false\"/;' ./build.xml
- EANT_BUILD_TARGET="javadocs" \
- java-pkg-2_src_compile
- fi
-}
-
-src_install() {
- java-pkg_dojar \
- build/${PN}.jar \
- build/${PN}-sandbox.jar \
- build/${PN}-hyph.jar
-
- java-pkg_dolauncher \
- ${PN} --main org.apache.fop.cli.Main \
- -pre "${FILESDIR}/headless-launcher.bash"
-
- dodoc NOTICE README
-
- if use doc; then
- java-pkg_dojavadoc \
- build/javadocs
- fi
-
- if use examples; then
- java-pkg_doexamples \
- examples/* conf
- fi
-
- if use source; then
- java-pkg_dosrc \
- src/java/org \
- src/sandbox/org
- fi
-}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-java/fop/files/, dev-java/fop/
@ 2023-09-20 7:30 Miroslav Šulc
0 siblings, 0 replies; 6+ messages in thread
From: Miroslav Šulc @ 2023-09-20 7:30 UTC (permalink / raw
To: gentoo-commits
commit: a626db0289f7ddb5f1ab029e18b665d8ea784d19
Author: Volkmar W. Pogatzki <gentoo <AT> pogatzki <DOT> net>
AuthorDate: Wed Sep 6 18:04:21 2023 +0000
Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Wed Sep 20 07:30:31 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a626db02
dev-java/fop: add 2.9
Signed-off-by: Volkmar W. Pogatzki <gentoo <AT> pogatzki.net>
Closes: https://github.com/gentoo/gentoo/pull/32925
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>
dev-java/fop/Manifest | 2 +
...fop-2.9-FO2StructureTreeConverterTestCase.patch | 45 +++++
.../fop-2.9-MissingLanguageWarningTestCase.patch | 88 +++++++++
.../fop/files/fop-2.9-PDFEncodingTestCase.patch | 31 ++++
.../files/fop-2.9-PDFToUnicodeCMapTestCase.patch | 33 ++++
dev-java/fop/fop-2.9.ebuild | 199 +++++++++++++++++++++
6 files changed, 398 insertions(+)
diff --git a/dev-java/fop/Manifest b/dev-java/fop/Manifest
index 0d9b604c3ef6..5080bc909c93 100644
--- a/dev-java/fop/Manifest
+++ b/dev-java/fop/Manifest
@@ -1,4 +1,6 @@
DIST fop-2.7-jars.tar.xz 7348 BLAKE2B 79a5b4f1948bbc9628e571a9873494e2d2088d7a90296e81e03cafa6ecd8f9d1c8dd6779d15c47a0e110304aa07e706c56412e3766a84e0a66c8224fdd92f61c SHA512 71c39cbb20416dc29beb8628ae8bac2a663c0b0d1f0418a241f3795a2d5e01159572c210b5a2d2eff8274247dc3631980de50fea4f94182ddde095d0e5e605c6
DIST fop-2.8-src.tar.gz 22855369 BLAKE2B 183649f531068b8f7513613c89f9f66a48894ab97a659e110b91853d5dffc1664d3830a8ced9ba221e22ca02fc51aed991ddee0e927cab59b9160a504f6dab02 SHA512 22e1737b5cd87dc5e014838e2ad867ccf46bdc564fb5c231cc6b4c1f8a9862864679ea7ddf143126058553ed90045941fb07aa2657db9e3ed35660ce11169357
DIST fop-2.8-src.tar.gz.asc 833 BLAKE2B f761b427bac89249ab4ab5f2194468e44f997e28ed77392a785764fb60dd2fbbc716ef881e2009a3dbad416ef195fc8ae4d2ebdbd63c3fb3f47d355acab8389b SHA512 c25e94ac4a72c9ff9bfa487369ee1510ab5b19a6178f14f5076b9cf0548044e79eca707025e962c63d268d0f48661cc7110f604036957e447f8413cdb582d3de
+DIST fop-2.9-src.tar.gz 20642865 BLAKE2B 6ab265ddfb1c07b9266687930af21ac4653438800772da836dbceb14de126333dcff50c2cea1352ad77988ec7f7a3d4eef91341983edc13684abf2531634eb0a SHA512 d346c8fffd0d3ff5e803bea4233ce171972ded39b0c475b367333e37247da8f9e823c7e2e75fab735bf9282654d67befa2fa473f53a199cbd96b0f7305b3c093
+DIST fop-2.9-src.tar.gz.asc 833 BLAKE2B 284f04d450bcfb6583d353ae21bbadad8da14b59d946e094453b564e700c8cfdcb448ed206a5a246b725b453a1b3feea69f96ff3b2a683320bce6743cc5a167f SHA512 404d5df54cf84ddb11c7f5ebc6772d61cd04fc434dea421429a9a270e1d0ca17f61df8a33600db5a41c6d45f828a67fc26becfa9b4ac18342e9dfb4781dd0bdc
DIST fop-hyph-2.0.jar 6655933 BLAKE2B bfbefcc2ebd9a9a467c23a70d7cef256f83cf2335f6e17db6bbefceaf8a3cee78de0302f269d096eb3238b3f4883429e09cc640bed11a42da4ef67ab9f0cb164 SHA512 3d5f27623008c7beba5332387bd42c501b7ae1dddfc98014b3fb35273394ca5f0a4ce69e7726090ec468c9b4f7983fb8b1a5759f49e81ea342c81c61311d87b3
diff --git a/dev-java/fop/files/fop-2.9-FO2StructureTreeConverterTestCase.patch b/dev-java/fop/files/fop-2.9-FO2StructureTreeConverterTestCase.patch
new file mode 100644
index 000000000000..87e36eb4b49c
--- /dev/null
+++ b/dev-java/fop/files/fop-2.9-FO2StructureTreeConverterTestCase.patch
@@ -0,0 +1,45 @@
+There were 2 failures:
+1) testRemoveBlocks(org.apache.fop.accessibility.fo.FO2StructureTreeConverterTestCase)
+org.junit.ComparisonFailure: expected:<....0" encoding="UTF-8"[ standalone="no"]?><structure-tree-se...> but was:<....0" encoding="UTF-8"[]?><structure-tree-se...>
+ at org.junit.Assert.assertEquals(Assert.java:117)
+ at org.junit.Assert.assertEquals(Assert.java:146)
+ at org.apache.fop.accessibility.fo.FO2StructureTreeConverterTestCase.compare(FO2StructureTreeConverterTestCase.java:225)
+ at org.apache.fop.accessibility.fo.FO2StructureTreeConverterTestCase.testRemoveBlocks(FO2StructureTreeConverterTestCase.java:150)
+2) testRemoveTableHeader(org.apache.fop.accessibility.fo.FO2StructureTreeConverterTestCase)
+org.junit.ComparisonFailure: expected:<....0" encoding="UTF-8"[ standalone="no"]?><structure-tree-se...> but was:<....0" encoding="UTF-8"[]?><structure-tree-se...>
+ at org.junit.Assert.assertEquals(Assert.java:117)
+ at org.junit.Assert.assertEquals(Assert.java:146)
+ at org.apache.fop.accessibility.fo.FO2StructureTreeConverterTestCase.compare(FO2StructureTreeConverterTestCase.java:225)
+ at org.apache.fop.accessibility.fo.FO2StructureTreeConverterTestCase.testRemoveTableHeader(FO2StructureTreeConverterTestCase.java:187)
+
+FAILURES!!!
+Tests run: 11, Failures: 2
+
+--- a/fop-core/src/test/java/org/apache/fop/accessibility/fo/FO2StructureTreeConverterTestCase.java
++++ b/fop-core/src/test/java/org/apache/fop/accessibility/fo/FO2StructureTreeConverterTestCase.java
+@@ -43,6 +43,7 @@ import javax.xml.transform.stream.StreamSource;
+
+ import org.custommonkey.xmlunit.Diff;
+ import org.junit.Test;
++import org.junit.Ignore;
+ import org.w3c.dom.Document;
+ import org.xml.sax.SAXException;
+ import org.xml.sax.helpers.AttributesImpl;
+@@ -144,7 +145,7 @@ public class FO2StructureTreeConverterTestCase {
+ assertNull(d.getStructureTreeEventHandler().startNode("table-body", null, null));
+ }
+
+- @Test
++ @Test @Ignore
+ public void testRemoveBlocks() throws Exception {
+ keepEmptyTags = false;
+ compare("<fo:root xmlns:fo=\"http://www.w3.org/1999/XSL/Format\">\n"
+@@ -180,7 +181,7 @@ public class FO2StructureTreeConverterTestCase {
+ + "</structure-tree-sequence>\n");
+ }
+
+- @Test
++ @Test @Ignore
+ public void testRemoveTableHeader() throws Exception {
+ keepEmptyTags = false;
+ String fo = IOUtils.toString(getResource("table-artifact.fo"), "utf8").replace("role=\"artifact\"", "");
diff --git a/dev-java/fop/files/fop-2.9-MissingLanguageWarningTestCase.patch b/dev-java/fop/files/fop-2.9-MissingLanguageWarningTestCase.patch
new file mode 100644
index 000000000000..b3c70d33356c
--- /dev/null
+++ b/dev-java/fop/files/fop-2.9-MissingLanguageWarningTestCase.patch
@@ -0,0 +1,88 @@
+There was 1 failure:
+1) testMissingLanguage(org.apache.fop.accessibility.pdf.MissingLanguageWarningTestCase)
+org.junit.ComparisonFailure: expected:<3[2:36]> but was:<3[0:37]>
+ at org.junit.Assert.assertEquals(Assert.java:117)
+ at org.junit.Assert.assertEquals(Assert.java:146)
+ at org.apache.fop.accessibility.pdf.MissingLanguageWarningTestCase$MissingLanguageEventChecker.processEvent(MissingLanguageWarningTestCase.java:65)
+ at org.apache.fop.events.CompositeEventListener.processEvent(CompositeEventListener.java:61)
+ at org.apache.fop.events.FOPEventListenerProxy.processEvent(FOPEventListenerProxy.java:70)
+ at org.apache.fop.apps.FOUserAgent$FOPEventBroadcaster.broadcastEvent(FOUserAgent.java:621)
+ at org.apache.fop.events.DefaultEventBroadcaster$1.invoke(DefaultEventBroadcaster.java:170)
+ at jdk.proxy2/jdk.proxy2.$Proxy12.unknownLanguage(Unknown Source)
+ at org.apache.fop.render.pdf.PDFPainter$LanguageAvailabilityChecker.checkLanguageAvailability(PDFPainter.java:106)
+ at org.apache.fop.render.pdf.PDFPainter$LanguageAvailabilityChecker.access$000(PDFPainter.java:90)
+ at org.apache.fop.render.pdf.PDFPainter.prepareImageMCID(PDFPainter.java:238)
+ at org.apache.fop.render.pdf.PDFPainter.drawImageUsingURI(PDFPainter.java:216)
+ at org.apache.fop.render.pdf.PDFPainter.drawImage(PDFPainter.java:182)
+ at org.apache.fop.render.intermediate.IFRenderer.drawImage(IFRenderer.java:1306)
+ at org.apache.fop.render.intermediate.IFRenderer.renderImage(IFRenderer.java:1293)
+ at org.apache.fop.render.AbstractRenderer.renderInlineViewport(AbstractRenderer.java:1030)
+ at org.apache.fop.render.AbstractPathOrientedRenderer.renderInlineViewport(AbstractPathOrientedRenderer.java:836)
+ at org.apache.fop.render.intermediate.IFRenderer.renderInlineViewport(IFRenderer.java:860)
+ at org.apache.fop.render.AbstractRenderer.renderInlineArea(AbstractRenderer.java:877)
+ at org.apache.fop.render.intermediate.IFRenderer.renderInlineArea(IFRenderer.java:924)
+ at org.apache.fop.render.AbstractRenderer.renderLineArea(AbstractRenderer.java:845)
+ at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:704)
+ at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:758)
+ at org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:1004)
+ at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:689)
+ at org.apache.fop.render.AbstractRenderer.renderFlow(AbstractRenderer.java:591)
+ at org.apache.fop.render.AbstractPathOrientedRenderer.renderFlow(AbstractPathOrientedRenderer.java:789)
+ at org.apache.fop.render.AbstractRenderer.renderMainReference(AbstractRenderer.java:568)
+ at org.apache.fop.render.AbstractRenderer.renderBodyRegion(AbstractRenderer.java:433)
+ at org.apache.fop.render.AbstractRenderer.renderRegionViewport(AbstractRenderer.java:380)
+ at org.apache.fop.render.intermediate.IFRenderer.renderRegionViewport(IFRenderer.java:735)
+ at org.apache.fop.render.AbstractRenderer.renderPageAreas(AbstractRenderer.java:345)
+ at org.apache.fop.render.AbstractRenderer.renderPage(AbstractRenderer.java:318)
+ at org.apache.fop.render.intermediate.IFRenderer.renderPage(IFRenderer.java:584)
+ at org.apache.fop.area.RenderPagesModel.renderPage(RenderPagesModel.java:193)
+ at org.apache.fop.area.RenderPagesModel.checkPreparedPages(RenderPagesModel.java:174)
+ at org.apache.fop.area.RenderPagesModel.addPage(RenderPagesModel.java:146)
+ at org.apache.fop.layoutmgr.AbstractPageSequenceLayoutManager.finishPage(AbstractPageSequenceLayoutManager.java:316)
+ at org.apache.fop.layoutmgr.PageSequenceLayoutManager.finishPage(PageSequenceLayoutManager.java:243)
+ at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:147)
+ at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:267)
+ at org.apache.fop.fo.DelegatingFOEventHandler.endPageSequence(DelegatingFOEventHandler.java:114)
+ at org.apache.fop.accessibility.fo.FO2StructureTreeConverter.endPageSequence(FO2StructureTreeConverter.java:184)
+ at org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:140)
+ at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:390)
+ at org.apache.fop.fo.FOTreeBuilder$3.run(FOTreeBuilder.java:207)
+ at org.apache.fop.fo.FOTreeBuilder$3.run(FOTreeBuilder.java:204)
+ at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
+ at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:203)
+ at org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1102)
+ at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:618)
+ at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1728)
+ at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2899)
+ at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605)
+ at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
+ at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:542)
+ at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:889)
+ at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:825)
+ at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
+ at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1224)
+ at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)
+ at org.apache.fop.accessibility.pdf.MissingLanguageWarningTestCase.testMissingLanguage(MissingLanguageWarningTestCase.java:90)
+
+FAILURES!!!
+Tests run: 10, Failures: 1
+
+--- a/fop-core/src/test/java/org/apache/fop/accessibility/pdf/MissingLanguageWarningTestCase.java
++++ b/fop-core/src/test/java/org/apache/fop/accessibility/pdf/MissingLanguageWarningTestCase.java
+@@ -31,6 +31,7 @@ import javax.xml.transform.stream.StreamSource;
+
+ import org.junit.Before;
+ import org.junit.Test;
++import org.junit.Ignore;
+
+ import static org.junit.Assert.assertEquals;
+ import static org.junit.Assert.assertFalse;
+@@ -82,7 +83,7 @@ public class MissingLanguageWarningTestCase {
+ fop = fopFactory.newFop(MimeConstants.MIME_PDF, userAgent, NullOutputStream.NULL_OUTPUT_STREAM);
+ }
+
+- @Test
++ @Test @Ignore
+ public void testMissingLanguage() throws Exception {
+ Source src = new StreamSource(getClass().getResourceAsStream("missing-language.fo"));
+ SAXResult res = new SAXResult(fop.getDefaultHandler());
diff --git a/dev-java/fop/files/fop-2.9-PDFEncodingTestCase.patch b/dev-java/fop/files/fop-2.9-PDFEncodingTestCase.patch
new file mode 100644
index 000000000000..8508de962382
--- /dev/null
+++ b/dev-java/fop/files/fop-2.9-PDFEncodingTestCase.patch
@@ -0,0 +1,31 @@
+There was 1 failure:
+1) testPDFEncodingWithStandardFont(org.apache.fop.render.pdf.PDFEncodingTestCase)
+java.lang.AssertionError: line containing 'PDFE_TEST_MARK_2' must contain 'XX_é_XX'
+ at org.junit.Assert.fail(Assert.java:89)
+ at org.junit.Assert.assertTrue(Assert.java:42)
+ at org.apache.fop.render.pdf.PDFEncodingTestCase.checkEncoding(PDFEncodingTestCase.java:159)
+ at org.apache.fop.render.pdf.PDFEncodingTestCase.runTest(PDFEncodingTestCase.java:128)
+ at org.apache.fop.render.pdf.PDFEncodingTestCase.testPDFEncodingWithStandardFont(PDFEncodingTestCase.java:78)
+
+FAILURES!!!
+Tests run: 3, Failures: 1
+
+--- a/fop-core/src/test/java/org/apache/fop/render/pdf/PDFEncodingTestCase.java
++++ b/fop-core/src/test/java/org/apache/fop/render/pdf/PDFEncodingTestCase.java
+@@ -25,6 +25,7 @@ import java.io.File;
+ import java.io.IOException;
+
+ import org.junit.Test;
++import org.junit.Ignore;
+ import org.xml.sax.SAXException;
+
+ import static org.junit.Assert.assertEquals;
+@@ -61,7 +62,7 @@ public class PDFEncodingTestCase extends BasePDFTest {
+ * Test using a standard FOP font
+ * @throws Exception checkstyle wants a comment here, even a silly one
+ */
+- @Test
++ @Test @Ignore
+ public void testPDFEncodingWithStandardFont() throws Exception {
+
+ /* If the PDF encoding is correct, a text dump of the generated PDF file contains this (excerpts)
diff --git a/dev-java/fop/files/fop-2.9-PDFToUnicodeCMapTestCase.patch b/dev-java/fop/files/fop-2.9-PDFToUnicodeCMapTestCase.patch
new file mode 100644
index 000000000000..f08052ac6483
--- /dev/null
+++ b/dev-java/fop/files/fop-2.9-PDFToUnicodeCMapTestCase.patch
@@ -0,0 +1,33 @@
+There was 1 failure:
+1) unpairedHighSurrogateTest(org.apache.fop.pdf.PDFToUnicodeCMapTestCase)
+java.lang.IllegalStateException: Event model isn't consistent with the EventProducer interface. Please rebuild FOP! Affected method: org.apache.fop.render.pdf.PDFEventProducer.unpairedSurrogate
+ at org.apache.fop.events.DefaultEventBroadcaster$1.invoke(DefaultEventBroadcaster.java:155)
+ at jdk.proxy2/jdk.proxy2.$Proxy11.unpairedSurrogate(Unknown Source)
+ at org.apache.fop.pdf.PDFToUnicodeCMap$ToUnicodeCMapBuilder.writeBFCharEntries(PDFToUnicodeCMap.java:160)
+ at org.apache.fop.pdf.PDFToUnicodeCMap$ToUnicodeCMapBuilder.writeBFEntries(PDFToUnicodeCMap.java:108)
+ at org.apache.fop.pdf.PDFToUnicodeCMap$ToUnicodeCMapBuilder.writeCMap(PDFToUnicodeCMap.java:99)
+ at org.apache.fop.pdf.PDFToUnicodeCMapTestCase.buildAndAssertLine(PDFToUnicodeCMapTestCase.java:100)
+ at org.apache.fop.pdf.PDFToUnicodeCMapTestCase.unpairedHighSurrogateTest(PDFToUnicodeCMapTestCase.java:307)
+
+FAILURES!!!
+Tests run: 10, Failures:
+
+--- a/fop-core/src/test/java/org/apache/fop/pdf/PDFToUnicodeCMapTestCase.java
++++ b/fop-core/src/test/java/org/apache/fop/pdf/PDFToUnicodeCMapTestCase.java
+@@ -29,6 +29,7 @@ import java.util.Set;
+ import org.junit.Assert;
+ import org.junit.Before;
+ import org.junit.Test;
++import org.junit.Ignore;
+
+ import static org.junit.Assert.assertEquals;
+ import static org.junit.Assert.assertNotNull;
+@@ -278,7 +279,7 @@ public class PDFToUnicodeCMapTestCase {
+ * Checks that an unpaired surrogate (a high-surrogate as the last code unit) is correctly handled.
+ * @throws IOException
+ */
+- @Test
++ @Test @Ignore
+ public void unpairedHighSurrogateTest() throws IOException {
+ final int charMapSize = 10;
+
diff --git a/dev-java/fop/fop-2.9.ebuild b/dev-java/fop/fop-2.9.ebuild
new file mode 100644
index 000000000000..c2ad2912a16e
--- /dev/null
+++ b/dev-java/fop/fop-2.9.ebuild
@@ -0,0 +1,199 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+JAVA_PKG_IUSE="doc source test"
+MAVEN_ID="org.apache.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/~flow/distfiles/fop/fop-2.7-jars.tar.xz
+ verify-sig? ( https://www.apache.org/dist/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}/fop-${PV}"
+
+LICENSE="Apache-2.0"
+SLOT="2.8"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
+
+CP_DEPEND="
+ dev-java/batik:1.16
+ dev-java/commons-io:1
+ dev-java/commons-logging:0
+ dev-java/fontbox:0
+ dev-java/qdox:1.12
+ dev-java/xmlgraphics-commons:2
+"
+
+DEPEND="${CP_DEPEND}
+ >=virtual/jdk-1.8:*
+ dev-java/ant-core:0
+ dev-java/javax-servlet-api:2.2
+ dev-java/sun-jai-bin:0
+ test? (
+ dev-java/mockito:2
+ dev-java/pdfbox:0
+ dev-java/xmlunit:1
+ )
+"
+
+RDEPEND="${CP_DEPEND}
+ >=virtual/jre-1.8:*"
+
+BDEPEND="dev-java/xalan:0"
+
+DOCS=( NOTICE README )
+
+PATCHES=(
+ "${FILESDIR}/fop-2.9-PDFEncodingTestCase.patch"
+ "${FILESDIR}/fop-2.9-PDFToUnicodeCMapTestCase.patch"
+ "${FILESDIR}/fop-2.9-MissingLanguageWarningTestCase.patch"
+ "${FILESDIR}/fop-2.9-FO2StructureTreeConverterTestCase.patch"
+)
+
+JAVA_CLASSPATH_EXTRA="
+ ant-core
+ javax-servlet-api-2.2
+ sun-jai-bin
+"
+
+BDEPEND="verify-sig? ( sec-keys/openpgp-keys-apache-xmlgraphics-fop )"
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}/usr/share/openpgp-keys/xmlgraphics-fop.apache.org.asc"
+src_unpack() {
+ if use verify-sig; then
+ verify-sig_verify_detached "${DISTDIR}"/${P}-src.tar.gz{,.asc}
+ fi
+ default
+}
+
+src_prepare() {
+ java-pkg_clean
+ java-pkg-2_src_prepare
+ default
+}
+
+src_compile() {
+ 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:.*<mainClass>\(.*\)</mainClass>:\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
+ java-pkg-simple_src_compile
+
+ # Update "fop-core.jar" with "event-mode.xml" files produced manually
+ # by running "mvn package".
+ # Upstream does this with maven-antrun-plugin:
+ # https://github.com/apache/xmlgraphics-fop/blob/fop-2_8/fop-core/pom.xml#L269-L290
+ mkdir event-model && pushd $_ > /dev/null || die
+ jar -xf "${WORKDIR}/fop-2.7-core-event-models.jar"
+ popd > /dev/null || die
+
+ jar -uf "fop-core.jar" -C event-model . || die
+ JAVA_GENTOO_CLASSPATH_EXTRA+=":fop-core.jar"
+ 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.7-test-event-model.jar" || 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
+ # <workingDirectory>../fop</workingDirectory>
+ 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
+}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-java/fop/files/, dev-java/fop/
@ 2024-02-22 13:45 Miroslav Šulc
0 siblings, 0 replies; 6+ messages in thread
From: Miroslav Šulc @ 2024-02-22 13:45 UTC (permalink / raw
To: gentoo-commits
commit: 84e8700135cb51435adec7cf9e049ef3fd92d004
Author: Volkmar W. Pogatzki <gentoo <AT> pogatzki <DOT> net>
AuthorDate: Thu Feb 22 07:01:00 2024 +0000
Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Thu Feb 22 13:45:06 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=84e87001
dev-java/fop: drop 2.8-r1
Closes: https://bugs.gentoo.org/903880
Signed-off-by: Volkmar W. Pogatzki <gentoo <AT> pogatzki.net>
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>
dev-java/fop/Manifest | 2 -
.../fop/files/fop-2.8-skip-failing-tests.patch | 48 ------
dev-java/fop/fop-2.8-r1.ebuild | 188 ---------------------
3 files changed, 238 deletions(-)
diff --git a/dev-java/fop/Manifest b/dev-java/fop/Manifest
index 5080bc909c93..09319bb63d30 100644
--- a/dev-java/fop/Manifest
+++ b/dev-java/fop/Manifest
@@ -1,6 +1,4 @@
DIST fop-2.7-jars.tar.xz 7348 BLAKE2B 79a5b4f1948bbc9628e571a9873494e2d2088d7a90296e81e03cafa6ecd8f9d1c8dd6779d15c47a0e110304aa07e706c56412e3766a84e0a66c8224fdd92f61c SHA512 71c39cbb20416dc29beb8628ae8bac2a663c0b0d1f0418a241f3795a2d5e01159572c210b5a2d2eff8274247dc3631980de50fea4f94182ddde095d0e5e605c6
-DIST fop-2.8-src.tar.gz 22855369 BLAKE2B 183649f531068b8f7513613c89f9f66a48894ab97a659e110b91853d5dffc1664d3830a8ced9ba221e22ca02fc51aed991ddee0e927cab59b9160a504f6dab02 SHA512 22e1737b5cd87dc5e014838e2ad867ccf46bdc564fb5c231cc6b4c1f8a9862864679ea7ddf143126058553ed90045941fb07aa2657db9e3ed35660ce11169357
-DIST fop-2.8-src.tar.gz.asc 833 BLAKE2B f761b427bac89249ab4ab5f2194468e44f997e28ed77392a785764fb60dd2fbbc716ef881e2009a3dbad416ef195fc8ae4d2ebdbd63c3fb3f47d355acab8389b SHA512 c25e94ac4a72c9ff9bfa487369ee1510ab5b19a6178f14f5076b9cf0548044e79eca707025e962c63d268d0f48661cc7110f604036957e447f8413cdb582d3de
DIST fop-2.9-src.tar.gz 20642865 BLAKE2B 6ab265ddfb1c07b9266687930af21ac4653438800772da836dbceb14de126333dcff50c2cea1352ad77988ec7f7a3d4eef91341983edc13684abf2531634eb0a SHA512 d346c8fffd0d3ff5e803bea4233ce171972ded39b0c475b367333e37247da8f9e823c7e2e75fab735bf9282654d67befa2fa473f53a199cbd96b0f7305b3c093
DIST fop-2.9-src.tar.gz.asc 833 BLAKE2B 284f04d450bcfb6583d353ae21bbadad8da14b59d946e094453b564e700c8cfdcb448ed206a5a246b725b453a1b3feea69f96ff3b2a683320bce6743cc5a167f SHA512 404d5df54cf84ddb11c7f5ebc6772d61cd04fc434dea421429a9a270e1d0ca17f61df8a33600db5a41c6d45f828a67fc26becfa9b4ac18342e9dfb4781dd0bdc
DIST fop-hyph-2.0.jar 6655933 BLAKE2B bfbefcc2ebd9a9a467c23a70d7cef256f83cf2335f6e17db6bbefceaf8a3cee78de0302f269d096eb3238b3f4883429e09cc640bed11a42da4ef67ab9f0cb164 SHA512 3d5f27623008c7beba5332387bd42c501b7ae1dddfc98014b3fb35273394ca5f0a4ce69e7726090ec468c9b4f7983fb8b1a5759f49e81ea342c81c61311d87b3
diff --git a/dev-java/fop/files/fop-2.8-skip-failing-tests.patch b/dev-java/fop/files/fop-2.8-skip-failing-tests.patch
deleted file mode 100644
index 729795e93fd2..000000000000
--- a/dev-java/fop/files/fop-2.8-skip-failing-tests.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-# https://bugs.gentoo.org/903880
---- a/fop-core/src/test/java/org/apache/fop/accessibility/fo/FO2StructureTreeConverterTestCase.java
-+++ b/fop-core/src/test/java/org/apache/fop/accessibility/fo/FO2StructureTreeConverterTestCase.java
-@@ -43,6 +43,7 @@ import javax.xml.transform.stream.StreamSource;
-
- import org.custommonkey.xmlunit.Diff;
- import org.junit.Test;
-+import org.junit.Ignore;
- import org.w3c.dom.Document;
- import org.xml.sax.SAXException;
- import org.xml.sax.helpers.AttributesImpl;
-@@ -144,7 +145,7 @@ public class FO2StructureTreeConverterTestCase {
- assertNull(d.getStructureTreeEventHandler().startNode("table-body", null, null));
- }
-
-- @Test
-+ @Test @Ignore
- public void testRemoveBlocks() throws Exception {
- keepEmptyTags = false;
- compare("<fo:root xmlns:fo=\"http://www.w3.org/1999/XSL/Format\">\n"
-@@ -180,7 +181,7 @@ public class FO2StructureTreeConverterTestCase {
- + "</structure-tree-sequence>\n");
- }
-
-- @Test
-+ @Test @Ignore
- public void testRemoveTableHeader() throws Exception {
- keepEmptyTags = false;
- String fo = IOUtils.toString(getResource("table-artifact.fo"), "utf8").replace("role=\"artifact\"", "");
---- a/fop-core/src/test/java/org/apache/fop/render/pdf/PDFEncodingTestCase.java
-+++ b/fop-core/src/test/java/org/apache/fop/render/pdf/PDFEncodingTestCase.java
-@@ -25,6 +25,7 @@ import java.io.File;
- import java.io.IOException;
-
- import org.junit.Test;
-+import org.junit.Ignore;
- import org.xml.sax.SAXException;
-
- import static org.junit.Assert.assertEquals;
-@@ -61,7 +62,7 @@ public class PDFEncodingTestCase extends BasePDFTest {
- * Test using a standard FOP font
- * @throws Exception checkstyle wants a comment here, even a silly one
- */
-- @Test
-+ @Test @Ignore
- public void testPDFEncodingWithStandardFont() throws Exception {
-
- /* If the PDF encoding is correct, a text dump of the generated PDF file contains this (excerpts)
diff --git a/dev-java/fop/fop-2.8-r1.ebuild b/dev-java/fop/fop-2.8-r1.ebuild
deleted file mode 100644
index 89f3be35d3bc..000000000000
--- a/dev-java/fop/fop-2.8-r1.ebuild
+++ /dev/null
@@ -1,188 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-JAVA_PKG_IUSE="doc source test"
-MAVEN_ID="org.apache.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/~flow/distfiles/fop/fop-2.7-jars.tar.xz
- verify-sig? ( https://www.apache.org/dist/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}/fop-${PV}"
-
-LICENSE="Apache-2.0"
-SLOT="2.8"
-KEYWORDS="amd64 ~arm64 ppc64 x86"
-
-CP_DEPEND="
- dev-java/batik:1.16
- dev-java/commons-io:1
- dev-java/commons-logging:0
- dev-java/fontbox:0
- dev-java/qdox:1.12
- dev-java/xmlgraphics-commons:2
-"
-
-DEPEND="${CP_DEPEND}
- >=virtual/jdk-1.8:*
- dev-java/ant-core:0
- dev-java/javax-servlet-api:2.2
- dev-java/sun-jai-bin:0
- test? (
- dev-java/mockito:2
- dev-java/pdfbox:0
- dev-java/xmlunit:1
- )
-"
-
-RDEPEND="${CP_DEPEND}
- >=virtual/jre-1.8:*"
-
-BDEPEND="dev-java/xalan:0"
-
-DOCS=( NOTICE README )
-
-PATCHES=( "${FILESDIR}/fop-2.8-skip-failing-tests.patch" )
-
-JAVA_CLASSPATH_EXTRA="
- ant-core
- javax-servlet-api-2.2
- sun-jai-bin
-"
-
-BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-apache-xmlgraphics-fop )"
-VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/xmlgraphics-fop.apache.org.asc"
-
-src_unpack() {
- if use verify-sig; then
- verify-sig_verify_detached "${DISTDIR}"/${P}-src.tar.gz{,.asc}
- fi
- default
-}
-
-src_prepare() {
- java-pkg_clean
- java-pkg-2_src_prepare
- default
-}
-
-src_compile() {
- 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:.*<mainClass>\(.*\)</mainClass>:\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
- java-pkg-simple_src_compile
-
- # Update "fop-core.jar" with "event-mode.xml" files produced manually
- # by running "mvn package".
- # Upstream does this with maven-antrun-plugin:
- # https://github.com/apache/xmlgraphics-fop/blob/fop-2_8/fop-core/pom.xml#L269-L290
- mkdir event-model && pushd $_ > /dev/null || die
- jar -xf "${WORKDIR}/fop-2.7-core-event-models.jar"
- popd > /dev/null || die
-
- jar -uf "fop-core.jar" -C event-model . || die
- JAVA_GENTOO_CLASSPATH_EXTRA+=":fop-core.jar"
- 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.7-test-event-model.jar" || 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" \
- ! -name 'MissingLanguageWarningTestCase.java' \
- )
- JAVA_TEST_RUN_ONLY="${JAVA_TEST_RUN_ONLY//.java}"
- JAVA_TEST_RUN_ONLY="${JAVA_TEST_RUN_ONLY//\//.}"
- popd > /dev/null || die
- # https://github.com/apache/xmlgraphics-fop/blob/fop-2_8/fop-core/pom.xml#L297-L307
- # <workingDirectory>../fop</workingDirectory>
- 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
-}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-java/fop/files/, dev-java/fop/
@ 2024-10-30 11:32 Miroslav Šulc
0 siblings, 0 replies; 6+ messages in thread
From: Miroslav Šulc @ 2024-10-30 11:32 UTC (permalink / raw
To: gentoo-commits
commit: dfeddd5d6637f482103e816a046c1c356dbc0d0f
Author: Volkmar W. Pogatzki <gentoo <AT> pogatzki <DOT> net>
AuthorDate: Tue Oct 15 17:42:35 2024 +0000
Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Wed Oct 30 11:32:00 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dfeddd5d
dev-java/fop: add 2.10 - CVE-2024-28168
Updating fop-2.7-jars.tar.xz -> fop-2.10-jars.tar.xz with newer events
solves several test exclusions.
Bug: https://bugs.gentoo.org/941239
Signed-off-by: Volkmar W. Pogatzki <gentoo <AT> pogatzki.net>
Closes: https://github.com/gentoo/gentoo/pull/38836/commits/b312a3234fda20fe912b57e25cee1c0ec1ac9970
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>
dev-java/fop/Manifest | 3 +
dev-java/fop/files/fop-2.10-java23.patch | 52 ++++++++
dev-java/fop/fop-2.10.ebuild | 211 +++++++++++++++++++++++++++++++
3 files changed, 266 insertions(+)
diff --git a/dev-java/fop/Manifest b/dev-java/fop/Manifest
index 09319bb63d30..ab5e905bc3fb 100644
--- a/dev-java/fop/Manifest
+++ b/dev-java/fop/Manifest
@@ -1,3 +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.7-jars.tar.xz 7348 BLAKE2B 79a5b4f1948bbc9628e571a9873494e2d2088d7a90296e81e03cafa6ecd8f9d1c8dd6779d15c47a0e110304aa07e706c56412e3766a84e0a66c8224fdd92f61c SHA512 71c39cbb20416dc29beb8628ae8bac2a663c0b0d1f0418a241f3795a2d5e01159572c210b5a2d2eff8274247dc3631980de50fea4f94182ddde095d0e5e605c6
DIST fop-2.9-src.tar.gz 20642865 BLAKE2B 6ab265ddfb1c07b9266687930af21ac4653438800772da836dbceb14de126333dcff50c2cea1352ad77988ec7f7a3d4eef91341983edc13684abf2531634eb0a SHA512 d346c8fffd0d3ff5e803bea4233ce171972ded39b0c475b367333e37247da8f9e823c7e2e75fab735bf9282654d67befa2fa473f53a199cbd96b0f7305b3c093
DIST fop-2.9-src.tar.gz.asc 833 BLAKE2B 284f04d450bcfb6583d353ae21bbadad8da14b59d946e094453b564e700c8cfdcb448ed206a5a246b725b453a1b3feea69f96ff3b2a683320bce6743cc5a167f SHA512 404d5df54cf84ddb11c7f5ebc6772d61cd04fc434dea421429a9a270e1d0ca17f61df8a33600db5a41c6d45f828a67fc26becfa9b4ac18342e9dfb4781dd0bdc
diff --git a/dev-java/fop/files/fop-2.10-java23.patch b/dev-java/fop/files/fop-2.10-java23.patch
new file mode 100644
index 000000000000..fb3aae334c72
--- /dev/null
+++ b/dev-java/fop/files/fop-2.10-java23.patch
@@ -0,0 +1,52 @@
+From 49e0e9ae69cf96eb4c13527b271c8a70a5f5f843 Mon Sep 17 00:00:00 2001
+From: Simon Steiner <ssteiner@apache.org>
+Date: Mon, 21 Oct 2024 10:10:54 +0100
+Subject: [PATCH] Fix compile on Java 23
+
+---
+ .github/workflows/maven.yml | 2 +-
+ .../main/java/org/apache/fop/layoutmgr/KnuthSequence.java | 8 ++++----
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+# diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
+# index a9c6e0f7eba..d5e426590b5 100644
+# --- a/.github/workflows/maven.yml
+# +++ b/.github/workflows/maven.yml
+# @@ -17,7 +17,7 @@ jobs:
+# strategy:
+# fail-fast: false
+# matrix:
+# - jdk: ['8', '11', '17', '21']
+# + jdk: ['8', '11', '17', '21', '23']
+# os: [ubuntu-latest, windows-latest]
+#
+# steps:
+# diff --git a/fop-core/src/main/java/org/apache/fop/layoutmgr/KnuthSequence.java b/fop-core/src/main/java/org/apache/fop/layoutmgr/KnuthSequence.java
+# index ce85b686cb4..8f4a6d66c0f 100644
+--- a/fop-core/src/main/java/org/apache/fop/layoutmgr/KnuthSequence.java
++++ b/fop-core/src/main/java/org/apache/fop/layoutmgr/KnuthSequence.java
+@@ -134,20 +134,20 @@ public void wrapPositions(LayoutManager lm) {
+ /**
+ * @return the last element of this sequence.
+ */
+- public ListElement getLast() {
++ public T getLast() {
+ return (isEmpty()
+ ? null
+- : (ListElement) ListUtil.getLast(this));
++ : ListUtil.getLast(this));
+ }
+
+ /**
+ * Remove the last element of this sequence.
+ * @return the removed element.
+ */
+- public ListElement removeLast() {
++ public T removeLast() {
+ return (isEmpty()
+ ? null
+- : (ListElement) ListUtil.removeLast(this));
++ : ListUtil.removeLast(this));
+ }
+
+ /**
diff --git a/dev-java/fop/fop-2.10.ebuild b/dev-java/fop/fop-2.10.ebuild
new file mode 100644
index 000000000000..0b0835b224f5
--- /dev/null
+++ b/dev-java/fop/fop-2.10.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="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:.*<mainClass>\(.*\)</mainClass>:\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
+ # <workingDirectory>../fop</workingDirectory>
+ 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
+}
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-10-30 12:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-20 7:30 [gentoo-commits] repo/gentoo:master commit in: dev-java/fop/files/, dev-java/fop/ Miroslav Šulc
-- strict thread matches above, loose matches on Subject: below --
2024-10-30 11:32 Miroslav Šulc
2024-02-22 13:45 Miroslav Šulc
2022-05-09 17:21 Arthur Zamarin
2022-04-17 22:27 Florian Schmaus
2016-01-13 20:58 James Le Cuirot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox