Bug#928460: fatsort FTCBFS: builds for the wrong architecture

2024-04-09 Thread Alex Muntada
Control: owner -1 !
Control: tags -1 moreinfo

Hi Helmut,

it's been a while since you reported this bug, and now fatsort
uses dh instead of cdbs. In fact, I recently uploaded the latest
upstream version that also made some fixes on the Makefile.

Can you check if this bug is still valid?

Thanks!
Alex

--
  ⢀⣴⠾⠻⢶⣦⠀
  ⣾⠁⢠⠒⠀⣿⡁   Alex Muntada 
  ⢿⡄⠘⠷⠚⠋   Debian Developer  log.alexm.org
  ⠈⠳⣄



signature.asc
Description: PGP signature


Bug#928460: fatsort FTCBFS: builds for the wrong architecture

2019-05-05 Thread Helmut Grohne
Source: fatsort
Version: 1.3.365-1
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

fatsort fails to cross build from source, because the upstream Makefile
hard codes the environment variables set up by cdbs. dh_auto_build
instead passes them as override variables so fatsort's build system
consumes them. One also has to set LD. help2man slightly complicates the
picture making it necessary to build fatsort twice: Once for help2man
and once for real. The attached patch makes fatsort cross buildable.
Please consider applying it.

Helmut
diff --minimal -Nru fatsort-1.3.365/debian/changelog 
fatsort-1.3.365/debian/changelog
--- fatsort-1.3.365/debian/changelog2015-09-19 13:29:40.0 +0200
+++ fatsort-1.3.365/debian/changelog2019-05-05 09:37:13.0 +0200
@@ -1,3 +1,12 @@
+fatsort (1.3.365-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
++ Let dh_auto_build pass cross tools to make.
++ Add a native build pass for help2man.
+
+ -- Helmut Grohne   Sun, 05 May 2019 09:37:13 +0200
+
 fatsort (1.3.365-1) unstable; urgency=medium
 
   * New upstream release (Closes: #717397, #557142).
diff --minimal -Nru fatsort-1.3.365/debian/rules fatsort-1.3.365/debian/rules
--- fatsort-1.3.365/debian/rules2010-03-22 14:44:52.0 +0100
+++ fatsort-1.3.365/debian/rules2019-05-05 09:37:13.0 +0200
@@ -1,5 +1,6 @@
 #!/usr/bin/make -f
 
+include /usr/share/dpkg/architecture.mk
 include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/cdbs/1/class/makefile.mk
 
@@ -8,6 +9,17 @@
 
 DEB_INSTALL_MANPAGES_fatsort := man/fatsort.1
 
+$(cdbs_make_build_stamps):
+   # perform a native build for help2man
+   dpkg-architecture -a$(DEB_BUILD_ARCH) -f -c dh_auto_build -- LD='$$(CC)'
+ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+   dh_auto_clean --sourcedirectory=src
+   dh_auto_build --sourcedirectory=src -- LD='$$(CC)'
+   # prevent regenerating manpage
+   touch -c man/fatsort.1
+endif
+   touch $@
+
 install/fatsort::
dh_install src/fatsort /usr/bin