Source: xwit
Version: 3.4-16
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

xwit fails to cross build from source, because it uses the build
architecture compiler. debian/rules doesn't pass cross tools to make and
the upstream Makefile hard codes plain "gcc". The attached patch fixes
both. Please consider applying it.

Helmut
diff --minimal -Nru xwit-3.4/debian/changelog xwit-3.4/debian/changelog
--- xwit-3.4/debian/changelog   2019-01-27 20:40:53.000000000 +0100
+++ xwit-3.4/debian/changelog   2019-04-30 05:49:43.000000000 +0200
@@ -1,3 +1,12 @@
+xwit (3.4-16.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Let dh_auto_build pass cross tools to make.
+    + cross.patch: Make compiler substitutable.
+
+ -- Helmut Grohne <hel...@subdivi.de>  Tue, 30 Apr 2019 05:49:43 +0200
+
 xwit (3.4-16) unstable; urgency=medium
 
   * update Debian packaging
diff --minimal -Nru xwit-3.4/debian/patches/cross.patch 
xwit-3.4/debian/patches/cross.patch
--- xwit-3.4/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100
+++ xwit-3.4/debian/patches/cross.patch 2019-04-30 05:49:43.000000000 +0200
@@ -0,0 +1,15 @@
+--- xwit-3.4.orig/Makefile
++++ xwit-3.4/Makefile
+@@ -5,10 +5,10 @@
+ all: xwit
+ 
+ xwit: xwit.o ClientWin.o dsimple.o
+-      gcc $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBRARIES)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBRARIES)
+ 
+ %.o: %.c
+-      gcc $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
++      $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
+ 
+ # Headers needed
+ dsimple.o: dsimple.h
diff --minimal -Nru xwit-3.4/debian/patches/series 
xwit-3.4/debian/patches/series
--- xwit-3.4/debian/patches/series      2019-01-27 20:40:53.000000000 +0100
+++ xwit-3.4/debian/patches/series      2019-04-30 05:49:30.000000000 +0200
@@ -13,3 +13,4 @@
 0013-Incorrect-example-on-man-page.patch
 0014-xwit-use-_NET_ACTIVE_WINDOW-to-implement-focus.patch
 0015-fix-as-needed-linking.patch
+cross.patch
diff --minimal -Nru xwit-3.4/debian/rules xwit-3.4/debian/rules
--- xwit-3.4/debian/rules       2019-01-27 20:40:53.000000000 +0100
+++ xwit-3.4/debian/rules       2019-04-30 05:49:10.000000000 +0200
@@ -20,7 +20,7 @@
 
 build-arch-stamp:
        dh_testdir
-       $(MAKE) CFLAGS='$(CFLAGS)' CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)'
+       dh_auto_build -- CFLAGS='$(CFLAGS)' CPPFLAGS='$(CPPFLAGS)' 
LDFLAGS='$(LDFLAGS)'
        touch build-arch-stamp
 
 clean:

Reply via email to