Bug#853194: libsoxr FTCBFS: aborts on endianess test, runs test suite despite DEB_BUILD_OPTIONS=nocheck

Helmut Grohne helmut at subdivi.de
Mon Jan 30 15:12:39 UTC 2017


Source: libsoxr
Version: 0.1.2-2
Tags: patch
User: helmutg at debian.org
Usertags: rebootstrap

libsoxr fails to cross build from source. dh_auto_configure correctly
passes cross compilers to cmake, but cmake fails running the endianess
test. Also the default build target tries to run tests. The attached
patch supplies the endianess test result from DEB_HOST_ARCH_ENDIAN and
correctly handles DEB_BUILD_OPTIONS=nocheck. With the patch, cross
building libsoxr is successful. Please consider applying it after
stretch is released.

Helmut
-------------- next part --------------
diff --minimal -Nru libsoxr-0.1.2/debian/changelog libsoxr-0.1.2/debian/changelog
--- libsoxr-0.1.2/debian/changelog	2016-12-25 18:41:58.000000000 +0100
+++ libsoxr-0.1.2/debian/changelog	2017-01-30 15:48:59.000000000 +0100
@@ -1,3 +1,12 @@
+libsoxr (0.1.2-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Feed endianess from DEB_HOST_ARCH_ENDIAN
+    + Honour DEB_BUILD_OPTIONS=nocheck
+
+ -- Helmut Grohne <helmut at subdivi.de>  Mon, 30 Jan 2017 15:48:59 +0100
+
 libsoxr (0.1.2-2) unstable; urgency=medium
 
   * Define NDEBUG to disable debug output (Closes: #822727, LP: #1649224)
diff --minimal -Nru libsoxr-0.1.2/debian/rules libsoxr-0.1.2/debian/rules
--- libsoxr-0.1.2/debian/rules	2016-12-25 18:29:29.000000000 +0100
+++ libsoxr-0.1.2/debian/rules	2017-01-30 15:48:59.000000000 +0100
@@ -2,13 +2,24 @@
 
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
-DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+include /usr/share/dpkg/architecture.mk
+
+CONFIGURE_FLAGS = -DLIB_INSTALL_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) \
+		  -DDOC_INSTALL_DIR=/usr/share/doc/libsoxr-dev
+ifeq ($(DEB_HOST_ARCH_ENDIAN),big)
+CONFIGURE_FLAGS += -DHAVE_WORDS_BIGENDIAN_EXITCODE=0
+else
+CONFIGURE_FLAGS += -DHAVE_WORDS_BIGENDIAN_EXITCODE=1
+endif
+ifneq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
+CONFIGURE_FLAGS += -DBUILD_TESTS=0 -DBUILD_EXAMPLES=1
+endif
 
 %:
 	dh $@ --parallel
 
 override_dh_auto_configure:
-	dh_auto_configure -- -DLIB_INSTALL_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) -DDOC_INSTALL_DIR=/usr/share/doc/libsoxr-dev
+	dh_auto_configure -- $(CONFIGURE_FLAGS)
 
 override_dh_compress:
 	dh_compress -X.c -X.C


More information about the pkg-multimedia-maintainers mailing list