Source: trace-cmd
Version: 2.8.3-2
Tags: patch
User: debian-cr...@lists.debian.org
Usertags: ftcbfs

trace-cmd fails to cross build from source, because it uses build
architecture build tool. The all target honours cross tools, so there
using dh_auto_build helps. The gui target is a thin wrapper around a
cmake project for kernelshark. Here we need to pass cross stuff to
cmake. Rather than moving those flags through the makefile, we can run
cmake before make gui and let dh_auto_configure solve that. This is
enough to make trace-cmd cross buildable. Please consider applying the
attached patch.

Helmut
diff --minimal -Nru trace-cmd-2.8.3/debian/changelog 
trace-cmd-2.8.3/debian/changelog
--- trace-cmd-2.8.3/debian/changelog    2019-12-04 22:32:41.000000000 +0100
+++ trace-cmd-2.8.3/debian/changelog    2019-12-06 17:25:30.000000000 +0100
@@ -1,3 +1,13 @@
+trace-cmd (2.8.3-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Let dh_auto_build pass cross tools to make all.
+    + Let dh_auto_configure pass cross tools to the cmake invocation
+      normally performed by make gui.
+
+ -- Helmut Grohne <hel...@subdivi.de>  Fri, 06 Dec 2019 17:25:30 +0100
+
 trace-cmd (2.8.3-2) unstable; urgency=medium
 
   * build should be verbose by default (Closes: #946067)
diff --minimal -Nru trace-cmd-2.8.3/debian/rules trace-cmd-2.8.3/debian/rules
--- trace-cmd-2.8.3/debian/rules        2019-12-04 21:54:12.000000000 +0100
+++ trace-cmd-2.8.3/debian/rules        2019-12-06 17:25:30.000000000 +0100
@@ -10,7 +10,9 @@
 override_dh_auto_clean:
        $(MAKE) clean doc_clean $(OPTS)
 override_dh_auto_build:
-       $(MAKE) all $(OPTS)
+       dh_auto_build -- all $(OPTS)
+       # Run cmake in the way the Makefile would do it, but append our flags.
+       dh_auto_configure --sourcedirectory=kernel-shark 
--builddirectory=kernel-shark/build -- -D_INSTALL_PREFIX=/usr
        $(MAKE) gui $(OPTS)
        $(MAKE) doc $(OPTS)
 override_dh_auto_install:

Reply via email to