Source: pugixml
Version: 1.8.1-6
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

pugixml fails to cross build from source for two reasons:

 1. It unconditionally passes -DBUILD_TESTS=1 to cmake, so it runs tests
    even when DEB_BUILD_OPTIONS contains nocheck. Notably, running tests
    makes the cross build fail. They should be skipped instead.

 2. cmake does not detect the multiarch filesystem layout for cross
    builds that it uses for native builds. Thus the packaging doesn't
    find the installed files where it expects them. Forcing a multiarch
    layout for cross builds fixes this. Potentially, cdbs should pass
    this flag (debhelper does). If you agree, please clone this
    secondary issue and reassign it to cdbs.

After applying the attached patch, pugixml cross builds successfully.
Please consider using it.

Helmut
diff --minimal -Nru pugixml-1.8.1/debian/changelog 
pugixml-1.8.1/debian/changelog
--- pugixml-1.8.1/debian/changelog      2017-09-15 17:19:03.000000000 +0200
+++ pugixml-1.8.1/debian/changelog      2017-10-19 06:22:40.000000000 +0200
@@ -1,3 +1,12 @@
+pugixml (1.8.1-6.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Closes: #-1.
+    + Honour DEB_BUILD_OPTIONS=nocheck.
+    + Always use a multiarch install layout.
+
+ -- Helmut Grohne <hel...@subdivi.de>  Thu, 19 Oct 2017 06:22:40 +0200
+
 pugixml (1.8.1-6) unstable; urgency=medium
 
   * Drop multi-arch tag for now from libpugixml-dev.
diff --minimal -Nru pugixml-1.8.1/debian/rules pugixml-1.8.1/debian/rules
--- pugixml-1.8.1/debian/rules  2017-08-18 17:28:24.000000000 +0200
+++ pugixml-1.8.1/debian/rules  2017-10-19 06:22:40.000000000 +0200
@@ -31,6 +31,7 @@
                <debian/control.in.in \
                >debian/control.in
 
+include /usr/share/dpkg/architecture.mk
 include /usr/share/cdbs/1/class/cmake.mk
 include /usr/share/cdbs/1/rules/debhelper.mk
 
@@ -45,7 +46,10 @@
 export DPKG_GENSYMBOLS_CHECK_LEVEL=$(if $(EXP_RELEASE),0,1)
 
 # Build the shared library
-DEB_CMAKE_EXTRA_FLAGS += -DBUILD_TESTS=1 -DBUILD_PKGCONFIG=1
+DEB_CMAKE_EXTRA_FLAGS += -DBUILD_PKGCONFIG=1 
-DCMAKE_INSTALL_LIBDIR=lib/$(DEB_HOST_MULTIARCH)
+ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
+DEB_CMAKE_EXTRA_FLAGS += -DBUILD_TESTS=1
+endif
 
 # We need this to build the package
 CDBS_BUILD_DEPENDS +=, cmake

Reply via email to