Source: stfl Version: 0.22-2 Tags: patch User: debian-cr...@lists.debian.org Usertags: ftcbfs
stfl fails to cross build from source for multiple reasons. It builds the main library without passing any cross tools to make thus performing a native build. One cannot use dh_auto_build here, because it would override CC and stfl stuffs the -pthread flag into the CC variable. Thus the attached patch manually constructs a suitable CC variable. It then attempts to build the perl extension for the build architecture. The simple way of fixing that is using dh_auto_configure. Note that building a perl extension now requires a build dependency on perl-xs-dev. With those fixes applied, it fails building the ruby extension. Doing so needs more work on the ruby/gem2deb side, so the attached patch only fixes the former problems. Please consider applying it and close this bug when doing so. Helmut
diff --minimal -Nru stfl-0.22/debian/changelog stfl-0.22/debian/changelog --- stfl-0.22/debian/changelog 2019-09-29 21:46:30.000000000 +0200 +++ stfl-0.22/debian/changelog 2020-11-05 20:49:57.000000000 +0100 @@ -1,3 +1,12 @@ +stfl (0.22-3) UNRELEASED; urgency=medium + + * Improve cross building. (Closes: #-1) + + Pass a CC initialized from dpkg's buildtools.mk to make. + + Let dh_auto_configure pass cross variables to perl. + + Missing build dependency on perl-xs-dev for building perl extensions. + + -- Helmut Grohne <hel...@subdivi.de> Thu, 05 Nov 2020 20:49:57 +0100 + stfl (0.22-2) unstable; urgency=medium * QA upload. diff --minimal -Nru stfl-0.22/debian/control stfl-0.22/debian/control --- stfl-0.22/debian/control 2019-09-29 21:45:01.000000000 +0200 +++ stfl-0.22/debian/control 2020-11-05 20:49:57.000000000 +0100 @@ -1,7 +1,7 @@ Source: stfl Priority: optional Maintainer: Debian QA Group <packa...@qa.debian.org> -Build-Depends: debhelper (>= 7), libncursesw5-dev, swig, gem2deb +Build-Depends: debhelper (>= 7), libncursesw5-dev, swig, perl-xs-dev, gem2deb Standards-Version: 3.9.2 Section: libdevel XS-Ruby-Versions: all diff --minimal -Nru stfl-0.22/debian/rules stfl-0.22/debian/rules --- stfl-0.22/debian/rules 2019-09-29 21:40:05.000000000 +0200 +++ stfl-0.22/debian/rules 2020-11-05 20:49:57.000000000 +0100 @@ -1,6 +1,8 @@ #!/usr/bin/make -f #export DH_VERBOSE=1 +-include /usr/share/dpkg/buildtools.mk + MAKE_DESTDIR := $(CURDIR)/debian/tmp MAKE_FOUND_INTERPR := FOUND_PERL5=0 FOUND_SWIG=1 FOUND_SPL=0 FOUND_RUBY=0 FOUND_PYTHON=0 MAKE_INSTALL_TARGET := DESTDIR=$(MAKE_DESTDIR) prefix=/usr @@ -11,10 +13,11 @@ build-stamp: dh_testdir - $(MAKE) $(MAKE_FOUND_INTERPR) + $(MAKE) $(MAKE_FOUND_INTERPR) CC='$(CC) -pthread' # perl test ! -f perl5/Makefile || $(MAKE) -C perl5 clean - cd perl5 && swig -perl5 stfl.i && perl Makefile.PL INSTALLDIRS=vendor + cd perl5 && swig -perl5 stfl.i + dh_auto_configure --sourcedirectory=perl5 -- INSTALLDIRS=vendor $(MAKE) -C perl5 # ruby dh_ruby --build