[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#905741: ploop FTCBFS: hard codes the build architecture pkg-config



Source: ploop
Version: 1.15-6
Tags: patch upstream
User: helmutg@debian.org
Usertags: rebootstrap

ploop fails to cross build from source, because it hard codes the build
architecture pkg-config and thus fails finding host architecture .pc
files. After making pkg-config substitutable, ploop cross builds
successfully. Please consider applying the attached patch.

Helmut
--- ploop-1.15.orig/Makefile.inc
+++ ploop-1.15/Makefile.inc
@@ -3,6 +3,7 @@
 RELEASE=
 
 CC=gcc
+PKG_CONFIG ?= pkg-config
 INSTALL=install
 SBINDIR=/sbin
 USRSBINDIR=/usr/sbin
--- ploop-1.15.orig/lib/Makefile
+++ ploop-1.15/lib/Makefile
@@ -37,9 +37,9 @@
 SOURCES=$(LIBOBJS:.o=.c)
 GENERATED=symbols.c
 
-CFLAGS += $(shell pkg-config libxml-2.0 --cflags) -fPIC -fvisibility=hidden
+CFLAGS += $(shell $(PKG_CONFIG) libxml-2.0 --cflags) -fPIC -fvisibility=hidden
 LDFLAGS+= -shared -Wl,-soname,$(LIBPLOOP_SO_X)
-LDLIBS += $(shell pkg-config libxml-2.0 --libs) -lpthread -lrt
+LDLIBS += $(shell $(PKG_CONFIG) libxml-2.0 --libs) -lpthread -lrt
 
 all: $(LIBPLOOP) $(LIBPLOOP_SO) $(PC)
 .PHONY: all

Reply to: