[Android] [RFC PATCH] compile-libvlc.sh: fix NDK version check

Geoffrey Métais geoffrey.metais at gmail.com
Fri Aug 5 22:01:22 CEST 2016


Actually, vlc-android needs ndk11, and is not compliant with ndk12.
We still have to make our code respect ndk12 rules

Le ven. 5 août 2016 21:31, Filip Roséen <filip at atch.se> a écrit :

> The diagnostic certainly implies that the shell script shall abort if
> the version of the NDK is less than 11, though the previous case-check
> only matched versions matching "11*".
>
> This commit changes the implementation so that we check whether "$REL"
> is greater-than-or-equal compared to 11.
>
> ---
>
> The current implementation caused be a slight headache when trying to
> build using "Pkg.Revision = 12.1.2977051".
> ---
>  compile-libvlc.sh | 20 +++++++++-----------
>  1 file changed, 9 insertions(+), 11 deletions(-)
>
> diff --git a/compile-libvlc.sh b/compile-libvlc.sh
> index 381e4ee..b9a3bbd 100755
> --- a/compile-libvlc.sh
> +++ b/compile-libvlc.sh
> @@ -279,19 +279,17 @@ fi
>  # try to detect NDK version
>  GCCVER=4.9
>  REL=$(grep -o '^Pkg.Revision.*[0-9]*.*' $ANDROID_NDK/source.properties
> |cut -d " " -f 3 | cut -d "." -f 1)
> -case "$REL" in
> -    11*)
> -        if [ "${HAVE_64}" = 1 ];then
> -            ANDROID_API=android-21
> -        else
> -            ANDROID_API=android-9
> -        fi
> -    ;;
> -    *)
> +
> +if [ "$REL" -ge 11 ]; then
> +    if [ "${HAVE_64}" = 1 ];then
> +        ANDROID_API=android-21
> +    else
> +        ANDROID_API=android-9
> +    fi
> +else
>      echo "You need the NDKv11 or later"
>      exit 1
> -    ;;
> -esac
> +fi
>
>  SYSROOT=$ANDROID_NDK/platforms/$ANDROID_API/arch-$PLATFORM_SHORT_ARCH
>  SRC_DIR=$PWD
> --
> 2.9.2
>
> _______________________________________________
> Android mailing list
> Android at videolan.org
> https://mailman.videolan.org/listinfo/android
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/android/attachments/20160805/50e686f5/attachment.html>


More information about the Android mailing list