Source: morse Version: 2.5-1 Tags: patch User: [email protected] Usertags: rebootstrap
morse fails to cross build from source, because it does not pass any cross tools to make. The easiest way of fixing that is using dh_auto_build. The morse.d directory still hard codes the build architecture pkg-config. After making it substitutable, morse cross builds successfully. Please consider applying the attached patch. Helmut
diff --minimal -Nru morse-2.5/debian/changelog morse-2.5/debian/changelog --- morse-2.5/debian/changelog 2015-06-10 21:40:20.000000000 +0200 +++ morse-2.5/debian/changelog 2018-10-17 19:16:30.000000000 +0200 @@ -1,3 +1,12 @@ +morse (2.5-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + + Let dh_auto_build supply cross tools to make. + + cross.patch: Make pkg-config substitutable. + + -- Helmut Grohne <[email protected]> Wed, 17 Oct 2018 19:16:30 +0200 + morse (2.5-1) unstable; urgency=low * New upstream release. diff --minimal -Nru morse-2.5/debian/patches/cross.patch morse-2.5/debian/patches/cross.patch --- morse-2.5/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100 +++ morse-2.5/debian/patches/cross.patch 2018-10-17 19:16:30.000000000 +0200 @@ -0,0 +1,25 @@ +--- morse-2.5.orig/morse.d/Makefile ++++ morse-2.5/morse.d/Makefile +@@ -3,16 +3,18 @@ + BEEPERS = beepLinux.c beepOSS.c beepX11.c beepALSA.c + SOURCES = alarm.c morse.c alarm.h beep.h $(BEEPERS) + ++PKG_CONFIG ?= pkg-config ++ + # The flags necessary to link with the X11 libraries. + X11LIBS = -L/usr/X11R6/lib -lX11 + + # The flags necessary to link with PulseAudio and support pthread +-PA_CFLAGS = -pthread $(shell pkg-config --cflags libpulse-simple) +-PA_LIBS = $(shell pkg-config --libs libpulse-simple) -pthread ++PA_CFLAGS = -pthread $(shell $(PKG_CONFIG) --cflags libpulse-simple) ++PA_LIBS = $(shell $(PKG_CONFIG) --libs libpulse-simple) -pthread + + # The flags necessary to link with ALSA +-ALSA_CFLAGS = $(shell pkg-config --cflags alsa) +-ALSA_LIBS = $(shell pkg-config --libs alsa) ++ALSA_CFLAGS = $(shell $(PKG_CONFIG) --cflags alsa) ++ALSA_LIBS = $(shell $(PKG_CONFIG) --libs alsa) + + # Any additional flags your favorite C compiler requires to work. + CFLAGS = -O3 -I/usr/X11R6/include $($(device)_EXTRA_CFLAGS) diff --minimal -Nru morse-2.5/debian/patches/series morse-2.5/debian/patches/series --- morse-2.5/debian/patches/series 2015-06-10 21:38:46.000000000 +0200 +++ morse-2.5/debian/patches/series 2018-10-17 19:16:30.000000000 +0200 @@ -4,3 +4,4 @@ 04fix-pa_simple_write-with-mono-output.patch 05fix_ftbfs.patch 06fix_-X_handling.patch +cross.patch diff --minimal -Nru morse-2.5/debian/rules morse-2.5/debian/rules --- morse-2.5/debian/rules 2015-06-10 21:38:46.000000000 +0200 +++ morse-2.5/debian/rules 2018-10-17 19:16:27.000000000 +0200 @@ -37,15 +37,15 @@ dh_testdir # Add here commands to compile the package. - cd qso.d && $(MAKE) - cd morse.d && $(MAKE) DEVICE=X11 - cd morse.d && $(MAKE) DEVICE=PA - cd morse.d && $(MAKE) DEVICE=OSS + dh_auto_build --sourcedirectory=qso.d + dh_auto_build --sourcedirectory=morse.d -- DEVICE=X11 + dh_auto_build --sourcedirectory=morse.d -- DEVICE=PA + dh_auto_build --sourcedirectory=morse.d -- DEVICE=OSS if dpkg-architecture -ilinux-any ; then \ - cd morse.d && $(MAKE) DEVICE=Linux ; \ + dh_auto_build --sourcedirectory=morse.d -- DEVICE=Linux ; \ fi if dpkg-architecture -ilinux-any ; then \ - cd morse.d && $(MAKE) DEVICE=ALSA ; \ + dh_auto_build --sourcedirectory=morse.d -- DEVICE=ALSA ; \ fi #docbook-to-man debian/morse.sgml > morse.1 xmlto man morse.xml

