Package: multipath-tools / 0.8.5-1

0008-Bug-916521-FTCBFS-uses-the-wrong-pkg-config.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
From: Helmut Grohne <helmutg@debian.org>
Date: Wed, 23 Dec 2020 22:52:02 +0000
Subject: Bug#916521: FTCBFS: uses the wrong pkg-config

multipath-tools fails to cross build from source, because
multipath-tools' Makefiles hard code the build architecture pkg-config.
After making it substitutable, it picks up the one supplied by
dh_auto_build and cross builds successfully.
---
 Makefile.inc     | 1 +
 libdmmp/Makefile | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Makefile.inc b/Makefile.inc
index 9062d3d..02f8b57 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -78,6 +78,7 @@ GZIP		= gzip -9 -c
 RM		= rm -f
 LN		= ln -sf
 INSTALL_PROGRAM	= install
+PKG_CONFIG	?= pkg-config
 
 # $(call TEST_CC_OPTION,option,fallback)
 # Test if the C compiler supports the option.
diff --git a/libdmmp/Makefile b/libdmmp/Makefile
index 1dd3f34..5bef7e1 100644
--- a/libdmmp/Makefile
+++ b/libdmmp/Makefile
@@ -16,9 +16,9 @@ HEADERS = libdmmp/libdmmp.h
 OBJS = libdmmp.o libdmmp_mp.o libdmmp_pg.o libdmmp_path.o libdmmp_misc.o
 
 CFLAGS += $(LIB_CFLAGS) -fvisibility=hidden -I$(libdmmpdir) -I$(mpathcmddir) \
-	  $(shell pkg-config --cflags json-c)
+	  $(shell $(PKG_CONFIG) --cflags json-c)
 
-LIBDEPS += $(shell pkg-config --libs json-c) -L$(mpathcmddir) -lmpathcmd -lpthread
+LIBDEPS += $(shell $(PKG_CONFIG) --libs json-c) -L$(mpathcmddir) -lmpathcmd -lpthread
 
 all: $(LIBS) doc