From cf1d1f5333ff3fc19c3df66edb530ef99e805ce838a92ec1507fba5323579d4c Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Wed, 3 Jun 2020 17:06:14 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/Java:packages/xmlgraphics-fop?expand=0&rev=95 --- fop-2.5.pom | 79 ------------------------------ xmlgraphics-fop-fontlist.script | 2 +- xmlgraphics-fop-fontmetrics.script | 2 +- xmlgraphics-fop.script | 2 +- xmlgraphics-fop.spec | 64 +++++++++++++++++------- 5 files changed, 48 insertions(+), 101 deletions(-) delete mode 100644 fop-2.5.pom diff --git a/fop-2.5.pom b/fop-2.5.pom deleted file mode 100644 index eddd1b2..0000000 --- a/fop-2.5.pom +++ /dev/null @@ -1,79 +0,0 @@ - - 4.0.0 - - org.apache.xmlgraphics - fop - Apache FOP All-In-One - XML Graphics Format Object Processor All-In-One - - - org.apache.xmlgraphics - fop-parent - 2.5 - - - - - - ${project.groupId} - fop-util - ${project.version} - - - ${project.groupId} - fop-events - ${project.version} - - - ${project.groupId} - fop-core - ${project.version} - - - - junit - junit - ${junit.version} - test - - - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - package-all - package - - single - - - false - false - - - true - org.apache.fop.cli.Main - - - XSL-FO - Extensible Stylesheet Language - 1.1 - World Wide Web Consortium - http://www.w3.org/TR/xsl - - - - src/tools/resources/assembly/assembly.xml - - - - - - - - - diff --git a/xmlgraphics-fop-fontlist.script b/xmlgraphics-fop-fontlist.script index 08fb31d..d70d3ad 100644 --- a/xmlgraphics-fop-fontlist.script +++ b/xmlgraphics-fop-fontlist.script @@ -29,7 +29,7 @@ fi # Rest of the configuration MAIN_CLASS=org.apache.fop.tools.fontlist.FontListMain -BASE_JARS="xmlgraphics-fop xmlgraphics-commons batik-all avalon-framework-impl avalon-framework-api xerces-j2 xalan-j2 xalan-j2-serializer commons-logging commons-io" +BASE_JARS="xmlgraphics-fop xmlgraphics-commons batik-all xerces-j2 xalan-j2 xalan-j2-serializer commons-logging commons-io" # Set parameters set_jvm diff --git a/xmlgraphics-fop-fontmetrics.script b/xmlgraphics-fop-fontmetrics.script index ae1e1de..afd9437 100644 --- a/xmlgraphics-fop-fontmetrics.script +++ b/xmlgraphics-fop-fontmetrics.script @@ -41,7 +41,7 @@ else MAIN_CLASS=${MAIN_CLASS_TTF} fi -BASE_JARS="xmlgraphics-fop xmlgraphics-commons commons-io commons-logging avalon-framework-impl avalon-framework-api xml-commons-apis xerces-j2 xalan-j2 xalan-j2-serializer" +BASE_JARS="xmlgraphics-fop xmlgraphics-commons commons-io commons-logging xml-commons-apis xerces-j2 xalan-j2 xalan-j2-serializer" # Set parameters set_jvm diff --git a/xmlgraphics-fop.script b/xmlgraphics-fop.script index f885a75..a88841b 100644 --- a/xmlgraphics-fop.script +++ b/xmlgraphics-fop.script @@ -33,7 +33,7 @@ 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 avalon-framework-api avalon-framework-impl batik-all fontbox xml-commons-apis xml-commons-apis-ext" +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 diff --git a/xmlgraphics-fop.spec b/xmlgraphics-fop.spec index b356fe4..73adf2d 100644 --- a/xmlgraphics-fop.spec +++ b/xmlgraphics-fop.spec @@ -26,12 +26,11 @@ License: Apache-2.0 Group: Productivity/Publishing/XML URL: https://xmlgraphics.apache.org/fop/ Source0: https://ftp.halifax.rwth-aachen.de/apache/xmlgraphics/fop/source/fop-%{version}-src.tar.gz -Source1: https://repo.maven.apache.org/maven2/org/apache/xmlgraphics/fop/%{version}/fop-%{version}.pom +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 -Source5: https://download.sourceforge.net/project/offo/offo-hyphenation/2.2/offo-hyphenation.zip # Manpage(s) Source10: %{name}.xml Source11: %{name}-fontmetrics.xml @@ -43,31 +42,35 @@ 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 -BuildRequires: ant >= 1.6.5 -BuildRequires: apache-pdfbox -BuildRequires: avalon-framework >= 4.3 +BuildRequires: ant >= 1.8.4 +BuildRequires: apache-pdfbox >= 2.0 BuildRequires: commons-io >= 2.4 BuildRequires: commons-logging BuildRequires: docbook-xsl-stylesheets -# Needed for maven conversions BuildRequires: glassfish-servlet-api BuildRequires: java-devel >= 1.8 BuildRequires: javapackages-local BuildRequires: libxslt BuildRequires: qdox >= 2.0 BuildRequires: unzip -BuildRequires: xml-commons-apis >= 1.3 +BuildRequires: xml-commons-apis BuildRequires: xmlgraphics-batik >= 1.11 BuildRequires: xmlgraphics-commons >= 2.1 #!BuildIgnore: saxon -Requires: apache-pdfbox -Requires: avalon-framework >= 4.3 -Requires: commons-io >= 2.4 -Requires: commons-logging Requires: java >= 1.8 -Requires: xml-commons-apis >= 1.3 -Requires: xmlgraphics-commons >= 2.1 -%requires_ge xmlgraphics-batik +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 +Requires: mvn(org.apache.xmlgraphics:batik-anim) >= 1.11 +Requires: mvn(org.apache.xmlgraphics:batik-awt-util) >= 1.11 +Requires: mvn(org.apache.xmlgraphics:batik-bridge) >= 1.11 +Requires: mvn(org.apache.xmlgraphics:batik-extension) >= 1.11 +Requires: mvn(org.apache.xmlgraphics:batik-gvt) >= 1.11 +Requires: mvn(org.apache.xmlgraphics:batik-transcoder) >= 1.11 +Requires: mvn(org.apache.xmlgraphics:xmlgraphics-commons) Provides: %{bname} = %{version}-%{release} Obsoletes: %{bname} < %{version}-%{release} Provides: fo-formatter = %{version}-%{release} @@ -81,7 +84,7 @@ formats: PDF (primary output target), PCL, PS, SVG, XML (area tree representation), Print, AWT, MIF, and TXT. %prep -%setup -q -n %{bname}-%{version} -a5 +%setup -q -n %{bname}-%{version} -a1 ln -tfop/hyph offo-hyphenation/hyph/*.xml find -name "*.jar" | xargs -t rm # Remove this file. It needs jai and we don't compile it. @@ -99,17 +102,40 @@ 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.16 fop +%pom_add_dep org.apache.xmlgraphics:batik-anim:1.13 fop +%pom_add_dep org.apache.xmlgraphics:batik-awt-util:1.13 fop +%pom_add_dep org.apache.xmlgraphics:batik-bridge:1.13 fop +%pom_add_dep org.apache.xmlgraphics:batik-extension:1.13 fop +%pom_add_dep org.apache.xmlgraphics:batik-gvt:1.13 fop +%pom_add_dep org.apache.xmlgraphics:batik-transcoder:1.13 fop +%pom_add_dep org.apache.xmlgraphics:xmlgraphics-commons:2.4 fop + %build build-jar-repository -s fop/lib \ - avalon-framework-api \ - avalon-framework-impl \ commons-io \ commons-logging \ fontbox \ glassfish-servlet-api \ - xml-commons-apis \ - xml-commons-apis-ext \ batik-all \ + xml-commons-apis \ + xml-commons-apis-ext \ xmlgraphics-commons \ qdox