Source: glewmx
Version: 1.13.0-3
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

glewmx fails to cross build from source for a number of reasons:

 * Build-Depends: binutils is unsatisfiable, because it conflicts with
   the build architecture binutils requested by build-essential. The
   dependency can be dropped as the version constraint is satisfied in
   wheezy.
 * It uses the build architecture toolchain. Let dh_auto_build pass
   cross compilers.
 * It still uses the build architecture compiler via the LD variable and
   it misdetects the host features as the SYSTEM variable is discovered
   for the build architecture.

After fixing all of the above, glewmx cross builds successfully. Please
consider applying the attached patch.

Helmut
diff --minimal -Nru glewmx-1.13.0/debian/changelog 
glewmx-1.13.0/debian/changelog
--- glewmx-1.13.0/debian/changelog      2016-09-16 07:34:13.000000000 +0200
+++ glewmx-1.13.0/debian/changelog      2017-08-24 22:15:39.000000000 +0200
@@ -1,3 +1,13 @@
+glewmx (1.13.0-3.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Drop binutils build dependency satisfied in wheezy.
+    + Let dh_auto_build pass cross compilers to make.
+    + Pass the correct LD and SYSTEM to make.
+
+ -- Helmut Grohne <hel...@subdivi.de>  Thu, 24 Aug 2017 22:15:39 +0200
+
 glewmx (1.13.0-3) unstable; urgency=medium
 
   * New maintainer
diff --minimal -Nru glewmx-1.13.0/debian/control glewmx-1.13.0/debian/control
--- glewmx-1.13.0/debian/control        2016-09-16 07:34:13.000000000 +0200
+++ glewmx-1.13.0/debian/control        2017-08-24 22:15:37.000000000 +0200
@@ -2,8 +2,7 @@
 Priority: optional
 Section: libs
 Maintainer: Paul Wise <p...@debian.org>
-Build-Depends: binutils (>> 2.18),
-               debhelper (>= 9),
+Build-Depends: debhelper (>= 9),
                docbook-to-man,
                libgl1-mesa-dev | libgl-dev,
                libglu1-mesa-dev | libglu-dev,
diff --minimal -Nru glewmx-1.13.0/debian/rules glewmx-1.13.0/debian/rules
--- glewmx-1.13.0/debian/rules  2016-09-16 07:34:13.000000000 +0200
+++ glewmx-1.13.0/debian/rules  2017-08-24 22:15:39.000000000 +0200
@@ -18,7 +18,7 @@
        INSTALL_PROGRAM += -s
 endif
 
-DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+include /usr/share/dpkg/architecture.mk
 
 configure: configure-stamp
 configure-stamp:
@@ -32,7 +32,7 @@
        dh_testdir
        dh_testroot
        dh_prep
-       $(MAKE) glew.lib.mx STRIP= POPT="-g $(POPT)" WARN=-Wall GL_LDFLAGS=-lGL 
GLU_LDFLAGS=-lGLU GLUT_LDFLAGS=-lglut LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)
+       dh_auto_build -- glew.lib.mx STRIP= POPT="-g $(POPT)" WARN=-Wall 
GL_LDFLAGS=-lGL GLU_LDFLAGS=-lGLU GLUT_LDFLAGS=-lglut 
LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH) 'LD=$$(CC)' SYSTEM=$(firstword $(subst -, 
,$(DEB_HOST_GNU_SYSTEM)))
        touch build-stamp
        dh_installdirs
        $(MAKE) install.mx GLEW_DEST=$(CURDIR)/debian/tmp/usr 
LIBDIR=$(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)

Reply via email to