[vlc-commits] extras/tools: have Hugo's pkgconfig patch in cmake

Steve Lhomme git at videolan.org
Thu Jan 23 14:39:53 CET 2020


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Jan 23 14:35:25 2020 +0100| [b6d86698138859a1ecde870bb320299618d29cc2] | committer: Steve Lhomme

extras/tools: have Hugo's pkgconfig patch in cmake

It's still not in 3.16.2 or 3.16.3...

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

 ...ig-Fix-path-manipulations-when-cross-comp.patch | 28 ++++++++++++++++++++++
 extras/tools/tools.mak                             |  1 +
 2 files changed, 29 insertions(+)

diff --git a/extras/tools/0001-FindPkgConfig-Fix-path-manipulations-when-cross-comp.patch b/extras/tools/0001-FindPkgConfig-Fix-path-manipulations-when-cross-comp.patch
new file mode 100644
index 0000000000..3b5e765661
--- /dev/null
+++ b/extras/tools/0001-FindPkgConfig-Fix-path-manipulations-when-cross-comp.patch
@@ -0,0 +1,28 @@
+From f92a4b23994fa7516f16fbb5b3c02caa07534b3f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo at beauzee.fr>
+Date: Mon, 2 Dec 2019 16:42:07 +0100
+Subject: [PATCH] FindPkgConfig: Fix path manipulations when cross compiling
+
+When cross compiling from a unix machine, if(UNIX) is false,
+whih causes the path not to be fixed for unix, leading to false
+negative if PKG_CONFIG_PATH needs to be probed
+---
+ Modules/FindPkgConfig.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake
+index 5162a44b33..f4b6ea121c 100644
+--- a/Modules/FindPkgConfig.cmake
++++ b/Modules/FindPkgConfig.cmake
+@@ -337,7 +337,7 @@ macro(_pkg_set_path_internal)
+       # remove empty values from the list
+       list(REMOVE_ITEM _pkgconfig_path "")
+       file(TO_NATIVE_PATH "${_pkgconfig_path}" _pkgconfig_path)
+-      if(UNIX)
++      if(CMAKE_HOST_UNIX)
+         string(REPLACE ";" ":" _pkgconfig_path "${_pkgconfig_path}")
+         string(REPLACE "\\ " " " _pkgconfig_path "${_pkgconfig_path}")
+       endif()
+-- 
+2.19.1.windows.1
+
diff --git a/extras/tools/tools.mak b/extras/tools/tools.mak
index 18dd37df59..e1d8e0f7d4 100644
--- a/extras/tools/tools.mak
+++ b/extras/tools/tools.mak
@@ -92,6 +92,7 @@ cmake-$(CMAKE_VERSION).tar.gz:
 
 cmake: cmake-$(CMAKE_VERSION).tar.gz
 	$(UNPACK)
+	$(APPLY) $(TOOLS)/0001-FindPkgConfig-Fix-path-manipulations-when-cross-comp.patch
 	$(APPLY) $(TOOLS)/cmake-msys-FindPkg.patch
 	$(MOVE)
 



More information about the vlc-commits mailing list