Bug#872691: worklog FTCBFS: uses the build architecture compiler
Source: worklog
Version: 1.8-6
Tags: patch
User: helmutg@debian.org
Usertags: rebootstrap
worklog fails to cross build from source, because it uses the build
architecture compiler. The upstream makefile bluntly hardcodes the build
architecture compiler and the packaging does not pass any cross
compilers to it either. After fixing both, worklog cross compiles
successfully. Please consider applying the attached patch.
Helmut
diff --minimal -Nru worklog-1.8/debian/changelog worklog-1.8/debian/changelog
--- worklog-1.8/debian/changelog 2012-02-18 20:11:04.000000000 +0100
+++ worklog-1.8/debian/changelog 2017-08-20 07:33:26.000000000 +0200
@@ -1,3 +1,12 @@
+worklog (1.8-6.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix FTCBFS: Closes: #-1
+ + Let dh_auto_build pass cross compilers to make.
+ + makefile_fix.patch: Honour variable CC.
+
+ -- Helmut Grohne <helmut@subdivi.de> Sun, 20 Aug 2017 07:33:26 +0200
+
worklog (1.8-6) unstable; urgency=low
* QA upload.
diff --minimal -Nru worklog-1.8/debian/patches/makefile_fix.patch worklog-1.8/debian/patches/makefile_fix.patch
--- worklog-1.8/debian/patches/makefile_fix.patch 2012-02-18 20:06:21.000000000 +0100
+++ worklog-1.8/debian/patches/makefile_fix.patch 2017-08-20 07:33:26.000000000 +0200
@@ -1,4 +1,4 @@
-Description: Fix hardcoded installation path from the Makefile
+Description: Fix hardcoded installation path and compiler from the Makefile
--- worklog-1.8.orig/Makefile
+++ worklog-1.8/Makefile
@@ -27,15 +27,15 @@
+ #gzip $(MAN)/man1/worklog.1
worklog: worklog.c Makefile
- gcc $(CFLAGS) $(USE_ENV_DIR) worklog.c $(LIBS) -o worklog
-
+- gcc $(CFLAGS) $(USE_ENV_DIR) worklog.c $(LIBS) -o worklog
++ $(CC) $(CFLAGS) $(USE_ENV_DIR) worklog.c $(LIBS) -o worklog
++
+clean:
+ rm -f worklog
-+
+
tar:
- rm -rf worklog-${VERSION}
- mkdir worklog-${VERSION}
@@ -37,3 +40,4 @@ tar:
cp worklog.lsm distr/worklog-${VERSION}.lsm
tar -clzvf distr/worklog-${VERSION}.tar.gz worklog-${VERSION}
- rm -rf worklog-${VERSION}
diff --minimal -Nru worklog-1.8/debian/rules worklog-1.8/debian/rules
--- worklog-1.8/debian/rules 2012-02-18 19:39:00.000000000 +0100
+++ worklog-1.8/debian/rules 2017-08-20 07:33:22.000000000 +0200
@@ -14,7 +14,7 @@
build-stamp: configure-stamp
dh_testdir
- $(MAKE)
+ dh_auto_build
touch build-stamp
clean:
Reply to: