office/pdftk: Switch using gcc5.

Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
This commit is contained in:
Konrad J Hambrick 2018-03-04 17:05:17 +01:00 committed by Robby Workman
parent 7b44ef316c
commit b29d32bd87
5 changed files with 28 additions and 33 deletions

View file

@ -4,3 +4,10 @@ command-line tool for doing everyday things with PDF documents. Keep one
in the top drawer of your desktop and use it to merge PDF documents,
split PDF documents, apply watermarks, repair corrupt PDF, update PDF
metadata, and more. pdftk does not require Acrobat and is free software.
NOTE: Starting with Slackware 15.0 pdftk compilation requires SBo gcc-5
because gcc-java was dropped from the GNU Compiler Collection as of gcc-7:
don't forget to source /etc/profile.d/gcc5.sh before starting to build
this, like
. /etc/profile.d/gcc5.sh

View file

@ -1,26 +0,0 @@
diff -Nurp pdftk-1.44-dist-orig/pdftk/Makefile.Slackware-13.1 pdftk-1.44-dist/pdftk/Makefile.Slackware-13.1
--- pdftk-1.44-dist-orig/pdftk/Makefile.Slackware-13.1 2010-10-25 20:04:51.000000000 +0100
+++ pdftk-1.44-dist/pdftk/Makefile.Slackware-13.1 2010-10-31 01:44:31.000000000 +0000
@@ -34,7 +34,7 @@ export CXX= $(TOOLPATH)g++
export GCJ= $(TOOLPATH)gcj
export GCJH= $(TOOLPATH)gcjh
export GJAR= $(TOOLPATH)gjar
-export LIBGCJ= /usr/share/java/libgcj$(VERSUFF).jar
+export LIBGCJ= /usr/share/java
export AR= ar
export RM= rm
export ARFLAGS= rs
@@ -71,9 +71,10 @@ export RMFLAGS= -vf
# only effects libraries following option on the command line
#
#
-export CPPFLAGS= -DPATH_DELIM=0x2f -DASK_ABOUT_WARNINGS=false -DUNBLOCK_SIGNALS -fdollars-in-identifiers
-export CXXFLAGS= -Wall -Wextra -Weffc++ -O2
-export GCJFLAGS= -Wall -fsource=1.3 -O2
+export OPT= -O2
+export CPPFLAGS= $(OPT) -DPATH_DELIM=0x2f -DASK_ABOUT_WARNINGS=false -DUNBLOCK_SIGNALS -fdollars-in-identifiers
+export CXXFLAGS= $(OPT) -Wall -Wextra -Weffc++
+export GCJFLAGS= $(OPT) -Wall -fsource=1.3
export GCJHFLAGS= -force
export LDLIBS= -lgcj

View file

@ -0,0 +1,15 @@
# diff -Nurp pdftk/Makefile.Slackware-13.1.orig pdftk/Makefile.Slackware-13.1
--- orig/pdftk/Makefile.Slackware-13.1 2013-07-24 13:27:46.000000000 -0500
+++ pdftk/Makefile.Slackware-13.1 2018-03-04 06:20:55.312900883 -0600
@@ -21,8 +21,9 @@
# tools
# need direct path to libgcj for gcjh (starting in gcj 4.1.2 per Aurélien GÃRÃME)
TOOLPATH=
-export VERSUFF=-4.4.4
-export CXX= $(TOOLPATH)g++
+GCCMAJORTAG=-5 # kjh was here
+export VERSUFF=-5.5.0 # kjh was here
+export CXX= $(TOOLPATH)g++$(GCCMAJORTAG) # kjh was here
export GCJ= $(TOOLPATH)gcj
export GCJH= $(TOOLPATH)gcjh
export GJAR= $(TOOLPATH)gjar

View file

@ -30,7 +30,7 @@ TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@ -41,8 +41,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@ -70,8 +70,7 @@ 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 {} \;
# Use our SLKCFLAGS
patch -p1 < $CWD/pdftk-1.44-add_custom_optflags.patch
patch -p1 < $CWD/pdftk-2.02-use-gcc5.patch
cd $PRGNAM
# Hardcode "-j1" since this fails with multiple make jobs

View file

@ -5,6 +5,6 @@ DOWNLOAD="https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk-2.02-src.zip
MD5SUM="6534365fd6727724f288a556ede33faa"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
REQUIRES="gcc5"
MAINTAINER="ArTourter"
EMAIL="artourter@gmail.com"