From 27e0713a7fbfc3edadf8a849c614156334fa0129 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Aug 25 2021 15:09:27 +0000 Subject: Update to 2.6, build with maven --- diff --git a/0001-Main.patch b/0001-Main.patch deleted file mode 100644 index 1d83354..0000000 --- a/0001-Main.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: Michael Simacek -Date: Tue, 14 Jul 2015 16:54:43 +0200 -Subject: [PATCH] Main - - -diff --git a/fop-core/src/main/java/org/apache/fop/cli/Main.java b/fop-core/src/main/java/org/apache/fop/cli/Main.java -index b8ba68df9..b14bc831e 100644 ---- a/fop-core/src/main/java/org/apache/fop/cli/Main.java -+++ b/fop-core/src/main/java/org/apache/fop/cli/Main.java -@@ -210,11 +210,7 @@ public final class Main { - * @param args the command line parameters - */ - public static void main(String[] args) { -- if (checkDependencies()) { -- startFOP(args); -- } else { -- startFOPWithDynamicClasspath(args); -- } -+ startFOP(args); - } - - } diff --git a/0002-Use-sRGB.icc-color-profile-from-colord-package.patch b/0002-Use-sRGB.icc-color-profile-from-colord-package.patch deleted file mode 100644 index fa3157b..0000000 --- a/0002-Use-sRGB.icc-color-profile-from-colord-package.patch +++ /dev/null @@ -1,33 +0,0 @@ -From: Michael Simacek -Date: Tue, 14 Jul 2015 16:56:49 +0200 -Subject: [PATCH] Use sRGB.icc color profile from colord package - - -diff --git a/fop-core/src/main/java/org/apache/fop/pdf/PDFICCBasedColorSpace.java b/fop-core/src/main/java/org/apache/fop/pdf/PDFICCBasedColorSpace.java -index 704898def..1ce14cb4e 100644 ---- a/fop-core/src/main/java/org/apache/fop/pdf/PDFICCBasedColorSpace.java -+++ b/fop-core/src/main/java/org/apache/fop/pdf/PDFICCBasedColorSpace.java -@@ -22,7 +22,9 @@ package org.apache.fop.pdf; - import java.awt.color.ColorSpace; - import java.awt.color.ICC_Profile; - import java.io.IOException; -+import java.io.FileNotFoundException; - import java.io.InputStream; -+import java.io.FileInputStream; - import java.util.Set; - - import org.apache.commons.io.IOUtils; -@@ -138,7 +140,12 @@ public class PDFICCBasedColorSpace extends PDFObject implements PDFColorSpace { - public static PDFICCStream setupsRGBColorProfile(PDFDocument pdfDoc) { - ICC_Profile profile; - PDFICCStream sRGBProfile = pdfDoc.getFactory().makePDFICCStream(); -- InputStream in = PDFDocument.class.getResourceAsStream("sRGB.icc"); -+ InputStream in; -+ try { -+ in = new FileInputStream("/usr/share/color/icc/colord/sRGB.icc"); -+ } catch (FileNotFoundException e) { -+ in = null; -+ } - if (in != null) { - try { - profile = ColorProfileUtil.getICC_Profile(in); diff --git a/0003-Disable-javadoc-doclint.patch b/0003-Disable-javadoc-doclint.patch deleted file mode 100644 index 329b5d0..0000000 --- a/0003-Disable-javadoc-doclint.patch +++ /dev/null @@ -1,17 +0,0 @@ -From: Mikolaj Izdebski -Date: Thu, 14 May 2015 06:26:09 +0200 -Subject: [PATCH] Disable javadoc doclint - - -diff --git a/fop/build.xml b/fop/build.xml -index 6f4b00e78..cabd73d46 100644 ---- a/fop/build.xml -+++ b/fop/build.xml -@@ -905,6 +905,7 @@ NOTE: - bottom="Copyright ${year} The Apache Software Foundation. All Rights Reserved." - overview="${src.java.dir}/org/apache/fop/overview.html" - maxmemory="256M"> -+ -
-
- diff --git a/0005-Allow-javascript-in-javadoc.patch b/0005-Allow-javascript-in-javadoc.patch deleted file mode 100644 index fe17806..0000000 --- a/0005-Allow-javascript-in-javadoc.patch +++ /dev/null @@ -1,17 +0,0 @@ -From: Michael Simacek -Date: Wed, 1 Feb 2017 13:10:03 +0100 -Subject: [PATCH] Allow javascript in javadoc - - -diff --git a/fop/build.xml b/fop/build.xml -index cabd73d46..3b83424c1 100644 ---- a/fop/build.xml -+++ b/fop/build.xml -@@ -906,6 +906,7 @@ NOTE: - overview="${src.java.dir}/org/apache/fop/overview.html" - maxmemory="256M"> - -+ -
-
- diff --git a/0006-Revert-Fix-compile-on-newer-mvn.patch b/0006-Revert-Fix-compile-on-newer-mvn.patch deleted file mode 100644 index bb2eff8..0000000 --- a/0006-Revert-Fix-compile-on-newer-mvn.patch +++ /dev/null @@ -1,67 +0,0 @@ -From: Peter Lemenkov -Date: Mon, 23 Nov 2020 16:51:21 +0100 -Subject: [PATCH] Revert "Fix compile on newer mvn" - -This reverts commit d1022f8e33ad8c234c13e7109fba2fe5797f5a64. - -diff --git a/fop/build.xml b/fop/build.xml -index 3b83424c1..a526d13dd 100644 ---- a/fop/build.xml -+++ b/fop/build.xml -@@ -615,7 +615,7 @@ list of possible build targets. - - - -- -+ - - - -diff --git a/pom.xml b/pom.xml -index 3aac301c7..75eaed176 100644 ---- a/pom.xml -+++ b/pom.xml -@@ -84,6 +84,8 @@ - - ${java.version} - ${java.version} -+ ${jdk.path}/bin/javac -+ true - - - -@@ -105,34 +107,6 @@ - - - -- -- -- custom-javac -- -- -- jdk.path -- -- -- -- -- -- -- org.apache.maven.plugins -- maven-compiler-plugin -- ${compiler.plugin.version} -- -- ${java.version} -- ${java.version} -- ${jdk.path}/bin/javac -- true -- -- -- -- -- -- -- -- - - scm:svn:https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk/ - scm:svn:https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk/ diff --git a/0007-Revert-FOP-2895-Try-to-fix-Java-7.patch b/0007-Revert-FOP-2895-Try-to-fix-Java-7.patch deleted file mode 100644 index 27b3d3b..0000000 --- a/0007-Revert-FOP-2895-Try-to-fix-Java-7.patch +++ /dev/null @@ -1,18 +0,0 @@ -From: Peter Lemenkov -Date: Mon, 23 Nov 2020 16:51:36 +0100 -Subject: [PATCH] Revert "FOP-2895: Try to fix Java 7" - -This reverts commit b696bac863370a617cb1a048228c4dd06dabddcc. - -diff --git a/fop/build.xml b/fop/build.xml -index a526d13dd..7d8de1773 100644 ---- a/fop/build.xml -+++ b/fop/build.xml -@@ -616,7 +616,6 @@ list of possible build targets. - - - -- - - - diff --git a/0008-Revert-FOP-2895-Build-at-root.patch b/0008-Revert-FOP-2895-Build-at-root.patch deleted file mode 100644 index f9dbe61..0000000 --- a/0008-Revert-FOP-2895-Build-at-root.patch +++ /dev/null @@ -1,24 +0,0 @@ -From: Peter Lemenkov -Date: Mon, 23 Nov 2020 16:51:59 +0100 -Subject: [PATCH] Revert "FOP-2895: Build at root" - -This reverts commit 1ef4f9b38f8c89affaa0c0eb4dc3a3ca345e2303. - -diff --git a/fop/build.xml b/fop/build.xml -index 7d8de1773..b6eb76642 100644 ---- a/fop/build.xml -+++ b/fop/build.xml -@@ -615,7 +615,12 @@ list of possible build targets. - - - -- -+ -+ -+ -+ -+ -+ - - - diff --git a/0009-Revert-FOP-2895-Ant-build-should-use-mvn-jar-to-avoi.patch b/0009-Revert-FOP-2895-Ant-build-should-use-mvn-jar-to-avoi.patch deleted file mode 100644 index fbd08ae..0000000 --- a/0009-Revert-FOP-2895-Ant-build-should-use-mvn-jar-to-avoi.patch +++ /dev/null @@ -1,165 +0,0 @@ -From: Peter Lemenkov -Date: Mon, 23 Nov 2020 16:52:11 +0100 -Subject: [PATCH] Revert "FOP-2895: Ant build should use mvn jar to avoid - duplicate transcoder configuration" - -This reverts commit d113056a8bfb73695f21a98e2715cd04459a09bc. - -diff --git a/fop-transcoder/src/tools/resources/assembly/assembly.xml b/fop-transcoder/src/tools/resources/assembly/assembly.xml -index 90d77524f..99eb0fb17 100644 ---- a/fop-transcoder/src/tools/resources/assembly/assembly.xml -+++ b/fop-transcoder/src/tools/resources/assembly/assembly.xml -@@ -52,14 +52,12 @@ - org/apache/fop/util/ASCII*.class - org/apache/fop/util/AbstractPaintingState** - org/apache/fop/util/CMYKColorSpace*.class -- org/apache/fop/util/CharUtilities*.class -+ org/apache/fop/util/CharUtilities.class - org/apache/fop/util/Color*.class - org/apache/fop/util/DecimalFormatCache*.class - org/apache/fop/util/Finalizable.class - org/apache/fop/util/ImageObject.class - org/apache/fop/util/SubInputStream.class -- org/apache/fop/util/HexEncoder.class -- org/apache/fop/configuration/** - - - org/apache/fop/render/pdf/PSRenderer.class -diff --git a/fop/build.xml b/fop/build.xml -index b6eb76642..fc17bf158 100644 ---- a/fop/build.xml -+++ b/fop/build.xml -@@ -606,6 +606,59 @@ list of possible build targets. - - - -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ - - - -@@ -614,19 +667,60 @@ list of possible build targets. - - - -- -- -- -- -- -- -- -- -- -- -- -- -- -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ - - - diff --git a/fop.spec b/fop.spec index 1baa558..55ec177 100644 --- a/fop.spec +++ b/fop.spec @@ -1,7 +1,7 @@ Name: fop Summary: XSL-driven print formatter -Version: 2.5 -Release: 3%{?dist} +Version: 2.6 +Release: 1%{?dist} # ASL 1.1: # several files in fop-core/src/main/resources/org/apache/fop/render/awt/viewer/resources # rest is ASL 2.0 @@ -10,44 +10,40 @@ URL: https://xmlgraphics.apache.org/fop Source0: https://www.apache.org/dist/xmlgraphics/%{name}/source/%{name}-%{version}-src.tar.gz Source1: %{name}.script Source2: batik-pdf-MANIFEST.MF -Source3: https://repo1.maven.org/maven2/org/apache/xmlgraphics/%{name}/%{version}/%{name}-%{version}.pom Source4: https://www.apache.org/licenses/LICENSE-1.1.txt -Patch1: 0001-Main.patch -Patch2: 0002-Use-sRGB.icc-color-profile-from-colord-package.patch -Patch3: 0003-Disable-javadoc-doclint.patch +#Patch0: fop-xmlunit.patch Patch4: 0004-Port-to-QDox-2.0.patch -Patch5: 0005-Allow-javascript-in-javadoc.patch -Patch6: 0006-Revert-Fix-compile-on-newer-mvn.patch -Patch7: 0007-Revert-FOP-2895-Try-to-fix-Java-7.patch -Patch8: 0008-Revert-FOP-2895-Build-at-root.patch -Patch9: 0009-Revert-FOP-2895-Ant-build-should-use-mvn-jar-to-avoi.patch BuildArch: noarch -Requires: apache-commons-io >= 1.2 -Requires: apache-commons-logging >= 1.0.4 -Requires: batik >= 1.7 -Requires: fontbox -Requires: jakarta-commons-httpclient Requires: java Requires: xalan-j2 >= 2.7.0 Requires: xml-commons-apis >= 1.3.04 -Requires: xmlgraphics-commons >= 1.5 # Explicit requires for javapackages-tools since fop script # uses /usr/share/java-utils/java-functions Requires: javapackages-tools -BuildRequires: ant BuildRequires: apache-commons-io BuildRequires: apache-commons-logging BuildRequires: batik BuildRequires: fontbox BuildRequires: javapackages-local BuildRequires: junit +BuildRequires: maven-antrun-plugin +BuildRequires: maven-assembly-plugin +BuildRequires: maven-clean-plugin +BuildRequires: maven-local +BuildRequires: maven-plugin-build-helper +BuildRequires: mvn(javax.servlet:servlet-api) +# For servlet, not packaged +#BuildRequires: maven-war-plugin +BuildRequires: pdfbox BuildRequires: qdox BuildRequires: servlet +BuildRequires: xml-maven-plugin BuildRequires: xmlgraphics-commons >= 1.5 BuildRequires: xmlunit +BuildRequires: xmlunit-assertj BuildRequires: xmlunit-core %description @@ -71,29 +67,31 @@ cp %{SOURCE4} LICENSE-1.1 rm -f fop/lib/*.jar fop/lib/build/*.jar -#upstream workaround -- many thanks to spepping@apache.org -- see https://issues.apache.org/bugzilla/show_bug.cgi?id=50575 -ln -s %{_javadir}/qdox.jar fop/lib/build/qdox.jar +# Not packaged +%pom_remove_plugin org.apache.maven.plugins:maven-javadoc-plugin +%pom_remove_dep javax.media:jai-core fop-core +%pom_remove_dep com.sun.media:jai-codec fop-core +%pom_remove_dep net.sf.offo:fop-hyph fop-core +%pom_remove_dep net.sf.saxon:saxon fop-core +# Update to current xmlunit +%pom_change_dep xmlunit:xmlunit org.xmlunit:xmlunit-core fop-core +%pom_add_dep org.xmlunit:xmlunit-assertj3 fop-core +# Requires maven-war-plugin +%pom_disable_module fop-servlet +# Requires JAI, not packaged +rm fop-core/src/main/java/org/apache/fop/util/bitmap/JAIMonochromeBitmapConverter.java + %build -#qdox intentionally left off classpath -- see https://issues.apache.org/bugzilla/show_bug.cgi?id=50575 -export CLASSPATH=$(build-classpath apache-commons-logging apache-commons-io \ - fontbox xmlgraphics-commons batik-all \ - servlet batik/batik-svg-dom xml-commons-apis \ - xml-commons-apis-ext objectweb-asm/asm-all xmlunit) -export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8 -# FIXME no javadocs for now -#ant -f fop/build.xml jar-main transcoder-pkg javadocs -ant -f fop/build.xml jar-main transcoder-pkg +# Skip tests for now, make dirs needed by build but created by tests +mkdir -p fop-events/target/test-classes +%mvn_build -f + %install +%mvn_install # inject OSGi manifest -jar ufm fop/build/%{name}.jar %{SOURCE2} - - -# jars -install -d -m 755 %{buildroot}%{_javadir} -install -p -m 644 fop/build/%{name}.jar %{buildroot}%{_javadir}/%{name}.jar -install -p -m 644 fop/build/%{name}-transcoder.jar %{buildroot}%{_javadir}/pdf-transcoder.jar +jar ufm %{buildroot}%{_javadir}/%{name}/%{name}.jar %{SOURCE2} # script install -d -m 755 %{buildroot}%{_bindir} @@ -105,18 +103,12 @@ cp -rp fop/conf/* %{buildroot}%{_datadir}/%{name}/conf # javadoc install -d -m 755 %{buildroot}%{_javadocdir}/%{name} -# FIXME no javadocs for now -#cp -rp fop/build/javadocs/* %{buildroot}%{_javadocdir}/%{name} - -install -d -m 755 %{buildroot}%{_mavenpomdir} -install -p -m 644 %{SOURCE3} %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom -%add_maven_depmap JPP-%{name}.pom %{name}.jar +cp -rp target/xmvn-apidocs/* %{buildroot}%{_javadocdir}/%{name} %files -f .mfiles %doc LICENSE LICENSE-1.1 README NOTICE %{_datadir}/%{name} -%{_javadir}/pdf-transcoder.jar %{_bindir}/fop %files javadoc @@ -125,6 +117,9 @@ install -p -m 644 %{SOURCE3} %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom %changelog +* Wed Aug 25 2021 Orion Poplawski - 2.6-1 +- Update to 2.6, build with maven + * Wed Jul 21 2021 Fedora Release Engineering - 2.5-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild diff --git a/sources b/sources index 5761230..8271b22 100644 --- a/sources +++ b/sources @@ -1,3 +1,2 @@ SHA512 (LICENSE-1.1.txt) = 15369f9a39937f9973218840c178a39566e902d8b4bff1deb8956891095529f884068d4873532ce7417c937826dd952bac59b8dc84732412eb243516074b8121 -SHA512 (fop-2.5-src.tar.gz) = 313e286e67af6d48fa3caed5e07b493a0d5113c428f78871e9098c2d699aa0ff24a8e019bf259e0b6a4290fc384796ed30fd5260cb8a2a6c3660f5ea65c51adb -SHA512 (fop-2.5.pom) = ae3239208414dfd3768b4f8af26b81b81c9d7ede1a9030907aed7a8c0c6756e0a116b36c2aeae01e29cc0767772ca28df4ba00894c67a218c78f9341cefacef2 +SHA512 (fop-2.6-src.tar.gz) = 221a3e52933c79c81f00ebaf48005c7ed92992cb10220840dddcaa0bbd249cc088e2f136061cfbbda9aaa3cfd3e73b28a37406cc1c29cf287bdcc0e7228974e1