[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#918864: calligra FTCBFS: uses try_run to check for iconv



Source: calligra
Version: 1:3.1.0+dfsg-4
Tags: patch
User: helmutg@debian.org
Usertags: rebootstrap

calligra fails to cross build from source, because cmake checks for a
working iconv using try_run. Doing so is a good thing in principle and
should be kept for native builds, but it is not something that can work
with cross builds. Given that the check is quite specific to calligra, I
propose that debian/rules provides the check result for cross builds
only. The attached patch implements that. It doesn't make calligra cross
buildable, but that's hardly surprising given that it fails natively on
the buildds. Please consider applying it.

Helmut
diff --minimal -Nru calligra-3.1.0+dfsg/debian/changelog calligra-3.1.0+dfsg/debian/changelog
--- calligra-3.1.0+dfsg/debian/changelog	2018-10-22 10:28:51.000000000 +0200
+++ calligra-3.1.0+dfsg/debian/changelog	2019-01-10 06:18:46.000000000 +0100
@@ -1,3 +1,10 @@
+calligra (1:3.1.0+dfsg-4.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Tell cmake that iconv works. (Closes: #-1)
+
+ -- Helmut Grohne <helmut@subdivi.de>  Thu, 10 Jan 2019 06:18:46 +0100
+
 calligra (1:3.1.0+dfsg-4) unstable; urgency=medium
 
   * Team upload.
diff --minimal -Nru calligra-3.1.0+dfsg/debian/rules calligra-3.1.0+dfsg/debian/rules
--- calligra-3.1.0+dfsg/debian/rules	2018-10-22 10:28:51.000000000 +0200
+++ calligra-3.1.0+dfsg/debian/rules	2019-01-10 06:18:46.000000000 +0100
@@ -15,11 +15,17 @@
 l10npkgs_langs := bs ca cavalencia cs da de el engb es et eu fi fr gl hu it ja kk nb nds nl pl pt ptbr ru sk sv tr uk zhcn zhtw
 l10npkgs_packages_rels := $(patsubst %,$(l10npkgs_prefix)-% $(l10npkgs_fixed_version_comma),$(l10npkgs_langs))
 
+include /usr/share/dpkg/architecture.mk
+ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+# Tell cmake to skip the iconv check and trust that Debian's iconv works.
+CONFIGURE_FLAGS += -DMODERN_ICONV_RUN=0
+endif
+
 %:
 	dh $@ --with kf5
 
 override_dh_auto_configure:
-	dh_auto_configure -Skf5 -- -DBUILD_TESTING=OFF -DBUILD_app_cstester=OFF -DBUILD_app_devtools=OFF -DCALLIGRA_SHOULD_BUILD_UNMAINTAINED=ON
+	dh_auto_configure -Skf5 -- -DBUILD_TESTING=OFF -DBUILD_app_cstester=OFF -DBUILD_app_devtools=OFF -DCALLIGRA_SHOULD_BUILD_UNMAINTAINED=ON $(CONFIGURE_FLAGS)
 
 override_dh_auto_install:
 	dh_auto_install

Reply to: