Bug#871479: pnglite FTCBFS: hard codes build architecture compiler gcc in debian/rules

Helmut Grohne helmut at subdivi.de
Tue Aug 8 10:59:35 UTC 2017


Source: pnglite
Version: 0.1.17-2
Tags: patch
User: helmutg at debian.org
Usertags: rebootstrap

pnglite fails to cross build from source, because debian/rules hard
codes the build architecture compiler. Once adding the host architecture
prefix, it cross builds successfully. Please consider applying the
attached patch.

Helmut
-------------- next part --------------
diff --minimal -Nru pnglite-0.1.17/debian/changelog pnglite-0.1.17/debian/changelog
--- pnglite-0.1.17/debian/changelog	2016-04-23 18:37:45.000000000 +0200
+++ pnglite-0.1.17/debian/changelog	2017-08-08 12:57:17.000000000 +0200
@@ -1,3 +1,10 @@
+pnglite (0.1.17-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Use a triplet-prefixed compiler (Closes: #-1)
+
+ -- Helmut Grohne <helmut at subdivi.de>  Tue, 08 Aug 2017 12:57:17 +0200
+
 pnglite (0.1.17-2) unstable; urgency=low
 
   * Team upload.
diff --minimal -Nru pnglite-0.1.17/debian/rules pnglite-0.1.17/debian/rules
--- pnglite-0.1.17/debian/rules	2016-04-23 18:33:16.000000000 +0200
+++ pnglite-0.1.17/debian/rules	2017-08-08 12:57:15.000000000 +0200
@@ -1,6 +1,11 @@
 #!/usr/bin/make -f
 # -*- makefile -*-
 
+include /usr/share/dpkg/architecture.mk
+ifeq ($(origin CC),default)
+CC = $(DEB_HOST_GNU_TYPE)-gcc
+endif
+
 # Upstream doesn't use an SONAME.
 # Bump manually when the ABI changes.
 export ABI_MAJOR=0
@@ -9,7 +14,7 @@
 	dh $@
 
 override_dh_auto_build:
-	gcc -shared -fPIC -Wall $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) \
+	$(CC) -shared -fPIC -Wall $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) \
 		-Wl,--soname,libpnglite.so.$(ABI_MAJOR) \
 		-o libpnglite.so.$(ABI_MAJOR) -lz pnglite.c
 


More information about the Pkg-games-devel mailing list