Source: lua50
Version: 5.0.3-8
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

lua50 fails to cross build from source, because it uses the build
architecture toolchain. Letting dh_auto_build pass cross compilers to
make mostly fixes that except for two bare gcc invocations added in
debian/patches/build.patch. After fixing those as well, lua50 cross
builds successfully. Please consider applying the attached patch.

Helmut
diff --minimal -Nru lua50-5.0.3/debian/changelog lua50-5.0.3/debian/changelog
--- lua50-5.0.3/debian/changelog        2016-08-05 11:00:57.000000000 +0200
+++ lua50-5.0.3/debian/changelog        2017-09-16 11:46:35.000000000 +0200
@@ -1,3 +1,12 @@
+lua50 (5.0.3-8.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Let dh_auto_build pass cross compilers to make.
+    + Fix gcc invocations in build.patch.
+
+ -- Helmut Grohne <hel...@subdivi.de>  Sat, 16 Sep 2017 11:46:35 +0200
+
 lua50 (5.0.3-8) unstable; urgency=medium
 
   * Add "build-arch" and "build-indep" targets, patch by Santiago Vila
diff --minimal -Nru lua50-5.0.3/debian/control lua50-5.0.3/debian/control
--- lua50-5.0.3/debian/control  2016-08-05 11:00:57.000000000 +0200
+++ lua50-5.0.3/debian/control  2017-09-16 11:46:11.000000000 +0200
@@ -2,7 +2,7 @@
 Section: interpreters
 Priority: optional
 Maintainer: Enrico Tassi <gareuselesi...@debian.org>
-Build-Depends: debhelper (>= 5), libreadline-dev, quilt (>= 0.40)
+Build-Depends: debhelper (>= 7), libreadline-dev, quilt (>= 0.40)
 Standards-Version: 3.9.2
 Homepage: http://www.lua.org
 Vcs-Git: git://git.debian.org/git/pkg-lua/lua50.git
diff --minimal -Nru lua50-5.0.3/debian/patches/build.patch 
lua50-5.0.3/debian/patches/build.patch
--- lua50-5.0.3/debian/patches/build.patch      2016-08-05 11:00:57.000000000 
+0200
+++ lua50-5.0.3/debian/patches/build.patch      2017-09-16 11:46:35.000000000 
+0200
@@ -25,10 +25,10 @@
 -      ld -o lib/liblua.so.$V -shared src/*.o
 -      ld -o lib/liblualib.so.$V -shared src/lib/*.o
 -      cd lib; ln -fs liblua.so.$V liblua.so; ln -fs liblualib.so.$V 
liblualib.so
-+      gcc -o lib/liblua50.so.$V -shared -Wl,-soname,liblua50.so.$V \
++      $(CC) -o lib/liblua50.so.$V -shared -Wl,-soname,liblua50.so.$V \
 +               src/*.os -lc
 +      ln -fs liblua50.so.$V lib/liblua-build50.so
-+      gcc -o lib/liblualib50.so.$V -shared -Wl,-soname,liblualib50.so.$V \
++      $(CC) -o lib/liblualib50.so.$V -shared -Wl,-soname,liblualib50.so.$V \
 +               src/lib/*.os src/lib/compat-5.1r5/*.os \
 +             -Llib -llua-build50 -lm -ldl -lc
 +      cd lib; ln -fs liblua50.so.$V liblua50.so; \
diff --minimal -Nru lua50-5.0.3/debian/rules lua50-5.0.3/debian/rules
--- lua50-5.0.3/debian/rules    2016-08-05 11:00:57.000000000 +0200
+++ lua50-5.0.3/debian/rules    2017-09-16 11:46:35.000000000 +0200
@@ -20,7 +20,7 @@
        dh_testdir
 
 #      Well, this does it all.
-       $(MAKE) MYCFLAGS="$(MYCFLAGS)" all so sobin
+       dh_auto_build --buildsystem=makefile -- MYCFLAGS="$(MYCFLAGS)" all so 
sobin
 
        touch build-stamp
 

Reply via email to