Source: tfortune Version: 1.0.1-1 Tags: patch User: debian-cr...@lists.debian.org Usertags: ftcbfs
tfortune fails to cross build from source. The immediate failure is failing 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. All in all, the build system is quite arcane and requires many fiddles to make it work properly. I'm attaching a patch for your convenience and generally recommend using something more standard if possible. Helmut
diff --minimal -Nru tfortune-1.0.1/debian/changelog tfortune-1.0.1/debian/changelog --- tfortune-1.0.1/debian/changelog 2019-09-05 12:21:38.000000000 +0200 +++ tfortune-1.0.1/debian/changelog 2023-02-28 05:42:58.000000000 +0100 @@ -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 <hel...@subdivi.de> 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 --minimal -Nru tfortune-1.0.1/debian/rules tfortune-1.0.1/debian/rules --- tfortune-1.0.1/debian/rules 2019-09-05 12:21:38.000000000 +0200 +++ tfortune-1.0.1/debian/rules 2023-02-28 05:42:58.000000000 +0100 @@ -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