From 1eea9ee1984bd8f7afeca3f603b11dde84fb83a28373a50e4838b651befa0c25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Sat, 4 May 2024 02:10:43 +0200 Subject: [PATCH] Sync from SUSE:SLFO:Main xmlgraphics-fop revision bfc2c9597b48f3367e42b35d65bc74fc --- .gitattributes | 23 ++ fix-javadoc-java8.patch | 10 + fop-2.5-QDox-2.0.patch | 138 +++++++ fop-2.8-src.tar.gz | 3 + hyphenation-more-stack.patch | 12 + java8-compatibility.patch | 227 +++++++++++ offo-hyphenation.zip | 3 + reproducible-build-manifest.patch | 50 +++ reproducible.patch | 34 ++ xmlgraphics-fop-cli.patch | 15 + xmlgraphics-fop-fontlist.script | 41 ++ xmlgraphics-fop-fontlist.xml | 110 +++++ xmlgraphics-fop-fontmetrics.script | 53 +++ xmlgraphics-fop-fontmetrics.xml | 103 +++++ xmlgraphics-fop.changes | 541 +++++++++++++++++++++++++ xmlgraphics-fop.script | 45 +++ xmlgraphics-fop.spec | 210 ++++++++++ xmlgraphics-fop.xml | 626 +++++++++++++++++++++++++++++ 18 files changed, 2244 insertions(+) create mode 100644 .gitattributes create mode 100644 fix-javadoc-java8.patch create mode 100644 fop-2.5-QDox-2.0.patch create mode 100644 fop-2.8-src.tar.gz create mode 100644 hyphenation-more-stack.patch create mode 100644 java8-compatibility.patch create mode 100644 offo-hyphenation.zip create mode 100644 reproducible-build-manifest.patch create mode 100644 reproducible.patch create mode 100644 xmlgraphics-fop-cli.patch create mode 100644 xmlgraphics-fop-fontlist.script create mode 100644 xmlgraphics-fop-fontlist.xml create mode 100644 xmlgraphics-fop-fontmetrics.script create mode 100644 xmlgraphics-fop-fontmetrics.xml create mode 100644 xmlgraphics-fop.changes create mode 100644 xmlgraphics-fop.script create mode 100644 xmlgraphics-fop.spec create mode 100644 xmlgraphics-fop.xml diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/fix-javadoc-java8.patch b/fix-javadoc-java8.patch new file mode 100644 index 0000000..2a5683b --- /dev/null +++ b/fix-javadoc-java8.patch @@ -0,0 +1,10 @@ +--- fop-2.5/fop/build.xml ++++ fop-2.5/fop/build.xml +@@ -904,6 +904,7 @@ NOTE: + doctitle="Apache Formatting Objects Processor (FOP)" + bottom="Copyright ${year} The Apache Software Foundation. All Rights Reserved." + overview="${src.java.dir}/org/apache/fop/overview.html" ++ additionalparam="--allow-script-in-comments" + maxmemory="256M"> +
+ diff --git a/fop-2.5-QDox-2.0.patch b/fop-2.5-QDox-2.0.patch new file mode 100644 index 0000000..7a5de57 --- /dev/null +++ b/fop-2.5-QDox-2.0.patch @@ -0,0 +1,138 @@ +--- fop-2.5/fop-events/src/main/java/org/apache/fop/tools/EventProducerCollector.java 2020-05-05 11:42:05.000000000 +0200 ++++ fop-2.5/fop-events/src/main/java/org/apache/fop/tools/EventProducerCollector.java 2020-06-03 10:49:58.195555295 +0200 +@@ -21,6 +21,7 @@ + + import java.io.File; + import java.io.IOException; ++import java.util.Collection; + import java.util.Collections; + import java.util.List; + import java.util.Map; +@@ -31,14 +32,11 @@ + import org.apache.fop.events.model.EventProducerModel; + import org.apache.fop.events.model.EventSeverity; + +-import com.thoughtworks.qdox.JavaDocBuilder; +-import com.thoughtworks.qdox.model.DefaultDocletTagFactory; ++import com.thoughtworks.qdox.JavaProjectBuilder; + import com.thoughtworks.qdox.model.DocletTag; +-import com.thoughtworks.qdox.model.DocletTagFactory; + import com.thoughtworks.qdox.model.JavaClass; + import com.thoughtworks.qdox.model.JavaMethod; + import com.thoughtworks.qdox.model.JavaParameter; +-import com.thoughtworks.qdox.model.Type; + + /** + * Finds EventProducer interfaces and builds the event model for them. +@@ -61,22 +59,12 @@ + PRIMITIVE_MAP = Collections.unmodifiableMap(m); + } + +- private DocletTagFactory tagFactory; + private List models = new java.util.ArrayList(); + + /** + * Creates a new EventProducerCollector. + */ + EventProducerCollector() { +- this.tagFactory = createDocletTagFactory(); +- } +- +- /** +- * Creates the {@link DocletTagFactory} to be used by the collector. +- * @return the doclet tag factory +- */ +- protected DocletTagFactory createDocletTagFactory() { +- return new DefaultDocletTagFactory(); + } + + /** +@@ -89,9 +77,9 @@ + */ + public boolean scanFile(File src) + throws IOException, EventConventionException, ClassNotFoundException { +- JavaDocBuilder builder = new JavaDocBuilder(this.tagFactory); ++ JavaProjectBuilder builder = new JavaProjectBuilder(); + builder.addSource(src); +- JavaClass[] classes = builder.getClasses(); ++ Collection classes = builder.getClasses(); + boolean eventProducerFound = false; + for (JavaClass clazz : classes) { + if (clazz.isInterface() && implementsInterface(clazz, CLASSNAME_EVENT_PRODUCER)) { +@@ -103,7 +91,7 @@ + } + + private boolean implementsInterface(JavaClass clazz, String intf) { +- JavaClass[] classes = clazz.getImplementedInterfaces(); ++ List classes = clazz.getInterfaces(); + for (JavaClass cl : classes) { + if (cl.getFullyQualifiedName().equals(intf)) { + return true; +@@ -121,7 +109,7 @@ + protected void processEventProducerInterface(JavaClass clazz) + throws EventConventionException, ClassNotFoundException { + EventProducerModel prodMeta = new EventProducerModel(clazz.getFullyQualifiedName()); +- JavaMethod[] methods = clazz.getMethods(true); ++ List methods = clazz.getMethods(true); + for (JavaMethod method : methods) { + EventMethodModel methodMeta = createMethodModel(method); + prodMeta.addMethod(methodMeta); +@@ -133,20 +121,20 @@ + + private EventMethodModel createMethodModel(JavaMethod method) + throws EventConventionException, ClassNotFoundException { +- JavaClass clazz = method.getParentClass(); ++ JavaClass clazz = method.getDeclaringClass(); + //Check EventProducer conventions +- if (!method.getReturnType().isVoid()) { ++ if (!method.getReturns().isVoid()) { + throw new EventConventionException("All methods of interface " + + clazz.getFullyQualifiedName() + " must have return type 'void'!"); + } + String methodSig = clazz.getFullyQualifiedName() + "." + method.getCallSignature(); +- JavaParameter[] params = method.getParameters(); +- if (params.length < 1) { ++ List params = method.getParameters(); ++ if (params.size() < 1) { + throw new EventConventionException("The method " + methodSig + + " must have at least one parameter: 'Object source'!"); + } +- Type firstType = params[0].getType(); +- if (firstType.isPrimitive() || !"source".equals(params[0].getName())) { ++ JavaClass firstType = params.get(0).getJavaClass(); ++ if (firstType.isPrimitive() || !"source".equals(params.get(0).getName())) { + throw new EventConventionException("The first parameter of the method " + methodSig + + " must be: 'Object source'!"); + } +@@ -161,12 +149,12 @@ + } + EventMethodModel methodMeta = new EventMethodModel( + method.getName(), severity); +- if (params.length > 1) { +- for (int j = 1, cj = params.length; j < cj; j++) { +- JavaParameter p = params[j]; ++ if (params.size() > 1) { ++ for (int j = 1, cj = params.size(); j < cj; j++) { ++ JavaParameter p = params.get(j); + Class type; +- JavaClass pClass = p.getType().getJavaClass(); +- if (p.getType().isPrimitive()) { ++ JavaClass pClass = p.getJavaClass(); ++ if (pClass.isPrimitive()) { + type = PRIMITIVE_MAP.get(pClass.getName()); + if (type == null) { + throw new UnsupportedOperationException( +@@ -179,10 +167,10 @@ + methodMeta.addParameter(type, p.getName()); + } + } +- Type[] exceptions = method.getExceptions(); +- if (exceptions != null && exceptions.length > 0) { ++ List exceptions = method.getExceptions(); ++ if (exceptions != null && exceptions.size() > 0) { + //We only use the first declared exception because that is always thrown +- JavaClass cl = exceptions[0].getJavaClass(); ++ JavaClass cl = exceptions.get(0); + methodMeta.setExceptionClass(cl.getFullyQualifiedName()); + methodMeta.setSeverity(EventSeverity.FATAL); //In case it's not set in the comments + } diff --git a/fop-2.8-src.tar.gz b/fop-2.8-src.tar.gz new file mode 100644 index 0000000..cdfab31 --- /dev/null +++ b/fop-2.8-src.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6fb02fd7bc2ee80aff9e928e8b062ace5bc115222e5d3a6a4da70cd6cc6d06f7 +size 22855369 diff --git a/hyphenation-more-stack.patch b/hyphenation-more-stack.patch new file mode 100644 index 0000000..86d1fc3 --- /dev/null +++ b/hyphenation-more-stack.patch @@ -0,0 +1,12 @@ +diff -urEbwB fop-2.5/fop/build.xml fop-2.5/fop/build.xml +--- fop-2.5/fop/build.xml 2020-05-05 11:42:05.000000000 +0200 ++++ fop-2.5/fop/build.xml 2020-06-03 11:09:17.026418161 +0200 +@@ -207,7 +207,7 @@ + + + +- ++ + + + diff --git a/java8-compatibility.patch b/java8-compatibility.patch new file mode 100644 index 0000000..e29870d --- /dev/null +++ b/java8-compatibility.patch @@ -0,0 +1,227 @@ +--- fop-2.5/fop-core/src/main/java/org/apache/fop/afp/fonts/CharactersetEncoder.java 2020-05-05 11:42:04.000000000 +0200 ++++ fop-2.5/fop-core/src/main/java/org/apache/fop/afp/fonts/CharactersetEncoder.java 2020-06-03 11:18:04.577537190 +0200 +@@ -21,6 +21,7 @@ + + import java.io.IOException; + import java.io.OutputStream; ++import java.nio.Buffer; + import java.nio.ByteBuffer; + import java.nio.CharBuffer; + import java.nio.charset.CharacterCodingException; +@@ -68,7 +69,7 @@ + if (bb.hasArray()) { + return getEncodedChars(bb.array(), bb.limit()); + } else { +- bb.rewind(); ++ ((Buffer)bb).rewind(); + byte[] bytes = new byte[bb.remaining()]; + bb.get(bytes); + return getEncodedChars(bytes, bytes.length); +--- fop-2.5/fop-core/src/main/java/org/apache/fop/area/AreaTreeParser.java 2020-05-05 11:42:04.000000000 +0200 ++++ fop-2.5/fop-core/src/main/java/org/apache/fop/area/AreaTreeParser.java 2020-06-03 11:18:04.581537214 +0200 +@@ -24,6 +24,7 @@ + import java.awt.geom.Rectangle2D; + import java.io.FileNotFoundException; + import java.io.IOException; ++import java.nio.Buffer; + import java.nio.CharBuffer; + import java.util.List; + import java.util.Map; +@@ -326,7 +327,7 @@ + throws SAXException { + lastAttributes = new AttributesImpl(attributes); + Maker maker = makers.get(localName); +- content.clear(); ++ ((Buffer)content).clear(); + ignoreCharacters = true; + if (maker != null) { + ignoreCharacters = maker.ignoreCharacters(); +@@ -357,7 +358,7 @@ + Maker maker = makers.get(localName); + if (maker != null) { + maker.endElement(); +- content.clear(); ++ ((Buffer)content).clear(); + } + ignoreCharacters = true; + } else { +@@ -845,7 +846,7 @@ + boolean reversed = XMLUtil.getAttributeAsBoolean(lastAttributes, "reversed", false); + int[][] gposAdjustments + = XMLUtil.getAttributeAsPositionAdjustments(lastAttributes, "position-adjust"); +- content.flip(); ++ ((Buffer)content).flip(); + WordArea word = new WordArea( + offset, level, content.toString().trim(), letterAdjust, + null, gposAdjustments, reversed); +@@ -865,7 +866,7 @@ + int offset = XMLUtil.getAttributeAsInt(lastAttributes, "offset", 0); + //TODO the isAdjustable parameter is currently not used/implemented + if (content.position() > 0) { +- content.flip(); ++ ((Buffer)content).flip(); + boolean adjustable = XMLUtil.getAttributeAsBoolean(lastAttributes, "adj", true); + int level = XMLUtil.getAttributeAsInt(lastAttributes, "level", -1); + SpaceArea space = new SpaceArea(offset, level, content.charAt(0), adjustable); +@@ -1254,17 +1255,17 @@ + // allocate a larger buffer and transfer content + CharBuffer newContent + = CharBuffer.allocate(this.content.position() + length); +- this.content.flip(); ++ ((Buffer)(this.content)).flip(); + newContent.put(this.content); + this.content = newContent; + } + // make sure the full capacity is used +- this.content.limit(this.content.capacity()); ++ ((Buffer)(this.content)).limit(this.content.capacity()); + // add characters to the buffer + this.content.put(ch, start, length); + // decrease the limit, if necessary + if (this.content.position() < this.content.limit()) { +- this.content.limit(this.content.position()); ++ ((Buffer)(this.content)).limit(this.content.position()); + } + } + } +--- fop-2.5/fop-core/src/main/java/org/apache/fop/fo/FOText.java 2020-05-05 11:42:04.000000000 +0200 ++++ fop-2.5/fop-core/src/main/java/org/apache/fop/fo/FOText.java 2020-06-03 11:18:04.581537214 +0200 +@@ -20,6 +20,7 @@ + package org.apache.fop.fo; + + import java.awt.Color; ++import java.nio.Buffer; + import java.nio.CharBuffer; + import java.text.CharacterIterator; + import java.text.StringCharacterIterator; +@@ -134,17 +135,17 @@ + newCapacity = requires; + } + CharBuffer newBuffer = CharBuffer.allocate(newCapacity); +- charBuffer.rewind(); ++ ((Buffer)charBuffer).rewind(); + newBuffer.put(charBuffer); + charBuffer = newBuffer; + } + } + // extend limit to capacity +- charBuffer.limit(charBuffer.capacity()); ++ ((Buffer)charBuffer).limit(charBuffer.capacity()); + // append characters + charBuffer.put(data, start, length); + // shrink limit to position +- charBuffer.limit(charBuffer.position()); ++ ((Buffer)charBuffer).limit(((Buffer)charBuffer).position()); + } + + /** +@@ -156,7 +157,7 @@ + if (this.charBuffer == null) { + return null; + } +- this.charBuffer.rewind(); ++ ((Buffer)(this.charBuffer)).rewind(); + return this.charBuffer.asReadOnlyBuffer().subSequence(0, this.charBuffer.limit()); + } + +@@ -169,9 +170,9 @@ + // pointed to is really a different one + if (charBuffer != null) { + ft.charBuffer = CharBuffer.allocate(charBuffer.limit()); +- charBuffer.rewind(); ++ ((Buffer)charBuffer).rewind(); + ft.charBuffer.put(charBuffer); +- ft.charBuffer.rewind(); ++ ((Buffer)(ft.charBuffer)).rewind(); + } + } + ft.prevFOTextThisBlock = null; +@@ -203,7 +204,7 @@ + /** {@inheritDoc} */ + public void endOfNode() throws FOPException { + if (charBuffer != null) { +- charBuffer.rewind(); ++ ((Buffer)charBuffer).rewind(); + } + super.endOfNode(); + getFOEventHandler().characters(this); +@@ -230,7 +231,7 @@ + } + + char ch; +- charBuffer.rewind(); ++ ((Buffer)charBuffer).rewind(); + while (charBuffer.hasRemaining()) { + ch = charBuffer.get(); + if (!((ch == CharUtilities.SPACE) +@@ -238,7 +239,7 @@ + || (ch == CharUtilities.CARRIAGE_RETURN) + || (ch == CharUtilities.TAB))) { + // not whitespace +- charBuffer.rewind(); ++ ((Buffer)charBuffer).rewind(); + return true; + } + } +@@ -281,7 +282,7 @@ + return; + } + +- charBuffer.rewind(); ++ ((Buffer)charBuffer).rewind(); + CharBuffer tmp = charBuffer.slice(); + char c; + int lim = charBuffer.limit(); +@@ -548,19 +549,19 @@ + public void remove() { + + if (this.canRemove) { +- charBuffer.position(currentPosition); ++ ((Buffer)charBuffer).position(currentPosition); + // Slice the buffer at the current position + CharBuffer tmp = charBuffer.slice(); + // Reset position to before current character +- charBuffer.position(--currentPosition); ++ ((Buffer)charBuffer).position(--currentPosition); + if (tmp.hasRemaining()) { + // Transfer any remaining characters +- charBuffer.mark(); ++ ((Buffer)charBuffer).mark(); + charBuffer.put(tmp); +- charBuffer.reset(); ++ ((Buffer)charBuffer).reset(); + } + // Decrease limit +- charBuffer.limit(charBuffer.limit() - 1); ++ ((Buffer)charBuffer).limit(((Buffer)charBuffer).limit() - 1); + // Make sure following calls fail, unless nextChar() was called + this.canRemove = false; + } else { +@@ -743,7 +744,7 @@ + */ + public void resetBuffer() { + if (charBuffer != null) { +- charBuffer.rewind(); ++ ((Buffer)charBuffer).rewind(); + } + } + +--- fop-2.5/fop-core/src/main/java/org/apache/fop/fonts/MultiByteFont.java 2020-05-05 11:42:05.000000000 +0200 ++++ fop-2.5/fop-core/src/main/java/org/apache/fop/fonts/MultiByteFont.java 2020-06-03 11:19:29.182037444 +0200 +@@ -21,6 +21,7 @@ + + import java.awt.Rectangle; + import java.io.InputStream; ++import java.nio.Buffer; + import java.nio.CharBuffer; + import java.nio.IntBuffer; + import java.util.ArrayList; +@@ -731,7 +732,7 @@ + cb.put(c); + } + +- cb.flip(); ++ ((Buffer)cb).flip(); + return cb; + } + diff --git a/offo-hyphenation.zip b/offo-hyphenation.zip new file mode 100644 index 0000000..82b26af --- /dev/null +++ b/offo-hyphenation.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:df0b863a2ef269ac7defd497f74da54480cd2c03ad665304e7c05334ab3f289f +size 883080 diff --git a/reproducible-build-manifest.patch b/reproducible-build-manifest.patch new file mode 100644 index 0000000..e9a2fbd --- /dev/null +++ b/reproducible-build-manifest.patch @@ -0,0 +1,50 @@ +--- fop-2.5/fop/build.xml 2020-05-05 11:42:05.000000000 +0200 ++++ fop-2.5/fop/build.xml 2020-06-03 11:24:41.859886083 +0200 +@@ -500,7 +500,6 @@ + + + +- + + + +@@ -522,7 +521,6 @@ + + + +- +
+ + +@@ -550,9 +548,7 @@ + + + +- +- +- ++ + + + +@@ -983,9 +979,7 @@ + + + +- +- +- ++ + + + +--- fop-2.5/fop/examples/plan/build.xml 2020-05-05 11:42:05.000000000 +0200 ++++ fop-2.5/fop/examples/plan/build.xml 2020-06-03 11:50:35.613163539 +0200 +@@ -133,7 +133,6 @@ + + + +- + + + diff --git a/reproducible.patch b/reproducible.patch new file mode 100644 index 0000000..b334026 --- /dev/null +++ b/reproducible.patch @@ -0,0 +1,34 @@ +https://github.com/apache/xmlgraphics-fop/pull/65 +partial fix for +https://issues.apache.org/jira/browse/FOP-2854 +https://github.com/openSUSE/daps/issues/482 + +commit 0d3f0f9a473aad6f315fd60cc6ed1447afb791ef +Author: Bernhard M. Wiedemann +Date: Wed Dec 23 13:53:56 2020 +0100 + + FOP-2854: Allow to override CreationDate + + Allow to override build date with SOURCE_DATE_EPOCH + in order to make builds reproducible. + See https://reproducible-builds.org/ for why this is good + and https://reproducible-builds.org/specs/source-date-epoch/ + for the definition of this variable. + + This patch was done while working on reproducible builds for openSUSE. + +diff --git a/fop-core/src/main/java/org/apache/fop/pdf/PDFMetadata.java b/fop-core/src/main/java/org/apache/fop/pdf/PDFMetadata.java +index 3af9af606..ff708e371 100644 +--- a/fop-core/src/main/java/org/apache/fop/pdf/PDFMetadata.java ++++ b/fop-core/src/main/java/org/apache/fop/pdf/PDFMetadata.java +@@ -134,7 +134,9 @@ public class PDFMetadata extends PDFStream { + + //Set creation date if not available, yet + if (info.getCreationDate() == null) { +- Date d = new Date(); ++ Date d = System.getenv("SOURCE_DATE_EPOCH") == null ? ++ new Date() : ++ new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))); + info.setCreationDate(d); + } + diff --git a/xmlgraphics-fop-cli.patch b/xmlgraphics-fop-cli.patch new file mode 100644 index 0000000..59a302f --- /dev/null +++ b/xmlgraphics-fop-cli.patch @@ -0,0 +1,15 @@ +--- fop-2.5/fop-core/src/main/java/org/apache/fop/cli/Main.java ++++ fop-2.5/fop-core/src/main/java/org/apache/fop/cli/Main.java +@@ -210,11 +210,7 @@ + * @param args the command line parameters + */ + public static void main(String[] args) { +- if (checkDependencies()) { +- startFOP(args); +- } else { +- startFOPWithDynamicClasspath(args); +- } ++ startFOP(args); + } + + } diff --git a/xmlgraphics-fop-fontlist.script b/xmlgraphics-fop-fontlist.script new file mode 100644 index 0000000..d70d3ad --- /dev/null +++ b/xmlgraphics-fop-fontlist.script @@ -0,0 +1,41 @@ +#!/bin/bash + +# Source functions library +if [ -f /usr/share/java-utils/java-functions ] ; then + . /usr/share/java-utils/java-functions +else + echo "Can't find functions library, aborting" + exit 1 +fi +# Load system-wide configuration +if [ -f /etc/fop.conf ]; then + . /etc/fop.conf +fi +fopxconf=/etc/fop.xconf +fop_exec_args= +if [ -f "$fopxconf" ] ; then + config_found=0 + for i in "$@"; do if [ "$i" = "-c" ]; then config_found=1; break; fi; done + if [ $config_found = 0 ]; then + fop_exec_args="-c $fopxconf $fop_exec_args" + fi +fi + +# Load user configuration +if [ -f "$HOME/.foprc" ]; then + . "$HOME/.foprc" +fi + +# Rest of the configuration +MAIN_CLASS=org.apache.fop.tools.fontlist.FontListMain + +BASE_JARS="xmlgraphics-fop xmlgraphics-commons batik-all xerces-j2 xalan-j2 xalan-j2-serializer commons-logging commons-io" + +# Set parameters +set_jvm +set_classpath $BASE_JARS +set_flags $BASE_FLAGS +set_options $BASE_OPTIONS $FOP_OPTS + +# Let's start +run $fop_exec_args "$@" diff --git a/xmlgraphics-fop-fontlist.xml b/xmlgraphics-fop-fontlist.xml new file mode 100644 index 0000000..fe3d8f1 --- /dev/null +++ b/xmlgraphics-fop-fontlist.xml @@ -0,0 +1,110 @@ + + +]> + + + &product; + + Apache Foundation + + Thomas + Schraitle + Manpage + + + + + &product; + 1 + 1.1 + + http://xmlgraphics.apache.org/fop/1.0/fonts.html#advanced + + + &product; + + + + + Synopsis + Classname: org.apache.fop.tools.fontlist.FontListMain + &product; + -c CONFIG_FILE + -f MIME + + + output-dir + output-file + + font-family + + + + + + Options + The following options in alphabetical order are + available: + + + + + an optional FOP configuration file + + + + + + MIME type of the output format for which to create the + font list (defaults to application/pdf) + + + + + + creates one sample PDF per font-family + + + + + + writes the list as file (valid file extensions: + xml, + fo, and + pdf) + + + + + + filters to a single font family + + + + + + + Examples + + + prints all detected fonts to the console: + &product; + + + same as before, but outputs it into a PDF file: + &product; system-fonts.pdf + + + Generates a single PDF containing a sample of all + configured fonts: + &product; -c userconfig.xml all-fonts.pdf + + + + + + diff --git a/xmlgraphics-fop-fontmetrics.script b/xmlgraphics-fop-fontmetrics.script new file mode 100644 index 0000000..afd9437 --- /dev/null +++ b/xmlgraphics-fop-fontmetrics.script @@ -0,0 +1,53 @@ +#!/bin/bash + +# Source functions library +if [ -f /usr/share/java-utils/java-functions ] ; then + . /usr/share/java-utils/java-functions +else + echo "Can't find functions library, aborting" + exit 1 +fi + +# Load system-wide configuration +if [ -f /etc/fop.conf ]; then + . /etc/fop.conf +fi + +# Load user configuration +if [ -f "$HOME/.foprc" ]; then + . "$HOME/.foprc" +fi +fopxconf=/etc/fop.xconf +fop_exec_args= +if [ -f "$fopxconf" ] ; then + config_found=0 + for i in "$@"; do if [ "$i" = "-c" ]; then config_found=1; break; fi; done + if [ $config_found = 0 ]; then + fop_exec_args="-c $fopxconf $fop_exec_args" + fi +fi + +# Rest of the configuration +MAIN_CLASS_PFM=org.apache.fop.fonts.apps.PFMReader +MAIN_CLASS_TTF=org.apache.fop.fonts.apps.TTFReader + +if [ "$1" = '-t' ]; then +MAIN_CLASS=${MAIN_CLASS_TTF} +shift +elif [ "$1" = "-p" ]; then +MAIN_CLASS=${MAIN_CLASS_PFM} +shift +else +MAIN_CLASS=${MAIN_CLASS_TTF} +fi + +BASE_JARS="xmlgraphics-fop xmlgraphics-commons commons-io commons-logging xml-commons-apis xerces-j2 xalan-j2 xalan-j2-serializer" + +# Set parameters +set_jvm +set_classpath $BASE_JARS +set_flags $BASE_FLAGS +set_options $BASE_OPTIONS $FOP_OPTS + +# Let's start +run $fop_exec_args "$@" diff --git a/xmlgraphics-fop-fontmetrics.xml b/xmlgraphics-fop-fontmetrics.xml new file mode 100644 index 0000000..0917e4d --- /dev/null +++ b/xmlgraphics-fop-fontmetrics.xml @@ -0,0 +1,103 @@ + + +]> + + + &product; + + Apache Foundation + + Thomas + Schraitle + Manpage + + + + + &product; + 1 + 1.1 + + http://xmlgraphics.apache.org/fop/1.0/fonts.html#advanced + + + &product; + Reads TTF files and Generates Appropriate Font Metrics + + + + Synopsis + Classnames: + org.apache.fop.fonts.apps.PFMReader and + org.apache.fop.fonts.apps.TTFReader + + &product; + + -t + -p + + options + fontfile.ttf + xmlfile.xml + + + + + Options + The first argument has to be or + . The option (default) + activates the TrueTypeReader, option activates + the PostSriptReader. + The following options in alphabetical order are + available: + + + + + debug mode + + + + + + With this option you create a WinAnsi encoded font. The + default is to create a CID keyed font. If you're not going + to use characters outside the pdfencoding range (almost the + same as iso-8889-1) you can add this option. + + + + + + default is to use the fontname in the .ttf file, but you can + override that name to make sure that the embedded font is + used (if you're embedding fonts) instead of installed fonts + when viewing documents with Acrobat Reader. + + + + + + If you're reading data from a TrueType Collection + (.ttc file) you + must specify which font from the collection you will read + metrics from. If you read from a .ttc file without this option, the fontnames + will be listed for you. + + + + + + quiet mode + + + + + + diff --git a/xmlgraphics-fop.changes b/xmlgraphics-fop.changes new file mode 100644 index 0000000..6728506 --- /dev/null +++ b/xmlgraphics-fop.changes @@ -0,0 +1,541 @@ +------------------------------------------------------------------- +Thu Jan 26 08:27:09 UTC 2023 - Fridrich Strba + +- version 2.8 + * Changes: + + FOP-2839: Links to pdf files with no scheme should open in pdf + viewer + + FOP-2860: Add light weight line breaking option + + FOP-2861: Allow resource loading from jar + + FOP-2865: Stroke-opacity is not honored on svg:text while + conveting svg to pdf + + FOP-2897: Skip OOM during font OS scanning + + FOP-2910: Remove cidset for PDF/A-2 + + FOP-2969: Reorder glyphs with no width + + FOP-2977: Array index out of bounds with glyph position + adjustments and surrogate pairs + + FOP-3015: Set text color for simulate-style + + FOP-3023: Simulated bold error in Adobe Reader + + FOP-3048: Resolve links across IF files + + FOP-3049: Align AFP SVG text in the middle + + FOP-3051: Upgrade to Commons IO 2.11 + + FOP-3053: Remove Xerces + + FOP-3055: Use a event for a draw image error + + FOP-3057: Allow fallback to non svg glyphs + + FOP-3061: AFP invoke-medium-map missing when using + page-group=false + + FOP-3062: AssertionError with SFArabic.ttf + + FOP-3067: README file still refers to bugzilla + + FOP-3068: NPE when reading a invalid TTC file + + FOP-3070: Batik is setting load-external-dtd to false so this + example doesnt work + + FOP-3071: Write mediummap before pagegroup + + FOP-3072: Empty link url gives NPE + + FOP-3074: Reorder glyphs based on gpa value + + FOP-3077: Use all rulesets for glyph substitution + + FOP-3078: Fix position of macron glyph + + FOP-3080: Allow removing empty table elements from structure + tree + + FOP-3081: Fix change ipd for linefeed-treatment=preserve + + FOP-3082: NPE when using a link in a span with accessibility + + FOP-3085: Remove Xalan + + FOP-3091: Add transparency color support + + FOP-3092: PDF/UA NPE when using external pdf + + FOP-3093: Stop reading ttf if we hit last offset + + FOP-3094: Allow bookmarks before declarations + + FOP-3101: Don't break with hangul syllables + + FOP-3102: Move composite glyphs to the end + + FOP-3103: NPE when using a footnote on redo of layout + + FOP-3105: Infinite loop when using page break with changing + ipd + + XGC-130: Allow subproperties in XMP + + XGC-132: Fallback to raw png if ImageIO cannot read image +- Removed patch: + * update-2.7.patch + +------------------------------------------------------------------- +Fri Jan 28 12:52:15 UTC 2022 - Quang Tran + +- version 2.7 + * Changes: + + FOP-2928: PDFDocumentGraphics2D does not clear content on + nextPage() + + FOP-2943: NPE when inline character is a white space + + FOP-2973: Cannot use custom schemes starting with "data" in + resource resolver + + FOP-2997: Double byte glyphs not working in SVG font + + FOP-2999: Rollback after checking next page + + FOP-3000: Absolute positioning wrong with AFP TTF + + FOP-3002: Optimise memory usage for data uri + + FOP-3006: XMP Metadata in created PDF/A-2 documents is not + valid + + FOP-3008: Table with linefeed-treatment may give + ClassCastException + + FOP-3014: ConcurrentModificationException for table cell + + FOP-3016: Reorder thai marks for zero width + + FOP-3017: Add option to disable positioning per char + + FOP-3018: Allow to disable AFP page group + + FOP-3019: Merge useragent encryption params with fop.xconf + + FOP-3021: Improve validation of border property + + FOP-3024: Make sure even number of bytes are output per trn + for AFP TTF + + FOP-3025: Keep table size on changing ipd which has graphics + + FOP-3026: Fix NPE with empty table header + + FOP-3027: Sections of text sometimes lost with span=all + multiple columns + + FOP-3028: Set values in fopFactoryBuilder setConfiguration + + FOP-3030: AFP page overlay was written twice + + FOP-3031: Add MCF before MDR in AFP + + FOP-3032: Allow to embed native PDF in AFP + + FOP-3033: Update PDFBox to 2.0.21 + + FOP-3034: Update PDFBox to 2.0.24 + + FOP-3038: Allow sections which need security permissions to + be run when AllPermission denied in caller code + + FOP-3039: AFP include-page-overlay missing X and Y via IF + + FOP-3046: Don't use page position only on redo of layout + + XGC-128: Remove image transparency for PS + * Allow to embed native PDF in AFP +- Added patch: + * update-2.7.patch + +------------------------------------------------------------------- +Sun Jan 24 18:01:22 UTC 2021 - Fridrich Strba + +- version 2.6 + * Changes: + + FOP-1648: Fix pdf internal named destinations + + FOP-2536: Allow overpaint of PDF border + + FOP-2889: Make JAI optional + + FOP-2919: NPE printing + + FOP-2935: Make servlet a compile only dependency + + FOP-2939: Upgrade ant to 1.9.15 + + FOP-2941: SVG container with stroke=black has an unexpected + border + + FOP-2945: Don't use change ipd on columns where it won't fit + + FOP-2950: Display font error at top level exception + + FOP-2957: Don't change ipd on lastpage if column count changes + + FOP-2958: Error when using both AFP truetype and base14 font + + FOP-2960: Soft-Hyphen on Hyphenated words + + FOP-2975: Put composite glyphs to separate font + + FOP-2978: Include composite glyphs in otf subset + + FOP-2979: Update PDFBox to 2.0.19 + + FOP-2980: Reduce filesize for AFP Graphics2D + + FOP-2981: Convert CFF CID to Type1 + + FOP-2989: Missing text in AFP output when using high + resolution + + FOP-2990: Changing ipd doesn't handle table narrowing + + FOP-2992: List broken too early without change ipd + + FOP-2994: Support OTF/TTF SVG fonts + + XGC-123: Decode image at page load rather than document load + * Support OTF/TTF SVG fonts + * Allow overpaint of PDF border + +------------------------------------------------------------------- +Sat Jan 23 18:39:32 UTC 2021 - Bernhard Wiedemann + +- Add reproducible.patch to override build date (boo#1047218) + +------------------------------------------------------------------- +Thu Jun 4 05:13:44 UTC 2020 - Fridrich Strba + +- version 2.5 + * Changes: + + FOP-1606: Incorrect border when using number-columns-spanned + in RTF + + FOP-2704: Don't fail on coverage set class table not + supported + + FOP-2889: Make JAI optional + + FOP-2892: Font substitutions not working + + FOP-2894: Fit table contents onto current page + + FOP-2895: Add missing classes to allinone jar + + FOP-2898: Only use zero glue for change ipd + + FOP-2901: NoSuchElementException on empty table footer + + FOP-2902: Ignore TTF reserved index range + + FOP-2907: Missing bounding box on repeated image for PDF/UA + + FOP-2908: Repeated image in header not shown in structure tree + + FOP-2909: Hide empty blocks from structure tree + + FOP-2911: Add endpage event for FO to IF + + FOP-2923: Allow to suppress fo:leader within empty paragaphs + from structure tree + + FOP-2924: Images not scaled or rotated in PCL + + FOP-2925: Change in IPD on empty block NPE + + FOP-2926: Add artifact type to PDF header/footer + + FOP-2934: Absolute element should not be removed + * Allow to hide empty blocks from structure tre + * Does not need avalon-framework to build or run + * Adapt the command-line scripts by removing avalon-framework + from classpath + * Build against fontbox from apache-pdfbox >= 2 + * Use the included pom file instead of downloading the same + file from maven central +- Removed patch: + * fop-2.1-batik-xmlconstants.patch + + Included directly in this version. Requires batik >= 1.11 +- Modified patches: + * fop-2.1-QDox-2.0.patch -> fop-2.5-QDox-2.0.patch + * fix-javadoc-java8.patch + * hyphenation-more-stack.patch + * java8-compatibility.patch + * reproducible-build-manifest.patch + * xmlgraphics-fop-cli.patch + + Port to fop 2.5 + +------------------------------------------------------------------- +Mon May 18 14:41:12 UTC 2020 - Fridrich Strba + +- Do not install the OFFO hyphenation files to datadir, but package + instead the xmlgraphics-fop-hyph.jar and + xmlgraphics-fop-sandbox.jar that we build anyway. This fixes + boo#1145693 +- Clean up the build a bit + +------------------------------------------------------------------- +Fri Apr 3 10:50:59 UTC 2020 - Fridrich Strba + +- Added patch: + * fop-2.1-batik-xmlconstants.patch + + apply when building with batik >= 1.11 + + batik 1.11 moved XMLConstants class from + org.apache.batik.util to org.apache.batik.constants + +------------------------------------------------------------------- +Wed Aug 14 23:18:43 UTC 2019 - Frank H. Ellenberger + +- Add fontbox to classpath: (rh#1413340) + +------------------------------------------------------------------- +Mon Apr 15 13:59:26 UTC 2019 - Fridrich Strba + +- Build against glassfish-servlet-api + +------------------------------------------------------------------- +Mon Jan 21 16:37:54 UTC 2019 - Fridrich Strba + +- Fix build with new avalon-framework and batik +- Install maven pom file + +------------------------------------------------------------------- +Fri Jan 4 16:20:13 UTC 2019 - Fridrich Strba + +- Added patch: + * fop-2.1-QDox-2.0.patch + + Build against QDox >= 2 + +------------------------------------------------------------------- +Thu Dec 6 21:54:53 UTC 2018 - Fridrich Strba + +- Bring back the java-devel/java requirements to >= 1.8; we will + fix the ByteBuffer/CharBuffer compatibilities as they arise. +- Modified patch: + * java8-compatibility.patch + + Fix fix ByteBuffer/CharBuffer incompatibilities with java8 + Cast all the java.nio.ByteBuffer and java.nio.CharBuffer + instances to java.nio.Buffer before calling the clear(), + flip(), limit(int), mark(), reset() and rewind() methods. + +------------------------------------------------------------------- +Thu Nov 15 11:45:21 UTC 2018 - thomas.schraitle@suse.com + +- version 2.1 + Change requirement from java-devel-openjdk >= 1.8.0 to + java-devel-openjdk >= 9 to avoid tracebacks because of compatibility + issues with java.nio.Buffer, for example: + java.lang.NoSuchMethodError: + java.nio.CharBuffer.rewind()Ljava/nio/CharBuffer; + +------------------------------------------------------------------- +Wed Nov 7 20:48:57 UTC 2018 - Fridrich Strba + +- Do not depend on a particular xml-commons-apis provider. + +------------------------------------------------------------------- +Mon Oct 29 06:31:21 UTC 2018 - antoine.belvire@opensuse.org + +- Add reproducible-build-manifest.patch: Remove custom "Build-Id" + from manifests. It contains date and other information making the + build unreproducible (boo#1110024). + +------------------------------------------------------------------- +Tue Aug 28 13:51:49 UTC 2018 - tchvatal@suse.com + +- Fix building with ant >= 1.9.12 + +------------------------------------------------------------------- +Thu Apr 5 10:13:02 UTC 2018 - fstrba@suse.com + +- Added patch: + * java8-compatibility.patch + + Fix compatibility with java8 and lower when built with java9 + or higher + +------------------------------------------------------------------- +Fri Sep 29 06:57:25 UTC 2017 - fstrba@suse.com + +- Don't condition the maven defines on release version, but on + _maven_repository being defined + +------------------------------------------------------------------- +Tue Sep 19 07:23:59 UTC 2017 - fstrba@suse.com + +- Fix build with jdk9: specify java source and target 1.6 and fix + javadoc build + +------------------------------------------------------------------- +Fri May 19 09:16:13 UTC 2017 - vsistek@suse.com + +- Add BuildRequires: javapackages-local (for maven conversions) + +------------------------------------------------------------------- +Mon Mar 6 11:47:06 UTC 2017 - sknorr@suse.com + +- Make sure to apply new file list for Tumbleweed only + (FATE#322405) + +------------------------------------------------------------------- +Thu Mar 2 08:45:45 UTC 2017 - fvogt@suse.com + +- Add patch to fix build with stricter javadoc in version 8: + * fix-javadoc-java8.patch (boo#1027467) +- Fix file list on SLE + +------------------------------------------------------------------- +Tue Mar 8 08:52:41 UTC 2016 - fvogt@suse.com + +- Fix manpage for xmlgraphics-fop-fontmetrics + +------------------------------------------------------------------- +Thu Mar 3 12:05:58 UTC 2016 - fvogt@suse.com + +- Update to fop 2.1 + - https://xmlgraphics.apache.org/fop/changes.html#version_2.1 +- Remove upstreamed fop-commons-2.0.patch + and xmlgraphics-fop-xconf.patch +- Add hyphenation-more-stack.patch to fix build with offo 2.2 + +------------------------------------------------------------------- +Wed Mar 18 09:46:25 UTC 2015 - tchvatal@suse.com + +- Fix build with new javapackages-tools + +------------------------------------------------------------------- +Mon Dec 8 12:57:49 UTC 2014 - tchvatal@suse.com + +- Spec-cleanify +- Do not ever run tests, we lack quite packages to do so anyway +- Drop fop-1.1-src.tar.gz.asc xmlgraphics-fop.keyring as upstream + does not provide those anymore +- Apply patch to build with new xmlgraphics-commons: + * fop-commons-2.0.patch + +------------------------------------------------------------------- +Tue Jul 8 10:30:59 UTC 2014 - tchvatal@suse.com + +- Do not depend on ant-trax + +------------------------------------------------------------------- +Thu Sep 12 21:16:29 UTC 2013 - tchvatal@suse.com + +- Drop javadoc package so we build this package + +------------------------------------------------------------------- +Mon Sep 9 11:06:30 UTC 2013 - tchvatal@suse.com + +- Move from jpackage-utils to javapackage-tools + +------------------------------------------------------------------- +Fri Sep 6 08:09:43 UTC 2013 - mvyskocil@suse.com + +- use new add_maven_depmap +- add missing commons packages to BuildRequires +- add gpg verification + +------------------------------------------------------------------- +Thu Apr 25 12:10:30 UTC 2013 - mvyskocil@suse.com + +- fix a typo in a xmlgraphics-fop.script (bnc#817145) + +------------------------------------------------------------------- +Mon Jan 28 14:45:12 UTC 2013 - mvyskocil@suse.com + +- (build) require xml-commons-apis, the org.w3c.svg are used inside fop + part of a fix for bnc#800694 + +------------------------------------------------------------------- +Thu Jan 10 11:26:27 UTC 2013 - mvyskocil@suse.com + +- drop excalibur usage from all classpaths, use avalon-framework instead + +------------------------------------------------------------------- +Mon Dec 17 10:21:55 UTC 2012 - mvyskocil@suse.com + +- drop excalibur-avalon from dependencies, fop now uses avalon-framework + +------------------------------------------------------------------- +Sun Dec 9 08:29:33 UTC 2012 - slavb18@gmail.com + +- patched fop.xconf + * added to pdf renderer section, so now possible to use system fonts like font-family="DejaVuSansMono" +- fix the spec file to install a (default) fop.xconf file in /etc +- patched scripts to use /etc/fop.xconf + +------------------------------------------------------------------- +Tue Nov 20 12:53:08 UTC 2012 - mvyskocil@suse.com + +- add fo-formatter to provides upon a request of doc team + +------------------------------------------------------------------- +Wed Nov 14 13:23:34 UTC 2012 - slavb18@gmail.com + +- fixed "Class not found" errors in fop scripts + +------------------------------------------------------------------- +Thu Oct 25 07:44:09 UTC 2012 - mvyskocil@suse.com + +- add commons-logging and commons-io to Requires and fop script +- removed uneeded xalan-j2, xmlcommons and xerces from dependencies + +------------------------------------------------------------------- +Wed Oct 24 14:04:38 UTC 2012 - mvyskocil@suse.com + +- update to 1.1 + * many bug fixes and a number of improvements + * support for Complex Scripts (e.g., Arabic, Hebrew, Indic, and Southeast + * Asian scripts) + * http://xmlgraphics.apache.org/fop/1.1/releaseNotes_1.1.html + * This release implements a substantial subset of the W3C + * XSL-FO 1.1 Recommendation. For a detailed overview of FOP's compliance with + * this recommendation, see Compliance. + * http://xmlgraphics.apache.org/fop/compliance.html +- obsoleted xmlgraphics-fop-asf51789.patch +- obsoleted xmlgraphics-fop-build.patch + +------------------------------------------------------------------- +Fri Sep 9 16:20:40 UTC 2011 - giecrilj@stegny.2a.pl + +- restored gzipped archive to avoid HTTP 404 +- disabled tests (they take ages to build and they fail anyway, so do we really need them)? +- added standard hyphenation from OFFO +- told ant to use UTF-8 +- fix for asf#51789 + +------------------------------------------------------------------- +Fri May 13 08:25:38 UTC 2011 - toms@suse.de + +- Recompressed gzip archive to bz2 to avoid warning +- Fixed non-conffile-in-etc warning for %{_mavendepmapfragdir} +- Added new xmlgraphics-fontmetrics and xmlgraphics-fontlist scripts + to help for better FOP configuration +- Added manpage and HTML for all scripts (xmlgraphics-fop, + xmlgraphics-fop-fontmetrics, and xmlgraphics-fop-fontlist) +- Created links without prefix xmlgraphics-fop for + xmlgraphics-fop-fontmetrics and xmlgraphics-fop-fontlist +- Created links for all manpages without prefix xmlgraphics-fop + +------------------------------------------------------------------- +Wed May 11 14:43:06 UTC 2011 - toms@suse.de + +- Added two new scripts for creating font metrics and font lists + +------------------------------------------------------------------- +Mon May 2 06:37:50 UTC 2011 - toms@suse.de + +- Fixed xmlgraphic-fop script: + * Added excalibur/avalon-framework-impl in BASE_JAR variable to + avoid exception in thread "main" java.lang.NoClassDefFoundError: + org/apache/avalon/framework/configuration/DefaultConfigurationBuilder + Caused by: java.lang.ClassNotFoundException: + org.apache.avalon.framework.configuration.DefaultConfigurationBuilder + * Replaced xmlgraphics-batik/util in BASE_JAR variable to + avoid ClassNotFoundException: org.apache.batik.bridge.UserAgent + +------------------------------------------------------------------- +Tue Nov 16 15:11:29 UTC 2010 - mvyskocil@suse.cz + +- correct fop Provides: Obsolete: + +------------------------------------------------------------------- +Wed Nov 3 13:11:50 UTC 2010 - mvyskocil@suse.cz + +- fix bnc#650138 - fop update wanted + * fix memory leak in property cache + * change FONode.addCharacters() parameter to closer match the signature of the standard SAX characters() event + * new event handling framework + * support for font substitution + * support for addressing all glyphs available in a Type 1 font, + not just the ones in the font's primary encoding. + * limited support for pages of different inline-progression-dimensions within a page-sequence. + * minimal support for integer keep values on the various keep properties on block-level FOs. + * new AFPGraphics2D implementation which provides the ability to use Batik to + drive the production of AFP Graphics (GOCA) output from SVG. + * new Resource group leveling, external streaming, and de-duplication of images and + graphics using IncludeObject and ResourceGroup. + * new Native image embedding support (e.g. JPEG, GIF, TIFF) using ObjectContainer + and a MOD:CA Registry implementation. +- merge with xmlgraphics-fop-0.95-6.jpp5.src.rpm + +------------------------------------------------------------------- +Thu Feb 26 13:52:34 CET 2009 - mvyskocil@suse.cz + +- fixed bnc#467866 - fop fails if JAVACMD_OPTS is set + +------------------------------------------------------------------- +Wed Aug 6 15:23:11 CEST 2008 - skh@suse.de + +- update to version 0.95, list of changes at: + http://xmlgraphics.apache.org/fop/0.95/changes_0.95.html +- fop requires java 1.4 now +- use unversioned Requires: jre + +------------------------------------------------------------------- +Fri Jun 27 10:48:43 CEST 2008 - coolo@suse.de + +- avoid build cycle between fop and saxon + +------------------------------------------------------------------- +Wed Jan 30 17:42:06 CET 2008 - skh@suse.de + +- update to version 0.94, major changes: + + * Add support for font auto-detection (JM) Thanks to Adrian Cumiskey + * Add support for the border-collapsing model in tables (VH, JM) + * Add support for named destinations in PDF (JB) + * Add support for UAX#14 type line breaking (MM) + + full list of changes at: + + http://xmlgraphics.apache.org/fop/0.94/changes_0.94.html + +------------------------------------------------------------------- +Tue Jul 10 12:23:48 CEST 2007 - skh@suse.de + +- update to version 0.93 +- build with gcj + +------------------------------------------------------------------- +Sun May 6 22:50:12 CEST 2007 - ro@suse.de + +- added unzip to buildrequires + +------------------------------------------------------------------- +Wed Jan 25 21:46:22 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Fri Sep 17 19:53:40 CEST 2004 - skh@suse.de + +- do no longer use setJava + +------------------------------------------------------------------- +Wed Apr 28 13:59:08 CEST 2004 - ke@suse.de + +- Provide wrapper scripts for fop.sh and xalan.sh to make it find the + java environment; reported by Thomas Schraitle; fix provided by Petr + Mladek [#39581]. + +------------------------------------------------------------------- +Mon Oct 27 13:56:38 CET 2003 - ke@suse.de + +- New package: version 0.20.5. + + diff --git a/xmlgraphics-fop.script b/xmlgraphics-fop.script new file mode 100644 index 0000000..a88841b --- /dev/null +++ b/xmlgraphics-fop.script @@ -0,0 +1,45 @@ +#!/bin/sh +# +# FOP 0.94 script +# JPackage Project +# $Id$ + +# Source functions library +if [ -f /usr/share/java-utils/java-functions ] ; then + . /usr/share/java-utils/java-functions +else + echo "Can't find functions library, aborting" + exit 1 +fi + +# Load system-wide configuration +if [ -f /etc/fop.conf ]; then + . /etc/fop.conf +fi +fopxconf=/etc/fop.xconf +fop_exec_args= +if [ -f "$fopxconf" ] ; then + config_found=0 + for i in "$@"; do if [ "$i" = "-c" ]; then config_found=1; break; fi; done + if [ $config_found = 0 ]; then + fop_exec_args="-c $fopxconf $fop_exec_args" + fi +fi + +# Load user configuration +if [ -f "$HOME/.foprc" ]; then + . "$HOME/.foprc" +fi + +# Rest of the configuration +MAIN_CLASS=org.apache.fop.cli.Main +BASE_JARS="xmlgraphics-fop xmlgraphics-fop-hyph xmlgraphics-commons commons-logging commons-io batik-all fontbox xml-commons-apis xml-commons-apis-ext" + +# Set parameters +set_jvm +set_classpath $BASE_JARS +set_flags $BASE_FLAGS +set_options $BASE_OPTIONS $FOP_OPTS + +# Let's start +run $fop_exec_args "$@" diff --git a/xmlgraphics-fop.spec b/xmlgraphics-fop.spec new file mode 100644 index 0000000..b14e348 --- /dev/null +++ b/xmlgraphics-fop.spec @@ -0,0 +1,210 @@ +# +# spec file for package xmlgraphics-fop +# +# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2000-2008, JPackage Project +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define bname fop +Name: xmlgraphics-fop +Version: 2.8 +Release: 0 +Summary: Formatter for Printing XSLT Processed XML Files +License: Apache-2.0 +Group: Productivity/Publishing/XML +URL: https://xmlgraphics.apache.org/fop/ +Source0: https://dlcdn.apache.org/xmlgraphics/fop/source/fop-%{version}-src.tar.gz +Source1: https://download.sourceforge.net/project/offo/offo-hyphenation/2.2/offo-hyphenation.zip +#FIX-OPENSUSE: add xmlgraphics-commons to classpath +Source2: %{name}.script +Source3: %{name}-fontmetrics.script +Source4: %{name}-fontlist.script +# Manpage(s) +Source10: %{name}.xml +Source11: %{name}-fontmetrics.xml +Source12: %{name}-fontlist.xml +Patch1: xmlgraphics-fop-cli.patch +Patch2: hyphenation-more-stack.patch +Patch3: fix-javadoc-java8.patch +Patch4: java8-compatibility.patch +# PATCH-FEATURE-OPENSUSE reproducible-build-manifest.patch -- boo#1110024 +Patch5: reproducible-build-manifest.patch +Patch6: fop-2.5-QDox-2.0.patch +Patch7: reproducible.patch +BuildRequires: ant >= 1.9.15 +BuildRequires: apache-pdfbox >= 2.0.23 +BuildRequires: commons-io >= 2.4 +BuildRequires: commons-logging +BuildRequires: docbook-xsl-stylesheets +BuildRequires: glassfish-servlet-api +BuildRequires: java-devel >= 1.8 +BuildRequires: javapackages-local +BuildRequires: libxslt +BuildRequires: qdox >= 2.0 +BuildRequires: unzip +BuildRequires: xml-commons-apis +BuildRequires: xmlgraphics-batik >= 1.14 +BuildRequires: xmlgraphics-commons >= 2.6 +#!BuildIgnore: saxon +Requires: java >= 1.8 +Requires: xml-commons-apis +Requires: mvn(com.thoughtworks.qdox:qdox) >= 2.0 +Requires: mvn(commons-io:commons-io) +Requires: mvn(commons-logging:commons-logging) +Requires: mvn(javax.servlet:servlet-api) +Requires: mvn(org.apache.pdfbox:fontbox) >= 2.0.0 +Requires: mvn(org.apache.xmlgraphics:batik-anim) >= 1.14 +Requires: mvn(org.apache.xmlgraphics:batik-awt-util) >= 1.14 +Requires: mvn(org.apache.xmlgraphics:batik-bridge) >= 1.14 +Requires: mvn(org.apache.xmlgraphics:batik-extension) >= 1.14 +Requires: mvn(org.apache.xmlgraphics:batik-gvt) >= 1.14 +Requires: mvn(org.apache.xmlgraphics:batik-transcoder) >= 1.14 +Requires: mvn(org.apache.xmlgraphics:xmlgraphics-commons) +Provides: %{bname} = %{version}-%{release} +Obsoletes: %{bname} < %{version}-%{release} +Provides: fo-formatter = %{version}-%{release} +BuildArch: noarch + +%description +FOP (Formatting Objects Processor) is driven by XSL formatting objects +(XSL-FO). It is a Java application that reads a formatting object (FO) +tree and renders the resulting pages to one of the following output +formats: PDF (primary output target), PCL, PS, SVG, XML (area tree +representation), Print, AWT, MIF, and TXT. + +%prep +%setup -q -n %{bname}-%{version} -a1 +ln -t fop/hyph offo-hyphenation/hyph/*.xml +find -name "*.jar" | xargs -t rm +%patch1 -p1 -b .cli +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 + +# Replace keyword "VERSION" in XML files with the real one: +for x in %{SOURCE10} %{SOURCE11} %{SOURCE12}; do + sed -i "s=@VERSION@=%{version}=" $x +done + +# Building with ant, so the parent is pointless +%pom_remove_parent fop +%pom_xpath_inject pom:project "%{version}" fop + +# When building with ant, the fop.jar is an all-in jar, +# so adapt the dependencies accordingly + +# Remove dependencies on fop modules included in the jar +%pom_remove_dep :fop-events fop +%pom_remove_dep :fop-util fop +%pom_remove_dep :fop-core fop + +# Add dependencies of fop modules included in the jar +%pom_add_dep com.thoughtworks.qdox:qdox:2 fop +%pom_add_dep commons-io:commons-io:1.3.1 fop +%pom_add_dep commons-logging:commons-logging:1.0.4 fop +%pom_add_dep javax.servlet:servlet-api:2.2 fop +%pom_add_dep org.apache.pdfbox:fontbox:2.0 fop +%pom_add_dep org.apache.xmlgraphics:batik-anim:1.14 fop +%pom_add_dep org.apache.xmlgraphics:batik-awt-util:1.14 fop +%pom_add_dep org.apache.xmlgraphics:batik-bridge:1.14 fop +%pom_add_dep org.apache.xmlgraphics:batik-extension:1.14 fop +%pom_add_dep org.apache.xmlgraphics:batik-gvt:1.14 fop +%pom_add_dep org.apache.xmlgraphics:batik-transcoder:1.14 fop +%pom_add_dep org.apache.xmlgraphics:xmlgraphics-commons:2.6 fop + +%build +build-jar-repository -s fop/lib \ + commons-io \ + commons-logging \ + fontbox \ + glassfish-servlet-api \ + batik-all \ + xml-commons-apis \ + xml-commons-apis-ext \ + xmlgraphics-commons \ + qdox + +export CLASSPATH= LANG=en_US.UTF-8 +%{ant} -f fop/build.xml \ + -Djavac.source=1.8 -Djavac.target=1.8 \ + package + +# Build the manpage(s) and HTML +DB=%{_datadir}/xml/docbook/stylesheet/nwalsh/current +for m in %{SOURCE10} %{SOURCE11} %{SOURCE12}; do + xsltproc $DB/manpages/docbook.xsl $m +# Only filename for HTML is needed, remove anything before / + xml=${m##*/} + xsltproc --output ${xml%%.xml}.html $DB/html/docbook.xsl $m +done + +%install +# jars +mkdir -p %{buildroot}%{_javadir} +install -m 644 fop/build/%{bname}.jar %{buildroot}%{_javadir}/%{name}.jar +install -m 644 fop/build/%{bname}-hyph.jar %{buildroot}%{_javadir}/%{name}-hyph.jar +install -m 644 fop/build/%{bname}-sandbox.jar %{buildroot}%{_javadir}/%{name}-sandbox.jar + +# pom +install -d -m 755 %{buildroot}%{_mavenpomdir} +install -pm 644 fop/pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom +%add_maven_depmap + +# script +mkdir -p %{buildroot}%{_bindir} +cp -p %{SOURCE2} %{buildroot}%{_bindir}/%{name} +cp -p %{SOURCE3} %{buildroot}%{_bindir}/%{name}-fontmetrics +cp -p %{SOURCE4} %{buildroot}%{_bindir}/%{name}-fontlist +# compat symlink +ln -s %{name} %{buildroot}%{_bindir}/%{bname} +ln -s %{name}-fontmetrics %{buildroot}%{_bindir}/%{bname}-fontmetrics +ln -s %{name}-fontlist %{buildroot}%{_bindir}/%{bname}-fontlist + +# data +install -D -m 644 fop/conf/fop.xconf %{buildroot}%{_sysconfdir}/fop.xconf + +# Manpages +mkdir -p %{buildroot}%{_mandir}/man1 +for m in *.1; do + gzip $m +done +cp -vi *.1.gz %{buildroot}%{_mandir}/man1 + +# Remove prefix xmlgraphics to make also the linked manpage version available +pushd %{buildroot}%{_mandir}/man1 +for m in *.1.gz; do + ln -s $m ${m#*-} +done +popd + +%files -f .mfiles +%{_javadir}/%{name}-hyph.jar +%{_javadir}/%{name}-sandbox.jar +%license LICENSE +%doc NOTICE README fop/known-issues.xml +%doc *.html +%attr(0755,root,root) %{_bindir}/%{name} +%{_bindir}/%{bname} +%attr(0755,root,root) %{_bindir}/%{name}-fontmetrics +%{_bindir}/%{bname}-fontmetrics +%attr(0755,root,root) %{_bindir}/%{name}-fontlist +%{_bindir}/%{bname}-fontlist +%{_mandir}/man1/* +%config(noreplace) %{_sysconfdir}/fop.xconf + +%changelog diff --git a/xmlgraphics-fop.xml b/xmlgraphics-fop.xml new file mode 100644 index 0000000..2900929 --- /dev/null +++ b/xmlgraphics-fop.xml @@ -0,0 +1,626 @@ + + +]> + + + &product; + + Apache Foundation + + Thomas + Schraitle + Manpage + + + + + &product; + 1 + 1.1 + + http://xmlgraphics.apache.org/fop/1.0/fonts.html#advanced + + + &product; + Formatter for Printing XSLT Processed XML + Files + + + + Synopsis + Classname: org.apache.fop.cli.Main + + &product; + + -fo + -xml + + infile + + -xsl file + + + -awt + -pdf + -mif + -rtf + -tiff + -png + -pcl + -ps + -txt + -at mime + -print + + outfile + + + + + Options + The following options in alphabetical order are + available: + + + + + + enables accessibility features (Tagged PDF etc., default + off) + + + + + + input will be rendered as AFP + + + + + + representation of area tree as XML specify optional mime + output to allow the AT to be converted to final format + later + + + + + + area tree input file + + + + + + input will be displayed on screen + + + + + + cfg.xml + + use additional configuration file + cfg.xml + + + + + + use XML catalog resolver for input XML and XSLT + files + + + + + + enable memory-conservation policy (trades + memory-consumption for disk I/O) (Note: currently only + influences whether the area tree is serialized.) + + + + + + + debug mode + + + + + + target resolution in dots per inch (dpi) where + XXX is a number + + + + + + + XSL-FO input file + + + + + + input will only be XSL transformed. The intermediate + XSL-FO file is saved and no rendering is performed. (Only + available if you use and + parameters) + + + + + + + representation of document in intermediate format XML + specify optional mime output to allow the IF to be converted + to final format later + + + + + + intermediate format input file + + + + + + image input file (piping through stdin not + supported) + + + + + + XSL-FO input file (use for infile to + pipe input from stdin); same as + + + + + + + use the language for user information + + + + + + + + + encrypt PDF file without edit annotation + permission + + + + + + encrypt PDF file without copy content permission + + + + + + encrypt PDF file without edit content permission + + + + + + encrypt PDF file without printing permission + + + + + + + encrypt PDF file with option owner password + + + + + + input will be rendered using the given MIME type. + Example: + (Tip: prints the list of + supported MIME types) + + + + + + input will be rendered as PDF into outfile (use + for outfile to pipe output to + stdout) + + + + + + + + NAME to use for parameter + NAME in XSLT stylesheet (repeat + this option for each parameter) + + + + + + input will be rendered as PCL + + + + + + input will be rendered as PDF (outfile required) + + + + + + input will be rendered as PDF/A-1b compliant PDF + (outfile required, same as + ) + + + + + + PDF file will be generated with the specified profile + (Examples for PROF: PDF/A-1b or + PDF/X-3:2003) + + + + + + input will be rendered as PNG + + + + + + input file will be rendered and sent to the printer + see options with + + + + + + input will be rendered as PostScript + + + + + + + quiet mode + + + + + + + relaxed/less strict validation (where available) + + + + + + input will be rendered as RTF + + + + + + + for area tree XML, down to block areas only + + + + + + input will be rendered as an SVG slides file. + Experimental feature; requires additional + fop-sandbox.jar + + + + + + + input will be rendered as TIFF + + + + + + input will be rendered as plain text + + + + + + + encrypt PDF file with option user password + + + + + + + run in verbose mode (currently simply print FOP version + and continue) + + + + + + print FOP version and exit + + + + + + + dump configuration settings + + + + + + XML input file, must be used together with + + + + + + + + XSLT stylesheet + + + + + + + FOP Configuration File + This is a small overview. More details can be found in . + + Excerpt FOP Configuration File + + + + true + + + true + + + ./ + + + ./ + + + 72 + + 72 + + + + + + nl_Bel + + +]]> + + + + Summary of the General Configuration Options + + + + + + + + Element + Data Type + Description + Default Value + + + + + base + URL or directory + Specifies the base URL based on which relative URL will be resolved + current directory + + + font-base + URL or directory + Specifies the base URL based on which relative font URLs will be resolved + base URL/directory + + + hyphenation-base + URL or directory + Specifies the base URL based on which relative URLs to hyphenation pattern files will be resolved. If not specified, support for user-supplied hyphenation patterns remains disabled + disabled + + + Relative URIs for the above three properties are evaluated relative to the base URI of the configuration file. If the configuration is provided programmatically, the base URI can be set with FopFactory.setUserConfigBaseURI; default is the current working directory. + + + hyphenation-pattern + String, attribute lang, attribute country (optional) + Register a file name for the hyphenation pattern for the mentioned language and country. Language ll and country CC must both consist of two letters. + ll_CC + + + source-resolution + Integer + Resolution in dpi (dots per inch) which is used internally to determine the pixel size for SVG images and bitmap images without resolution information. + 72dpi + + + target-resolution + Integer + Resolution in dpi (dots per inch) used to specify the output resolution for bitmap images generated by bitmap renderers (such as the TIFF renderer) and by bitmaps generated by Apache Batik for filter effects and such. + + 72dpi + + + strict-configuration + Boolean + Setting this option to 'true' will cause FOP to strictly verify the contents of the FOP configuration file to ensure that defined resources (such as fonts and base URLs/directories) are valid and available to FOP. Any errors found will cause FOP to immediately raise an exception. + false + + + strict-validation + Boolean + Setting this option to 'false' causes FOP to be more forgiving about XSL-FO validity, for example, you're allowed to specify a border on a region-body which is supported by some FO implementations but is non-standard. Note that such a border would currently have no effect in Apache FOP. + true + + + break-indent-inheritance + Boolean + Setting this option to 'true' causes FOP to use an alternative rule set to determine text indents specified through margins, start-indent and end-indent. Many commercial FO implementations have chosen to break the XSL specification in this aspect. This option tries to mimic their behaviour. Please note that Apache FOP may still not behave exactly like those implementations either because FOP has not fully matched the desired behaviour and because the behaviour among the commercial implementations varies. The default for this option (i.e. false) is to behave exactly like the specification describes. + false + + + default-page-settings + n/a + Specifies the default width and height of a page if "auto" is specified for either or both values. Use "height" and "width" attributes on the default-page-settings element to specify the two values. + "height" 11 inches, "width" 8.26 inches + + + use-cache + Boolean + All fonts information that has been gathered as a result of "directory" or "auto-detect" font configurations will be cached for future rendering runs. This setting should improve performance on systems where fonts have been configured using the "directory" or "auto-detect" tag mechanisms. By default this option is switched on. + true + + + cache-file + String + This option specifies the file/directory path of the fop cache file. This file is currently only used to cache font triplet information for future reference. + ${base}/conf/fop.cache + + + renderers + MIME + Contains the configuration for each renderer + n/a + + + + +
+
+ + + Files + + + /etc/fop.conf + + System-wide configuration + + + + ~/.foprc + + User configuration + + + + fop.xconf + + Example configuration file; can be handed over with + option. See + for details. + + + + + + + Examples + + + Transforms the foo.fo FO file into + PDF: + fop foo.fo foo.pdf + + + Does the same as the previous line: + fop -xml foo.xml -xsl foo.xsl -pdf foo.pdf + + + Transforms and formats foo.xml with + the help of the XSLT stylesheet foo.xsl + into the PDF file foo.pdf: + fop -xml foo.xml -xsl foo.xsl -pdf foo.pdf + + + Only transforms, but don't format: + fop -xml foo.xml -xsl foo.xsl -foout foo.fo + + + Formats foo.fo into FRTF: + fop foo.fo -mif foo.rtf + + + Input file is send to the printer: + fop foo.fo -print + + + + +