diff -Nru dlm-4.0.7/debian/changelog dlm-4.0.7/debian/changelog --- dlm-4.0.7/debian/changelog 2018-11-04 18:01:58.000000000 +0000 +++ dlm-4.0.7/debian/changelog 2018-11-18 09:02:59.000000000 +0000 @@ -1,3 +1,9 @@ +dlm (4.0.7-4) unstable; urgency=medium + + * [5063137] Add patch to fix cross build from source (Closes: #913866) + + -- Valentin Vidic Sun, 18 Nov 2018 10:02:59 +0100 + dlm (4.0.7-3) unstable; urgency=medium * [a517b75] Add patch for gcc warning diff -Nru dlm-4.0.7/debian/patches/Fix-cross-build.patch dlm-4.0.7/debian/patches/Fix-cross-build.patch --- dlm-4.0.7/debian/patches/Fix-cross-build.patch 1970-01-01 00:00:00.000000000 +0000 +++ dlm-4.0.7/debian/patches/Fix-cross-build.patch 2018-11-18 09:00:16.000000000 +0000 @@ -0,0 +1,25 @@ +From: Helmut Grohne +Date: Fri, 16 Nov 2018 06:24:06 +0100 +Subject: FTCBFS: uses the wrong pkg-config + +dlm fails to cross build from source, because the upstream Makefile hard +codes the build architecture pkg-config. The attached patch makes +pkg-config substitutable. dh_auto_build substitutes it and dlm becomes +cross buildable. + +--- a/dlm_controld/Makefile ++++ b/dlm_controld/Makefile +@@ -61,10 +61,11 @@ + LIB_CFLAGS += $(BIN_CFLAGS) + LIB_LDFLAGS += -Wl,-z,relro -pie + ++PKG_CONFIG ?= pkg-config + ifeq ($(USE_SD_NOTIFY),yes) +- BIN_CFLAGS += $(shell pkg-config --cflags libsystemd) \ ++ BIN_CFLAGS += $(shell $(PKG_CONFIG) --cflags libsystemd) \ + -DUSE_SD_NOTIFY +- BIN_LDFLAGS += $(shell pkg-config --libs libsystemd) ++ BIN_LDFLAGS += $(shell $(PKG_CONFIG) --libs libsystemd) + endif + + all: $(LIB_TARGET) $(BIN_TARGET) diff -Nru dlm-4.0.7/debian/patches/series dlm-4.0.7/debian/patches/series --- dlm-4.0.7/debian/patches/series 2018-11-04 17:51:53.000000000 +0000 +++ dlm-4.0.7/debian/patches/series 2018-11-18 09:00:07.000000000 +0000 @@ -9,3 +9,4 @@ Check-sscanf-return-value.patch Check-write-return-value.patch Toplevel-Makefile-always-returns-success.patch +Fix-cross-build.patch