From 3e56ce235d339b4e9387ac0d5619302dc355bac7 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Mon, 6 Mar 2017 10:06:24 +0100 Subject: [PATCH] Revert "+x" This reverts commit 846546916759f9713f7dd9ea43ac19032c418b7d. --- dist-build/android-build.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/dist-build/android-build.sh b/dist-build/android-build.sh index 6feb5815..f89fd1fd 100755 --- a/dist-build/android-build.sh +++ b/dist-build/android-build.sh @@ -6,6 +6,8 @@ if [ -z "$NDK_PLATFORM" ]; then else export NDK_PLATFORM_COMPAT="${NDK_PLATFORM_COMPAT:-${NDK_PLATFORM}}" fi +export NDK_API_VERSION=$(echo "$NDK_PLATFORM" | sed 's/^android-//') +export NDK_API_VERSION_COMPAT=$(echo "$NDK_PLATFORM_COMPAT" | sed 's/^android-//') if [ -z "$ANDROID_NDK_HOME" ]; then echo "You should probably set ANDROID_NDK_HOME to the directory containing" @@ -23,7 +25,7 @@ if [ "x$TARGET_ARCH" = 'x' ] || [ "x$ARCH" = 'x' ] || [ "x$HOST_COMPILER" = 'x' exit 1 fi -export MAKE_TOOLCHAIN="${ANDROID_NDK_HOME}/build/tools/make-standalone-toolchain.sh" +export MAKE_TOOLCHAIN="${ANDROID_NDK_HOME}/build/tools/make_standalone_toolchain.py" export PREFIX="$(pwd)/libsodium-android-${TARGET_ARCH}" export TOOLCHAIN_DIR="$(pwd)/android-toolchain-${TARGET_ARCH}" @@ -35,8 +37,9 @@ echo echo "Building for platform [${NDK_PLATFORM}], retaining compatibility with platform [${NDK_PLATFORM_COMPAT}]" echo -bash $MAKE_TOOLCHAIN --force --platform="$NDK_PLATFORM_COMPAT" \ - --arch="$ARCH" --install-dir="$TOOLCHAIN_DIR" || exit 1 +env - PATH="$PATH" \ + $MAKE_TOOLCHAIN --force --api="$NDK_API_VERSION_COMPAT" \ + --unified-headers --arch="$ARCH" --install-dir="$TOOLCHAIN_DIR" || exit 1 ./configure \ --disable-soname-versions \ @@ -50,8 +53,9 @@ if [ "$NDK_PLATFORM" != "$NDK_PLATFORM_COMPAT" ]; then echo echo "Configuring again for platform [${NDK_PLATFORM}]" echo - bash $MAKE_TOOLCHAIN --force --platform="$NDK_PLATFORM" \ - --arch="$ARCH" --install-dir="$TOOLCHAIN_DIR" || exit 1 + env - PATH="$PATH" \ + $MAKE_TOOLCHAIN --force --api="$NDK_API_VERSION" \ + --unified-headers --arch="$ARCH" --install-dir="$TOOLCHAIN_DIR" || exit 1 ./configure \ --disable-soname-versions \