Bug#1003144: obexftp FTCBFS: multiple reasons
Source: obexftp
Version: 0.24-6
Tags: patch
User: debian-cross@lists.debian.org
Usertags: ftcbfs
obexftp fails to cross build from source. Most of the reasons come down
to language bindings. In order to make the problem manageable, I propose
adding support for the noperl and noruby build profiles. Those profiles
allow easy disabling of those language bindings. That's really needed
for ruby as the ruby packaging itself does not yet support cross
building in a sane way. So all we can support right now is cross
building with the noruby profile. For perl, exporting a PERL5LIB
pointing to the cross configs makes it work. Please consider applying
the attached patch.
Helmut
diff --minimal -Nru obexftp-0.24/debian/changelog obexftp-0.24/debian/changelog
--- obexftp-0.24/debian/changelog 2019-08-21 19:51:26.000000000 +0200
+++ obexftp-0.24/debian/changelog 2022-01-03 07:24:35.000000000 +0100
@@ -1,3 +1,13 @@
+obexftp (0.24-7) UNRELEASED; urgency=medium
+
+ * QA upload.
+ * Support build profiles noperl and noruby.
+ * Make obexftp cross build with just noruby:
+ + Add missing build dependency on perl-xs-dev.
+ + Export a PERL5LIB containing the cross config.
+
+ -- Helmut Grohne <helmut@subdivi.de> Mon, 03 Jan 2022 07:24:35 +0100
+
obexftp (0.24-6) unstable; urgency=medium
* QA upload.
diff --minimal -Nru obexftp-0.24/debian/control obexftp-0.24/debian/control
--- obexftp-0.24/debian/control 2019-08-21 19:51:17.000000000 +0200
+++ obexftp-0.24/debian/control 2022-01-03 07:24:35.000000000 +0100
@@ -7,11 +7,12 @@
cmake,
debhelper (>= 9),
doxygen,
- gem2deb,
+ gem2deb <!noruby>,
libbluetooth-dev,
libopenobex2-dev,
+ perl-xs-dev <!noperl>,
pkg-config,
- swig,
+ swig <!noperl> <!noruby>,
Standards-Version: 3.9.7
Homepage: http://triq.net/obex
Vcs-Git: https://anonscm.debian.org/git/collab-maint/obexftp.git
@@ -140,6 +141,7 @@
Package: ruby-obexftp
Architecture: any
Section: ruby
+Build-Profiles: <!noruby>
Depends:
libobexftp0 (= ${binary:Version}),
${misc:Depends},
@@ -163,6 +165,7 @@
Package: libobexftp-perl
Architecture: any
Section: perl
+Build-Profiles: <!noperl>
Depends:
libobexftp0 (= ${binary:Version}),
${misc:Depends},
diff --minimal -Nru obexftp-0.24/debian/rules obexftp-0.24/debian/rules
--- obexftp-0.24/debian/rules 2019-08-21 19:51:26.000000000 +0200
+++ obexftp-0.24/debian/rules 2022-01-03 07:24:35.000000000 +0100
@@ -1,14 +1,26 @@
#!/usr/bin/make -f
+include /usr/share/dpkg/architecture.mk
+
export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
+DOPACKAGES := $(shell dh_listpackages)
+
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CFLAGS += -DOBEXFTP_DEBUG=5
endif
+ifneq ($(filter libobexftp-perl,$(DOPACKAGES)),)
+PERL_VER := $(shell perl -MConfig -e 'print $$Config{version}')
+ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+export PERL5LIB := /usr/lib/$(DEB_HOST_MULTIARCH)/perl/cross-config-$(PERL_VER)$(if $(PERL5LIB),:$(PERL5LIB))
+endif
PERL_ARCHLIB := $(shell perl -MConfig -e 'print $$Config{vendorarch}')
+endif
+ifneq ($(filter ruby-obexftp,$(DOPACKAGES)),)
RUBY_DEPENDS := -Vruby:Depends="lib$(firstword $(shell dh_ruby --print-supported))"
+endif
%:
dh $@ --parallel
@@ -17,14 +29,19 @@
dh_gencontrol -- $(RUBY_DEPENDS)
override_dh_auto_configure:
- dh_auto_configure -- -DENABLE_PYTHON=OFF
+ dh_auto_configure -- \
+ -DENABLE_PERL=$(if $(filter libobexftp-perl,$(DOPACKAGES)),ON,OFF) \
+ -DENABLE_PYTHON=OFF \
+ -DENABLE_RUBY=$(if $(filter ruby-obexftp,$(DOPACKAGES)),ON,OFF)
override_dh_auto_build:
dh_auto_build
doxygen
override_dh_install:
+ifneq ($(filter libobexftp-perl,$(DOPACKAGES)),)
sed -e 's;@PERL_ARCHLIB@;$(PERL_ARCHLIB);g;' $(CURDIR)/debian/libobexftp-perl.install.in > $(CURDIR)/debian/libobexftp-perl.install
+endif
dh_install --fail-missing -X.la
override_dh_installdocs:
Reply to: