vlc | branch: master | Steve Lhomme <[email protected]> | Fri Feb 14 11:48:31 
2020 +0100| [6746f5787356c189323228a37bd52b8e6406cfab] | committer: Steve Lhomme

package/win32: build.sh: don't force the PKG_CONFIG_LIBDIR in contribs

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.

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

 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 4f92b9f7ea..08f69519b0 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
 

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to