Package: release.debian.org
Severity: normal
Tags: trixie
X-Debbugs-Cc: [email protected]
User: [email protected]
Usertags: pu
Control: affects -1 + src:fop

[ Reason ]
fop in trixie doesn't hyphenate (#1154469). fop-hyph.jar is empty and
/usr/bin/fop doesn't put it on the classpath anyway. Worked in bookworm.

[ Impact ]
hyphenate="true" does nothing.

[ Tests ]
Built for trixie: fop-hyph.jar has 71 patterns again, same as bookworm.
My test document gets 0 hyphenated lines with -2 and 7 with this.

[ Risks ]
Low. Same fix as 1:2.10+dfsg1-4, already in testing.

[ Checklist ]
  [x] *all* changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in (old)stable
  [x] the issue is verified as fixed in unstable

[ Changes ]
* debian/rules: build fop-hyph.jar with the patterns again.
* debian/fop.sh: run fop through java-wrappers again, like bookworm did.
diff -Nru fop-2.10+dfsg/debian/changelog fop-2.10+dfsg/debian/changelog
--- fop-2.10+dfsg/debian/changelog	2025-05-07 22:57:22.000000000 +0200
+++ fop-2.10+dfsg/debian/changelog	2026-11-19 14:07:46.000000000 +0100
@@ -1,3 +1,15 @@
+fop (1:2.10+dfsg-2+deb13u1) trixie; urgency=medium
+
+  * Team upload.
+  * Restore hyphenation, lost in 2.10 (Closes: #1154469):
+    - build fop-hyph.jar with the patterns again (it was empty, a
+      regression of #932734);
+    - run fop through java-wrappers again, so that the jar,
+      FOP_HYPHENATION_PATH and the java-wrappers(7) variables work, as
+      fop(1) documents.
+
+ -- Juan Manuel Méndez Rey <[email protected]>  Thu, 19 Nov 2026 14:07:46 +0100
+
 fop (1:2.10+dfsg-2) unstable; urgency=medium
 
   * Team upload
diff -Nru fop-2.10+dfsg/debian/fop.sh fop-2.10+dfsg/debian/fop.sh
--- fop-2.10+dfsg/debian/fop.sh	2025-05-07 22:14:08.000000000 +0200
+++ fop-2.10+dfsg/debian/fop.sh	2026-11-19 14:07:46.000000000 +0100
@@ -46,4 +46,13 @@
     . "$HOME/.foprc"
 fi
 
-java $HEADLESS $LOGCHOICE $LOGLEVEL -jar /usr/share/java/fop-core.jar "$@"
+find_java_runtime
+
+# We load the hyphenation jar at the request of the user.
+if [ -n "$FOP_HYPHENATION_PATH" ]; then
+    find_jars "$FOP_HYPHENATION_PATH"
+fi
+find_jars /usr/share/fop/fop-hyph.jar
+find_jar_classpath fop-core
+
+run_java $HEADLESS $LOGCHOICE $LOGLEVEL org.apache.fop.cli.Main "$@"
diff -Nru fop-2.10+dfsg/debian/rules fop-2.10+dfsg/debian/rules
--- fop-2.10+dfsg/debian/rules	2025-05-07 22:14:08.000000000 +0200
+++ fop-2.10+dfsg/debian/rules	2026-11-19 14:07:46.000000000 +0100
@@ -30,9 +30,13 @@
 override_dh_auto_build:
 	dh_auto_build -- -X package
 	mkdir -p fop/lib/build
+	# compile-hyphenation needs SerializeHyphPattern from fop-core
+	cp fop-core/target/fop-core-*.jar fop/lib/
 	# While the README mention those are deprecated build instructions it
 	# seems those targets have not been moved to the new maven build system
 	ant -f fop/build.xml -lib /usr/share/java/xmlgraphics-commons.jar:/usr/share/java/commons-logging.jar:/usr/share/java/commons-io.jar:/usr/share/java/batik-libs.jar:/usr/share/java/xml-apis-ext.jar:/usr/share/java/fontbox2.jar:/usr/share/java/servlet-api-3.1.jar jar-hyphenation
+	# ant only warns when the patterns fail to compile
+	unzip -l fop/build/fop-hyph.jar | grep -q '\.hyp$$'
 	ant -f fop/build.xml -lib /usr/share/java/xmlgraphics-commons.jar:/usr/share/java/commons-logging.jar:/usr/share/java/commons-io.jar:/usr/share/java/batik-libs.jar:/usr/share/java/xml-apis-ext.jar:/usr/share/java/fontbox2.jar:/usr/share/java/servlet-api-3.1.jar javadocs
 
 debian/fop.1: debian/fop.1.in

Reply via email to