Accepting request 368070 from home:favogt:branches:Java:packages

- Fix manpage for xmlgraphics-fop-fontmetrics

- 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

OBS-URL: https://build.opensuse.org/request/show/368070
OBS-URL: https://build.opensuse.org/package/show/Java:packages/xmlgraphics-fop?expand=0&rev=49
This commit is contained in:
Tomáš Chvátal 2016-03-08 12:32:37 +00:00 committed by Git OBS Bridge
parent 1ad1840740
commit 0e68d52147
11 changed files with 69 additions and 95 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:58164cb3298d130522ecd445b8082c71c36242ea6464c8f02ab4157e4a332522
size 24513986

3
fop-2.1-src.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e5af1d81df8f9fab8aa473e6a1c1407c1bf1c3d327df9b04c3861e8247e8b998
size 23308630

View File

@ -1,42 +0,0 @@
From 07f112a532b277e6ebada50f8654b3aacb8e9a47 Mon Sep 17 00:00:00 2001
From: Simon Steiner <ssteiner@apache.org>
Date: Thu, 21 Aug 2014 14:42:22 +0000
Subject: [PATCH] FOP-2353: PDF-A preflight warnings
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1619415 13f79535-47bb-0310-9956-ffa450edef68
---
.../apache/fop/render/pdf/PDFRenderingUtil.java | 8 +++++++-
.../fop/render/pdf/PDFStructureTreeBuilder.java | 16 ++++++++++++++--
3 files changed, 21 insertions(+), 3 deletions(-)
Index: fop-1.1/src/java/org/apache/fop/render/pdf/PDFRenderingUtil.java
===================================================================
--- fop-1.1.orig/src/java/org/apache/fop/render/pdf/PDFRenderingUtil.java
+++ fop-1.1/src/java/org/apache/fop/render/pdf/PDFRenderingUtil.java
@@ -25,6 +25,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;
+import java.util.ArrayList;
import java.util.Map;
import javax.xml.transform.Source;
@@ -37,6 +38,7 @@ import org.apache.commons.logging.LogFac
import org.apache.xmlgraphics.image.loader.util.ImageUtil;
import org.apache.xmlgraphics.java2d.color.profile.ColorProfileUtil;
import org.apache.xmlgraphics.xmp.Metadata;
+import org.apache.xmlgraphics.xmp.schemas.DublinCoreSchema;
import org.apache.xmlgraphics.xmp.schemas.XMPBasicAdapter;
import org.apache.xmlgraphics.xmp.schemas.XMPBasicSchema;
@@ -352,8 +354,8 @@ class PDFRenderingUtil implements PDFCon
public void renderXMPMetadata(XMPMetadata metadata) {
Metadata docXMP = metadata.getMetadata();
Metadata fopXMP = PDFMetadata.createXMPFromPDFDocument(pdfDoc);
- //Merge FOP's own metadata into the one from the XSL-FO document
- fopXMP.mergeInto(docXMP);
+ ArrayList<Class> exclude = new ArrayList<Class>();
+ fopXMP.mergeInto(docXMP, exclude);
XMPBasicAdapter xmpBasic = XMPBasicSchema.getAdapter(docXMP);
//Metadata was changed so update metadata date
xmpBasic.setMetadataDate(new java.util.Date());

View File

@ -0,0 +1,17 @@
---
build.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: fop-2.1/build.xml
===================================================================
--- fop-2.1.orig/build.xml
+++ fop-2.1/build.xml
@@ -181,7 +181,7 @@ list of possible build targets.
<property name="lib.dir" value="${basedir}/lib"/>
<property name="user.hyph.dir" value="${basedir}/hyph"/>
<property name="unidata.dir" value="${basedir}/UNIDATA"/>
- <property name="hyph.stacksize" value="512k"/>
+ <property name="hyph.stacksize" value="1M"/>
<property name="test.dir" value="${basedir}/test"/>
<property name="build.dir" value="${basedir}/build"/>
<property name="build.gensrc.dir" value="${build.dir}/gensrc"/>

BIN
offo-hyphenation.zip (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:79d341820583aa5b77ee00dc7da59bfafb92adceb88c7a1922fe300a90a22c4e
size 858046

View File

@ -2,7 +2,7 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.docbook.org/xml/4.5/docbookx.dtd" "http://www.docbook.org/xml/4.5/docbookx.dtd"
[ [
<!ENTITY product "xmlgraphics-fop-fontmetric"> <!ENTITY product "xmlgraphics-fop-fontmetrics">
]> ]>
<refentry id="fop-fontmetrics"> <refentry id="fop-fontmetrics">
<refentryinfo> <refentryinfo>

View File

@ -75,32 +75,32 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
<dependency> <dependency>
<groupId>org.apache.xmlgraphics</groupId> <groupId>org.apache.xmlgraphics</groupId>
<artifactId>xmlgraphics-commons</artifactId> <artifactId>xmlgraphics-commons</artifactId>
<version>1.5</version> <version>2.1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.xmlgraphics</groupId> <groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-svg-dom</artifactId> <artifactId>batik-svg-dom</artifactId>
<version>1.7</version> <version>1.8</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.xmlgraphics</groupId> <groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-bridge</artifactId> <artifactId>batik-bridge</artifactId>
<version>1.7</version> <version>1.8</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.xmlgraphics</groupId> <groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-awt-util</artifactId> <artifactId>batik-awt-util</artifactId>
<version>1.7</version> <version>1.8</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.xmlgraphics</groupId> <groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-gvt</artifactId> <artifactId>batik-gvt</artifactId>
<version>1.7</version> <version>1.8</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.xmlgraphics</groupId> <groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-transcoder</artifactId> <artifactId>batik-transcoder</artifactId>
<version>1.7</version> <version>1.8</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.apache.xmlgraphics</groupId> <groupId>org.apache.xmlgraphics</groupId>
@ -111,12 +111,12 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
<dependency> <dependency>
<groupId>org.apache.xmlgraphics</groupId> <groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-extension</artifactId> <artifactId>batik-extension</artifactId>
<version>1.7</version> <version>1.8</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.xmlgraphics</groupId> <groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-ext</artifactId> <artifactId>batik-ext</artifactId>
<version>1.7</version> <version>1.8</version>
</dependency> </dependency>
<!-- other dependencies --> <!-- other dependencies -->
<dependency> <dependency>
@ -132,12 +132,12 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
<dependency> <dependency>
<groupId>org.apache.avalon.framework</groupId> <groupId>org.apache.avalon.framework</groupId>
<artifactId>avalon-framework-api</artifactId> <artifactId>avalon-framework-api</artifactId>
<version>4.2.0</version> <version>4.3.1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.avalon.framework</groupId> <groupId>org.apache.avalon.framework</groupId>
<artifactId>avalon-framework-impl</artifactId> <artifactId>avalon-framework-impl</artifactId>
<version>4.2.0</version> <version>4.3.1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>javax.servlet</groupId> <groupId>javax.servlet</groupId>
@ -148,7 +148,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
<dependency> <dependency>
<groupId>xalan</groupId> <groupId>xalan</groupId>
<artifactId>xalan</artifactId> <artifactId>xalan</artifactId>
<version>2.7.0</version> <version>2.7.2</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -1,10 +0,0 @@
--- fop-1.1.orig/conf/fop.xconf 2012-11-11 10:53:23.000000000 +0400
+++ fop-1.1/conf/fop.xconf 2012-12-09 10:57:56.000000000 +0400
@@ -78,6 +78,7 @@
<font-triplet name="ArialMT" style="normal" weight="bold"/>
</font>
-->
+ <auto-detect/>
</fonts>
<!-- This option lets you specify additional options on an XML handler -->

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
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 Wed Mar 18 09:46:25 UTC 2015 - tchvatal@suse.com

View File

@ -1,7 +1,7 @@
# #
# spec file for package xmlgraphics-fop # spec file for package xmlgraphics-fop
# #
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2000-2008, JPackage Project # Copyright (c) 2000-2008, JPackage Project
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
@ -19,30 +19,29 @@
%define bname fop %define bname fop
Name: xmlgraphics-fop Name: xmlgraphics-fop
Version: 1.1 Version: 2.1
Release: 0 Release: 0
Summary: Formatter for Printing XSLT Processed XML Files Summary: Formatter for Printing XSLT Processed XML Files
License: Apache-2.0 License: Apache-2.0
Group: Productivity/Publishing/XML Group: Productivity/Publishing/XML
Url: http://xmlgraphics.apache.org/fop/ Url: http://xmlgraphics.apache.org/fop/
Source0: http://ftp.halifax.rwth-aachen.de/apache/xmlgraphics/fop/source/fop-1.1-src.tar.gz Source0: http://ftp.halifax.rwth-aachen.de/apache/xmlgraphics/fop/source/fop-2.1-src.tar.gz
#FIX-OPENSUSE: add xmlgraphics-commons to classpath #FIX-OPENSUSE: add xmlgraphics-commons to classpath
Source1: %{name}.script Source1: %{name}.script
Source2: http://svn.apache.org/repos/asf/xmlgraphics/fop/tags/fop-1_1/xmlgraphics-fop-pom-template.pom Source2: http://svn.apache.org/repos/asf/xmlgraphics/fop/tags/fop-2_1/xmlgraphics-fop-pom-template.pom
Source3: %{name}-fontmetrics.script Source3: %{name}-fontmetrics.script
Source4: %{name}-fontlist.script Source4: %{name}-fontlist.script
Source5: http://heanet.dl.sourceforge.net/project/offo/offo-hyphenation/2.0/offo-hyphenation_v2.0.zip Source5: http://heanet.dl.sourceforge.net/project/offo/offo-hyphenation/2.2/offo-hyphenation.zip
# Manpage(s) # Manpage(s)
Source10: %{name}.xml Source10: %{name}.xml
Source11: %{name}-fontmetrics.xml Source11: %{name}-fontmetrics.xml
Source12: %{name}-fontlist.xml Source12: %{name}-fontlist.xml
Patch1: xmlgraphics-fop-cli.patch Patch1: xmlgraphics-fop-cli.patch
Patch2: xmlgraphics-fop-xconf.patch Patch2: hyphenation-more-stack.patch
# PATCH-FIX-UPSTREAM: build with xmlgraphics-commons-2.0
Patch3: fop-commons-2.0.patch
BuildRequires: ant >= 1.6.5 BuildRequires: ant >= 1.6.5
BuildRequires: apache-commons-io >= 2.4 BuildRequires: apache-commons-io >= 2.4
BuildRequires: apache-commons-logging BuildRequires: apache-commons-logging
BuildRequires: apache-pdfbox
BuildRequires: avalon-framework BuildRequires: avalon-framework
BuildRequires: docbook-xsl-stylesheets BuildRequires: docbook-xsl-stylesheets
BuildRequires: gpg2 BuildRequires: gpg2
@ -53,16 +52,17 @@ BuildRequires: qdox >= 1.12
BuildRequires: servlet_api BuildRequires: servlet_api
BuildRequires: unzip BuildRequires: unzip
BuildRequires: xml-commons-jaxp-1.3-apis BuildRequires: xml-commons-jaxp-1.3-apis
BuildRequires: xmlgraphics-batik BuildRequires: xmlgraphics-batik >= 1.8
BuildRequires: xmlgraphics-commons >= 1.5 BuildRequires: xmlgraphics-commons >= 2.1
Requires: apache-commons-io >= 2.4 Requires: apache-commons-io >= 2.4
Requires: apache-commons-logging Requires: apache-commons-logging
Requires: apache-pdfbox
Requires: avalon-framework Requires: avalon-framework
Requires: java >= 1.6.0 Requires: java >= 1.6.0
Requires: javapackages-tools Requires: javapackages-tools
Requires: xml-commons-jaxp-1.3-apis Requires: xml-commons-jaxp-1.3-apis
Requires: xmlgraphics-batik Requires: xmlgraphics-batik >= 1.8
Requires: xmlgraphics-commons >= 1.5 Requires: xmlgraphics-commons >= 2.1
Requires(post): javapackages-tools Requires(post): javapackages-tools
Requires(postun): javapackages-tools Requires(postun): javapackages-tools
#!BuildIgnore: saxon #!BuildIgnore: saxon
@ -84,8 +84,7 @@ representation), Print, AWT, MIF, and TXT.
ln -thyph offo-hyphenation/hyph/*.xml ln -thyph offo-hyphenation/hyph/*.xml
find -name "*.jar" | xargs -t rm find -name "*.jar" | xargs -t rm
%patch1 -p1 -b .cli %patch1 -p1 -b .cli
%patch2 -p1 -b .cli %patch2 -p1
%patch3 -p1 -b .xml2
cp %{SOURCE2} %{SOURCE3} %{SOURCE4} . cp %{SOURCE2} %{SOURCE3} %{SOURCE4} .
# Replace keyword "VERSION" in XML files with the real one: # Replace keyword "VERSION" in XML files with the real one:
@ -98,6 +97,7 @@ pushd lib
ln -s $(build-classpath avalon-framework) ln -s $(build-classpath avalon-framework)
ln -s $(build-classpath commons-io) ln -s $(build-classpath commons-io)
ln -s $(build-classpath commons-logging) ln -s $(build-classpath commons-logging)
ln -s $(build-classpath fontbox)
ln -s $(build-classpath servlet_api) ln -s $(build-classpath servlet_api)
ln -s $(build-classpath xml-commons-jaxp-1.3-apis) ln -s $(build-classpath xml-commons-jaxp-1.3-apis)
ln -s $(build-classpath xml-commons-jaxp-1.3-apis-ext) ln -s $(build-classpath xml-commons-jaxp-1.3-apis-ext)
@ -120,13 +120,8 @@ ln -s $(build-classpath xmlgraphics-commons)
ln -s $(build-classpath qdox) ln -s $(build-classpath qdox)
popd popd
export CLASSPATH= LANG=en_US.UTF-8 export CLASSPATH= LANG=en_US.UTF-8
export OPT_JAR_LIST=`cat %{_sysconfdir}/ant.d/trax` ant package maven-artifacts
ant \
-Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5 \
package \
maven-artifacts
# false
# Build the manpage(s) and HTML # Build the manpage(s) and HTML
DB=%{_datadir}/xml/docbook/stylesheet/nwalsh/current DB=%{_datadir}/xml/docbook/stylesheet/nwalsh/current
for m in %{SOURCE10} %{SOURCE11} %{SOURCE12}; do for m in %{SOURCE10} %{SOURCE11} %{SOURCE12}; do
@ -178,15 +173,15 @@ popd
%files %files
%defattr(0644,root,root,0755) %defattr(0644,root,root,0755)
%doc NOTICE LICENSE README known-issues.xml status.xml %doc NOTICE LICENSE README known-issues.xml
%doc *.html %doc *.html
%attr(0755,root,root) %{_bindir}/%{name} %attr(0755,root,root) %{_bindir}/%{name}
%attr(0755,root,root) %{_bindir}/%{bname} %{_bindir}/%{bname}
%attr(0755,root,root) %{_bindir}/%{name}-fontmetrics %attr(0755,root,root) %{_bindir}/%{name}-fontmetrics
%attr(0755,root,root) %{_bindir}/%{bname}-fontmetrics %{_bindir}/%{bname}-fontmetrics
%attr(0755,root,root) %{_bindir}/%{name}-fontlist %attr(0755,root,root) %{_bindir}/%{name}-fontlist
%attr(0755,root,root) %{_bindir}/%{bname}-fontlist %{_bindir}/%{bname}-fontlist
%{_javadir}/%{name}.jar %{_javadir}/%{name}.jar
%{_datadir}/%{name} %{_datadir}/%{name}
%{_mavenpomdir}/* %{_mavenpomdir}/*