summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLenard Spencer <lenardrspencer@gmail.com>2020-05-23 00:17:27 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2020-05-23 00:17:27 +0700
commita2cddf8b25f02b136e40efb94fce31c91fc794c5 (patch)
treeff3f9cc0f032dae97e43e083fa963fee050da3b8
parent150adf9c281c5eb4dba46cfcc6d8df0ad695da5e (diff)
downloadslackbuilds-a2cddf8b25f02b136e40efb94fce31c91fc794c5.tar.gz
office/fop: Updated for version 2.5.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--office/fop/README5
-rw-r--r--office/fop/fop.SlackBuild42
-rw-r--r--office/fop/fop.info14
3 files changed, 44 insertions, 17 deletions
diff --git a/office/fop/README b/office/fop/README
index fe7aab4c22..0fb4f3ef99 100644
--- a/office/fop/README
+++ b/office/fop/README
@@ -13,4 +13,7 @@ described in the W3C Recommendation from 05 December 2006, and that
complies with the November 2001 Portable Document Format Specification
(Version 1.4) from Adobe Systems.
-jai is an optional but recommended dependency.
+The default build is for jdk 8 and older (including openjdk). To build
+on jdk11 and newer, pass JDK11=yes to the build script.
+
+jai and jai-imageio are optional but recommended dependencies.
diff --git a/office/fop/fop.SlackBuild b/office/fop/fop.SlackBuild
index 82871cd44f..8b486a42b6 100644
--- a/office/fop/fop.SlackBuild
+++ b/office/fop/fop.SlackBuild
@@ -3,6 +3,7 @@
# Slackware build script for fop
# Copyright 2015 Thorn Inurcide USA
+# Copyright 2020 Lenard Spencer, Orlando, Florida, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,7 +24,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=fop
-VERSION=${VERSION:-2.4}
+VERSION=${VERSION:-2.5}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -69,23 +70,40 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-# Fix an Issue with Java 8 (thanks LFS):
-sed -i '\@</javad@i\
-<arg value="-Xdoclint:none"/>\
-<arg value="--allow-script-in-comments"/>' fop/build.xml
+if [ "${JDK11:-no}" = "yes" ]; then
+# Fix an Issue with Java 11 and newer:
+ sed -i '\@</javad@i\
+ <arg value="-Xdoclint:none"/>\
+ <arg value="--allow-script-in-comments"/>\
+ <arg value="--ignore-source-errors"/>' \
+ fop/build.xml
+# With jdk11 and newer, the minimum source version is 1.7, while
+# the fop build system has 1.6. Change it here:
+ sed -e 's/1\.6/1.7/' \
+ -i fop/build.xml
+else
+ # Fix an Issue with Java 8 and older:
+ sed -i '\@</javad@i\
+ <arg value="--allow-script-in-comments"/>' fop/build.xml
+fi
-# Increase hyphenation stacksize from 512k to 1M (thanks LFS):
+# Increase hyphenation stacksize from 512k to 1M:
sed -e '/hyph\.stack/s/512k/1M/' -i fop/build.xml
-# Compiles with apache-ant:
-ant -f fop/build.xml compile
-ant -f fop/build.xml jar-main
-ant -f fop/build.xml javadocs
+# Copy updated {pdf,font}box files:
+rm fop/lib/fontbox-2.0.*.jar || true
+cp $CWD/{font,pdf}box-2.0.19.jar fop/lib
-mkdir -p $PKG/opt/$PRGNAM-$VERSION
-install -v -d -m755 $PKG/opt/$PRGNAM-$VERSION/
+# Copy hyphenation tables:
+unzip $CWD/offo-hyphenation.zip
+cp offo-hyphenation/hyph/* fop/hyph
+rm -rf offo-hyphenation
+# Compiles with apache-ant:
( cd fop
+ant all javadocs
+mkdir -p $PKG/opt/$PRGNAM-$VERSION
+install -v -d -m755 $PKG/opt/$PRGNAM-$VERSION/
mv build/javadocs .
cp -va build conf examples javadocs fop* lib \
$PKG/opt/$PRGNAM-$VERSION )
diff --git a/office/fop/fop.info b/office/fop/fop.info
index 1037a04203..62104d7aea 100644
--- a/office/fop/fop.info
+++ b/office/fop/fop.info
@@ -1,10 +1,16 @@
PRGNAM="fop"
-VERSION="2.4"
+VERSION="2.5"
HOMEPAGE="https://xmlgraphics.apache.org/fop/"
-DOWNLOAD="https://archive.apache.org/dist/xmlgraphics/fop/source/fop-2.4-src.tar.gz"
-MD5SUM="e379d5916bc705b6fd3808a77f5d8478"
+DOWNLOAD="https://archive.apache.org/dist/xmlgraphics/fop/source/fop-2.5-src.tar.gz \
+ http://mirror.reverse.net/pub/apache/pdfbox/2.0.19/fontbox-2.0.19.jar \
+ http://mirror.reverse.net/pub/apache/pdfbox/2.0.19/pdfbox-2.0.19.jar \
+ https://downloads.sourceforge.net/offo/2.2/offo-hyphenation.zip"
+MD5SUM="5e7e87ef12845d31bce7a1fe8d61f501 \
+ 74b3b8ee7eef40b0aff5ca5aa07d96f7 \
+ 1c085389e055c957b07c25c8443de728 \
+ bf9c09bf05108ef9661b8f08d91c2336"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="apache-ant"
+REQUIRES="apache-maven"
MAINTAINER="Lenard Spencer"
EMAIL="lenardrspencer@gmail.com"