[vlc-commits] contrib: modify the PKG_CONFIG pathes when running in mingw32 shells

Steve Lhomme git at videolan.org
Tue Mar 19 11:54:09 CET 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Mar 18 10:19:13 2019 +0100| [1606068ff1e3e4beb1cc0aff646391db4886b9b9] | committer: Steve Lhomme

contrib: modify the PKG_CONFIG pathes when running in mingw32 shells

The pkg-config of these shells only understands windows/hybrid pathes, not UNIX
pathes. The pure Msys2 shell doesn't.

And they force a PKG_CONFIG_LIBDIR unless specifically set, even exporting the
variable is not sufficient.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1606068ff1e3e4beb1cc0aff646391db4886b9b9
---

 contrib/src/main.mak | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index 6d37e66b7f..4ac209bf13 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -51,8 +51,12 @@ endif
 ifdef HAVE_CROSS_COMPILE
 need_pkg = 1
 else
+ifeq ($(findstring mingw32,$(BUILD)),mingw32)
+need_pkg = $(shell PKG_CONFIG_LIBDIR="${PKG_CONFIG_PATH}" $(PKG_CONFIG) $(1) || echo 1)
+else
 need_pkg = $(shell $(PKG_CONFIG) $(1) || echo 1)
 endif
+endif
 
 ifeq ($(findstring mingw32,$(BUILD)),mingw32)
 MSYS_BUILD := 1
@@ -228,6 +232,9 @@ PKG_CONFIG_LIBDIR := /usr/$(HOST)/lib/pkgconfig
 export PKG_CONFIG_LIBDIR
 endif
 PKG_CONFIG_PATH := $(PREFIX)/lib/pkgconfig:$(PKG_CONFIG_PATH)
+ifeq ($(findstring mingw32,$(BUILD)),mingw32)
+PKG_CONFIG_PATH := $(shell cygpath -pm ${PKG_CONFIG_PATH})
+endif
 export PKG_CONFIG_PATH
 
 ifndef GIT



More information about the vlc-commits mailing list