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.gro...@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 <d...@spiessknafl.at>
 Uploaders: Cleto Martín <cl...@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

Reply via email to