mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-25 08:37:13 +09:00
Try to go to the NDK directory containing "source.properties"
This commit is contained in:
@@ -12,6 +12,16 @@ if [ -z "$ANDROID_NDK_HOME" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "${ANDROID_NDK_HOME}/source.properties" ]; then
|
||||
sp=$(find "${ANDROID_NDK_HOME}" -depth 2 -type f -name source.properties | head -n1)
|
||||
if [ -n "$sp" ]; then
|
||||
export ANDROID_NDK_HOME=$(dirname "$sp")
|
||||
else
|
||||
echo "The ANDROID_NDK_HOME directory does not contain a 'source.properties' file."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
NDK_VERSION=$(grep "Pkg.Revision = " <"${ANDROID_NDK_HOME}/source.properties" | cut -f 2 -d '=' | cut -f 2 -d' ' | cut -f 1 -d'.')
|
||||
DEST_PATH=$(mktemp -d)
|
||||
|
||||
@@ -46,8 +56,6 @@ make_manifest() {
|
||||
}
|
||||
|
||||
make_prefab_structure() {
|
||||
mkdir "$DEST_PATH"
|
||||
|
||||
for variant_dirs in "prefab" "prefab/modules" "META-INF"; do
|
||||
mkdir "${DEST_PATH}/${variant_dirs}"
|
||||
done
|
||||
|
||||
@@ -28,7 +28,6 @@ fi
|
||||
export PREFIX="$(pwd)/libsodium-android-${TARGET_ARCH}"
|
||||
export TOOLCHAIN_OS_DIR="$(uname | tr '[:upper:]' '[:lower:]')-x86_64/"
|
||||
export TOOLCHAIN_DIR="$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/${TOOLCHAIN_OS_DIR}"
|
||||
echo "$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/${TOOLCHAIN_OS_DIR}/${HOST_COMPILER}"
|
||||
|
||||
export PATH="${PATH}:${TOOLCHAIN_DIR}/bin"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user