- 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

OBS-URL: https://build.opensuse.org/package/show/Java:packages/xmlgraphics-fop?expand=0&rev=44
This commit is contained in:
Tomáš Chvátal 2014-12-08 13:29:50 +00:00 committed by Git OBS Bridge
parent de34208b16
commit 67ce32235f
5 changed files with 85 additions and 90 deletions

View File

@ -1,11 +0,0 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (Darwin)
iQEVAwUAUH2CV2ZUur4O09MXAQJttQf7B+1B+INfHTi9SuMTCAUJKTy2PIfhOklI
ArXJS6BT+mnJ2Seep7svdMXvTjygyU0AVQsS/OaPiSqBcQVFIHKGprv3X+FtUq/S
lXmLyDh8m1P9rc0CzZQsvATMAFGb5GBKsg9343UAuLiDaS+CAbinB0YwTfNNDiSF
2gyWF/K63eDNhbOj4Ux5WbcyfBJM3km3WY6AQKXN6a/bd+AnCXLVO3uRmnSiKHH/
q2fGBGPzsTOesQws02A2YSq7Vu9h5N4JQdZKHsT32INPYIVz3qfhMg92xu350O0E
q0AMnoAvpb49OR4nMx/LwzE7RKFLOryUyLeVqrwxqqcf2GsXcM/s+A==
=9Vi8
-----END PGP SIGNATURE-----

42
fop-commons-2.0.patch Normal file
View File

@ -0,0 +1,42 @@
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

@ -1,3 +1,13 @@
-------------------------------------------------------------------
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

View File

@ -1,34 +0,0 @@
pub 2048R/0ED3D317 2012-04-09 [expires: 2017-04-08]
uid Glenn Adams <gadams@apache.org>
sub 2048R/F23E86C1 2012-04-09 [expires: 2017-04-08]
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2.0.19 (GNU/Linux)
mQENBE+DFvEBCACwHesM5hkZrlgPiq588FbZPe7QGtDRVdh0YbgI2A4Ky2odbFmA
/n7lF9v+yf+FUn/0H2igwDYqLFx4JsB7z+Nvj+hwExdGQxuDaGSwMjjpJeEiuEmf
b1Er5KYgpeFNm1MVP+r5kW5962O+HGIEx1xQ85AskNbr/jQkAg/wbbwWLFBQRMER
PqFs1rXL2aWip8XtNPKnKBLPlFPn9a7glgB5Whgbls44KpR0dplAVoCWMnZEYnTA
JYITcaDTCGFQI7aYgbj986RpS80o/Wcsnb8rjHKRZG8TaDr9MbgmmK39KwiJCflJ
9LvXR9g1j3addxgqEUuQBEtoLkWs/eDT/KQ7ABEBAAG0H0dsZW5uIEFkYW1zIDxn
YWRhbXNAYXBhY2hlLm9yZz6JAT4EEwECACgFAk+DFvECGwMFCQlmAYAGCwkIBwMC
BhUIAgkKCwQWAgMBAh4BAheAAAoJEGZUur4O09MXl7MH/jfeyE012/ABTTjvwvRw
2evD3cfghrZOQVT3PVEcVnXIcnVlmznO2DDs8aWXlhJ94ZnNdw8iKE8weK1FGXdd
qWA7vHrOI1UAo7h+CDaBt0TM6OEM3Mp3+5baOJMRXyrjhbv74sj88HYRtoPhA2+z
5ilVNmmX4PEAc6wqt87ZfNQ2ZqX2YzR+OaT5OggSB12qU/uE7d4d0NcDozEKQFUP
CMAuPJRNd4/J5yFy0DStfgsDKuUTir0oldlUElAjbhF8WtAgRwufIYuG/r4Cbuid
Qc32yVAoy069ZcggwBpkzVPOpL2by1fzeSohjIkntDIL474KuSSoBKCuw2nYxpyw
b0O5AQ0ET4MW8QEIAMFUAScm2Dw1fmBhmKMVc0mzqpR8TvSQvwJLiXRSP86NI1zc
DtuiXCFfNZykOifFk50otMH1hd91hqeQ6HfsxxYtXLg2UDHG2gTKzlWefwA+1eFc
M8fz/oV0CanGjqaOd6VZoYeg+LSD6YgrJZVjuoxNN/S0A9fNd8B3CXsG+92udkkW
YMyiUpD5qjMEwcjmj6ITX3M9VLxDCKKhYwN+u5wokuAk3yKtvBpWhJDQbaJcuDaC
rLH788gFybZDzyJ8Ug/95peV9Z57OCjMJLtn67ES7fB544EQRYVmDGnX5tTo9sYj
0bDjlbKX9lqS1sCGSezPxYxGgeXlnQrt+Sm+gd0AEQEAAYkBJQQYAQIADwUCT4MW
8QIbDAUJCWYBgAAKCRBmVLq+DtPTF2YbB/0Vo8Xr9N1adqlY1UAofvo5AoXZFxFJ
jkB0Eb3z1V3iSBh8P921LD0gUQz6JXptXZPVGnwgm/44RdqXC+kX+4MxiVBtNAHp
0ODjIXiabBrixAHnT7EcAJkWue0RP2J5wiYKklwWFbEetjl0QSmitz8Jh33eA76j
kFYW+vgKUMA8UrJ6j2Hk+vMFi0Odtntbc7AXvLifSPSmSztNe/Mws69EbuBph6bQ
+zSmTQ6nt8PX+v3e0PnkXdGD8si9H6hj0K32pEMz86ttSnAtrhvsAdKPYOkY7/JD
0Bl+bnb7FLxJjJGlGuO/Rn5SIR3fFNQGrE/zl2wsKtftUXse6kkZSue+
=XDBB
-----END PGP PUBLIC KEY BLOCK-----

View File

@ -3,7 +3,6 @@
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2000-2008, JPackage Project
# All rights reserved.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -18,21 +17,18 @@
#
%define section free
%define bname fop
%bcond_with tests
Name: xmlgraphics-fop
Version: 1.1
Release: 0
Summary: Formatter for Printing XSLT Processed XML Files
License: Apache-2.0
Group: Productivity/Publishing/XML
Url: http://xmlgraphics.apache.org/fop/
Source0: http://ftp.halifax.rwth-aachen.de/apache/xmlgraphics/fop/source/fop-1.1-src.tar.gz
#FIX-OPENSUSE: add xmlgraphics-commons to classpath
Source1: %{name}.script
Source2: http://svn.apache.org/repos/asf/xmlgraphics/fop/tags/fop-1_0/xmlgraphics-fop-pom-template.pom
Source2: http://svn.apache.org/repos/asf/xmlgraphics/fop/tags/fop-1_1/xmlgraphics-fop-pom-template.pom
Source3: %{name}-fontmetrics.script
Source4: %{name}-fontlist.script
Source5: http://heanet.dl.sourceforge.net/project/offo/offo-hyphenation/2.0/offo-hyphenation_v2.0.zip
@ -40,13 +36,25 @@ Source5: http://heanet.dl.sourceforge.net/project/offo/offo-hyphenation/2
Source10: %{name}.xml
Source11: %{name}-fontmetrics.xml
Source12: %{name}-fontlist.xml
Source1000: http://ftp.halifax.rwth-aachen.de/apache/xmlgraphics/fop/source/fop-1.1-src.tar.gz.asc
Source1001: xmlgraphics-fop.keyring
Patch1: xmlgraphics-fop-cli.patch
Patch2: xmlgraphics-fop-xconf.patch
Url: http://xmlgraphics.apache.org/fop/
Requires(post): javapackages-tools
Requires(postun): javapackages-tools
# PATCH-FIX-UPSTREAM: build with xmlgraphics-commons-2.0
Patch3: fop-commons-2.0.patch
BuildRequires: ant >= 1.6.5
BuildRequires: apache-commons-io >= 2.4
BuildRequires: apache-commons-logging
BuildRequires: avalon-framework
BuildRequires: docbook-xsl-stylesheets
BuildRequires: gpg2
BuildRequires: java-devel >= 1.6.0
BuildRequires: javapackages-tools
BuildRequires: libxslt
BuildRequires: qdox >= 1.12
BuildRequires: servlet_api
BuildRequires: unzip
BuildRequires: xml-commons-jaxp-1.3-apis
BuildRequires: xmlgraphics-batik
BuildRequires: xmlgraphics-commons >= 1.5
Requires: apache-commons-io >= 2.4
Requires: apache-commons-logging
Requires: avalon-framework
@ -55,31 +63,14 @@ Requires: javapackages-tools
Requires: xml-commons-jaxp-1.3-apis
Requires: xmlgraphics-batik
Requires: xmlgraphics-commons >= 1.5
BuildRequires: ant >= 1.6.5
BuildRequires: ant-junit
BuildRequires: apache-commons-io >= 2.4
BuildRequires: apache-commons-logging
BuildRequires: avalon-framework
BuildRequires: docbook-xsl-stylesheets
BuildRequires: gpg-offline
BuildRequires: gpg2
BuildRequires: java-devel >= 1.6.0
BuildRequires: javapackages-tools
BuildRequires: junit
BuildRequires: libxslt
BuildRequires: qdox >= 1.12
BuildRequires: servlet_api
BuildRequires: unzip
BuildRequires: xml-commons-jaxp-1.3-apis
BuildRequires: xmlgraphics-batik
BuildRequires: xmlgraphics-commons >= 1.5
BuildRequires: xmlunit
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
Requires(post): javapackages-tools
Requires(postun): javapackages-tools
#!BuildIgnore: saxon
Provides: %{bname} = %{version}-%{release}
Obsoletes: %{bname} < %{version}-%{release}
Provides: fo-formatter = %{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
FOP (Formatting Objects Processor) is driven by XSL formatting objects
@ -89,12 +80,12 @@ formats: PDF (primary output target), PCL, PS, SVG, XML (area tree
representation), Print, AWT, MIF, and TXT.
%prep
%gpg_verify %{SOURCE1000}
%setup -q -n %{bname}-%{version} -a5
ln -thyph offo-hyphenation/hyph/*.xml
find -name "*.jar" | xargs -t rm
%patch1 -p1 -b .cli
%patch2 -p1 -b .cli
%patch3 -p1 -b .xml2
cp %{SOURCE2} %{SOURCE3} %{SOURCE4} .
# Replace keyword "VERSION" in XML files with the real one:
@ -126,21 +117,18 @@ ln -s $(build-classpath xmlgraphics-batik/transcoder)
ln -s $(build-classpath xmlgraphics-batik/util)
ln -s $(build-classpath xmlgraphics-batik/xml)
ln -s $(build-classpath xmlgraphics-commons)
ln -s $(build-classpath xmlunit)
ln -s $(build-classpath qdox)
popd
export CLASSPATH= LANG=en_US.UTF-8
export OPT_JAR_LIST=`%{__cat} %{_sysconfdir}/ant.d/{junit,trax}`
%{ant} \
export OPT_JAR_LIST=`cat %{_sysconfdir}/ant.d/trax`
ant \
-Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5 \
package \
%if %{with tests}
junit \
%endif
maven-artifacts
# false
# Build the manpage(s) and HTML
DB=/usr/share/xml/docbook/stylesheet/nwalsh/current
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 /
@ -172,17 +160,17 @@ ln -s %{name}-fontlist %{buildroot}%{_bindir}/%{bname}-fontlist
mkdir -p %{buildroot}%{_datadir}/%{name}
cp -pr hyph %{buildroot}%{_datadir}/%{name}
cp -pr conf %{buildroot}%{_datadir}/%{name}
install -D -m 644 conf/fop.xconf %{buildroot}/etc/fop.xconf
install -D -m 644 conf/fop.xconf %{buildroot}%{_sysconfdir}/fop.xconf
# Manpages
mkdir -p %{buildroot}%_mandir/man1
mkdir -p %{buildroot}%{_mandir}/man1
for m in *.1; do
gzip $m
done
cp -vi *.1.gz %{buildroot}%_mandir/man1
cp -vi *.1.gz %{buildroot}%{_mandir}/man1
# Remove prefix xmlgraphics to make also the linked manpage version available
pushd %{buildroot}%_mandir/man1
pushd %{buildroot}%{_mandir}/man1
for m in *.1.gz; do
ln -s $m ${m#*-}
done
@ -204,6 +192,6 @@ popd
%{_mavenpomdir}/*
%config %{_mavendepmapfragdir}/*
%{_mandir}/man1/*
%config(noreplace) /etc/fop.xconf
%config(noreplace) %{_sysconfdir}/fop.xconf
%changelog