From f2197adbcab4e592374cc2d74ebf2ac93ae177c8 Mon Sep 17 00:00:00 2001 From: hanbowen Date: Mon, 11 Jul 2022 22:25:19 +0800 Subject: [PATCH] Remove FFMPEG_MBEDTLS_ENABLED Refactor EXTRA_BUILD_CONFIGURATION_FLAGS variable to be available for all libraries for a given ABI(just as FFMPEG_EXTRA_LD_FLAGS Append the EXTRA_BUILD_CONFIGURATION_FLAGS with --enable-protocol=https --enable-version in mbedtls/build.sh --- scripts/export-build-variables.sh | 3 +++ scripts/ffmpeg/build.sh | 8 ++------ scripts/mbedtls/build.sh | 2 +- scripts/parse-arguments.sh | 1 - 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/scripts/export-build-variables.sh b/scripts/export-build-variables.sh index d913f85..beca8d6 100755 --- a/scripts/export-build-variables.sh +++ b/scripts/export-build-variables.sh @@ -81,6 +81,9 @@ export FAM_YASM=${TOOLCHAIN_PATH}/bin/yasm # A variable to which certain dependencies can add -l arguments during build.sh export FFMPEG_EXTRA_LD_FLAGS= +# A variable to which certain dependencies can add addtional arguments during ffmpeg build.sh +export EXTRA_BUILD_CONFIGURATION_FLAGS= + export INSTALL_DIR=${BUILD_DIR_EXTERNAL}/${ANDROID_ABI} # Forcing FFmpeg and its dependencies to look for dependencies diff --git a/scripts/ffmpeg/build.sh b/scripts/ffmpeg/build.sh index 49b66d0..d0078ca 100755 --- a/scripts/ffmpeg/build.sh +++ b/scripts/ffmpeg/build.sh @@ -3,10 +3,10 @@ case $ANDROID_ABI in x86) # Disabling assembler optimizations, because they have text relocations - EXTRA_BUILD_CONFIGURATION_FLAGS=--disable-asm + EXTRA_BUILD_CONFIGURATION_FLAGS="$EXTRA_BUILD_CONFIGURATION_FLAGS --disable-asm" ;; x86_64) - EXTRA_BUILD_CONFIGURATION_FLAGS=--x86asmexe=${FAM_YASM} + EXTRA_BUILD_CONFIGURATION_FLAGS="$EXTRA_BUILD_CONFIGURATION_FLAGS --x86asmexe=${FAM_YASM}" ;; esac @@ -14,10 +14,6 @@ if [ "$FFMPEG_GPL_ENABLED" = true ] ; then EXTRA_BUILD_CONFIGURATION_FLAGS="$EXTRA_BUILD_CONFIGURATION_FLAGS --enable-gpl" fi -if [ "$FFMPEG_MBEDTLS_ENABLED" = true ] ; then -EXTRA_BUILD_CONFIGURATION_FLAGS="$EXTRA_BUILD_CONFIGURATION_FLAGS --enable-protocol=https --enable-version3" -fi - # Preparing flags for enabling requested libraries ADDITIONAL_COMPONENTS= for LIBARY_NAME in ${FFMPEG_EXTERNAL_LIBRARIES[@]} diff --git a/scripts/mbedtls/build.sh b/scripts/mbedtls/build.sh index d634ac1..91b0c19 100755 --- a/scripts/mbedtls/build.sh +++ b/scripts/mbedtls/build.sh @@ -18,4 +18,4 @@ ${CMAKE_EXECUTABLE} .. \ ${MAKE_EXECUTABLE} -j${HOST_NPROC} ${MAKE_EXECUTABLE} install -export FFMPEG_MBEDTLS_ENABLED=true \ No newline at end of file +export EXTRA_BUILD_CONFIGURATION_FLAGS="$EXTRA_BUILD_CONFIGURATION_FLAGS --enable-protocol=https --enable-version3" \ No newline at end of file diff --git a/scripts/parse-arguments.sh b/scripts/parse-arguments.sh index af8953d..6ab9942 100755 --- a/scripts/parse-arguments.sh +++ b/scripts/parse-arguments.sh @@ -12,7 +12,6 @@ SOURCE_TYPE=TAR SOURCE_VALUE=5.0.1 EXTERNAL_LIBRARIES=() FFMPEG_GPL_ENABLED=false -FFMPEG_MBEDTLS_ENABLED=false # All FREE libraries that are supported SUPPORTED_LIBRARIES_FREE=(