• Bug#1103271: z88 FTCBFS: attempts to build for the build architecture

    From Helmut Grohne@21:1/5 to All on Tue Apr 15 22:10:01 2025
    Source: z88
    Version: 15+dfsg-1
    Tags: patch
    User: debian-cross@lists.debian.org
    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 <helmut@subdivi.de> 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+