From efc41657baf186abe8808fe45fe5fb0be229968f Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@collabora.com>
Date: Tue, 9 Apr 2019 11:33:57 +0100
Subject: [PATCH] build: Cope with older dpkg-architecture versions

Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 Makefile | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 3d6570f76..9d3e0f148 100644
--- a/Makefile
+++ b/Makefile
@@ -34,7 +34,11 @@ libcapsule/configure:
 _build/%/config.stamp: libcapsule/configure
 	mkdir -p _build/$*/libcapsule
 	set -eu; \
-	eval "$$(dpkg-architecture -a"$*" --print-set)"; \
+	DEB_BUILD_ARCH="$$(dpkg-architecture -a"$*" -qDEB_BUILD_ARCH)"; \
+	DEB_HOST_ARCH="$$(dpkg-architecture -a"$*" -qDEB_HOST_ARCH)"; \
+	DEB_BUILD_GNU_TYPE="$$(dpkg-architecture -a"$*" -qDEB_BUILD_GNU_TYPE)"; \
+	DEB_HOST_GNU_TYPE="$$(dpkg-architecture -a"$*" -qDEB_HOST_GNU_TYPE)"; \
+	DEB_HOST_MULTIARCH="$$(dpkg-architecture -a"$*" -qDEB_HOST_MULTIARCH)"; \
 	case "$${DEB_BUILD_ARCH}/$${DEB_HOST_ARCH}" in \
 	    (amd64/i386) \
 	        export CC="cc -m32"; \
@@ -61,8 +65,7 @@ relocatabledir = /usr/lib/libcapsule/relocatable
 install-%:
 	mkdir -p relocatable-install/bin
 	set -eu; \
-	eval "$$(dpkg-architecture -a"$*" --print-set)"; \
-	dhm="$${DEB_HOST_MULTIARCH}"; \
+	dhm="$$(dpkg-architecture -a"$*" -qDEB_HOST_MULTIARCH)"; \
 	mkdir -p "relocatable-install/lib/$${dhm}"; \
 	if [ -e $(relocatabledir)/$${dhm}-capsule-capture-libs ]; then \
 		install $(relocatabledir)/$${dhm}-capsule-capture-libs _build/; \
-- 
GitLab