Source: z88 Version: 15+dfsg-1 Tags: patch User: [email protected] Usertags: ftcbfs
z88 fails to cross build from source, because it attempts to build for the build architecture instead. debian/rules makes no attempt to pass cross tools to make. Using dh_auto_build is a simple way to enable such passing. Even when doing so, the upstream build system hard codes the build architecture pkg-config. I'm attaching a patch to fix both aspects. Please consider applying it. Helmut
diff --minimal -Nru z88-15+dfsg/debian/changelog z88-15+dfsg/debian/changelog --- z88-15+dfsg/debian/changelog 2024-12-05 22:57:47.000000000 +0100 +++ z88-15+dfsg/debian/changelog 2025-04-14 22:16:34.000000000 +0200 @@ -1,3 +1,10 @@ +z88 (15+dfsg-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: Use host tools. (Closes: #-1) + + -- Helmut Grohne <[email protected]> Mon, 14 Apr 2025 22:16:34 +0200 + z88 (15+dfsg-1) unstable; urgency=medium * Team upload diff --minimal -Nru z88-15+dfsg/debian/patches/cross.patch z88-15+dfsg/debian/patches/cross.patch --- z88-15+dfsg/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100 +++ z88-15+dfsg/debian/patches/cross.patch 2025-04-14 22:16:06.000000000 +0200 @@ -0,0 +1,29 @@ +--- z88-15+dfsg.orig/make/make_unix_64/z88com.mk.gcc64 ++++ z88-15+dfsg/make/make_unix_64/z88com.mk.gcc64 +@@ -10,8 +10,9 @@ + DIROUT = $(DIRECA)/bin/unix64 + + CC = gcc ++PKG_CONFIG = pkg-config + CFLAGS = -I$(DIRCOM) -DFR_UNIX -DFR_XDOUB -DFR_XLONG -DFR_LINUX -O2 \ +- `pkg-config --cflags --libs gtk+-2.0` ++ `$(PKG_CONFIG) --cflags --libs gtk+-2.0` + + OBJECTSC = z88com.o cb88c.o ale88c.o lan88c.o wlog88c.o rcol88c.o + +--- z88-15+dfsg.orig/make/make_unix_64/z88o.mk.gcc64 ++++ z88-15+dfsg/make/make_unix_64/z88o.mk.gcc64 +@@ -10,11 +10,12 @@ + DIROUT = $(DIRECA)/bin/unix64 + + CC = gcc ++PKG_CONFIG = pkg-config + + CFLAGS = -I$(DIRCOM) -I$(DIRUNI) -O2 -fomit-frame-pointer \ + -DFR_UNIX -DFR_LINUX -DFR_XDOUB -DFR_XLONG -DFR_LINUX \ + -lm -Wl,--copy-dt-needed-entries \ +- `pkg-config --cflags --libs gtk+-2.0` -lGL ++ `$(PKG_CONFIG) --cflags --libs gtk+-2.0` -lGL + + OBJECTSO = z88o.o cb88o.o lan88o.o dyn88o.o wlog88o.o ale88o.o rcoo88.o \ + m9.o m10.o m12.o m15.o oc88.o m16.o man88o.o gdkgl.o gtkglarea.o fr_gltext3d.o diff --minimal -Nru z88-15+dfsg/debian/patches/series z88-15+dfsg/debian/patches/series --- z88-15+dfsg/debian/patches/series 2024-12-05 22:57:47.000000000 +0100 +++ z88-15+dfsg/debian/patches/series 2025-04-14 22:15:12.000000000 +0200 @@ -2,3 +2,4 @@ 20_missing_include.patch 50_all_changes.patch 60_fix_spelling_errors.patch +cross.patch diff --minimal -Nru z88-15+dfsg/debian/rules z88-15+dfsg/debian/rules --- z88-15+dfsg/debian/rules 2024-12-05 22:57:47.000000000 +0100 +++ z88-15+dfsg/debian/rules 2025-04-14 22:16:31.000000000 +0200 @@ -6,9 +6,9 @@ dh $@ --buildsystem=none override_dh_auto_build-arch: - $(MAKE) -f make/make_unix_64/z88com.mk.gcc64 DIRECA=$(CURDIR) - $(MAKE) -f make/make_unix_64/z88g.mk.gcc64 DIRECA=$(CURDIR) - $(MAKE) -f make/make_unix_64/z88h.mk.gcc64 DIRECA=$(CURDIR) - $(MAKE) -f make/make_unix_64/z88n.mk.gcc64 DIRECA=$(CURDIR) - $(MAKE) -f make/make_unix_64/z88o.mk.gcc64 DIRECA=$(CURDIR) - $(MAKE) -f make/make_unix_64/z88x.mk.gcc64 DIRECA=$(CURDIR) + dh_auto_build --buildsystem=makefile -- -f make/make_unix_64/z88com.mk.gcc64 DIRECA=$(CURDIR) + dh_auto_build --buildsystem=makefile -- -f make/make_unix_64/z88g.mk.gcc64 DIRECA=$(CURDIR) + dh_auto_build --buildsystem=makefile -- -f make/make_unix_64/z88h.mk.gcc64 DIRECA=$(CURDIR) + dh_auto_build --buildsystem=makefile -- -f make/make_unix_64/z88n.mk.gcc64 DIRECA=$(CURDIR) + dh_auto_build --buildsystem=makefile -- -f make/make_unix_64/z88o.mk.gcc64 DIRECA=$(CURDIR) + dh_auto_build --buildsystem=makefile -- -f make/make_unix_64/z88x.mk.gcc64 DIRECA=$(CURDIR)

