Source: libprelude Version: 5.2.0-5 Tags: patch User: debian-cr...@lists.debian.org Usertags: ftcbfs
While libprelude can be cross built when disabling language bindings, it fails in a regular build. Since Antonio Terceiro recently laid the ground work on the ruby side and perl and python support cross builds for a while longer, I've now implemented a patch that enables a full cross build of libprelude. Please consider applying it. Helmut
diff --minimal -Nru libprelude-5.2.0/debian/changelog libprelude-5.2.0/debian/changelog --- libprelude-5.2.0/debian/changelog 2021-11-03 19:53:39.000000000 +0100 +++ libprelude-5.2.0/debian/changelog 2022-10-28 12:13:19.000000000 +0200 @@ -1,3 +1,13 @@ +libprelude (5.2.0-5.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + + Use declarative ruby addon. + + export cross variables for perl, python and ruby + + cross.patch: Fix bare and useless pkg-config invocation. + + -- Helmut Grohne <hel...@subdivi.de> Fri, 28 Oct 2022 12:13:19 +0200 + libprelude (5.2.0-5) unstable; urgency=medium * d.patches: Update 025-Fix-PyIOBase_Type.patch because swig is not diff --minimal -Nru libprelude-5.2.0/debian/control libprelude-5.2.0/debian/control --- libprelude-5.2.0/debian/control 2021-08-29 10:39:10.000000000 +0200 +++ libprelude-5.2.0/debian/control 2022-10-28 12:10:16.000000000 +0200 @@ -6,8 +6,8 @@ Rules-Requires-Root: no Build-Depends: debhelper-compat (= 13), dh-sequence-python3 <!nopython>, + dh-sequence-ruby <!noruby>, gawk, - gem2deb <!noruby>, libgcrypt20-dev, libgnutls28-dev, libltdl-dev, diff --minimal -Nru libprelude-5.2.0/debian/patches/cross.patch libprelude-5.2.0/debian/patches/cross.patch --- libprelude-5.2.0/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100 +++ libprelude-5.2.0/debian/patches/cross.patch 2022-10-28 12:13:19.000000000 +0200 @@ -0,0 +1,11 @@ +--- libprelude-5.2.0.orig/m4/am_path_ruby.m4 ++++ libprelude-5.2.0/m4/am_path_ruby.m4 +@@ -100,7 +100,7 @@ + + dnl if PKG-CONFIG is available, we use it. Else, we try to dectect RUBY_INCLUDES manually + RUBY_VER=`$RUBY -rrbconfig -e "print RbConfig::CONFIG[['ruby_pc']]" | sed 's/.pc//g'` +- PKG_CHECK_MODULES(RUBY_PKG_CONFIG, $RUBY_VER, [RUBY_INCLUDES=`pkg-config $RUBY_VER --cflags`], [RUBY_INCLUDES=`$RUBY -r rbconfig -e ' ++ PKG_CHECK_MODULES(RUBY_PKG_CONFIG, $RUBY_VER, [RUBY_INCLUDES=$RUBY_PKG_CONFIG_CFLAGS], [RUBY_INCLUDES=`$RUBY -r rbconfig -e ' + if RbConfig::CONFIG[["archdir"]] then print " -I" + RbConfig::CONFIG[["archdir"]] end + if RbConfig::CONFIG[["rubyhdrdir"]] then print " -I" + RbConfig::CONFIG[["rubyhdrdir"]] end + if RbConfig::CONFIG[["rubyhdrdir"]] and RbConfig::CONFIG[["sitearch"]] then print " -I" + RbConfig::CONFIG[["rubyhdrdir"]] + "/" + RbConfig::CONFIG[["sitearch"]] end'`] ) diff --minimal -Nru libprelude-5.2.0/debian/patches/series libprelude-5.2.0/debian/patches/series --- libprelude-5.2.0/debian/patches/series 2021-08-29 10:39:10.000000000 +0200 +++ libprelude-5.2.0/debian/patches/series 2022-10-28 12:13:19.000000000 +0200 @@ -12,3 +12,4 @@ 023-Disable_GnuLib_Tests_perror2_strerror.patch 024-Fix_Config_H.patch 025-Fix-PyIOBase_Type.patch +cross.patch diff --minimal -Nru libprelude-5.2.0/debian/rules libprelude-5.2.0/debian/rules --- libprelude-5.2.0/debian/rules 2021-09-01 16:18:57.000000000 +0200 +++ libprelude-5.2.0/debian/rules 2022-10-28 12:13:19.000000000 +0200 @@ -1,5 +1,7 @@ #! /usr/bin/make -f +include /usr/share/dpkg/architecture.mk + export DEB_BUILD_MAINT_OPTIONS = hardening=+all CONFIGURE_FLAGS = --without-python2 --enable-easy-bindings @@ -16,9 +18,7 @@ CONFIGURE_FLAGS += --with-perl=no endif -ifeq ($(filter noruby,$(DEB_BUILD_PROFILES)),) - DH_ADDONS += --with ruby -else +ifneq ($(filter noruby,$(DEB_BUILD_PROFILES)),) CONFIGURE_FLAGS += --with-ruby=no endif @@ -30,6 +30,14 @@ CONFIGURE_FLAGS += --enable-gtk-doc endif +ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)) + export _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata__$(DEB_HOST_MULTIARCH) + PERLVER=$(shell perl -MConfig -e 'print $$Config{version}') + export PERLLIB=/usr/lib/$(DEB_HOST_MULTIARCH)/perl/cross-config-$(PERLVER) + RUBYVER=$(shell ruby -e "puts RbConfig::CONFIG['ruby_version']") + export RUBYLIB=/usr/lib/$(DEB_HOST_MULTIARCH)/ruby-crossbuild/$(RUBYVER) +endif + override_dh_auto_configure: dh_auto_configure -- $(CONFIGURE_FLAGS) @@ -56,4 +64,4 @@ cd bindings/python && python$* setup.py install --root $(CURDIR)/debian/tmp %: - dh $@ $(DH_ADDONS) + dh $@