diff --git a/buildscripts/include/download-sdk.sh b/buildscripts/include/download-sdk.sh index b77e247..ab0a505 100755 --- a/buildscripts/include/download-sdk.sh +++ b/buildscripts/include/download-sdk.sh @@ -60,25 +60,10 @@ sdkmanager () { "$exe" --sdk_root="${ANDROID_HOME}" "$@" } echo y | sdkmanager \ - "platforms;android-33" "build-tools;${v_sdk_build_tools}" "cmake;3.22.1" - -# Android NDK (either standalone or installed by SDK) -if [ -d "android-ndk-${v_ndk}" ]; then - : -elif [ -d "android-sdk-$os/ndk/${v_ndk_n}" ]; then - ln -s "android-sdk-$os/ndk/${v_ndk_n}" "android-ndk-${v_ndk}" -elif [ -z "${os_ndk}" ]; then - echo y | sdkmanager "ndk;${v_ndk_n}" - ln -s "android-sdk-$os/ndk/${v_ndk_n}" "android-ndk-${v_ndk}" -else - $WGET "http://dl.google.com/android/repository/android-ndk-${v_ndk}-${os_ndk}.zip" - unzip -q "android-ndk-${v_ndk}-${os_ndk}.zip" - rm "android-ndk-${v_ndk}-${os_ndk}.zip" -fi -if ! grep -qF "${v_ndk_n}" "android-ndk-${v_ndk}/source.properties"; then - echo "Error: NDK exists but is not the correct version (expecting ${v_ndk_n})" - exit 255 -fi + "platforms;android-33" \ + "build-tools;${v_sdk_build_tools}" \ + "ndk;${v_ndk_n}" \ + "cmake;3.22.1" # gas-preprocessor mkdir -p bin diff --git a/buildscripts/include/path.sh b/buildscripts/include/path.sh index ac8be5e..38c1010 100755 --- a/buildscripts/include/path.sh +++ b/buildscripts/include/path.sh @@ -23,6 +23,6 @@ if [ -n "$ndk_triple" ]; then unset PKG_CONFIG_PATH fi -toolchain=$(echo "$DIR/sdk/android-ndk-r25b/toolchains/llvm/prebuilt/"*) -export PATH="$toolchain/bin:$DIR/sdk/android-ndk-r25b:$DIR/sdk/bin:$PATH" +toolchain=$(echo "$DIR/sdk/android-sdk-linux/ndk/$v_ndk_n/toolchains/llvm/prebuilt/"*) +export PATH="$toolchain/bin:$DIR/sdk/android-sdk-linux/ndk/$v_ndk_n:$DIR/sdk/bin:$PATH" export ANDROID_HOME="$DIR/sdk/android-sdk-$os" diff --git a/buildscripts/scripts/dav1d.sh b/buildscripts/scripts/dav1d.sh index aef89de..87a7198 100755 --- a/buildscripts/scripts/dav1d.sh +++ b/buildscripts/scripts/dav1d.sh @@ -1,5 +1,6 @@ #!/bin/bash -e +. ../../include/depinfo.sh . ../../include/path.sh build=_build$ndk_suffix diff --git a/buildscripts/scripts/ffmpeg.sh b/buildscripts/scripts/ffmpeg.sh index 37432f9..890d88b 100755 --- a/buildscripts/scripts/ffmpeg.sh +++ b/buildscripts/scripts/ffmpeg.sh @@ -1,5 +1,6 @@ #!/bin/bash -e +. ../../include/depinfo.sh . ../../include/path.sh if [ "$1" == "build" ]; then @@ -29,13 +30,7 @@ cpuflags= --enable-{jni,mediacodec,mbedtls,libdav1d} --disable-vulkan \ --disable-static --enable-shared --enable-{gpl,version3} \ --disable-{stripping,doc,programs} \ - --disable-{muxers,encoders,devices,filters} \ - #--disable-decoders \ - #--enable-decoder={h264,h264_mediacodec,hevc,hevc_mediacodec,vp8,vp8_mediacodec,vp9,vp9_mediacodec,mpeg2video,mpeg2_mediacodec,mpeg4,mpeg4_mediacodec,av1_mediacodec,ssa,srt,dvdsub,webvtt,aac,flac,ac3,eac3,truehd,dca,opus,libdav1d,vorbis,subrip} \ - #--disable-demuxers \ - #--enable-demuxer={matroska,mov,avi,srt,ass,webvtt,hls,mpegts,mpegvideo} \ - #--disable-parsers \ - #--enable-parser={aac,ac3,flac,h264,hevc,dvdsub,opus,vp8,vp9,vorbis,mpegvideo} + --disable-{muxers,encoders,devices,filters} make -j$cores make DESTDIR="$prefix_dir" install diff --git a/buildscripts/scripts/freetype.sh b/buildscripts/scripts/freetype.sh index deceb0b..752ba95 100755 --- a/buildscripts/scripts/freetype.sh +++ b/buildscripts/scripts/freetype.sh @@ -1,5 +1,6 @@ #!/bin/bash -e +. ../../include/depinfo.sh . ../../include/path.sh build=_build$ndk_suffix diff --git a/buildscripts/scripts/fribidi.sh b/buildscripts/scripts/fribidi.sh index a9e22aa..19c1e80 100755 --- a/buildscripts/scripts/fribidi.sh +++ b/buildscripts/scripts/fribidi.sh @@ -1,5 +1,6 @@ #!/bin/bash -e +. ../../include/depinfo.sh . ../../include/path.sh build=_build$ndk_suffix diff --git a/buildscripts/scripts/harfbuzz.sh b/buildscripts/scripts/harfbuzz.sh index efe8ce9..f59d7ea 100755 --- a/buildscripts/scripts/harfbuzz.sh +++ b/buildscripts/scripts/harfbuzz.sh @@ -1,5 +1,6 @@ #!/bin/bash -e +. ../../include/depinfo.sh . ../../include/path.sh build=_build$ndk_suffix diff --git a/buildscripts/scripts/libass.sh b/buildscripts/scripts/libass.sh index 4f1b30a..2a9a44e 100755 --- a/buildscripts/scripts/libass.sh +++ b/buildscripts/scripts/libass.sh @@ -1,5 +1,6 @@ #!/bin/bash -e +. ../../include/depinfo.sh . ../../include/path.sh if [ "$1" == "build" ]; then diff --git a/buildscripts/scripts/libplacebo.sh b/buildscripts/scripts/libplacebo.sh index 65f4e1d..91a5b3d 100755 --- a/buildscripts/scripts/libplacebo.sh +++ b/buildscripts/scripts/libplacebo.sh @@ -1,5 +1,6 @@ #!/bin/bash -e +. ../../include/depinfo.sh . ../../include/path.sh build=_build$ndk_suffix diff --git a/buildscripts/scripts/lua.sh b/buildscripts/scripts/lua.sh index 6b8ef8b..38a0f24 100755 --- a/buildscripts/scripts/lua.sh +++ b/buildscripts/scripts/lua.sh @@ -1,5 +1,6 @@ #!/bin/bash -e +. ../../include/depinfo.sh . ../../include/path.sh if [ "$1" == "build" ]; then diff --git a/buildscripts/scripts/mbedtls.sh b/buildscripts/scripts/mbedtls.sh index 5780c90..f2aec46 100755 --- a/buildscripts/scripts/mbedtls.sh +++ b/buildscripts/scripts/mbedtls.sh @@ -1,5 +1,6 @@ #!/bin/bash -e +. ../../include/depinfo.sh . ../../include/path.sh if [ "$1" == "build" ]; then diff --git a/buildscripts/scripts/mpv.sh b/buildscripts/scripts/mpv.sh index 12076ae..a73d8e4 100755 --- a/buildscripts/scripts/mpv.sh +++ b/buildscripts/scripts/mpv.sh @@ -1,5 +1,6 @@ #!/bin/bash -e +. ../../include/depinfo.sh . ../../include/path.sh if [ "$1" == "build" ]; then diff --git a/buildscripts/scripts/shaderc.sh b/buildscripts/scripts/shaderc.sh index 46c3688..4b3dcbe 100755 --- a/buildscripts/scripts/shaderc.sh +++ b/buildscripts/scripts/shaderc.sh @@ -1,5 +1,6 @@ #!/bin/bash -e +. ../../include/depinfo.sh . ../../include/path.sh if [ "$1" == "build" ]; then