Source: multipath-tools
Version: 0.7.9-1
Tags: patch upstream
User: [email protected]
Usertags: rebootstrap

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. Please consider applying
the attached patch.

Helmut
--- multipath-tools-0.7.9.orig/Makefile.inc
+++ multipath-tools-0.7.9/Makefile.inc
@@ -75,6 +75,7 @@
 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.
--- multipath-tools-0.7.9.orig/libdmmp/Makefile
+++ multipath-tools-0.7.9/libdmmp/Makefile
@@ -16,9 +16,9 @@
 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
 

Reply via email to