[vlc-commits] package/win32: build.sh: don't force the PKG_CONFIG_LIBDIR in contribs

Steve Lhomme git at videolan.org
Thu Jun 18 14:54:25 CEST 2020


vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Feb 14 11:48:31 2020 +0100| [9ada2b86bfdf1f20377b41f35d537029f10b3809] | 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.

(cherry picked from commit 6746f5787356c189323228a37bd52b8e6406cfab) (rebased)

rebased:
- the contrib bootstrap is done later in this branch

Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>

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

 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 aea78b350f..add87cb9ec 100755
--- a/extras/package/win32/build.sh
+++ b/extras/package/win32/build.sh
@@ -129,7 +129,6 @@ make -j$JOBS
 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
@@ -177,6 +176,22 @@ info "Bootstrapping"
 ${SCRIPT_PATH}/../../../bootstrap
 
 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
 



More information about the vlc-commits mailing list