Source: colorcode
Version: 0.8.7-1
Tags: patch
User: debian-cr...@lists.debian.org
Usertags: ftcbfs

colorcode fails to cross build from source, because debian/rules does
not pass any cross flags to cmake. The easiest way of doing so - using
dh_auto_configure - makes colorcode cross buildable. I'm attaching a
patch and couldn't resist further simplifying debian/rules to also
support parallel building. I hope these changes are fine to apply still.
I can produce a more minimal version if needed.

Helmut
diff --minimal -Nru colorcode-0.8.7/debian/changelog 
colorcode-0.8.7/debian/changelog
--- colorcode-0.8.7/debian/changelog    2023-11-24 10:06:24.000000000 +0100
+++ colorcode-0.8.7/debian/changelog    2024-02-07 09:36:55.000000000 +0100
@@ -1,3 +1,10 @@
+colorcode (0.8.7-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Let dh_auto_configure pass cross tools to cmake. (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Wed, 07 Feb 2024 09:36:55 +0100
+
 colorcode (0.8.7-1) unstable; urgency=low
 
   * New upstream version with port to Qt6.
diff --minimal -Nru colorcode-0.8.7/debian/rules colorcode-0.8.7/debian/rules
--- colorcode-0.8.7/debian/rules        2023-11-24 10:06:24.000000000 +0100
+++ colorcode-0.8.7/debian/rules        2024-02-07 09:36:55.000000000 +0100
@@ -12,32 +12,23 @@
 DPKG_EXPORT_BUILDFLAGS = 1
 include /usr/share/dpkg/buildflags.mk
 
-ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
-       NUMJOBS = $(patsubst parallel=%,%,$(filter 
parallel=%,$(DEB_BUILD_OPTIONS)))
-       MAKEFLAGS += -j$(NUMJOBS)
-endif
-
 $(info "---------------------------------------")
-$(info NUMJOBS: $(NUMJOBS))
 $(info MAKEFLAGS: $(MAKEFLAGS))
 $(info DEB_BUILD_OPTIONS: $(DEB_BUILD_OPTIONS))
 $(info "---------------------------------------")
 
 
 %:
-       dh $@ --build-system=cmake
+       dh $@ --build-system=cmake --builddirectory=debian/build
 
 
 override_dh_clean:
-       rm -rf debian/build
        rm -rf debian/tmp
        dh_clean
 
 override_dh_auto_configure:
-       mkdir -p debian/build
        mkdir -p debian/tmp
-       cd debian/build && cmake -DCMAKE_BUILD_TYPE=Release 
-DCMAKE_INSTALL_PREFIX=/usr ../../src
-
-override_dh_auto_build:
-       cd debian/build && make
+       dh_auto_configure --sourcedirectory=src -- \
+               -DCMAKE_BUILD_TYPE=Release
 
+override_dh_auto_install:

Reply via email to