Source: libomemo
Version: 0.7.0-1
Tags: patch
User: [email protected]
Usertags: ftcbfs

When cross building libomemo it uses the build architecture multiarch
dir, but it should be using the host architecture one. It's because it
derives it from gcc -print-multiarch. In order to fix that one needs to
use $(CC) and pass CC to make install. Please consider applying the
attached patch.

Helmut
diff --minimal -Nru libomemo-0.7.0/debian/changelog 
libomemo-0.7.0/debian/changelog
--- libomemo-0.7.0/debian/changelog     2020-12-06 13:03:46.000000000 +0100
+++ libomemo-0.7.0/debian/changelog     2022-01-10 20:49:04.000000000 +0100
@@ -1,3 +1,11 @@
+libomemo (0.7.0-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix cross-misbuild: Derive the multiarch triplet from the host CC.
+    (Closes: #-1)
+
+ -- Helmut Grohne <[email protected]>  Mon, 10 Jan 2022 20:49:04 +0100
+
 libomemo (0.7.0-1) unstable; urgency=medium
 
   [Evangelos Ribeiro Tzaras]
diff --minimal -Nru libomemo-0.7.0/debian/patches/cross.patch 
libomemo-0.7.0/debian/patches/cross.patch
--- libomemo-0.7.0/debian/patches/cross.patch   1970-01-01 01:00:00.000000000 
+0100
+++ libomemo-0.7.0/debian/patches/cross.patch   2022-01-10 20:49:03.000000000 
+0100
@@ -0,0 +1,11 @@
+--- libomemo-0.7.0.orig/Makefile
++++ libomemo-0.7.0/Makefile
+@@ -6,7 +6,7 @@
+ MKDIR = mkdir
+ MKDIR_P = mkdir -p
+ 
+-ARCH = $(shell gcc -print-multiarch)
++ARCH = $(shell $(CC) -print-multiarch)
+ VER_MAJ = 0
+ VERSION = 0.7.0
+ 
diff --minimal -Nru libomemo-0.7.0/debian/patches/series 
libomemo-0.7.0/debian/patches/series
--- libomemo-0.7.0/debian/patches/series        2020-12-06 13:03:46.000000000 
+0100
+++ libomemo-0.7.0/debian/patches/series        2022-01-10 20:48:53.000000000 
+0100
@@ -1 +1,2 @@
 0001-Makefile-Fix-possible-race-condition-in-test-targets.patch
+cross.patch
diff --minimal -Nru libomemo-0.7.0/debian/rules libomemo-0.7.0/debian/rules
--- libomemo-0.7.0/debian/rules 2020-12-06 13:03:46.000000000 +0100
+++ libomemo-0.7.0/debian/rules 2022-01-10 20:49:04.000000000 +0100
@@ -1,6 +1,8 @@
 #!/usr/bin/make -f
 
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+DPKG_EXPORT_BUILDTOOLS=1
+-include /usr/share/dpkg/buildtools.mk
 
 # version are the first two decimals
 SOVERSION := 0.7.0

Reply via email to