update to 2.6 [release 2.6-1mamba;Sun Apr 11 2021]

This commit is contained in:
Silvan Calarco 2024-01-05 20:28:24 +01:00
parent 76f46475e2
commit c3b5827418
8 changed files with 36 additions and 316 deletions

View File

@ -1,9 +1,4 @@
# apache-fop # apache-fop
Apache FOP is the world's first print formatter driven by XSL formatting Apache FOP is the world's first print formatter driven by XSL formatting objects (XSL-FO) and the world's first output independent formatter. It is a Java application that reads a formatting object (FO) tree and renders the resulting pages to a specified output. Output formats currently supported include PDF, PCL, PS, AFP, TIFF, PNG, SVG, XML (area tree representation), Print, AWT and TXT. The primary output target is PDF.
objects (XSL-FO) and the world's first output independent formatter. It
is a Java application that reads a formatting object (FO) tree and
renders the resulting pages to a specified output. Output formats
currently supported include PDF, PCL, PS, AFP, TIFF, PNG, SVG, XML (area
tree representation), Print, AWT and TXT. The primary output target is PDF.

View File

@ -1,28 +0,0 @@
Manifest-Version: 1.0
Main-Class: org.apache.fop.cli.Main
Bundle-RequiredExecutionEnvironment: J2SE-1.4
Bundle-SymbolicName: org.apache.batik.pdf
Import-Package: org.apache.batik.bridge;version="[1.6.0,1.7.0)",org.ap
ache.batik.dom.svg;version="[1.6.0,1.7.0)",org.apache.batik.dom.util;
version="[1.6.0,1.7.0)",org.apache.batik.ext.awt;version="[1.6.0,1.7.
0)",org.apache.batik.ext.awt.g2d;version="[1.6.0,1.7.0)",org.apache.b
atik.gvt;version="[1.6.0,1.7.0)",org.apache.batik.gvt.renderer;versio
n="[1.6.0,1.7.0)",org.apache.batik.gvt.text;version="[1.6.0,1.7.0)",o
rg.apache.batik.transcoder;version="[1.6.0,1.7.0)",org.apache.batik.t
ranscoder.image;version="[1.6.0,1.7.0)",org.apache.batik.transcoder.k
eys;version="[1.6.0,1.7.0)",org.apache.batik.util;version="[1.6.0,1.7
.0)",org.w3c.dom
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-Localization: plugin
Bundle-Version: 1.6.0.v200806031500
Bundle-Vendor: %Bundle-Vendor
Export-Package: org.apache.avalon.framework,org.apache.avalon.framewor
k.activity,org.apache.avalon.framework.configuration,org.apache.avalo
n.framework.container,org.apache.commons.io,org.apache.commons.io.out
put,org.apache.commons.logging,org.apache.commons.logging.impl,org.ap
ache.fop.apps,org.apache.fop.fo,org.apache.fop.fonts,org.apache.fop.f
onts.apps,org.apache.fop.fonts.base14,org.apache.fop.fonts.truetype,o
rg.apache.fop.fonts.type1,org.apache.fop.image,org.apache.fop.image.a
nalyser,org.apache.fop.pdf,org.apache.fop.render.pdf,org.apache.fop.r
ender.ps,org.apache.fop.svg,org.apache.fop.util

View File

@ -1,28 +0,0 @@
--- build.xml 2009-11-19 23:33:50.000000000 +0100
+++ build.xml-gil 2009-11-19 23:38:59.000000000 +0100
@@ -527,9 +527,6 @@
<fileset dir="${src.java.dir}">
<patternset refid="java-only"/>
</fileset>
- <fileset dir="${src.java.version.dir}">
- <patternset refid="java-only"/>
- </fileset>
<fileset dir="${basedir}">
<include name="LICENSE"/>
<include name="NOTICE"/>
@@ -915,6 +912,7 @@
</target>
<target name="junit" depends="junit-userconfig, junit-basic, junit-transcoder, junit-text-linebreak, junit-layout, junit-fotree, junit-intermediate-format" description="Runs all of FOP's JUnit tests" if="junit.present">
+<!--
<fail>
<condition>
<or>
@@ -933,6 +931,7 @@
**************************************************************************
</fail>
<echo>All Junit tests passed!</echo>
+-->
<echo>Use the "junit-reports" target to generate HTML test reports</echo>
</target>

View File

@ -1,15 +0,0 @@
--- ../../orig/fop-0.94/src/java/org/apache/fop/cli/Main.java 2007-08-18 13:56:46.000000000 -0400
+++ src/java/org/apache/fop/cli/Main.java 2007-09-18 09:19:53.000000000 -0400
@@ -193,11 +193,7 @@
* @param args the command line parameters
*/
public static void main(String[] args) {
- if (checkDependencies()) {
- startFOP(args);
- } else {
- startFOPWithDynamicClasspath(args);
- }
+ startFOP(args);
}
}

View File

@ -1,22 +0,0 @@
diff -uN fop-0.94/build.xml fop-0.94-mod/build.xml
--- fop-0.94/build.xml 2007-08-18 19:56:46.000000000 -0400
+++ fop-0.94-mod/build.xml 2007-09-17 16:41:01.000000000 -0400
@@ -502,10 +502,10 @@
<map from="${optional.lib.dir}${file.separator}" to=""/>
</pathconvert>
- <jar jarfile="${build.dir}/fop.jar" basedir="${build.classes.dir}">
+ <jar jarfile="${build.dir}/fop.jar"
+ basedir="${build.classes.dir}"
+ manifest="${basedir}/fop.mf">
<manifest>
- <attribute name="Main-Class" value="org.apache.fop.cli.Main"/>
- <attribute name="Class-Path" value="${manifest.classpath}"/>
<attribute name="Build-Id" value="${ts} (${user.name} [${os.name} ${os.version} ${os.arch}, Java ${java.runtime.version}])"/>
<section name="org/apache/fop/">
<attribute name="Specification-Title" value="XSL-FO - Extensible Stylesheet Language"/>
--- fop-0.94/fopmf.old 2007-11-23 10:53:31.000000000 -0500
+++ fop-0.94/fop.mf 2007-11-23 10:53:18.000000000 -0500
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+Main-Class: org.apache.fop.cli.Main

View File

@ -1,36 +0,0 @@
#!/bin/sh
#
# Fop script
# JPackage Project <http://www.jpackage.org/>
# 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
# Source system prefs
if [ -f /etc/fop.conf ] ; then
. /etc/fop.conf
fi
# Source user prefs
if [ -f $HOME/.foprc ] ; then
. $HOME/.foprc
fi
BASE_JARS="fop batik-all excalibur/avalon-framework xmlgraphics-commons xerces-j2 xalan-j2 xalan-j2-serializer commons-io commons-logging xml-commons-apis xml-commons-apis-ext xmlunit"
# Configuration
MAIN_CLASS=org.apache.fop.cli.Main
# Set parameters
set_jvm
set_classpath $BASE_JARS
set_flags $BASE_FLAGS
set_options $BASE_OPTIONS $FOP_OPTS
export CLASSPATH=$CLASSPATH:/usr/share/java/xml-commons-apis-ext.jar
# Let's start
run "$@"

View File

@ -1,213 +1,59 @@
%define offo_version 1.2
%define javahome /usr/lib/jvm/java
Name: apache-fop Name: apache-fop
Version: 0.95 Version: 2.6
Release: 7mamba Release: 1mamba
Summary: Apache Formatting Objects Processor Summary: Apache Formatting Objects Processor
Group: Applications/Publishing Group: System/Libraries/Java
Vendor: openmamba Vendor: openmamba
Distribution: openmamba Distribution: openmamba
Packager: gil <puntogil@libero.it> Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://xmlgraphics.apache.org/fop/ URL: https://xmlgraphics.apache.org/fop/
#Source0: http://archive.apache.org/dist/xmlgraphics/fop/source/fop-%{version}-src.tar.gz Source0: https://ftp-stud.hs-esslingen.de/pub/Mirrors/ftp.apache.org/dist/xmlgraphics/fop/source/fop-%{version}-src.tar.gz
# jsvn export http://svn.apache.org/repos/asf/xmlgraphics/fop/tags/fop-0_95/ fop-0.95 Source1: fop.conf
Source0: fop-%{version}-src-svn.tar.gz
Source1: apache-fop.script
Source2: apache-fop-0.94-batik-pdf-MANIFEST.MF
Source3: http://downloads.sourceforge.net/project/offo/offo-hyphenation/%{offo_version}/offo-hyphenation_v%{offo_version}.zip
Patch0: apache-fop-0.94-manifest.patch
Patch1: apache-fop-0.94-main.patch
Patch2: apache-fop-0.94-build_xml.patch
License: Apache Software License 2.0 License: Apache Software License 2.0
## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END
BuildRequires: javapackages
BuildRequires: java-openjdk8
BuildRequires: apache-ant BuildRequires: apache-ant
BuildRequires: apache-ant-junit Requires: xmlgraphics-commons
BuildRequires: apache-ant-trax
BuildRequires: apache-batik = 1.7
BuildRequires: apache-batik-javadoc = 1.7
BuildRequires: apache-log4j
BuildRequires: apache-tomcat5-servletapi5
BuildRequires: jakarta-commons-httpclient
BuildRequires: jakarta-commons-io
BuildRequires: jakarta-commons-logging
BuildRequires: java-excalibur-avalon-logkit
BuildRequires: java-excalibur-avalon-framework-api
BuildRequires: java-excalibur-avalon-framework-impl
BuildRequires: java-openjdk
BuildRequires: java-junit3
BuildRequires: java-sun-jai
BuildRequires: xalan-j2
BuildRequires: xmlgraphics-commons = 1.3.1
BuildRequires: xml-commons-apis
BuildRequires: xmlunit
Requires: apache-ant
Requires: apache-batik = 1.7
Requires: jakarta-commons-httpclient
Requires: jakarta-commons-io Requires: jakarta-commons-io
Requires: jakarta-commons-logging Requires: jakarta-commons-logging
Requires: java-excalibur-avalon-logkit Requires: apache-batik
Requires: java-excalibur-avalon-framework-api
Requires: java-excalibur-avalon-framework-impl
Requires: xalan-j2
Requires: xmlgraphics-commons = 1.3.1
Requires: xml-commons-apis
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description %description
Apache FOP is the world's first print formatter driven by XSL formatting Apache FOP is the world's first print formatter driven by XSL formatting objects (XSL-FO) and the world's first output independent formatter. It is a Java application that reads a formatting object (FO) tree and renders the resulting pages to a specified output. Output formats currently supported include PDF, PCL, PS, AFP, TIFF, PNG, SVG, XML (area tree representation), Print, AWT and TXT. The primary output target is PDF.
objects (XSL-FO) and the world's first output independent formatter. It
is a Java application that reads a formatting object (FO) tree and
renders the resulting pages to a specified output. Output formats
currently supported include PDF, PCL, PS, AFP, TIFF, PNG, SVG, XML (area
tree representation), Print, AWT and TXT. The primary output target is PDF.
%package javadoc
Group: Documentation
Summary: Manual for %{name}
%description javadoc
FOP is the world's first print formatter driven by XSL formatting
objects. It is a Java application that reads a formatting object tree
and then turns it into a PDF document. The formatting object tree, can
be in the form of an XML document (output by an XSLT engine like XT or
Xalan) or can be passed in memory as a DOM Document or (in the case of
XT) SAX events.
This package contains documentation for %{name}.
%prep %prep
%setup -q -n fop-%{version}
%setup -q -n fop-%{version} -a 3
%patch0 -p1
%patch1 -p0
%patch2 -p0
mv offo-hyphenation/hyph/*.xml hyph
for j in $(find . -name "*.jar"); do
mv $j ${j}.no
done
pushd lib
ln -s $(build-classpath excalibur/avalon-logkit)
ln -s $(build-classpath excalibur/avalon-framework) avalon-framework-4.2.0.jar
# ln -s $(build-classpath batik-anim)
# ln -s $(build-classpath batik-awt-util)
# ln -s $(build-classpath batik-bridge)
# ln -s $(build-classpath batik-css)
# ln -s $(build-classpath batik-dom)
# ln -s $(build-classpath batik-ext)
# ln -s $(build-classpath batik-extension)
# ln -s $(build-classpath batik-gvt)
# ln -s $(build-classpath batik-parser)
# ln -s $(build-classpath batik-svg-dom)
# ln -s $(build-classpath batik-svggen)
# ln -s $(build-classpath batik-script)
# ln -s $(build-classpath batik-transcoder)
# ln -s $(build-classpath batik-util)
# ln -s $(build-classpath batik-xml)
ln -s $(build-classpath batik-all) batik-all-1.7.jar
ln -s $(build-classpath commons-io) commons-io-1.3.1.jar
ln -s $(build-classpath commons-logging) commons-logging-1.0.4.jar
ln -s $(build-classpath servletapi5) servlet-2.2.jar
ln -s $(build-classpath xalan-j2) xalan-2.7.0.jar
ln -s $(build-classpath xalan-j2-serializer) serializer-2.7.0.jar
ln -s $(build-classpath xercesImpl) xercesImpl-2.7.1.jar
ln -s $(build-classpath xml-commons-apis) xml-apis-1.3.04.jar
ln -s $(build-classpath xml-commons-apis-ext) xml-apis-ext-1.3.04.jar
ln -s $(build-classpath xmlgraphics-commons) xmlgraphics-commons-1.3.1.jar
ln -s $(build-classpath xmlunit)
popd
%build %build
export LC_ALL=en_US.UTF-8
export JAVA_HOME=%{_jvmdir}/java-8
ant -f fop/build.xml package
export JAVA_HOME=%javahome
export CLASSPATH=$(build-classpath jai junit-3.8.2 log4j ant/ant-junit ant/ant-trax)
# for test
DISPLAY=:0.0
export DISPLAY
# TODO [junit] log4j:WARN Please initialize the log4j system properly
ant \
-Dant.build.javac.source=1.4 \
-Dant.build.javac.target=1.4 \
-Djava.awt.headless=true \
-Dbatik.javadoc=%{_javadocdir}/batik \
package transcoder-pkg junit maven-artifacts
# examples
%install %install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
# OSGi manifests install -D -m0644 fop/build/fop.jar %{buildroot}%{_javadir}/fop-%{version}.jar
mkdir -p META-INF ln -s fop-%{version}.jar %{buildroot}%{_javadir}/fop.jar
cp -p %{SOURCE2} META-INF/MANIFEST.MF
touch META-INF/MANIFEST.MF
zip -u build/fop.jar META-INF/MANIFEST.MF
mkdir -p %{buildroot}%{_javadir} install -D -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/fop.conf
mkdir -p %{buildroot}%{_datadir}/maven2/poms install -D -m0755 fop/fop %{buildroot}%{_bindir}/fop
install -pm 644 build/fop.jar %{buildroot}%{_javadir}/fop-%{version}.jar
install -pm 644 build/fop-transcoder.jar %{buildroot}%{_javadir}/fop-pdf-transcoder-%{version}.jar
install -pm 644 build/fop-sandbox.jar %{buildroot}%{_javadir}/fop-sandbox-%{version}.jar
install -pm 644 build/fop-transcoder-allinone.jar %{buildroot}%{_javadir}/fop-transcoder-allinone-%{version}.jar
install -pm 644 build/fop-hyph.jar %{buildroot}%{_javadir}/fop-hyph-%{version}.jar
install -pm 644 build/maven/pom.xml %{buildroot}%{_datadir}/maven2/poms/JPP-fop.pom
%add_to_maven_depmap org.apache.xmlgraphics fop %{version} JPP fop
(
cd %{buildroot}%{_javadir}
for jar in *-%{version}*
do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`
done
)
mkdir -p %{buildroot}%{_bindir}
install -pm 755 %{SOURCE1} %{buildroot}%{_bindir}/fop
mkdir -p %{buildroot}%{_datadir}/fop
cp -pr conf %{buildroot}%{_datadir}/fop
cp -pr hyph %{buildroot}%{_datadir}/fop
cp -pr offo-hyphenation/images %{buildroot}%{_datadir}/fop/
cp -pr offo-hyphenation/skin %{buildroot}%{_datadir}/fop/
mkdir -p %{buildroot}%{_javadocdir}/fop-%{version}
cp -pr build/javadocs/* %{buildroot}%{_javadocdir}/fop-%{version}
ln -s fop-%{version} %{buildroot}%{_javadocdir}/fop
%clean %clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post
%update_maven_depmap
%postun
%update_maven_depmap
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%attr(755,root,root)%{_bindir}/fop %config %{_sysconfdir}/fop.conf
%{_bindir}/fop
%{_javadir}/fop-%{version}.jar %{_javadir}/fop-%{version}.jar
%{_javadir}/fop.jar %{_javadir}/fop.jar
%{_javadir}/fop-pdf-transcoder-%{version}.jar
%{_javadir}/fop-pdf-transcoder.jar
%{_javadir}/fop-hyph-%{version}.jar
%{_javadir}/fop-hyph.jar
%{_javadir}/fop-sandbox-%{version}.jar
%{_javadir}/fop-sandbox.jar
%{_javadir}/fop-transcoder-allinone-%{version}.jar
%{_javadir}/fop-transcoder-allinone.jar
%{_datadir}/fop
%{_datadir}/maven2/poms
%{_mavendepmapfragdir}
%doc LICENSE NOTICE README
%files javadoc
%defattr(-,root,root)
%{_javadocdir}/fop-%{version}
%{_javadocdir}/fop
%changelog %changelog
* Sun Apr 11 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 2.6-1mamba
- update to 2.6
* Thu Mar 24 2011 gil <puntogil@libero.it> 0.95-7mamba * Thu Mar 24 2011 gil <puntogil@libero.it> 0.95-7mamba
- rebuilt with java-openjdk support - rebuilt with java-openjdk support

8
fop.conf Normal file
View File

@ -0,0 +1,8 @@
FOP_HOME="/usr/share/java/"
CLASSPATH="$CLASSPATH:$FOP_HOME/fop.jar"
CLASSPATH="$CLASSPATH:/usr/share/java/xmlgraphics-commons.jar"
CLASSPATH="$CLASSPATH:/usr/share/java/commons-io.jar"
CLASSPATH="$CLASSPATH:/usr/share/java/commons-logging.jar"
CLASSPATH="$CLASSPATH:/usr/share/java/batik/batik-all.jar"
CLASSPATH="$CLASSPATH:/usr/share/java/excalibur/avalon-framework.jar"
CLASSPATH="$CLASSPATH:/usr/share/java/xml-apis-ext.jar"