[vlc-devel] [PATCH 1/2] contrib: don't use an empty PKG_CONFIG_PATH at the end of the path

Steve Lhomme robux4 at ycbcr.xyz
Wed Mar 6 10:16:05 CET 2019


pkg-config fails to find packages (on msys2) if the path is like
/some/path:/other/path:
---
 contrib/src/main.mak | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index d3caf2c8dc..8f9e723a71 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -215,7 +215,11 @@ PKG_CONFIG_PATH := /usr/share/pkgconfig
 PKG_CONFIG_LIBDIR := /usr/$(HOST)/lib/pkgconfig
 export PKG_CONFIG_LIBDIR
 endif
+ifeq ($(findstring $(PKG_CONFIG_PATH),/),)
+PKG_CONFIG_PATH := $(PREFIX)/lib/pkgconfig
+else
 PKG_CONFIG_PATH := $(PREFIX)/lib/pkgconfig:$(PKG_CONFIG_PATH)
+endif
 export PKG_CONFIG_PATH
 
 ifndef GIT
-- 
2.17.1



More information about the vlc-devel mailing list