Source: libsoil
Version: 1.07~20080707.dfsg-4
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

libsoil fails to cross build from source, because it does not pass cross
tools to make. Using dh_auto_build is the easiest way to fix that. Still
the alternate makefile hard codes gcc in one places. The attached patch
fixes both and makes libsoil cross build successfully. Please consider
applying it.

Helmut
diff --minimal -Nru libsoil-1.07~20080707.dfsg/debian/changelog 
libsoil-1.07~20080707.dfsg/debian/changelog
--- libsoil-1.07~20080707.dfsg/debian/changelog 2017-11-09 22:12:08.000000000 
+0100
+++ libsoil-1.07~20080707.dfsg/debian/changelog 2018-06-10 20:06:07.000000000 
+0200
@@ -1,3 +1,12 @@
+libsoil (1.07~20080707.dfsg-4.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Let dh_auto_build pass cross tools to make.
+    + cross.patch: make gcc substitutable
+
+ -- Helmut Grohne <hel...@subdivi.de>  Sun, 10 Jun 2018 20:06:07 +0200
+
 libsoil (1.07~20080707.dfsg-4) unstable; urgency=medium
 
   * Add dependency from -dev to library package (Closes: #881071)
diff --minimal -Nru libsoil-1.07~20080707.dfsg/debian/patches/cross.patch 
libsoil-1.07~20080707.dfsg/debian/patches/cross.patch
--- libsoil-1.07~20080707.dfsg/debian/patches/cross.patch       1970-01-01 
01:00:00.000000000 +0100
+++ libsoil-1.07~20080707.dfsg/debian/patches/cross.patch       2018-06-10 
20:06:07.000000000 +0200
@@ -0,0 +1,11 @@
+--- libsoil-1.07~20080707.dfsg.orig/projects/makefile/alternate Makefile.txt   
++++ libsoil-1.07~20080707.dfsg/projects/makefile/alternate Makefile.txt        
+@@ -29,7 +29,7 @@
+       # create static library
+       # ar -cvq $(LIBNAME).a $(OFILES)
+       # create shared library
+-      gcc -shared -Wl,-soname,$(LIBNAME).so.$(MAJOR) -o 
$(LIBNAME).so.$(VERSION) $(OFILES) -lGL -lm
++      $(CC) -shared -Wl,-soname,$(LIBNAME).so.$(MAJOR) -o 
$(LIBNAME).so.$(VERSION) $(OFILES) -lGL -lm
+ 
+ install:
+       $(INSTALL_DIR) $(DESTDIR)/$(INCLUDEDIR)
diff --minimal -Nru libsoil-1.07~20080707.dfsg/debian/patches/series 
libsoil-1.07~20080707.dfsg/debian/patches/series
--- libsoil-1.07~20080707.dfsg/debian/patches/series    2017-11-09 
22:04:17.000000000 +0100
+++ libsoil-1.07~20080707.dfsg/debian/patches/series    2018-06-10 
20:06:07.000000000 +0200
@@ -1 +1,2 @@
 linking_correctly.patch
+cross.patch
diff --minimal -Nru libsoil-1.07~20080707.dfsg/debian/rules 
libsoil-1.07~20080707.dfsg/debian/rules
--- libsoil-1.07~20080707.dfsg/debian/rules     2017-11-09 22:04:17.000000000 
+0100
+++ libsoil-1.07~20080707.dfsg/debian/rules     2018-06-10 20:06:04.000000000 
+0200
@@ -1,17 +1,16 @@
 #!/usr/bin/make -f
 
 %:
-       dh $@
+       dh $@ --sourcedirectory=src --buildsystem=makefile
 
 override_dh_auto_build:
-       cd src && $(MAKE) -f ../projects/makefile/alternate\ Makefile.txt
-
+       dh_auto_build -- -f ../projects/makefile/alternate\ Makefile.txt
 
 override_dh_auto_clean:
-       cd src && $(MAKE) -f ../projects/makefile/alternate\ Makefile.txt clean
+       dh_auto_clean -- -f ../projects/makefile/alternate\ Makefile.txt
 
 override_dh_auto_install:
-       cd src && $(MAKE) -f ../projects/makefile/alternate\ Makefile.txt 
DESTDIR=$(CURDIR)/debian/tmp install
+       dh_auto_install -- -f ../projects/makefile/alternate\ Makefile.txt 
DESTDIR=$(CURDIR)/debian/tmp
 
 override_dh_strip:
        dh_strip --dbgsym-migration='libsoil1-dbg (<< 1.07~20080707.dfsg-2~)'

Reply via email to