Source: xcolors Version: 1.5a-10.1 Tags: patch User: debian-cr...@lists.debian.org Usertags: ftcbfs
xcolors fails to cross build from source, because it uses xmkmf and that is architecturally incompatible with cross compilation. Rather than bolting on a new build system, I suggest embedding the few build steps into debian/rules and calling it a day. Doing so also causes the CFLAGS to be taken into account for real. I'm attaching a patch for your convenience. Helmut
diff --minimal -Nru xcolors-1.5a/debian/changelog xcolors-1.5a/debian/changelog --- xcolors-1.5a/debian/changelog 2024-12-31 12:29:06.000000000 +0100 +++ xcolors-1.5a/debian/changelog 2025-02-27 10:20:13.000000000 +0100 @@ -1,3 +1,10 @@ +xcolors (1.5a-10.2) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: Stop using xmkmf. (Closes: #-1) + + -- Helmut Grohne <hel...@subdivi.de> Thu, 27 Feb 2025 10:20:13 +0100 + xcolors (1.5a-10.1) unstable; urgency=medium * Non-maintainer upload. diff --minimal -Nru xcolors-1.5a/debian/clean xcolors-1.5a/debian/clean --- xcolors-1.5a/debian/clean 1970-01-01 01:00:00.000000000 +0100 +++ xcolors-1.5a/debian/clean 2025-02-27 10:19:28.000000000 +0100 @@ -0,0 +1 @@ +xcolors diff --minimal -Nru xcolors-1.5a/debian/rules xcolors-1.5a/debian/rules --- xcolors-1.5a/debian/rules 2024-12-31 12:29:00.000000000 +0100 +++ xcolors-1.5a/debian/rules 2025-02-27 10:20:13.000000000 +0100 @@ -14,29 +14,25 @@ # are obsolete. -CFLAGS = -g -O2 -DRGB_TXT="\\\"/etc/X11/rgb.txt\\\"" -LDFLAGS = -s -STRIP=strip -CC = gcc +DEB_CFLAGS_APPEND = -g -O2 -DRGB_TXT="\\\"/etc/X11/rgb.txt\\\"" +DEB_LDFLAGS_APPEND = -s package=xcolors DPKG_EXPORT_BUILDFLAGS=1 include /usr/share/dpkg/buildflags.mk +include /usr/share/dpkg/buildtools.mk build: build-arch build-indep build-arch: build-stamp build-indep: build-stamp build-stamp: $(checkdir) - xmkmf - make CC="$(CC)" CFLAGS="$(CFLAGS)" EXTRA_LDOPTIONS="$(LDFLAGS)" + $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) xcolors.c -lX11 -lXaw -lXt -lm -o xcolors touch build-stamp clean: $(checkdir) - if test -f Makefile; then make clean; fi - rm -f build Makefile.bak Makefile rm -rf *~ debian/xcolors debian/*~ debian/files* dh_clean @@ -49,9 +45,9 @@ binary-arch: build $(checkdir) -rm -rf debian/tmp - test -f build || make -f debian/rules build - make install install.man DESTDIR=debian/xcolors - mv debian/xcolors/usr/share/man/man1/xcolors.1x debian/xcolors/usr/share/man/man1/xcolors.1 + install -D -m755 xcolors debian/usr/bin/xcolors + install -D -m644 xcolors.man debian/xcolors/usr/share/man/man1/xcolors.1 + install -D -m644 Xcolors.ad debian/xcolors/etc/X11/app-defaults/Xcolors dh_installdocs dh_installchangelogs dh_installmenu