Control: tags -1 + patch
Hi there,
On Tue, 31 Jan 2017 09:35:00 +0000 Matthias Klose wrote:
> The package fails to build in a test rebuild on at least amd64 with
> gcc-7/g++-7, but succeeds to build with gcc-6/g++-6.
I think that's because GCJ was removed from GCC in version 7, and so the
build tries to use gcj-6 with g++-7, which leads to the following error
message.
> pdftk.cc:33:10: fatal error: gcj/cni.h: No such file or directory
> #include <gcj/cni.h>
> ^~~~~~~~~~~
Luckily, pdftk packaging already has a method to choose a specific GCC
version. One only has to do the inverse of this commit:
https://anonscm.debian.org/cgit/collab-maint/pdftk.git/commit/?id=4d888b81fbaaf49a086807ef6b072d93b06fac70
Here is the required change.
$ git diff
diff --git a/debian/control b/debian/control
index 10ce4fc..43de880 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: pdftk
Section: text
Priority: optional
Maintainer: Johann Felix Soden <joh...@debian.org>
-Build-Depends: debhelper (>= 9), gcj-jdk
+Build-Depends: debhelper (>= 9), gcj-6-jdk, g++-6
Standards-Version: 3.9.7
Homepage: https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/
Vcs-Git: https://anonscm.debian.org/git/collab-maint/pdftk.git
diff --git a/debian/rules b/debian/rules
index e0ef61a..f31a52c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,7 +5,7 @@
# VERSUFF=-$(shell gcj --version | sed -r -e '1s/.*
([0-9]+\.[0-9]+).*/\1/;q')
# use (temporary) fixed gcj/g++ version from debian/control
-# VERSUFF=$(shell grep -oP '(?<=gcj)-[0-9.]*' debian/control)
+VERSUFF=$(shell grep -oP '(?<=gcj)-[0-9.]*' debian/control)
DPKG_EXPORT_BUILDFLAGS = 1
-include /usr/share/dpkg/buildflags.mk
Cheers,
Juhani