From 5486982ccf0567a6568ab80c05a708865b75ab0d Mon Sep 17 00:00:00 2001 From: Gerhard Stein Date: Fri, 2 Dec 2016 18:09:26 +0100 Subject: [PATCH] Updated to ndk 13b --- env | 4 ++-- mk/build_ndk.sh | 11 ++++++++++- mk/ndk_source.sh | 14 +++++++++++++- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/env b/env index 45243595..57e4de24 100644 --- a/env +++ b/env @@ -6,9 +6,9 @@ export ANDROID_TOOL_PREFIX="${BASE}/build-tools" export ANDROID_TEST_PREFIX="${BASE}/build-vm" # SDKs and target platforms. -export NDK_REL=android-ndk-r10d +export NDK_REL=android-ndk-r13b export SDK_REL=android-sdk-r24.0.2 -export NDK_REV=10d +export NDK_REV=13b export SDK_REV=24.0.2 export ANDROID_API_LEVEL=21 export ANDROID_PLATFORM=arm diff --git a/mk/build_ndk.sh b/mk/build_ndk.sh index cbc953c3..f733b021 100755 --- a/mk/build_ndk.sh +++ b/mk/build_ndk.sh @@ -30,6 +30,15 @@ case "${NDK_REV}" in popd fi ;; + 13*) + NDK_ARCHIVE="$BASE/sdk/android-ndk-r${NDK_REV}-$(uname -s | tr '[A-Z]' '[a-z]')-${NDK_ARCH}.zip" + if [[ ! -d "${BASE}/sdk/${NDK_REL}" ]]; then + # Zip archive. + pushd "${BASE}/sdk" + unzip "${NDK_ARCHIVE}" || exit 1 + popd + fi + ;; *) NDK_ARCHIVE="$BASE/sdk/android-ndk-r${NDK_REV}-$(uname -s | tr '[A-Z]' '[a-z]')-${NDK_ARCH}.tar.bz2" if [[ ! -d "${BASE}/sdk/${NDK_REL}" ]]; then @@ -40,6 +49,6 @@ case "${NDK_REV}" in esac if [[ ! -f "${ANDROID_PREFIX}/.built-ndk-${BUILD_IDENTIFIER}" ]]; then - ("${BASE}/sdk/${NDK_REL}/build/tools/make-standalone-toolchain.sh" --platform="android-${ANDROID_API_LEVEL}" --install-dir="${ANDROID_TOOL_PREFIX}/${BUILD_IDENTIFIER}" --toolchain="${ANDROID_TOOLCHAIN}" &&\ + ("${BASE}/sdk/${NDK_REL}/build/tools/make-standalone-toolchain.sh" --force --platform="android-${ANDROID_API_LEVEL}" --install-dir="${ANDROID_TOOL_PREFIX}/${BUILD_IDENTIFIER}" --toolchain="${ANDROID_TOOLCHAIN}" &&\ touch "${ANDROID_PREFIX}/.built-ndk-${BUILD_IDENTIFIER}") || exit 1 fi diff --git a/mk/ndk_source.sh b/mk/ndk_source.sh index 9728d983..340cbda9 100644 --- a/mk/ndk_source.sh +++ b/mk/ndk_source.sh @@ -15,13 +15,25 @@ case $(uname -m) in ;; esac +# NOTE: For newer is seems that we require to unzip case "${NDK_REV}" in 10*) NDK_EXT=bin ;; + 13*) + NDK_EXT=zip + ;; *) NDK_EXT=tar.bz2 ;; esac -echo http://dl.google.com/android/ndk/android-ndk-r${NDK_REV}-$(uname -s | tr '[A-Z]' '[a-z'])-${NDK_ARCH}.${NDK_EXT} + +case "${NDK_EXT}" in + zip) + echo http://dl.google.com/android/repository//android-ndk-r${NDK_REV}-$(uname -s | tr '[A-Z]' '[a-z'])-${NDK_ARCH}.${NDK_EXT} + ;; + *) + echo http://dl.google.com/android/ndk/android-ndk-r${NDK_REV}-$(uname -s | tr '[A-Z]' '[a-z'])-${NDK_ARCH}.${NDK_EXT} + ;; +esac