Source: vdr-plugin-epgsearch
Version: 2.4.0+git20191101-1
Tags: patch upstream
User: debian-cr...@lists.debian.org
Usertags: ftcbfs

vdr-plugin-epgsearch fails to cross build from source, because the
upstream Makefile hard codes the build architecture pkg-config. After
making it substitutable, vdr-plugin-epgsearch cross builds successfully.
Please consider applying the attached patch.

Helmut
--- vdr-plugin-epgsearch-2.4.0+git20191101.orig/Makefile
+++ vdr-plugin-epgsearch-2.4.0+git20191101/Makefile
@@ -63,8 +63,9 @@
 ### The directory environment:
 
 # Use package data if installed...otherwise assume we're under the VDR source directory:
-#PKGCFG   = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell pkg-config --variable=$(1) vdr || pkg-config --variable=$(1) ../../../vdr.pc))
-PKGCFG   = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell PKG_CONFIG_PATH="$$PKG_CONFIG_PATH:../../.." pkg-config --variable=$(1) vdr))
+PKG_CONFIG ?= pkg-config
+#PKGCFG   = $(if $(VDRDIR),$(shell $(PKG_CONFIG) --variable=$(1) $(VDRDIR)/vdr.pc),$(shell $(PKG_CONFIG) --variable=$(1) vdr || $(PKG_CONFIG) --variable=$(1) ../../../vdr.pc))
+PKGCFG   = $(if $(VDRDIR),$(shell $(PKG_CONFIG) --variable=$(1) $(VDRDIR)/vdr.pc),$(shell PKG_CONFIG_PATH="$$PKG_CONFIG_PATH:../../.." $(PKG_CONFIG) --variable=$(1) vdr))
  
 LIBDIR   = $(call PKGCFG,libdir)
 LOCDIR   = $(call PKGCFG,locdir)
@@ -84,9 +85,9 @@
 
 ### configuring modules
 ifeq ($(AUTOCONFIG),1)
-	ifeq (exists, $(shell pkg-config libpcre && echo exists))
+	ifeq (exists, $(shell $(PKG_CONFIG) libpcre && echo exists))
 		REGEXLIB = pcre
-	else ifeq (exists, $(shell pkg-config tre && echo exists))
+	else ifeq (exists, $(shell $(PKG_CONFIG) tre && echo exists))
 		REGEXLIB = tre
 	endif
 	ifeq (exists, $(shell test -e ../pin && echo exists))
@@ -140,10 +141,10 @@
 INCLUDE += $(shell pcre-config --cflags)
 DEFINES += -DHAVE_PCREPOSIX
 else ifeq ($(REGEXLIB), tre)
-LIBS += -L$(shell pkg-config --variable=libdir tre) $(shell pkg-config --libs tre)
+LIBS += -L$(shell $(PKG_CONFIG) --variable=libdir tre) $(shell $(PKG_CONFIG) --libs tre)
 #LIBS += -L/usr/lib -ltre
 DEFINES += -DHAVE_LIBTRE
-INCLUDE += $(shell pkg-config --cflags tre)
+INCLUDE += $(shell $(PKG_CONFIG) --cflags tre)
 endif
 
 ifdef USE_PINPLUGIN

Reply via email to