[Android] buildsystem: libvlc: refactor pkg-config calls
Alexandre Janniaux
git at videolan.org
Fri Nov 6 10:25:02 CET 2020
vlc-android | branch: master | Alexandre Janniaux <ajanni at videolabs.io> | Sun Oct 25 14:55:03 2020 +0100| [fd44d9297a9dcb3f4a35e1104490f960f03183e9] | committer: Nicolas Pomepuy
buildsystem: libvlc: refactor pkg-config calls
Refactor pkg-config calls with a bash function, so as to ensure the
correct environment everywhere.
> https://code.videolan.org/videolan/vlc-android/commit/fd44d9297a9dcb3f4a35e1104490f960f03183e9
---
buildsystem/compile-libvlc.sh | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/buildsystem/compile-libvlc.sh b/buildsystem/compile-libvlc.sh
index 9f4476027..c973cdbd1 100755
--- a/buildsystem/compile-libvlc.sh
+++ b/buildsystem/compile-libvlc.sh
@@ -226,6 +226,13 @@ Libs: -l$1
Cflags:" > contrib/${TARGET_TUPLE}/lib/pkgconfig/$(echo $1|tr 'A-Z' 'a-z').pc
}
+avlc_pkgconfig()
+{
+ # Enforce pkg-config files coming from VLC contribs
+ PKG_CONFIG_PATH="$VLC_CONTRIB/lib/pkgconfig/" \
+ pkg-config "$@"
+}
+
avlc_build()
{
###########################
@@ -636,7 +643,7 @@ rm ${REDEFINED_VLC_MODULES_DIR}/syms
###########################
VLC_MODULES=$(avlc_find_modules ${REDEFINED_VLC_MODULES_DIR})
-VLC_CONTRIB_LDFLAGS=$(for i in $(/bin/ls $VLC_CONTRIB/lib/pkgconfig/*.pc); do PKG_CONFIG_PATH="$VLC_CONTRIB/lib/pkgconfig/" pkg-config --libs $i; done |xargs)
+VLC_CONTRIB_LDFLAGS=$(for i in $(/bin/ls $VLC_CONTRIB/lib/pkgconfig/*.pc); do avlc_pkgconfig --libs $i; done |xargs)
echo -e "ndk-build vlc"
touch $VLC_OUT_PATH/dummy.cpp
More information about the Android
mailing list