160d3aeb06
* update ndk to 17 * bump NDK version in setup-android script * libnl: fix for ndk r17 * libpixman: use clang's __builtin_shufflevector instead of __builtin_shuffle (#1) Required to make package build with ndk17. * fix as for arm * ndk17 still uses ld.bfd on aarch64 * use -fno-integrated-as for clang only * glib: remove patch unnecessary after ndk17 * torsocks: remove unneeded patch after ndk17 * subversion: fix build as clang++ now errors out for mismatched flags * libpulseaudio: fix build with ndk17 https://github.com/termux/termux-packages/pull/2415#issuecomment-388296684 * gst-plugins-good: disable video4linux2 ioctl is defined as __overloadable in ndk17 headers which conflicts with v4l2object's member ioctl * libzmq: disable Werror to build with ndk17 * ltrace: hardcode symbol not available in ndk17 * busybox: build with clang for all arches except arm * dropbear: build with clang instead of gcc * gnupg: build with clang instead of gcc * openssl: use clang for all arches except arm * picolisp: build with clang instead of gcc * valgrind: use clang on all arches except aarch64 * Revert "gst-plugins-good: disable video4linux2" This reverts commit 43850b81ccf60033c25cb13dfd326c1b0528773a. Already applied on base branch. * libllvm: use default arm triple
42 lines
1.1 KiB
Bash
Executable File
42 lines
1.1 KiB
Bash
Executable File
#!/bin/sh
|
|
set -e -u
|
|
|
|
# Install desired parts of the Android SDK:
|
|
test -f $HOME/.termuxrc && . $HOME/.termuxrc
|
|
: ${ANDROID_HOME:="${HOME}/lib/android-sdk"}
|
|
: ${NDK:="${HOME}/lib/android-ndk"}
|
|
|
|
if [ ! -d $ANDROID_HOME ]; then
|
|
mkdir -p $ANDROID_HOME
|
|
cd $ANDROID_HOME/..
|
|
rm -Rf `basename $ANDROID_HOME`
|
|
|
|
# https://developer.android.com/studio/index.html#command-tools
|
|
# The downloaded version below is 26.0.1.:
|
|
curl --fail --retry 3 \
|
|
-o tools.zip \
|
|
https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip
|
|
rm -Rf android-sdk
|
|
unzip -q tools.zip -d android-sdk
|
|
rm tools.zip
|
|
fi
|
|
|
|
if [ ! -d $NDK ]; then
|
|
mkdir -p $NDK
|
|
cd $NDK/..
|
|
rm -Rf `basename $NDK`
|
|
NDK_VERSION=r17
|
|
curl --fail --retry 3 -o ndk.zip \
|
|
http://dl.google.com/android/repository/android-ndk-${NDK_VERSION}-`uname`-x86_64.zip
|
|
|
|
rm -Rf android-ndk-$NDK_VERSION
|
|
unzip -q ndk.zip
|
|
mv android-ndk-$NDK_VERSION `basename $NDK`
|
|
rm ndk.zip
|
|
fi
|
|
|
|
yes | $ANDROID_HOME/tools/bin/sdkmanager --licenses
|
|
|
|
# The android-21 platform is used in the ecj package:
|
|
$ANDROID_HOME/tools/bin/sdkmanager "build-tools;27.0.3" "platforms;android-27" "platforms;android-21"
|