--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: libjsoncpp FTCBFS: unsatisfiable Build-Depends and runs test suite despite DEB_BUILD_OPTIONS=nocheck
- From: Helmut Grohne <h.grohne@intenta.de>
- Date: Tue, 17 May 2016 09:20:14 +0200
- Message-id: <20160517072007.GA9215@laureti-dev>
Source: libjsoncpp
Version: 1.7.2-1
Severity: wishlist
Tags: patch
Hi,
I noticed that libjoncpp fails to cross build. Since it uses debhelper's
dh_auto_configure for cmake (which supports cross building), it almost
works. Still two aspects are broken:
 * libjsoncpp Build-Depends: python. Since python is Multi-Arch:
   allowed, this refers to the host architecture python which can
   neither be run nor installed. What is needed though is the build
   architecture python, so annotate it with :native.
 * Tests cannot be run during cross compilation, so cross compiles
   typically set DEB_BUILD_OPTIONS=nocheck. Unfortunately, libjsoncpp
   has no support for this setting yet and runs the tests anyway.
I am attaching a patch that addresses both issues. Please consider
applying it.
Helmut
--- libjsoncpp-1.7.2/debian/changelog
+++ libjsoncpp-1.7.2/debian/changelog
@@ -1,3 +1,12 @@
+libjsoncpp (1.7.2-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    * Annotate Build-Depends: python with :native.
+    * Support DEB_BUILD_OPTIONS=nocheck.
+
+ -- Helmut Grohne <h.grohne@intenta.de>  Wed, 11 May 2016 10:09:20 +0200
+
 libjsoncpp (1.7.2-1) unstable; urgency=medium
 
   * Team upload.
--- libjsoncpp-1.7.2/debian/control
+++ libjsoncpp-1.7.2/debian/control
@@ -3,7 +3,7 @@
 Maintainer: Peter Spiess-Knafl <dev@spiessknafl.at>
 Uploaders: Cleto Martín <cleto@debian.org>
 Testsuite: autopkgtest
-Build-Depends: cmake, debhelper (>= 9), doxygen, python
+Build-Depends: cmake, debhelper (>= 9), doxygen, python:native
 Standards-Version: 3.9.7
 Section: libs
 Homepage: https://github.com/open-source-parsers/jsoncpp
--- libjsoncpp-1.7.2/debian/rules
+++ libjsoncpp-1.7.2/debian/rules
@@ -4,13 +4,18 @@
 %:
 	dh $@ --parallel --buildsystem=cmake
 
+ifneq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+CONFIGURE_FLAGS += -DJSONCPP_WITH_TESTS=Off
+endif
+
 override_dh_auto_configure:
 	dh_auto_configure -- \
 			-DBUILD_SHARED_LIBS=ON \
 			-DBUILD_STATIC_LIBS=ON \
 			-DJSONCPP_WITH_CMAKE_PACKAGE=ON \
 			-DLIB_SUFFIX="/$(DEB_TARGET_MULTIARCH)" \
-			-DINCLUDE_INSTALL_DIR=/usr/include/jsoncpp
+			-DINCLUDE_INSTALL_DIR=/usr/include/jsoncpp \
+			$(CONFIGURE_FLAGS)
 
 override_dh_auto_build-indep:
 	python doxybuild.py --doxygen=/usr/bin/doxygen
--- End Message ---