Source: love
Version: 0.9.1-4
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

love fails to cross build from source, because it configures for the
build architecture compiler by not passing the relevant --host flag. The
simplest way to fix that is deferring it to dh_auto_configure.
Furthermore pkg-config must be prefixed with the host architecture, but
letting dpkg's buildtools.mk take care of that is easier. After doing
both, love cross builds successfully. Please consider applying the
attached patch.

Helmut
diff --minimal -Nru love-0.9.1/debian/changelog love-0.9.1/debian/changelog
--- love-0.9.1/debian/changelog 2016-08-03 22:37:52.000000000 +0200
+++ love-0.9.1/debian/changelog 2018-03-25 20:04:20.000000000 +0200
@@ -1,3 +1,10 @@
+love (0.9.1-4.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Use dh_auto_configure and buildtools.mk. (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Sun, 25 Mar 2018 20:04:20 +0200
+
 love (0.9.1-4) unstable; urgency=medium
 
   * Team upload.
diff --minimal -Nru love-0.9.1/debian/rules love-0.9.1/debian/rules
--- love-0.9.1/debian/rules     2016-08-03 22:37:52.000000000 +0200
+++ love-0.9.1/debian/rules     2018-03-25 20:04:14.000000000 +0200
@@ -5,16 +5,15 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+-include /usr/share/dpkg/buildtools.mk
+PKG_CONFIG ?= pkg-config
+
 CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
 CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
 CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS)
 LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) -Wl,-z,defs -Wl,-as-needed
 
 CONFIGURE_OPTIONS:= \
-               $(CROSS) \
-               --prefix=/usr \
-               --mandir=\$${prefix}/share/man \
-               --infodir=\$${prefix}/share/info \
                CPPFLAGS="$(CPPFLAGS)" \
                CFLAGS="$(CFLAGS)" \
                CXXFLAGS="$(CXXFLAGS)" \
@@ -27,10 +26,10 @@
        libtoolize
        dh_autoreconf
 
-       if pkg-config luajit ; then echo + Using luagit ; \
-               ./configure $(CONFIGURE_OPTIONS) --with-lua=luajit ; \
+       if $(PKG_CONFIG) luajit ; then echo + Using luagit ; \
+               dh_auto_configure -- $(CONFIGURE_OPTIONS) --with-lua=luajit ; \
        else echo + Using lua ; \
-               ./configure $(CONFIGURE_OPTIONS) --with-lua=lua ; \
+               dh_auto_configure -- $(CONFIGURE_OPTIONS) --with-lua=lua ; \
        fi
 
        cd src/scripts/ && lua auto.lua boot graphics

Reply via email to