[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#843910: cups-pdf FTCBFS: uses build architecture compiler



2016-11-16 16:40 GMT+02:00 Helmut Grohne <helmut@subdivi.de>:
> On Wed, Nov 16, 2016 at 01:59:50PM +0200, Martin-Éric Racine wrote:
>> I cannot help but wonder if setting CC for cross-build would be best
>> handled by the build tools themselves, rather than compensated for by
>> individual packages' debian/rules.
>
> I'm inclined to agree, but you don't have a build system and that is
> precisely why you need to handle this here. If cups-pdf was using a
> Makefile, autotools or cmake, then dh_auto_* would just work (in most
> cases). But since you are invoking the compiler from debian/rules
> directly that's the place to set up CC.
>
> Guillem Jover has a draft[1] for a file /usr/share/dpkg/buildtools.mk or
> similar that would set up variables such as CC. Thus when that
> materializes, you can replace my patch with including such a makefile.
>
> Helmut
>
> [1] https://lists.debian.org/20150510013227.GA24314@gaara.hadrons.org

Fair enough.  I'm wondering if the enclosed patch would accomplish the
same thing.  I mean, the goal always is to set CC for the target host,
right?

Martin-Éric
diff -Nru cups-pdf-2.6.1/debian/changelog cups-pdf-2.6.1/debian/changelog
--- cups-pdf-2.6.1/debian/changelog	2016-02-23 15:18:02.000000000 +0200
+++ cups-pdf-2.6.1/debian/changelog	2016-11-16 16:37:40.000000000 +0200
@@ -1,3 +1,14 @@
+cups-pdf (2.6.1-22) unstable; urgency=medium
+
+  * Fix "cups-pdf FTCBFS: uses build architecture compiler" (Closes: #843910)
+    + Added [debian/rules] fragment:
+      export CC := $(shell dpkg-architecture --query DEB_HOST_GNU_TYPE)-gcc
+    = Thanks to Helmut Grohne for the alternate patch. 
+  * Updated the Copyright years in [debian/rules] and [debian/copyright].
+  * Bumped Standards-Version to 3.9.8 (no change required).
+
+ -- Martin-Éric Racine <martin-eric.racine@iki.fi>  Wed, 16 Nov 2016 16:37:40 +0200
+
 cups-pdf (2.6.1-21) unstable; urgency=medium
 
   * Fixed Lintian "W: spelling-error-in-readme-debian: debuging debugging"
diff -Nru cups-pdf-2.6.1/debian/control cups-pdf-2.6.1/debian/control
--- cups-pdf-2.6.1/debian/control	2016-02-23 15:15:02.000000000 +0200
+++ cups-pdf-2.6.1/debian/control	2016-11-16 16:35:34.000000000 +0200
@@ -5,7 +5,7 @@
 Maintainer: Debian CUPS Maintainers <debian-printing@lists.debian.org>
 Uploaders: Martin-Éric Racine <martin-eric.racine@iki.fi>
 Build-Depends: debhelper (>= 9.0~)
-Standards-Version: 3.9.7
+Standards-Version: 3.9.8
 
 Package: printer-driver-cups-pdf
 Architecture: any
diff -Nru cups-pdf-2.6.1/debian/copyright cups-pdf-2.6.1/debian/copyright
--- cups-pdf-2.6.1/debian/copyright	2015-03-11 23:21:33.000000000 +0200
+++ cups-pdf-2.6.1/debian/copyright	2016-11-16 16:27:46.000000000 +0200
@@ -23,6 +23,6 @@
 License: GPL-2+
 
 Files: debian/*
-Copyright: © 2004-2015 Martin-Éric Racine <martin-eric.racine@iki.fi>
+Copyright: © 2004-2016 Martin-Éric Racine <martin-eric.racine@iki.fi>
            © 2009,2011 Till Kamppeter <till.kamppeter@gmail.com>
 License: GPL-2+
diff -Nru cups-pdf-2.6.1/debian/rules cups-pdf-2.6.1/debian/rules
--- cups-pdf-2.6.1/debian/rules	2015-05-06 14:31:56.000000000 +0300
+++ cups-pdf-2.6.1/debian/rules	2016-11-16 16:27:22.000000000 +0200
@@ -2,16 +2,17 @@
 #
 # debhelper-7 [debian/rules] for cups-pdf
 #
-# COPYRIGHT © 2003-2015 Martin-Éric Racine <martin-eric.racine@iki.fi>
+# COPYRIGHT © 2003-2016 Martin-Éric Racine <martin-eric.racine@iki.fi>
 #
 # LICENSE
 # GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>
 #
+export CC       := $(shell dpkg-architecture --query DEB_HOST_GNU_TYPE)-gcc
 export CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
 export CFLAGS   := $(shell dpkg-buildflags --get CFLAGS)
 export LDFLAGS  := $(shell dpkg-buildflags --get LDFLAGS)
-# Append flags for Long File Support
-# LFS_CPPFLAGS is non-existent
+# Append flags for Long File Support (LFS)
+# LFS_CPPFLAGS does not exist
 export DEB_CFLAGS_MAINT_APPEND  +=$(shell getconf LFS_CFLAGS)
 export DEB_LDFLAGS_MAINT_APPEND +=$(shell getconf LFS_LDFLAGS)
 

Reply to: