From 51a5a39de6d9527e38b84744abfa330ef36ab779 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Wed, 1 Mar 2023 17:03:24 +0100 Subject: [PATCH] Fix cross build. The cross build fails to find the lopsub library since it configures for the build architecture. This happens as no --build nor --host is passed which would have happened automatically if dh_auto_configure could be used. Thus it'll have to be passed manually. Then configure fails finding config.h.in, which for some reason is not created (nor asked for) by the override_dh_autoreconf. And finally, the actual Makefile does not pick up the compiler detected by configure and rather uses plain cc, so we'll have to tell it as well. Signed-off-by: Andre Noll --- debian/changelog | 11 +++++++++++ debian/rules | 9 +++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index b54c641..ef53fa1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +tfortune (1.0.1-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + + Also ask for generating config.h.in, which otherwise goes missing in + cross builds. + + Pass --build and --host to configure as we cannot use dh_auto_configure. + + Also export cross tools for make. + + -- Helmut Grohne Tue, 28 Feb 2023 05:42:58 +0100 + tfortune (1.0.1-1) unstable; urgency=low * No changes relative to 1.0.0-2. diff --git a/debian/rules b/debian/rules index 03a9279..a360dc7 100755 --- a/debian/rules +++ b/debian/rules @@ -1,13 +1,18 @@ #!/usr/bin/make -f export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +include /usr/share/dpkg/architecture.mk +DPKG_EXPORT_BUILDTOOLS=1 +include /usr/share/dpkg/buildtools.mk + %: dh "$@" # plain dh_auto_configure uses options which configure does not understand override_dh_auto_configure: ./configure --prefix=/usr --bindir=/usr/games \ - --datadir=/usr/share/games + --datadir=/usr/share/games --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) # needed because dh_autoreconf overwrites our configure wrapper override_dh_autoreconf: - $(MAKE) configure.sh + $(MAKE) config.h.in configure.sh -- 2.39.2