Source: di
Version: 6.2.2.2-1
Tags: patch
User: [email protected]
Usertags: ftcbfs

di has an odd build system. Under the hood, it uses CMake, but that is
wrapped in another layer of make. This extra layer prevents debhelper
from properly setting up a CMake cross build and therefore di always
builds for the build architecture.

I suggest skipping the wrapping and driving CMake directly. The downside
is that this has to be kept in sync with upstream changes to the
wrapping Makefile. The good side is that once using CMake directly,
debhelper automatically handles a few things correctly - including cross
builds.

I'm attaching a patch for your convenience. Note that I list locales and
examples in debian/not-installed. That is what the packaging currently
does, but I suggest that locales should be installed into the di package
and examples should be installed into the libdi-dev package.

Helmut
diff -Nru di-6.2.2.2/debian/changelog di-6.2.2.2/debian/changelog
--- di-6.2.2.2/debian/changelog 2026-01-23 17:39:45.000000000 +0100
+++ di-6.2.2.2/debian/changelog 2026-02-05 17:13:09.000000000 +0100
@@ -1,3 +1,10 @@
+di (6.2.2.2-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Use the cmake debhelper buildsystem. (Closes: #-1)
+
+ -- Helmut Grohne <[email protected]>  Thu, 05 Feb 2026 17:13:09 +0100
+
 di (6.2.2.2-1) unstable; urgency=medium
 
   * New upstream version 6.2.2.2
diff -Nru di-6.2.2.2/debian/di.install di-6.2.2.2/debian/di.install
--- di-6.2.2.2/debian/di.install        2025-02-09 15:37:32.000000000 +0100
+++ di-6.2.2.2/debian/di.install        2026-02-05 17:13:09.000000000 +0100
@@ -1,2 +1,2 @@
-build/di usr/bin
-man/di.1 usr/share/man/man1
+usr/bin/di
+usr/share/man/man1/di.1
diff -Nru di-6.2.2.2/debian/libdi-dev.install 
di-6.2.2.2/debian/libdi-dev.install
--- di-6.2.2.2/debian/libdi-dev.install 2025-03-10 21:50:35.000000000 +0100
+++ di-6.2.2.2/debian/libdi-dev.install 2026-02-05 17:13:09.000000000 +0100
@@ -1,3 +1,4 @@
-di.h usr/include
-build/di.pc usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig
-man/libdi.3 usr/share/man/man3
+usr/include/di.h
+usr/lib/*/libdi.so
+usr/lib/*/pkgconfig
+usr/share/man/man3/libdi.3
diff -Nru di-6.2.2.2/debian/libdi-dev.links di-6.2.2.2/debian/libdi-dev.links
--- di-6.2.2.2/debian/libdi-dev.links   2025-03-10 20:20:39.000000000 +0100
+++ di-6.2.2.2/debian/libdi-dev.links   1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-usr/lib//${DEB_HOST_MULTIARCH}/libdi.so.6 
usr/lib/${DEB_HOST_MULTIARCH}/libdi.so
diff -Nru di-6.2.2.2/debian/libdi6.install di-6.2.2.2/debian/libdi6.install
--- di-6.2.2.2/debian/libdi6.install    2025-03-10 21:50:31.000000000 +0100
+++ di-6.2.2.2/debian/libdi6.install    2026-02-05 17:13:09.000000000 +0100
@@ -1 +1 @@
-build/libdi*.so.* usr/lib/${DEB_HOST_MULTIARCH}/
+usr/lib/*/libdi*.so.*
diff -Nru di-6.2.2.2/debian/not-installed di-6.2.2.2/debian/not-installed
--- di-6.2.2.2/debian/not-installed     1970-01-01 01:00:00.000000000 +0100
+++ di-6.2.2.2/debian/not-installed     2026-02-05 17:13:09.000000000 +0100
@@ -0,0 +1,2 @@
+usr/share/di/examples
+usr/share/locale
diff -Nru di-6.2.2.2/debian/rules di-6.2.2.2/debian/rules
--- di-6.2.2.2/debian/rules     2026-01-23 17:39:45.000000000 +0100
+++ di-6.2.2.2/debian/rules     2026-02-05 17:13:07.000000000 +0100
@@ -10,17 +10,11 @@
 #export DH_VERBOSE=1
 
 %:
-       dh $@
+       dh $@ --buildsystem=cmake
 
 override_dh_auto_configure:
-       $(MAKE) COMP=$(CC) DESTDIR=$(CURDIR)/debian/di/usr/ PREFIX=/usr 
CMAKE_SKIP_RPATH=TRUE cmake-unix
-
-override_dh_auto_build:
-       dh_auto_build -- cmake-build
-
-override_dh_auto_install:
-
-override_dh_auto_test:
+       # Flags copied from cmake-unix target of Makefile
+       CMAKE_SKIP_RPATH=TRUE dh_auto_configure -- -DDI_BUILD:STATIC=Release 
-DDI_BUILD_SYS:STATIC=make-cmake -Werror=deprecated
 
 override_dh_auto_clean:
        dh_auto_clean

Reply via email to