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 <maan@tuebingen.mpg.de>
+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 <helmut@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.
#!/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