]> git.tuebingen.mpg.de Git - tfortune.git/commitdiff
Fix cross build.
authorHelmut Grohne <helmut@subdivi.de>
Wed, 1 Mar 2023 16:03:24 +0000 (17:03 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Wed, 1 Mar 2023 16:16:47 +0000 (17:16 +0100)
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>
debian/changelog
debian/rules

index b54c6410e4079f92c22822ae8fb2dabce9c47201..ef53fa165d680b3606564f176bd0f3bef23c002e 100644 (file)
@@ -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 <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.
index 03a9279753a10aa9360c8da3f7a714d9d53861f5..a360dc702b65671ab500d9cba80b5deef76ff4d9 100755 (executable)
@@ -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