Source: libical3 Version: 3.0.17-1 Tags: patch User: debian-cr...@lists.debian.org Usertags: ftcbfs
libical3 fails to cross build from source, because it cannot find the ical glib generator used for building libical-glib. Upstream has instructions for this at https://github.com/libical/libical/wiki/For-the-Users:-Cross-compiling. I'm attaching a patch that implements these instructions. Unfortunately, it doesn't make libical3 cross buildable, because it runs the host architecture vapigen. That latter problem is generic and hopefully fixed at some other layer. So this bug is only about the glib generator. Please consider applying my patch. Helmut
diff --minimal -Nru libical3-3.0.17/debian/changelog libical3-3.0.17/debian/changelog --- libical3-3.0.17/debian/changelog 2023-10-14 19:08:52.000000000 +0200 +++ libical3-3.0.17/debian/changelog 2024-01-17 07:48:14.000000000 +0100 @@ -1,3 +1,11 @@ +libical3 (3.0.17-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Improve cross building: Add a native pass for the ical glib generator. + (Closes: #-1) + + -- Helmut Grohne <hel...@subdivi.de> Wed, 17 Jan 2024 07:48:14 +0100 + libical3 (3.0.17-1) unstable; urgency=medium * New Upstream release diff --minimal -Nru libical3-3.0.17/debian/control libical3-3.0.17/debian/control --- libical3-3.0.17/debian/control 2023-10-14 19:08:52.000000000 +0200 +++ libical3-3.0.17/debian/control 2024-01-17 07:48:14.000000000 +0100 @@ -9,7 +9,9 @@ libicu-dev, libgirepository1.0-dev, libdb-dev, + libglib2.0-dev:native, libxml2-dev, + libxml2-dev:native, valac, python3-gi <!nocheck>, gtk-doc-tools, diff --minimal -Nru libical3-3.0.17/debian/rules libical3-3.0.17/debian/rules --- libical3-3.0.17/debian/rules 2022-08-23 15:27:31.000000000 +0200 +++ libical3-3.0.17/debian/rules 2024-01-17 07:48:14.000000000 +0100 @@ -2,11 +2,22 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all +include /usr/share/dpkg/architecture.mk + %: dh $@ --with gir --buildsystem=cmake --no-parallel +CONFIGURE_FLAGS = -DGOBJECT_INTROSPECTION=true -DICAL_GLIB_VAPI=true + override_dh_auto_configure: - dh_auto_configure -- -DGOBJECT_INTROSPECTION=true -DICAL_GLIB_VAPI=true +ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)) + dh_auto_configure -- $(CONFIGURE_FLAGS) +else + dpkg-architecture -a$(DEB_BUILD_ARCH) -f -c dh_auto_configure --reload-all-buildenv-variables + dpkg-architecture -a$(DEB_BUILD_ARCH) -f -c dh_auto_build --reload-all-buildenv-variables + dpkg-architecture -a$(DEB_BUILD_ARCH) -f -c dh_auto_install --reload-all-buildenv-variables --destdir=debian/nativetmp + dh_auto_configure -- $(CONFIGURE_FLAGS) -DIMPORT_ICAL_GLIB_SRC_GENERATOR=$(CURDIR)/debian/nativetmp/usr/lib/$(DEB_BUILD_MULTIARCH)/cmake/LibIcal/IcalGlibSrcGenerator.cmake +endif override_dh_missing: dh_missing --list-missing @@ -16,3 +27,11 @@ : # the tests hang on the buildds, don't run them : -dh_auto_test endif + +ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)) +execute_after_dh_auto_clean: + dpkg-architecture -a$(DEB_BUILD_ARCH) -f -c dh_auto_clean + +execute_after_debian_clean: + rm -Rf debian/nativetmp +endif