Source: tty-solitaire Version: 1.3.1-1 Tags: patch User: debian-cr...@lists.debian.org Usertags: ftcbfs
tty-solitaire fails to cross build from source for multiple reasons. For one thing the bare make invocation will use the build architecture compiler combined with the host architecture compiler flags and that tends to end badly. Then there is help2man, which fundamentally cannot work for cross builds. I propose doing two builds. First, a native build is performed even when a cross build is requested. Matching compiler flags are generated using --reload-all-buildenv-variables. After running help2man on the native build, the build can be redone as needed. The double build requires duplicating the ncurses dependency. I'm attaching a patch for your convenience Helmut
diff --minimal -Nru tty-solitaire-1.3.1/debian/changelog tty-solitaire-1.3.1/debian/changelog --- tty-solitaire-1.3.1/debian/changelog 2021-10-23 23:16:14.000000000 +0200 +++ tty-solitaire-1.3.1/debian/changelog 2025-04-29 09:07:45.000000000 +0200 @@ -1,3 +1,10 @@ +tty-solitaire (1.3.1-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: Build twice for help2man. (Closes: #-1) + + -- Helmut Grohne <hel...@subdivi.de> Tue, 29 Apr 2025 09:07:45 +0200 + tty-solitaire (1.3.1-1) unstable; urgency=medium * New upstream release diff --minimal -Nru tty-solitaire-1.3.1/debian/control tty-solitaire-1.3.1/debian/control --- tty-solitaire-1.3.1/debian/control 2021-09-02 22:31:59.000000000 +0200 +++ tty-solitaire-1.3.1/debian/control 2025-04-29 09:05:54.000000000 +0200 @@ -2,7 +2,7 @@ Section: games Priority: optional Maintainer: Sven Wick <sven.w...@gmx.de> -Build-Depends: debhelper-compat (= 13), help2man, libncurses-dev +Build-Depends: debhelper-compat (= 13), help2man, libncurses-dev, libncurses-dev:native Standards-Version: 4.6.0 Rules-Requires-Root: no Homepage: https://github.com/mpereira/tty-solitaire diff --minimal -Nru tty-solitaire-1.3.1/debian/rules tty-solitaire-1.3.1/debian/rules --- tty-solitaire-1.3.1/debian/rules 2021-10-23 23:16:14.000000000 +0200 +++ tty-solitaire-1.3.1/debian/rules 2025-04-29 09:07:41.000000000 +0200 @@ -6,11 +6,17 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-format +include /usr/share/dpkg/architecture.mk + override_dh_auto_install: override_dh_auto_build: - make + dpkg-architecture -a$(DEB_BUILD_ARCH) -f -c dh_auto_build --reload-all-buildenv-variables help2man -n "ncurses-based klondike solitaire game" -N -S TTY-SOLITAIRE -o $(CURDIR)/ttysolitaire.1 $(CURDIR)/ttysolitaire +ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)) + make clean + dh_auto_build +endif %: dh $@