[Slackbuilds-users] pdftk on Slackware Current

Konrad J Hambrick kjhambrick at gmail.com
Sun Mar 4 15:00:31 UTC 2018


ArTourter --

I documented what I had to do after to build pdftk installing Alien Bob's
gcc5.SlackBuild on Slackware64-current in this thread on LQ:

https://www.linuxquestions.org/questions/slackware-14/building-pdftk-on-slackware-15-0-current-4175624922/

These three patch files modify the SlackBuild Files:

   -rw-r--r-- 1 root root  497 Mar  4 07:39
/home/tmp/README-Slackware-15.0.patch.txt
   -rw-r--r-- 1 root root  694 Mar  4 07:40
/home/tmp/pdftk.SlackBuild-Slackware-15.0.patch.txt
   -rw-r--r-- 1 root root  300 Mar  4 07:40
/home/tmp/pdftk.info-Slackware-15.0.patch.txt

This patch file replaces the existing pdftk-1.44-add_custom_optflags.patch
for Slackware -current + gcc5 in the SlackBuild Directory:

   -rw-r--r-- 1 root root  665 Mar  4 07:40
/home/tmp/pdftk-2.02-on-Slackware-15.patch.txt

I imagine there is a better way than my kludgy SLACKVER=15 Variable to
differentiate Slackware 15.0 from Slackware 14.2 in the pdftk.SlackBuild.

The only real change was to force GXX=gcc-5 in the
pdftk/Makefile.Slackware-13.1 Makefile ...

Thanks for the pdftk.SlackBuild ArTourter -- it is an essential tool where
I work !

-- kjh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.slackbuilds.org/pipermail/slackbuilds-users/attachments/20180304/44b0f554/attachment.html>
-------------- next part --------------
--- pdftk/README	2018-02-17 16:26:26.371132683 -0600
+++ pdftk-15.0/README	2018-03-04 06:53:51.638842490 -0600
@@ -4,3 +4,6 @@
 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
-------------- next part --------------
--- pdftk/pdftk.SlackBuild	2018-02-17 16:26:26.371132683 -0600
+++ pdftk-15.0/pdftk.SlackBuild	2018-03-04 07:00:19.578831027 -0600
@@ -28,6 +28,8 @@
 BUILD=${BUILD:-1}
 TAG=${TAG:-_SBo}
 
+SLACKVER=${SLACKVER:-15}
+
 if [ -z "$ARCH" ]; then
   case "$( uname -m )" in
     i?86) ARCH=i486 ;;
@@ -71,7 +73,13 @@
  -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
 
 # Use our SLKCFLAGS
-patch -p1 < $CWD/pdftk-1.44-add_custom_optflags.patch
+
+if [ -n "$SLACKVER" -a "$SLACKVER" -ge "15" ]
+then
+   patch -p1 < $CWD/pdftk-2.02-on-Slackware-15.patch
+else
+   patch -p1 < $CWD/pdftk-1.44-add_custom_optflags.patch
+fi
 
 cd $PRGNAM
   # Hardcode "-j1" since this fails with multiple make jobs
-------------- next part --------------
--- pdftk/pdftk.info	2018-02-17 16:26:26.371132683 -0600
+++ pdftk-15.0/pdftk.info	2018-03-04 06:52:13.255845397 -0600
@@ -5,6 +5,6 @@
 MD5SUM="6534365fd6727724f288a556ede33faa"
 DOWNLOAD_x86_64=""
 MD5SUM_x86_64=""
-REQUIRES=""
+REQUIRES="gcc-5"
 MAINTAINER="ArTourter"
 EMAIL="artourter at gmail.com"
-------------- next part --------------
# 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


More information about the SlackBuilds-users mailing list