Source: imvirt Version: 0.9.6-11 Tags: patch User: debian-cr...@lists.debian.org Usertags: ftcbfs
imvirt fails to cross build from source, because it confuses build and host in a number of occasions: * configure is run without the --host parameter thus defaulting to build. * debian/rules matches on host rather than build. * configure examines uname, which is host, while it should be examining host_alias and things derived from that. I'm attaching a patch fixing all of that. Consider applying it. Helmut
diff --minimal -Nru imvirt-0.9.6/debian/changelog imvirt-0.9.6/debian/changelog --- imvirt-0.9.6/debian/changelog 2023-01-12 11:08:10.000000000 +0100 +++ imvirt-0.9.6/debian/changelog 2023-12-07 12:43:12.000000000 +0100 @@ -1,3 +1,10 @@ +imvirt (0.9.6-11.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: Fix host versus build confusions. (Closes: #-1) + + -- Helmut Grohne <hel...@subdivi.de> Thu, 07 Dec 2023 12:43:12 +0100 + imvirt (0.9.6-11) unstable; urgency=medium * Adjust debian/watch to work again with GitHub. diff --minimal -Nru imvirt-0.9.6/debian/patches/cross.patch imvirt-0.9.6/debian/patches/cross.patch --- imvirt-0.9.6/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100 +++ imvirt-0.9.6/debian/patches/cross.patch 2023-12-07 11:06:55.000000000 +0100 @@ -0,0 +1,19 @@ +--- imvirt-0.9.6.orig/configure.in ++++ imvirt-0.9.6/configure.in +@@ -6,6 +6,7 @@ + AC_PREREQ(2.61) + AC_INIT(imvirt, 0.9.6, li...@ibh.de) + AM_INIT_AUTOMAKE ++AC_CANONICAL_HOST + AC_CONFIG_SRCDIR([helper/detect.c]) + AC_CONFIG_HEADER([helper/config.h]) + +@@ -30,7 +31,7 @@ + + # Check architecture + AC_MSG_CHECKING(x86 platform) +-case `uname -m` in ++case $host_cpu in + x86_64) x86arch=true ;; + i686) x86arch=true ;; + *) x86arch=false ;; diff --minimal -Nru imvirt-0.9.6/debian/patches/series imvirt-0.9.6/debian/patches/series --- imvirt-0.9.6/debian/patches/series 2023-01-12 11:08:10.000000000 +0100 +++ imvirt-0.9.6/debian/patches/series 2023-12-07 11:02:59.000000000 +0100 @@ -1,3 +1,4 @@ 01-spelling-error.diff 02-broken-sort.diff 03-escaped-quotes.diff +cross.patch diff --minimal -Nru imvirt-0.9.6/debian/rules imvirt-0.9.6/debian/rules --- imvirt-0.9.6/debian/rules 2023-01-12 11:08:10.000000000 +0100 +++ imvirt-0.9.6/debian/rules 2023-12-07 12:30:48.000000000 +0100 @@ -5,18 +5,15 @@ %: dh $@ -override_dh_auto_configure: - ./configure --prefix=/usr --libexec=/usr/lib - override_dh_auto_test: override_dh_install: dh_install -ifneq (,$(findstring linux,$(DEB_BUILD_ARCH_OS))) -ifneq (,$(findstring i386,$(DEB_BUILD_ARCH))) +ifneq (,$(findstring linux,$(DEB_HOST_ARCH_OS))) +ifneq (,$(findstring i386,$(DEB_HOST_ARCH))) dh_install -pimvirt-helper "debian/tmp/usr/lib/imvirt/" "usr/lib/" endif -ifneq (,$(findstring amd64,$(DEB_BUILD_ARCH))) +ifneq (,$(findstring amd64,$(DEB_HOST_ARCH))) dh_install -pimvirt-helper "debian/tmp/usr/lib/imvirt/" "usr/lib/" endif endif