Source: libopenobex
Version: 1.7.2-1
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

libopenobex fails to cross build from source, because it installs to
non-multiarch locations and then dh_install fails with missing files. I
guess that cmake infers a non-multiarchy CMAKE_INSTALL_LIBDIR for cross
compilation. The simple way to get the flags right is to defer to
dh_auto_configure though. After doing so, libopenobex cross builds
successfully. Please consider applying the attached patch.

Helmut
diff --minimal -Nru libopenobex-1.7.2/debian/changelog 
libopenobex-1.7.2/debian/changelog
--- libopenobex-1.7.2/debian/changelog  2016-07-26 02:09:09.000000000 +0200
+++ libopenobex-1.7.2/debian/changelog  2017-12-28 21:17:54.000000000 +0100
@@ -1,3 +1,11 @@
+libopenobex (1.7.2-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Let dh_auto_configure figure the right cmake flags. (Closes:
+    #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Thu, 28 Dec 2017 21:17:54 +0100
+
 libopenobex (1.7.2-1) unstable; urgency=medium
 
   * New upstream released.
diff --minimal -Nru libopenobex-1.7.2/debian/rules 
libopenobex-1.7.2/debian/rules
--- libopenobex-1.7.2/debian/rules      2016-07-26 02:09:09.000000000 +0200
+++ libopenobex-1.7.2/debian/rules      2017-12-28 21:17:54.000000000 +0100
@@ -38,26 +38,18 @@
     MAKEFLAGS += -j$(NUMJOBS)
 endif
 
-BUILD_FLAGS = -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) \
+BUILD_FLAGS = -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) \
              -DCMAKE_C_FLAGS_RELEASE="$(CFLAGS_RELEASE)" 
-DCMAKE_C_FLAGS_DEBUG="$(CFLAGS_DEBUG)" \
-              -DCMAKE_SKIP_RPATH=ON -DCMAKE_VERBOSE_MAKEFILE=ON 
-ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
-       BUILD_FLAGS += -DCMAKE_SYSTEM_NAME=$(shell dpkg-architecture 
-qDEB_BUILD_ARCH_OS) \
-                       -DCMAKE_SYSTEM_PROCESSOR=$(shell dpkg-architecture 
-qDEB_BUILD_ARCH_CPU) \
-                       -DCMAKE_C_COMPILER=$(DEB_BUILD_GNU_TYPE)-gcc
-endif
+              -DCMAKE_SKIP_RPATH=ON
 
 debian/build/CMakeCache.txt:
-       mkdir -p debian/build
-       cd $(CURDIR)/debian/build && \
-         cmake $(BUILD_FLAGS) ../..
+       dh_auto_configure --builddirectory=debian/build -- $(BUILD_FLAGS)
 
 debian/build: debian/build/CMakeCache.txt
 
 debian/build-static/CMakeCache.txt:
-       mkdir -p debian/build-static
-       cd $(CURDIR)/debian/build-static && \
-         cmake -DBUILD_SHARED_LIBS=OFF -DBUILD_DOCUMENTATION=OFF 
$(BUILD_FLAGS) ../..
+       dh_auto_configure --builddirectory=debian/build-static -- \
+         -DBUILD_SHARED_LIBS=OFF -DBUILD_DOCUMENTATION=OFF $(BUILD_FLAGS)
 
 debian/build-static: debian/build-static/CMakeCache.txt
 

Reply via email to