From 74fd1aa207455e22e8945cd525e71b4ac67cc5c1 Mon Sep 17 00:00:00 2001 From: Javernaut Date: Wed, 22 Apr 2020 16:48:47 +0300 Subject: [PATCH] libspeex is now supported --- .travis.yml | 2 +- scripts/libspeex/build.sh | 24 ++++++++++++++++++++++++ scripts/libspeex/download.sh | 9 +++++++++ scripts/parse-arguments.sh | 3 +++ 4 files changed, 37 insertions(+), 1 deletion(-) create mode 100755 scripts/libspeex/build.sh create mode 100755 scripts/libspeex/download.sh diff --git a/.travis.yml b/.travis.yml index 82e6918..9668def 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,4 +17,4 @@ install: - curl http://archive.ubuntu.com/ubuntu/pool/universe/n/nasm/nasm_2.14.02-1_amd64.deb --output $HOME/nasm_2.14.02-1_amd64.deb - sudo dpkg -i $HOME/nasm_2.14.02-1_amd64.deb script: - - ./ffmpeg-android-maker.sh -dav1d -mp3lame -aom -opus -wavpack -twolame -android=18 + - ./ffmpeg-android-maker.sh -dav1d -mp3lame -aom -opus -wavpack -twolame -speex -android=18 diff --git a/scripts/libspeex/build.sh b/scripts/libspeex/build.sh new file mode 100755 index 0000000..e319495 --- /dev/null +++ b/scripts/libspeex/build.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +ADDITIONAL_FLAGS= +if [[ $ANDROID_ABI = "x86" ]] || [[ $ANDROID_ABI = "x86_64" ]]; then + ADDITIONAL_FLAGS=--enable-sse +fi + +./configure \ + --prefix=${INSTALL_DIR} \ + --host=${TARGET} \ + --with-sysroot=${SYSROOT_PATH} \ + --disable-shared \ + --enable-static \ + --with-pic \ + CC=${FAM_CC} \ + AR=${FAM_AR} \ + RANLIB=${FAM_RANLIB} \ + ${ADDITIONAL_FLAGS} || exit 1 + +export FFMPEG_EXTRA_LD_FLAGS="${FFMPEG_EXTRA_LD_FLAGS} -lm" + +${MAKE_EXECUTABLE} clean +${MAKE_EXECUTABLE} -j${HOST_NPROC} +${MAKE_EXECUTABLE} install diff --git a/scripts/libspeex/download.sh b/scripts/libspeex/download.sh new file mode 100755 index 0000000..e03ea81 --- /dev/null +++ b/scripts/libspeex/download.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +source ${SCRIPTS_DIR}/common-functions.sh + +SPEEX_VERSION=1.2.0 + +downloadTarArchive \ + "libspeex" \ + "https://ftp.osuosl.org/pub/xiph/releases/speex/speex-${SPEEX_VERSION}.tar.gz" diff --git a/scripts/parse-arguments.sh b/scripts/parse-arguments.sh index 9b8e88f..0ab1d01 100755 --- a/scripts/parse-arguments.sh +++ b/scripts/parse-arguments.sh @@ -85,6 +85,9 @@ for argument in "$@"; do --enable-libtwolame|-twolame) EXTERNAL_LIBRARIES+=( "libtwolame" ) ;; + --enable-libspeex|-speex) + EXTERNAL_LIBRARIES+=( "libspeex" ) + ;; *) echo "Unknown argument $argument" ;;