[vlc-devel] [PATCH v2 4/5] package/win32: build.sh: don't force the PKG_CONFIG_LIBDIR in contribs

Steve Lhomme robux4 at ycbcr.xyz
Wed Mar 18 09:46:15 CET 2020


The contrib path is automatically added for contribs and for vlc.

We still need a proper environment to build VLC. We set the same values used in
contribs. They should always match. It could be removed once it's move into
configure.ac.

It uses the same detection for bogus Debian $TRIPLET-pkg-config.
---
 extras/package/win32/build.sh | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/extras/package/win32/build.sh b/extras/package/win32/build.sh
index 4f92b9f7ead..08f69519b01 100755
--- a/extras/package/win32/build.sh
+++ b/extras/package/win32/build.sh
@@ -139,7 +139,6 @@ fi
 cd ../../
 
 export USE_FFMPEG=1
-export PKG_CONFIG_LIBDIR="$PWD/contrib/$TRIPLET/lib/pkgconfig"
 export PATH="$PWD/contrib/$TRIPLET/bin":"$PATH"
 
 if [ "$INTERACTIVE" = "yes" ]; then
@@ -190,6 +189,22 @@ if ! [ -e ${SCRIPT_PATH}/../../../configure ]; then
 fi
 
 info "Configuring VLC"
+if [ -z "$PKG_CONFIG" ]; then
+    if [ `unset PKG_CONFIG_LIBDIR; $TRIPLET-pkg-config --version 1>/dev/null 2>/dev/null || echo FAIL` = "FAIL" ]; then
+        # $TRIPLET-pkg-config DOESNT WORK
+        # on Debian it pretends it works to autoconf
+        export PKG_CONFIG="pkg-config"
+        if [ -z "$PKG_CONFIG_LIBDIR" ]; then
+            export PKG_CONFIG_LIBDIR="/usr/$TRIPLET/lib/pkgconfig:/usr/lib/$TRIPLET/pkgconfig"
+        else
+            export PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR:/usr/$TRIPLET/lib/pkgconfig:/usr/lib/$TRIPLET/pkgconfig"
+        fi
+    else
+        # $TRIPLET-pkg-config WORKs
+        export PKG_CONFIG="pkg-config"
+    fi
+fi
+
 mkdir -p $SHORTARCH
 cd $SHORTARCH
 
-- 
2.17.1



More information about the vlc-devel mailing list