diff --git a/scripts/android/chromaprint.sh b/scripts/android/chromaprint.sh index 52e0972..947ab55 100755 --- a/scripts/android/chromaprint.sh +++ b/scripts/android/chromaprint.sh @@ -14,17 +14,20 @@ cmake -Wno-dev \ -DCMAKE_INSTALL_PREFIX="${LIB_INSTALL_PREFIX}" \ -DCMAKE_SYSTEM_NAME=Generic \ -DCMAKE_C_COMPILER="${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/${TOOLCHAIN}/bin/$CC" \ + -DCMAKE_CXX_COMPILER="${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/${TOOLCHAIN}/bin/$CXX" \ -DCMAKE_LINKER="${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/${TOOLCHAIN}/bin/$LD" \ -DCMAKE_AR="${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/${TOOLCHAIN}/bin/$AR" \ -DCMAKE_AS="${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/${TOOLCHAIN}/bin/$AS" \ -DCMAKE_SYSTEM_PROCESSOR=$(get_cmake_system_processor) \ -DCMAKE_POSITION_INDEPENDENT_CODE=1 \ -DFFT_LIB=kissfft \ - -DBUILD_SHARED_LIBS=0 "${BASEDIR}"/src/"${LIB_NAME}" || return 1 + -DKISSFFT_SOURCE_DIR="${BASEDIR}"/src/"${LIB_NAME}"/src/3rdparty/kissfft \ + -DBUILD_SHARED_LIBS=0 \ + -DBUILD_TESTS=0 "${BASEDIR}"/src/"${LIB_NAME}" || return 1 make -j$(get_cpu_count) || return 1 make install || return 1 # CREATE PACKAGE CONFIG MANUALLY -create_chromaprint_package_config "1.5.0" || return 1 +create_chromaprint_package_config "1.5.1" || return 1 diff --git a/scripts/android/expat.sh b/scripts/android/expat.sh index 62794bb..6cf67d4 100755 --- a/scripts/android/expat.sh +++ b/scripts/android/expat.sh @@ -7,7 +7,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/"${LIB_NAME}"/configure ]] || [[ ${RECONF_expat} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/android/ffmpeg.sh b/scripts/android/ffmpeg.sh index 3781a4b..7b6d2d7 100755 --- a/scripts/android/ffmpeg.sh +++ b/scripts/android/ffmpeg.sh @@ -29,7 +29,7 @@ export CXXFLAGS=$(get_cxxflags "${LIB_NAME}") export LDFLAGS=$(get_ldflags "${LIB_NAME}") export PKG_CONFIG_LIBDIR="${INSTALL_PKG_CONFIG_DIR}" -cd "${BASEDIR}"/src/"${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 +cd "${BASEDIR}"/src/"${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 # SET BUILD OPTIONS TARGET_CPU="" @@ -389,19 +389,19 @@ export CFLAGS="${HIGH_PRIORITY_INCLUDES} ${CFLAGS}" ulimit -n 2048 1>>"${BASEDIR}"/build.log 2>&1 ########################### CUSTOMIZATIONS ####################### -cd "${BASEDIR}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 +cd "${BASEDIR}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 git checkout android/ffmpeg-kit-android-lib/src/main/cpp/ffmpegkit.c 1>>"${BASEDIR}"/build.log 2>&1 -cd "${BASEDIR}"/src/"${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 +cd "${BASEDIR}"/src/"${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 git checkout libavformat/file.c 1>>"${BASEDIR}"/build.log 2>&1 git checkout libavformat/protocols.c 1>>"${BASEDIR}"/build.log 2>&1 git checkout libavutil 1>>"${BASEDIR}"/build.log 2>&1 # 1. Use thread local log levels -${SED_INLINE} 's/static int av_log_level/__thread int av_log_level/g' "${BASEDIR}"/src/"${LIB_NAME}"/libavutil/log.c 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 +${SED_INLINE} 's/static int av_log_level/__thread int av_log_level/g' "${BASEDIR}"/src/"${LIB_NAME}"/libavutil/log.c 1>>"${BASEDIR}"/build.log 2>&1 || return 1 # 2. Set friendly ffmpeg version FFMPEG_VERSION="v$(get_user_friendly_ffmpeg_version)" -${SED_INLINE} "s/\$version/$FFMPEG_VERSION/g" "${BASEDIR}"/src/"${LIB_NAME}"/ffbuild/version.sh 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 +${SED_INLINE} "s/\$version/$FFMPEG_VERSION/g" "${BASEDIR}"/src/"${LIB_NAME}"/ffbuild/version.sh 1>>"${BASEDIR}"/build.log 2>&1 || return 1 # 3. Enable ffmpeg-kit protocols if [[ ${NO_FFMPEG_KIT_PROTOCOLS} == "1" ]]; then @@ -503,7 +503,7 @@ fi # DELETE THE PREVIOUS BUILD OF THE LIBRARY BEFORE INSTALLING if [ -d "${FFMPEG_LIBRARY_PATH}" ]; then - rm -rf "${FFMPEG_LIBRARY_PATH}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + rm -rf "${FFMPEG_LIBRARY_PATH}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi make install 1>>"${BASEDIR}"/build.log 2>&1 diff --git a/scripts/android/fontconfig.sh b/scripts/android/fontconfig.sh index 695728c..c490f35 100755 --- a/scripts/android/fontconfig.sh +++ b/scripts/android/fontconfig.sh @@ -3,16 +3,19 @@ # ALWAYS CLEAN THE PREVIOUS BUILD make distclean 2>/dev/null 1>/dev/null +# WORKAROUND FOR "bad flag in substitute command" +${SED_INLINE} "s|in \"\$default_fonts\"|in \$default_fonts|g" "${BASEDIR}"/src/"${LIB_NAME}"/configure.ac 1>>"${BASEDIR}"/build.log 2>&1 + # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_fontconfig} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi # WORKAROUND TO FIX NOT-APPLIED HAVE_POSIX_FADVISE define ON MACOS if [[ -n ${FFMPEG_KIT_LTS_BUILD} ]]; then - ${SED_INLINE} "s/(HAVE_POSIX_FADVISE)/(NO_HAVE_POSIX_FADVISE)/g" "${BASEDIR}"/src/"${LIB_NAME}"/src/fccache.c 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + ${SED_INLINE} "s/(HAVE_POSIX_FADVISE)/(NO_HAVE_POSIX_FADVISE)/g" "${BASEDIR}"/src/"${LIB_NAME}"/src/fccache.c 1>>"${BASEDIR}"/build.log 2>&1 || return 1 else - ${SED_INLINE} "s/NO_HAVE_POSIX_FADVISE/HAVE_POSIX_FADVISE/g" "${BASEDIR}"/src/"${LIB_NAME}"/src/fccache.c 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + ${SED_INLINE} "s/NO_HAVE_POSIX_FADVISE/HAVE_POSIX_FADVISE/g" "${BASEDIR}"/src/"${LIB_NAME}"/src/fccache.c 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ @@ -34,4 +37,4 @@ make -j$(get_cpu_count) || return 1 make install || return 1 # CREATE PACKAGE CONFIG MANUALLY -create_fontconfig_package_config "2.13.93" || return 1 +create_fontconfig_package_config "2.13.94" || return 1 diff --git a/scripts/android/freetype.sh b/scripts/android/freetype.sh index 17cd945..03943f0 100755 --- a/scripts/android/freetype.sh +++ b/scripts/android/freetype.sh @@ -11,7 +11,7 @@ make distclean 2>/dev/null 1>/dev/null if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/builds/unix/configure ]] || [[ ${RECONF_freetype} -eq 1 ]]; then # NOTE THAT FREETYPE DOES NOT SUPPORT AUTORECONF BUT IT COMES WITH AN autogen.sh - ./autogen.sh || exit 1 + ./autogen.sh || return 1 fi ./configure \ @@ -37,4 +37,4 @@ make -j$(get_cpu_count) || return 1 make install || return 1 # CREATE PACKAGE CONFIG MANUALLY -create_freetype_package_config "24.0.18" || return 1 +create_freetype_package_config "24.1.18" || return 1 diff --git a/scripts/android/fribidi.sh b/scripts/android/fribidi.sh index 845377f..ed5bd88 100755 --- a/scripts/android/fribidi.sh +++ b/scripts/android/fribidi.sh @@ -5,7 +5,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_fribidi} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/android/giflib.sh b/scripts/android/giflib.sh index ebf1ff2..ce75034 100755 --- a/scripts/android/giflib.sh +++ b/scripts/android/giflib.sh @@ -8,7 +8,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_giflib} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/android/gmp.sh b/scripts/android/gmp.sh index 4b1edd2..3cfc749 100755 --- a/scripts/android/gmp.sh +++ b/scripts/android/gmp.sh @@ -5,7 +5,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_gmp} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/android/harfbuzz.sh b/scripts/android/harfbuzz.sh index 7955637..f739d4f 100755 --- a/scripts/android/harfbuzz.sh +++ b/scripts/android/harfbuzz.sh @@ -5,7 +5,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_harfbuzz} -eq 1 ]]; then - NOCONFIGURE=1 ./autogen.sh || exit 1 + NOCONFIGURE=1 ./autogen.sh || return 1 fi ./configure \ diff --git a/scripts/android/kvazaar.sh b/scripts/android/kvazaar.sh index 5793862..f668c43 100755 --- a/scripts/android/kvazaar.sh +++ b/scripts/android/kvazaar.sh @@ -5,7 +5,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_kvazaar} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi # UPDATE BUILD FLAGS diff --git a/scripts/android/lame.sh b/scripts/android/lame.sh index 5352851..35b896a 100755 --- a/scripts/android/lame.sh +++ b/scripts/android/lame.sh @@ -7,7 +7,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_lame} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/android/leptonica.sh b/scripts/android/leptonica.sh index 610f59d..95301b0 100755 --- a/scripts/android/leptonica.sh +++ b/scripts/android/leptonica.sh @@ -23,7 +23,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_leptonica} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/android/libaom.sh b/scripts/android/libaom.sh index ae5a4d0..6078f97 100755 --- a/scripts/android/libaom.sh +++ b/scripts/android/libaom.sh @@ -56,4 +56,4 @@ make -j$(get_cpu_count) || return 1 make install || return 1 # CREATE PACKAGE CONFIG MANUALLY -create_libaom_package_config "3.1.2" || return 1 +create_libaom_package_config "3.2.0" || return 1 diff --git a/scripts/android/libass.sh b/scripts/android/libass.sh index 02e5c14..648d589 100755 --- a/scripts/android/libass.sh +++ b/scripts/android/libass.sh @@ -19,7 +19,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_libass} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/android/libiconv.sh b/scripts/android/libiconv.sh index db36b77..a4dd556 100755 --- a/scripts/android/libiconv.sh +++ b/scripts/android/libiconv.sh @@ -8,7 +8,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_libiconv} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/android/libilbc.sh b/scripts/android/libilbc.sh index f1361d7..c2c14ef 100755 --- a/scripts/android/libilbc.sh +++ b/scripts/android/libilbc.sh @@ -5,7 +5,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_libilbc} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/android/libogg.sh b/scripts/android/libogg.sh index ec9816e..c44ff2b 100755 --- a/scripts/android/libogg.sh +++ b/scripts/android/libogg.sh @@ -5,7 +5,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_libogg} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/android/libpng.sh b/scripts/android/libpng.sh index c1f1509..af42569 100755 --- a/scripts/android/libpng.sh +++ b/scripts/android/libpng.sh @@ -22,7 +22,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_libpng} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/android/libsamplerate.sh b/scripts/android/libsamplerate.sh index 3609c3f..f527814 100755 --- a/scripts/android/libsamplerate.sh +++ b/scripts/android/libsamplerate.sh @@ -5,7 +5,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_libsamplerate} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/android/libsndfile.sh b/scripts/android/libsndfile.sh index 2508a08..9fa645e 100755 --- a/scripts/android/libsndfile.sh +++ b/scripts/android/libsndfile.sh @@ -5,7 +5,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_libsndfile} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/android/libtheora.sh b/scripts/android/libtheora.sh index a28053b..c84f049 100755 --- a/scripts/android/libtheora.sh +++ b/scripts/android/libtheora.sh @@ -16,7 +16,7 @@ if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_libtheora} # WORKAROUND NOT TO RUN CONFIGURE AT THE END OF autogen.sh ${SED_INLINE} 's/$srcdir\/configure/#$srcdir\/configure/g' "${BASEDIR}"/src/"${LIB_NAME}"/autogen.sh || return 1 - ./autogen.sh || exit 1 + ./autogen.sh || return 1 fi ./configure \ diff --git a/scripts/android/libuuid.sh b/scripts/android/libuuid.sh index 94e1429..ad5c983 100755 --- a/scripts/android/libuuid.sh +++ b/scripts/android/libuuid.sh @@ -5,7 +5,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_libuuid} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/android/libvidstab.sh b/scripts/android/libvidstab.sh index b82c06c..8803af9 100755 --- a/scripts/android/libvidstab.sh +++ b/scripts/android/libvidstab.sh @@ -15,7 +15,7 @@ mkdir -p "${BUILD_DIR}" || return 1 cd "${BUILD_DIR}" || return 1 # WORKAROUND TO DETECT ASM FLAGS PROPERLY -${SED_INLINE} 's/ ${CPUINFO}/ "${CPUINFO}"/g' "${BASEDIR}"/src/"${LIB_NAME}"/CMakeModules/FindSSE.cmake 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 +${SED_INLINE} 's/ ${CPUINFO}/ "${CPUINFO}"/g' "${BASEDIR}"/src/"${LIB_NAME}"/CMakeModules/FindSSE.cmake 1>>"${BASEDIR}"/build.log 2>&1 || return 1 cmake -Wno-dev \ -DCMAKE_VERBOSE_MAKEFILE=0 \ diff --git a/scripts/android/libvorbis.sh b/scripts/android/libvorbis.sh index 6f0d87b..4e6c8fd 100755 --- a/scripts/android/libvorbis.sh +++ b/scripts/android/libvorbis.sh @@ -9,7 +9,7 @@ if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_libvorbis} # -mno-ieee-fp OPTION IS NOT COMPATIBLE WITH clang. REMOVING IT ${SED_INLINE} 's/\-mno-ieee-fp//g' "${BASEDIR}"/src/"${LIB_NAME}"/configure.ac || return 1 - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi PKG_CONFIG= ./configure \ diff --git a/scripts/android/libwebp.sh b/scripts/android/libwebp.sh index 183fb63..0df1311 100755 --- a/scripts/android/libwebp.sh +++ b/scripts/android/libwebp.sh @@ -19,7 +19,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_libwebp} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/android/libxml2.sh b/scripts/android/libxml2.sh index 2007321..eaa497c 100755 --- a/scripts/android/libxml2.sh +++ b/scripts/android/libxml2.sh @@ -11,7 +11,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_libxml2} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/android/nettle.sh b/scripts/android/nettle.sh index 1061111..8461116 100755 --- a/scripts/android/nettle.sh +++ b/scripts/android/nettle.sh @@ -20,7 +20,7 @@ if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_nettle} -e # WORKAROUND TO FIX BUILD SYSTEM COMPILER ON macOS overwrite_file "${BASEDIR}"/tools/patch/make/nettle/aclocal.m4 "${BASEDIR}"/src/"${LIB_NAME}"/aclocal.m4 - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/android/opencore-amr.sh b/scripts/android/opencore-amr.sh index 3d4b863..99fe14a 100755 --- a/scripts/android/opencore-amr.sh +++ b/scripts/android/opencore-amr.sh @@ -5,7 +5,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_opencore_amr} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/android/openssl.sh b/scripts/android/openssl.sh index 1179a21..76eb706 100644 --- a/scripts/android/openssl.sh +++ b/scripts/android/openssl.sh @@ -29,7 +29,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_openssl} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi INT128_AVAILABLE=$($CC -dM -E - >"${BASEDIR}"/build.log | grep __SIZEOF_INT128__) diff --git a/scripts/android/opus.sh b/scripts/android/opus.sh index 89e14b7..ea1d22f 100755 --- a/scripts/android/opus.sh +++ b/scripts/android/opus.sh @@ -5,7 +5,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_opus} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/android/rubberband.sh b/scripts/android/rubberband.sh index b4dde77..77040ce 100755 --- a/scripts/android/rubberband.sh +++ b/scripts/android/rubberband.sh @@ -12,7 +12,7 @@ overwrite_file "${BASEDIR}"/tools/patch/make/rubberband/rubberband.pc.in "${BASE ${SED_INLINE} 's/%DEPENDENCIES%/sndfile, samplerate/g' "${BASEDIR}"/src/"${LIB_NAME}"/rubberband.pc.in || return 1 # ALWAYS REGENERATE BUILD FILES - NECESSARY TO APPLY THE WORKAROUNDS -autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 +autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 ./configure \ --prefix="${LIB_INSTALL_PREFIX}" \ diff --git a/scripts/android/sdl.sh b/scripts/android/sdl.sh index 4a728b0..6022ab1 100755 --- a/scripts/android/sdl.sh +++ b/scripts/android/sdl.sh @@ -5,7 +5,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_sdl} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/android/shine.sh b/scripts/android/shine.sh index 5be2f29..7b0087c 100755 --- a/scripts/android/shine.sh +++ b/scripts/android/shine.sh @@ -5,7 +5,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_shine} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/android/speex.sh b/scripts/android/speex.sh index 3187784..8c60cc3 100755 --- a/scripts/android/speex.sh +++ b/scripts/android/speex.sh @@ -13,7 +13,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_soxr} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/android/tesseract.sh b/scripts/android/tesseract.sh index c96c8ba..a99ec0f 100755 --- a/scripts/android/tesseract.sh +++ b/scripts/android/tesseract.sh @@ -9,7 +9,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_tesseract} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi # WORKAROUND TO MANUALLY SET ENDIANNESS diff --git a/scripts/android/tiff.sh b/scripts/android/tiff.sh index beeaf13..b484450 100755 --- a/scripts/android/tiff.sh +++ b/scripts/android/tiff.sh @@ -5,7 +5,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_tiff} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/android/twolame.sh b/scripts/android/twolame.sh index 51c208d..8b6a340 100755 --- a/scripts/android/twolame.sh +++ b/scripts/android/twolame.sh @@ -9,7 +9,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_twolame} -eq 1 ]]; then - NOCONFIGURE=1 ./autogen.sh || exit 1 + NOCONFIGURE=1 ./autogen.sh || return 1 fi ./configure \ diff --git a/scripts/android/vo-amrwbenc.sh b/scripts/android/vo-amrwbenc.sh index 778af4e..914a793 100755 --- a/scripts/android/vo-amrwbenc.sh +++ b/scripts/android/vo-amrwbenc.sh @@ -13,7 +13,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_vo_amrwbenc} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/android/x264.sh b/scripts/android/x264.sh index 0e41ba0..7115e2a 100755 --- a/scripts/android/x264.sh +++ b/scripts/android/x264.sh @@ -28,7 +28,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_x264} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/android/zimg.sh b/scripts/android/zimg.sh index 08713d7..97b71b1 100644 --- a/scripts/android/zimg.sh +++ b/scripts/android/zimg.sh @@ -5,7 +5,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_zimg} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/apple/chromaprint.sh b/scripts/apple/chromaprint.sh index 808275d..9ecb96f 100755 --- a/scripts/apple/chromaprint.sh +++ b/scripts/apple/chromaprint.sh @@ -15,14 +15,16 @@ cmake -Wno-dev \ -DCMAKE_SYSTEM_NAME="${CMAKE_SYSTEM_NAME}" \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX="${LIB_INSTALL_PREFIX}" \ + -DCMAKE_CXX_COMPILER="$CXX" \ -DCMAKE_C_COMPILER="$CC" \ -DCMAKE_LINKER="$LD" \ -DCMAKE_AR="$(xcrun --sdk "$(get_sdk_name)" -f ar)" \ -DCMAKE_AS="$AS" \ -DFFT_LIB=kissfft \ - -DKISSFFT_SOURCE_DIR="${BASEDIR}"/src/"${LIB_NAME}"/vendor/kissfft \ + -DKISSFFT_SOURCE_DIR="${BASEDIR}"/src/"${LIB_NAME}"/src/3rdparty/kissfft \ -DCMAKE_SYSTEM_PROCESSOR="$(get_target_cpu)" \ - -DBUILD_SHARED_LIBS=0 "${BASEDIR}"/src/"${LIB_NAME}" || return 1 + -DBUILD_SHARED_LIBS=0 \ + -DBUILD_TESTS=0 "${BASEDIR}"/src/"${LIB_NAME}" || return 1 make -j$(get_cpu_count) || return 1 diff --git a/scripts/apple/expat.sh b/scripts/apple/expat.sh index d2b4a18..3d97a82 100755 --- a/scripts/apple/expat.sh +++ b/scripts/apple/expat.sh @@ -7,7 +7,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/"${LIB_NAME}"/configure ]] || [[ ${RECONF_expat} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/apple/ffmpeg-kit.sh b/scripts/apple/ffmpeg-kit.sh index 28a463f..96af136 100755 --- a/scripts/apple/ffmpeg-kit.sh +++ b/scripts/apple/ffmpeg-kit.sh @@ -1,7 +1,7 @@ #!/bin/bash # ENABLE COMMON FUNCTIONS -source "${BASEDIR}"/scripts/function-"${FFMPEG_KIT_BUILD_TYPE}".sh 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 +source "${BASEDIR}"/scripts/function-"${FFMPEG_KIT_BUILD_TYPE}".sh 1>>"${BASEDIR}"/build.log 2>&1 || return 1 LIB_NAME="ffmpeg-kit" @@ -25,7 +25,7 @@ export CXXFLAGS=$(get_cxxflags ${LIB_NAME}) export LDFLAGS="$(get_ldflags ${LIB_NAME}) -F${LIB_INSTALL_BASE}/ffmpeg/framework -framework Foundation -framework CoreVideo -framework libavdevice" export PKG_CONFIG_LIBDIR="${INSTALL_PKG_CONFIG_DIR}" -cd "${BASEDIR}"/apple 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 +cd "${BASEDIR}"/apple 1>>"${BASEDIR}"/build.log 2>&1 || return 1 # ALWAYS BUILD SHARED LIBRARIES BUILD_LIBRARY_OPTIONS="--enable-shared --disable-static" @@ -43,19 +43,19 @@ if [[ ${ENABLED_LIBRARIES[$LIBRARY_APPLE_VIDEOTOOLBOX]} -eq 1 ]]; then fi # ALWAYS REGENERATE BUILD FILES - NECESSARY TO APPLY THE WORKAROUNDS -autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 +autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 # WORKAROUNDS if [[ ${FFMPEG_KIT_BUILD_TYPE} != "macos" ]]; then # REMOVE OPTIONS FROM CONFIGURE TO FIX THE FOLLOWING ERROR # ld: -flat_namespace and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) cannot be used together - ${SED_INLINE} 's/$wl-flat_namespace //g' configure 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 - ${SED_INLINE} 's/$wl-undefined //g' configure 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 - ${SED_INLINE} 's/${wl}suppress//g' configure 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + ${SED_INLINE} 's/$wl-flat_namespace //g' configure 1>>"${BASEDIR}"/build.log 2>&1 || return 1 + ${SED_INLINE} 's/$wl-undefined //g' configure 1>>"${BASEDIR}"/build.log 2>&1 || return 1 + ${SED_INLINE} 's/${wl}suppress//g' configure 1>>"${BASEDIR}"/build.log 2>&1 || return 1 # ld: file not found: dynamic_lookup - ${SED_INLINE} 's/${wl}dynamic_lookup//g' configure 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + ${SED_INLINE} 's/${wl}dynamic_lookup//g' configure 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ @@ -79,7 +79,7 @@ fi # DELETE THE PREVIOUS BUILD OF THE LIBRARY if [ -d "${FFMPEG_KIT_LIBRARY_PATH}" ]; then - rm -rf "${FFMPEG_KIT_LIBRARY_PATH}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + rm -rf "${FFMPEG_KIT_LIBRARY_PATH}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi make -j$(get_cpu_count) 1>>"${BASEDIR}"/build.log 2>&1 diff --git a/scripts/apple/ffmpeg.sh b/scripts/apple/ffmpeg.sh index 6224fe9..7142f69 100755 --- a/scripts/apple/ffmpeg.sh +++ b/scripts/apple/ffmpeg.sh @@ -28,7 +28,7 @@ export CXXFLAGS=$(get_cxxflags "${LIB_NAME}") export LDFLAGS=$(get_ldflags "${LIB_NAME}") export PKG_CONFIG_LIBDIR="${INSTALL_PKG_CONFIG_DIR}" -cd "${BASEDIR}"/src/"${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 +cd "${BASEDIR}"/src/"${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 # SET EXTRA BUILD FLAGS FFMPEG_CFLAGS="" @@ -471,21 +471,21 @@ git checkout libavformat/protocols.c 1>>"${BASEDIR}"/build.log 2>&1 git checkout libavutil 1>>"${BASEDIR}"/build.log 2>&1 # 1. Workaround to prevent adding of -mdynamic-no-pic flag -${SED_INLINE} 's/check_cflags -mdynamic-no-pic && add_asflags -mdynamic-no-pic;/check_cflags -mdynamic-no-pic;/g' ./configure 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 +${SED_INLINE} 's/check_cflags -mdynamic-no-pic && add_asflags -mdynamic-no-pic;/check_cflags -mdynamic-no-pic;/g' ./configure 1>>"${BASEDIR}"/build.log 2>&1 || return 1 # 2. Workaround for videotoolbox on mac catalyst if [[ ${ARCH} == *-mac-catalyst ]]; then - ${SED_INLINE} 's/ CFDictionarySetValue(buffer_attributes\, kCVPixelBufferOpenGLESCompatibilityKey/ \/\/ CFDictionarySetValue(buffer_attributes\, kCVPixelBufferOpenGLESCompatibilityKey/g' "${BASEDIR}"/src/${LIB_NAME}/libavcodec/videotoolbox.c || exit 1 + ${SED_INLINE} 's/ CFDictionarySetValue(buffer_attributes\, kCVPixelBufferOpenGLESCompatibilityKey/ \/\/ CFDictionarySetValue(buffer_attributes\, kCVPixelBufferOpenGLESCompatibilityKey/g' "${BASEDIR}"/src/${LIB_NAME}/libavcodec/videotoolbox.c || return 1 else - ${SED_INLINE} 's/ \/\/ CFDictionarySetValue(buffer_attributes\, kCVPixelBufferOpenGLESCompatibilityKey/ CFDictionarySetValue(buffer_attributes\, kCVPixelBufferOpenGLESCompatibilityKey/g' "${BASEDIR}"/src/${LIB_NAME}/libavcodec/videotoolbox.c || exit 1 + ${SED_INLINE} 's/ \/\/ CFDictionarySetValue(buffer_attributes\, kCVPixelBufferOpenGLESCompatibilityKey/ CFDictionarySetValue(buffer_attributes\, kCVPixelBufferOpenGLESCompatibilityKey/g' "${BASEDIR}"/src/${LIB_NAME}/libavcodec/videotoolbox.c || return 1 fi # 3. Use thread local log levels -${SED_INLINE} 's/static int av_log_level/__thread int av_log_level/g' "${BASEDIR}"/src/${LIB_NAME}/libavutil/log.c 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 +${SED_INLINE} 's/static int av_log_level/__thread int av_log_level/g' "${BASEDIR}"/src/${LIB_NAME}/libavutil/log.c 1>>"${BASEDIR}"/build.log 2>&1 || return 1 # 4. Set friendly ffmpeg version FFMPEG_VERSION="v$(get_user_friendly_ffmpeg_version)" -${SED_INLINE} "s/\$version/$FFMPEG_VERSION/g" "${BASEDIR}"/src/"${LIB_NAME}"/ffbuild/version.sh 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 +${SED_INLINE} "s/\$version/$FFMPEG_VERSION/g" "${BASEDIR}"/src/"${LIB_NAME}"/ffbuild/version.sh 1>>"${BASEDIR}"/build.log 2>&1 || return 1 ################################################################### @@ -580,14 +580,14 @@ install_ffmpeg() { # DELETE THE PREVIOUS BUILD if [ -d "${FFMPEG_LIBRARY_PATH}" ]; then - rm -rf "${FFMPEG_LIBRARY_PATH}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + rm -rf "${FFMPEG_LIBRARY_PATH}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi else # LEAVE EVERYTHING EXCEPT frameworks - rm -rf "${FFMPEG_LIBRARY_PATH}/include" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 - rm -rf "${FFMPEG_LIBRARY_PATH}/lib" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 - rm -rf "${FFMPEG_LIBRARY_PATH}/share" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + rm -rf "${FFMPEG_LIBRARY_PATH}/include" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 + rm -rf "${FFMPEG_LIBRARY_PATH}/lib" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 + rm -rf "${FFMPEG_LIBRARY_PATH}/share" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi make install 1>>"${BASEDIR}"/build.log 2>&1 @@ -597,7 +597,7 @@ install_ffmpeg() { fi } -${SED_INLINE} 's|$(SLIBNAME_WITH_MAJOR),|$(SLIBPREF)$(FULLNAME).framework/$(SLIBPREF)$(FULLNAME),|g' ${BASEDIR}/src/ffmpeg/ffbuild/config.mak 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 +${SED_INLINE} 's|$(SLIBNAME_WITH_MAJOR),|$(SLIBPREF)$(FULLNAME).framework/$(SLIBPREF)$(FULLNAME),|g' ${BASEDIR}/src/ffmpeg/ffbuild/config.mak 1>>"${BASEDIR}"/build.log 2>&1 || return 1 # BUILD DYNAMIC LIBRARIES WITH DEFAULT OPTIONS build_ffmpeg @@ -610,8 +610,8 @@ echo -e "\nShared libraries built successfully. Building frameworks.\n" 1>>"${BA create_temporary_framework() { local FRAMEWORK_NAME="$1" - mkdir -p "${FFMPEG_LIBRARY_PATH}/framework/${FRAMEWORK_NAME}.framework" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 - cp "${FFMPEG_LIBRARY_PATH}/lib/${FRAMEWORK_NAME}.dylib" "${FFMPEG_LIBRARY_PATH}/framework/${FRAMEWORK_NAME}.framework/${FRAMEWORK_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + mkdir -p "${FFMPEG_LIBRARY_PATH}/framework/${FRAMEWORK_NAME}.framework" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 + cp "${FFMPEG_LIBRARY_PATH}/lib/${FRAMEWORK_NAME}.dylib" "${FFMPEG_LIBRARY_PATH}/framework/${FRAMEWORK_NAME}.framework/${FRAMEWORK_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 } create_temporary_framework "libavcodec" @@ -622,10 +622,10 @@ create_temporary_framework "libavutil" create_temporary_framework "libswresample" create_temporary_framework "libswscale" -${SED_INLINE} 's|$(SLIBNAME_WITH_MAJOR),|$(SLIBPREF)$(FULLNAME).framework/$(SLIBPREF)$(FULLNAME),|g' ${BASEDIR}/src/ffmpeg/ffbuild/config.mak 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 -${SED_INLINE} "s|^ALLFFLIBS = .*|ALLFFLIBS = ${FFMPEG_LIBRARY_PATH}/framework|g" ${BASEDIR}/src/ffmpeg/ffbuild/common.mak 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 -${SED_INLINE} 's|$(LD_LIB)|-framework lib% |g' ${BASEDIR}/src/ffmpeg/ffbuild/common.mak 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 -${SED_INLINE} 's|$(LD_PATH)lib|-F |g' ${BASEDIR}/src/ffmpeg/ffbuild/common.mak 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 +${SED_INLINE} 's|$(SLIBNAME_WITH_MAJOR),|$(SLIBPREF)$(FULLNAME).framework/$(SLIBPREF)$(FULLNAME),|g' ${BASEDIR}/src/ffmpeg/ffbuild/config.mak 1>>"${BASEDIR}"/build.log 2>&1 || return 1 +${SED_INLINE} "s|^ALLFFLIBS = .*|ALLFFLIBS = ${FFMPEG_LIBRARY_PATH}/framework|g" ${BASEDIR}/src/ffmpeg/ffbuild/common.mak 1>>"${BASEDIR}"/build.log 2>&1 || return 1 +${SED_INLINE} 's|$(LD_LIB)|-framework lib% |g' ${BASEDIR}/src/ffmpeg/ffbuild/common.mak 1>>"${BASEDIR}"/build.log 2>&1 || return 1 +${SED_INLINE} 's|$(LD_PATH)lib|-F |g' ${BASEDIR}/src/ffmpeg/ffbuild/common.mak 1>>"${BASEDIR}"/build.log 2>&1 || return 1 # BUILD FRAMEWORKS AS DYNAMIC LIBRARIES build_ffmpeg diff --git a/scripts/apple/fontconfig.sh b/scripts/apple/fontconfig.sh index 3cbd24d..06dc1ee 100755 --- a/scripts/apple/fontconfig.sh +++ b/scripts/apple/fontconfig.sh @@ -3,9 +3,12 @@ # ALWAYS CLEAN THE PREVIOUS BUILD make distclean 2>/dev/null 1>/dev/null +# WORKAROUND FOR "bad flag in substitute command" +${SED_INLINE} "s|in \"\$default_fonts\"|in \$default_fonts|g" "${BASEDIR}"/src/"${LIB_NAME}"/configure.ac 1>>"${BASEDIR}"/build.log 2>&1 + # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_fontconfig} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ @@ -31,4 +34,4 @@ make -j$(get_cpu_count) || return 1 make install || return 1 # CREATE PACKAGE CONFIG MANUALLY -create_fontconfig_package_config "2.13.93" || return 1 +create_fontconfig_package_config "2.13.94" || return 1 diff --git a/scripts/apple/freetype.sh b/scripts/apple/freetype.sh index 88848a8..dc77a6d 100755 --- a/scripts/apple/freetype.sh +++ b/scripts/apple/freetype.sh @@ -11,7 +11,7 @@ make distclean 2>/dev/null 1>/dev/null if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/builds/unix/configure ]] || [[ ${RECONF_freetype} -eq 1 ]]; then # NOTE THAT FREETYPE DOES NOT SUPPORT AUTORECONF BUT IT COMES WITH AN autogen.sh - ./autogen.sh || exit 1 + ./autogen.sh || return 1 fi # UPDATE CONFIG FILES TO SUPPORT APPLE ARCHITECTURES @@ -41,4 +41,4 @@ make -j$(get_cpu_count) || return 1 make install || return 1 # CREATE PACKAGE CONFIG MANUALLY -create_freetype_package_config "24.0.18" || return 1 +create_freetype_package_config "24.1.18" || return 1 diff --git a/scripts/apple/fribidi.sh b/scripts/apple/fribidi.sh index 2ec2e83..abc51f8 100755 --- a/scripts/apple/fribidi.sh +++ b/scripts/apple/fribidi.sh @@ -5,7 +5,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_fribidi} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/apple/giflib.sh b/scripts/apple/giflib.sh index e8b474e..737f084 100755 --- a/scripts/apple/giflib.sh +++ b/scripts/apple/giflib.sh @@ -8,7 +8,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_giflib} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/apple/gmp.sh b/scripts/apple/gmp.sh index 053ce77..7efaf91 100755 --- a/scripts/apple/gmp.sh +++ b/scripts/apple/gmp.sh @@ -17,7 +17,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_gmp} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi # UPDATE CONFIG FILES TO SUPPORT APPLE ARCHITECTURES diff --git a/scripts/apple/harfbuzz.sh b/scripts/apple/harfbuzz.sh index 4b71744..07dba4c 100755 --- a/scripts/apple/harfbuzz.sh +++ b/scripts/apple/harfbuzz.sh @@ -5,7 +5,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_harfbuzz} -eq 1 ]]; then - NOCONFIGURE=1 ./autogen.sh || exit 1 + NOCONFIGURE=1 ./autogen.sh || return 1 fi ./configure \ diff --git a/scripts/apple/kvazaar.sh b/scripts/apple/kvazaar.sh index fefb229..0f905ac 100755 --- a/scripts/apple/kvazaar.sh +++ b/scripts/apple/kvazaar.sh @@ -16,7 +16,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_kvazaar} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/apple/lame.sh b/scripts/apple/lame.sh index a28e996..28bb2d2 100755 --- a/scripts/apple/lame.sh +++ b/scripts/apple/lame.sh @@ -7,7 +7,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_lame} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/apple/leptonica.sh b/scripts/apple/leptonica.sh index dbb1327..21d9eaa 100755 --- a/scripts/apple/leptonica.sh +++ b/scripts/apple/leptonica.sh @@ -27,7 +27,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_leptonica} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/apple/libass.sh b/scripts/apple/libass.sh index 53374c2..0a7daa2 100755 --- a/scripts/apple/libass.sh +++ b/scripts/apple/libass.sh @@ -13,7 +13,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_libass} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/apple/libilbc.sh b/scripts/apple/libilbc.sh index 98cc7cb..ee1792d 100755 --- a/scripts/apple/libilbc.sh +++ b/scripts/apple/libilbc.sh @@ -5,7 +5,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_libilbc} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/apple/libogg.sh b/scripts/apple/libogg.sh index 5154d6c..13f0051 100755 --- a/scripts/apple/libogg.sh +++ b/scripts/apple/libogg.sh @@ -5,7 +5,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_libogg} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi # FIX INCLUDE PATHS diff --git a/scripts/apple/libpng.sh b/scripts/apple/libpng.sh index 0035ed8..149632c 100755 --- a/scripts/apple/libpng.sh +++ b/scripts/apple/libpng.sh @@ -21,7 +21,7 @@ if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_libpng} -e overwrite_file "${FFMPEG_KIT_TMPDIR}"/source/config/config.guess "${BASEDIR}"/src/"${LIB_NAME}"/config.guess || return 1 overwrite_file "${FFMPEG_KIT_TMPDIR}"/source/config/config.sub "${BASEDIR}"/src/"${LIB_NAME}"/config.sub || return 1 - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/apple/libsamplerate.sh b/scripts/apple/libsamplerate.sh index 3f7f843..f3c73ee 100755 --- a/scripts/apple/libsamplerate.sh +++ b/scripts/apple/libsamplerate.sh @@ -5,7 +5,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_libsamplerate} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/apple/libsndfile.sh b/scripts/apple/libsndfile.sh index 3fe0675..a7ce0af 100755 --- a/scripts/apple/libsndfile.sh +++ b/scripts/apple/libsndfile.sh @@ -5,7 +5,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_libsndfile} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/apple/libtheora.sh b/scripts/apple/libtheora.sh index fe822f3..84696bb 100755 --- a/scripts/apple/libtheora.sh +++ b/scripts/apple/libtheora.sh @@ -9,7 +9,7 @@ if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_libtheora} # WORKAROUND NOT TO RUN CONFIGURE AT THE END OF autogen.sh ${SED_INLINE} 's/$srcdir\/configure/#$srcdir\/configure/g' "${BASEDIR}"/src/"${LIB_NAME}"/autogen.sh || return 1 - ./autogen.sh || exit 1 + ./autogen.sh || return 1 fi ./configure \ diff --git a/scripts/apple/libvidstab.sh b/scripts/apple/libvidstab.sh index 8668111..305fea7 100755 --- a/scripts/apple/libvidstab.sh +++ b/scripts/apple/libvidstab.sh @@ -15,7 +15,7 @@ mkdir -p "${BUILD_DIR}" || return 1 cd "${BUILD_DIR}" || return 1 # WORKAROUND TO DETECT ASM FLAGS PROPERLY -${SED_INLINE} 's/ ${CPUINFO}/ "${CPUINFO}"/g' "${BASEDIR}"/src/"${LIB_NAME}"/CMakeModules/FindSSE.cmake 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 +${SED_INLINE} 's/ ${CPUINFO}/ "${CPUINFO}"/g' "${BASEDIR}"/src/"${LIB_NAME}"/CMakeModules/FindSSE.cmake 1>>"${BASEDIR}"/build.log 2>&1 || return 1 cmake -Wno-dev \ -DCMAKE_VERBOSE_MAKEFILE=0 \ diff --git a/scripts/apple/libvorbis.sh b/scripts/apple/libvorbis.sh index 4feee40..00dbee7 100755 --- a/scripts/apple/libvorbis.sh +++ b/scripts/apple/libvorbis.sh @@ -8,7 +8,7 @@ make distclean 2>/dev/null 1>/dev/null ${SED_INLINE} 's/\-mno-ieee-fp//g' "${BASEDIR}"/src/"${LIB_NAME}"/configure.ac || return 1 # ALWAYS REGENERATE BUILD FILES - NECESSARY TO APPLY THE WORKAROUNDS -autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 +autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 if [[ ${FFMPEG_KIT_BUILD_TYPE} != "macos" ]]; then diff --git a/scripts/apple/libwebp.sh b/scripts/apple/libwebp.sh index 9ead71d..b5b9b1b 100755 --- a/scripts/apple/libwebp.sh +++ b/scripts/apple/libwebp.sh @@ -19,7 +19,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_libwebp} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/apple/libxml2.sh b/scripts/apple/libxml2.sh index 6a5401c..a4c4065 100755 --- a/scripts/apple/libxml2.sh +++ b/scripts/apple/libxml2.sh @@ -5,7 +5,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_libxml2} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/apple/nettle.sh b/scripts/apple/nettle.sh index 0abe399..449619c 100755 --- a/scripts/apple/nettle.sh +++ b/scripts/apple/nettle.sh @@ -20,7 +20,7 @@ if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_nettle} -e # WORKAROUND TO FIX BUILD SYSTEM COMPILER ON macOS overwrite_file "${BASEDIR}"/tools/patch/make/nettle/aclocal.m4 "${BASEDIR}"/src/"${LIB_NAME}"/aclocal.m4 - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi # UPDATE CONFIG FILES TO SUPPORT APPLE ARCHITECTURES diff --git a/scripts/apple/opencore-amr.sh b/scripts/apple/opencore-amr.sh index b110ec5..e51503f 100755 --- a/scripts/apple/opencore-amr.sh +++ b/scripts/apple/opencore-amr.sh @@ -18,7 +18,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_opencore_amr} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/apple/openssl.sh b/scripts/apple/openssl.sh index 68d78dc..1043c3d 100644 --- a/scripts/apple/openssl.sh +++ b/scripts/apple/openssl.sh @@ -23,7 +23,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_openssl} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi INT128_AVAILABLE=$($CC -dM -E - >"${BASEDIR}"/build.log | grep __SIZEOF_INT128__) diff --git a/scripts/apple/opus.sh b/scripts/apple/opus.sh index faa1ad1..64884a4 100755 --- a/scripts/apple/opus.sh +++ b/scripts/apple/opus.sh @@ -5,7 +5,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_opus} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/apple/rubberband.sh b/scripts/apple/rubberband.sh index bad41ee..251c56a 100755 --- a/scripts/apple/rubberband.sh +++ b/scripts/apple/rubberband.sh @@ -12,7 +12,7 @@ overwrite_file "${BASEDIR}"/tools/patch/make/rubberband/rubberband.pc.in "${BASE ${SED_INLINE} 's/%DEPENDENCIES%/sndfile, samplerate/g' "${BASEDIR}"/src/"${LIB_NAME}"/rubberband.pc.in || return 1 # ALWAYS REGENERATE BUILD FILES - NECESSARY TO APPLY THE WORKAROUNDS -autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 +autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 ./configure \ --prefix="${LIB_INSTALL_PREFIX}" \ diff --git a/scripts/apple/sdl.sh b/scripts/apple/sdl.sh index 5c97e99..43471eb 100755 --- a/scripts/apple/sdl.sh +++ b/scripts/apple/sdl.sh @@ -15,7 +15,7 @@ make distclean 2>/dev/null 1>/dev/null overwrite_file "${BASEDIR}/tools/patch/make/sdl/configure.in" "${BASEDIR}/src/${LIB_NAME}/configure.in" # ALWAYS REGENERATE BUILD FILES - NECESSARY TO APPLY THE WORKAROUNDS -./autogen.sh || exit 1 +./autogen.sh || return 1 # WORKAROUND TO EXCLUDE libunwind.h ON LTS BUILDS if [[ -n ${FFMPEG_KIT_LTS_BUILD} ]]; then diff --git a/scripts/apple/shine.sh b/scripts/apple/shine.sh index d9b10d0..129c2b2 100755 --- a/scripts/apple/shine.sh +++ b/scripts/apple/shine.sh @@ -5,7 +5,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_shine} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/apple/speex.sh b/scripts/apple/speex.sh index 058e0fa..955baaa 100755 --- a/scripts/apple/speex.sh +++ b/scripts/apple/speex.sh @@ -13,7 +13,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_soxr} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/apple/tesseract.sh b/scripts/apple/tesseract.sh index d94661d..60f47b4 100755 --- a/scripts/apple/tesseract.sh +++ b/scripts/apple/tesseract.sh @@ -9,7 +9,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_tesseract} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/apple/tiff.sh b/scripts/apple/tiff.sh index c782a59..37fe273 100755 --- a/scripts/apple/tiff.sh +++ b/scripts/apple/tiff.sh @@ -10,7 +10,7 @@ if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_tiff} -eq overwrite_file "${FFMPEG_KIT_TMPDIR}"/source/config/config.guess "${BASEDIR}"/src/"${LIB_NAME}"/config.guess || return 1 overwrite_file "${FFMPEG_KIT_TMPDIR}"/source/config/config.sub "${BASEDIR}"/src/"${LIB_NAME}"/config.sub || return 1 - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/apple/twolame.sh b/scripts/apple/twolame.sh index 7a5de63..ae27b2f 100755 --- a/scripts/apple/twolame.sh +++ b/scripts/apple/twolame.sh @@ -9,7 +9,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_twolame} -eq 1 ]]; then - NOCONFIGURE=1 ./autogen.sh || exit 1 + NOCONFIGURE=1 ./autogen.sh || return 1 fi ./configure \ diff --git a/scripts/apple/vo-amrwbenc.sh b/scripts/apple/vo-amrwbenc.sh index 40ce136..d0d8fb1 100755 --- a/scripts/apple/vo-amrwbenc.sh +++ b/scripts/apple/vo-amrwbenc.sh @@ -15,7 +15,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_vo_amrwbenc} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi ./configure \ diff --git a/scripts/apple/x264.sh b/scripts/apple/x264.sh index d3a3922..e80ed9c 100755 --- a/scripts/apple/x264.sh +++ b/scripts/apple/x264.sh @@ -20,13 +20,16 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_x264} -eq 1 ]]; then - autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi # UPDATE CONFIG FILES TO SUPPORT APPLE ARCHITECTURES overwrite_file "${FFMPEG_KIT_TMPDIR}"/source/config/config.guess "${BASEDIR}"/src/"${LIB_NAME}"/config.guess || return 1 overwrite_file "${FFMPEG_KIT_TMPDIR}"/source/config/config.sub "${BASEDIR}"/src/"${LIB_NAME}"/config.sub || return 1 +# WORKAROUND TO FIX arm64 BUILDS +${SED_INLINE} 's/\-arch arm64//g' "${BASEDIR}"/src/"${LIB_NAME}"/configure 1>>"${BASEDIR}"/build.log 2>&1 || return 1 + ./configure \ --prefix="${LIB_INSTALL_PREFIX}" \ --enable-pic \ diff --git a/scripts/apple/zimg.sh b/scripts/apple/zimg.sh index 0e0ae64..44c5739 100644 --- a/scripts/apple/zimg.sh +++ b/scripts/apple/zimg.sh @@ -13,7 +13,7 @@ make distclean 2>/dev/null 1>/dev/null # REGENERATE BUILD FILES IF NECESSARY OR REQUESTED if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_zimg} -eq 1 ]]; then - ./autogen.sh || exit 1 + ./autogen.sh || return 1 fi ./configure \ diff --git a/scripts/function-ios.sh b/scripts/function-ios.sh index 9598476..e5cda43 100755 --- a/scripts/function-ios.sh +++ b/scripts/function-ios.sh @@ -409,7 +409,7 @@ set_toolchain_paths() { if [[ ${DOWNLOAD_RESULT} -ne 0 ]]; then exit 1 fi - (chmod +x "${FFMPEG_KIT_TMPDIR}"/gas-preprocessor.pl 1>>"${BASEDIR}"/build.log 2>&1) || exit 1 + (chmod +x "${FFMPEG_KIT_TMPDIR}"/gas-preprocessor.pl 1>>"${BASEDIR}"/build.log 2>&1) || return 1 # patch gas-preprocessor.pl against the following warning # Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.32), passed through in regex; marked by <-- HERE in m/(?:ld|st)\d\s+({ <-- HERE \s*v(\d+)\.(\d[bhsdBHSD])\s*-\s*v(\d+)\.(\d[bhsdBHSD])\s*})/ at /Users/taner/Projects/ffmpeg-kit/.tmp/gas-preprocessor.pl line 1065. diff --git a/scripts/function-macos.sh b/scripts/function-macos.sh index ca48301..8683674 100755 --- a/scripts/function-macos.sh +++ b/scripts/function-macos.sh @@ -318,7 +318,7 @@ set_toolchain_paths() { if [[ ${DOWNLOAD_RESULT} -ne 0 ]]; then exit 1 fi - (chmod +x "${FFMPEG_KIT_TMPDIR}"/gas-preprocessor.pl 1>>"${BASEDIR}"/build.log 2>&1) || exit 1 + (chmod +x "${FFMPEG_KIT_TMPDIR}"/gas-preprocessor.pl 1>>"${BASEDIR}"/build.log 2>&1) || return 1 # patch gas-preprocessor.pl against the following warning # Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.32), passed through in regex; marked by <-- HERE in m/(?:ld|st)\d\s+({ <-- HERE \s*v(\d+)\.(\d[bhsdBHSD])\s*-\s*v(\d+)\.(\d[bhsdBHSD])\s*})/ at /Users/taner/Projects/ffmpeg-kit/.tmp/gas-preprocessor.pl line 1065. diff --git a/scripts/function-tvos.sh b/scripts/function-tvos.sh index ecbb600..6016b42 100755 --- a/scripts/function-tvos.sh +++ b/scripts/function-tvos.sh @@ -367,7 +367,7 @@ set_toolchain_paths() { if [[ ${DOWNLOAD_RESULT} -ne 0 ]]; then exit 1 fi - (chmod +x "${FFMPEG_KIT_TMPDIR}"/gas-preprocessor.pl 1>>"${BASEDIR}"/build.log 2>&1) || exit 1 + (chmod +x "${FFMPEG_KIT_TMPDIR}"/gas-preprocessor.pl 1>>"${BASEDIR}"/build.log 2>&1) || return 1 # patch gas-preprocessor.pl against the following warning # Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.32), passed through in regex; marked by <-- HERE in m/(?:ld|st)\d\s+({ <-- HERE \s*v(\d+)\.(\d[bhsdBHSD])\s*-\s*v(\d+)\.(\d[bhsdBHSD])\s*})/ at /Users/taner/Projects/ffmpeg-kit/.tmp/gas-preprocessor.pl line 1065. diff --git a/scripts/function.sh b/scripts/function.sh index b38503f..65f5d22 100755 --- a/scripts/function.sh +++ b/scripts/function.sh @@ -255,15 +255,15 @@ is_library_supported_on_platform() { 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20) echo "0" ;; - 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 39 | 40) + 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40) echo "0" ;; - 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48) + 42 | 43 | 44 | 45 | 46 | 47 | 48) echo "0" ;; # ANDROID - 7 | 38 | 49 | 50 | 51) + 7 | 41 | 49 | 50 | 51) if [[ ${FFMPEG_KIT_BUILD_TYPE} == "android" ]]; then echo "0" else @@ -929,11 +929,13 @@ redownload_library() { # 2. ignore unknown libraries # enable_library() { - local library_supported_on_platform=$(is_library_supported_on_platform "$1") - if [[ $library_supported_on_platform == 0 ]]; then - set_library "$1" 1 - elif [[ $2 -ne 1 ]]; then - print_unknown_library "$1" + if [ -n "$1" ]; then + local library_supported_on_platform=$(is_library_supported_on_platform "$1") + if [[ $library_supported_on_platform == 0 ]]; then + set_library "$1" 1 + elif [[ $2 -ne 1 ]]; then + print_unknown_library "$1" + fi fi } diff --git a/scripts/main-android.sh b/scripts/main-android.sh index ceee846..7266dbd 100755 --- a/scripts/main-android.sh +++ b/scripts/main-android.sh @@ -34,7 +34,7 @@ export LIB_INSTALL_BASE="${BASEDIR}/prebuilt/$(get_build_directory)" # CREATE PACKAGE CONFIG DIRECTORY FOR THIS ARCHITECTURE PKG_CONFIG_DIRECTORY="${LIB_INSTALL_BASE}/pkgconfig" if [ ! -d "${PKG_CONFIG_DIRECTORY}" ]; then - mkdir -p "${PKG_CONFIG_DIRECTORY}" || exit 1 + mkdir -p "${PKG_CONFIG_DIRECTORY}" || return 1 fi # FILTER WHICH EXTERNAL LIBRARIES WILL BE BUILT diff --git a/scripts/main-ios.sh b/scripts/main-ios.sh index 1d46a78..1a4f693 100755 --- a/scripts/main-ios.sh +++ b/scripts/main-ios.sh @@ -29,7 +29,7 @@ export LIB_INSTALL_BASE="${BASEDIR}/prebuilt/$(get_build_directory)" # CREATE PACKAGE CONFIG DIRECTORY FOR THIS ARCHITECTURE PKG_CONFIG_DIRECTORY="${LIB_INSTALL_BASE}/pkgconfig" if [ ! -d "${PKG_CONFIG_DIRECTORY}" ]; then - mkdir -p "${PKG_CONFIG_DIRECTORY}" || exit 1 + mkdir -p "${PKG_CONFIG_DIRECTORY}" || return 1 fi # FILTER WHICH EXTERNAL LIBRARIES WILL BE BUILT @@ -222,7 +222,7 @@ if [[ ${SKIP_ffmpeg} -ne 1 ]]; then export LDFLAGS=$(get_ldflags "${LIB_NAME}") export PKG_CONFIG_LIBDIR="${INSTALL_PKG_CONFIG_DIR}" - cd "${BASEDIR}"/src/"${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + cd "${BASEDIR}"/src/"${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 LIB_INSTALL_PREFIX="${LIB_INSTALL_BASE}/${LIB_NAME}" @@ -240,7 +240,7 @@ fi if [[ ${SKIP_ffmpeg_kit} -ne 1 ]]; then # BUILD FFMPEG KIT - . "${BASEDIR}"/scripts/apple/ffmpeg-kit.sh "$@" || exit 1 + . "${BASEDIR}"/scripts/apple/ffmpeg-kit.sh "$@" || return 1 else echo -e "\nffmpeg-kit: skipped" fi diff --git a/scripts/main-macos.sh b/scripts/main-macos.sh index 7509ece..96481ab 100755 --- a/scripts/main-macos.sh +++ b/scripts/main-macos.sh @@ -29,7 +29,7 @@ export LIB_INSTALL_BASE="${BASEDIR}/prebuilt/$(get_build_directory)" # CREATE PACKAGE CONFIG DIRECTORY FOR THIS ARCHITECTURE PKG_CONFIG_DIRECTORY="${LIB_INSTALL_BASE}/pkgconfig" if [ ! -d "${PKG_CONFIG_DIRECTORY}" ]; then - mkdir -p "${PKG_CONFIG_DIRECTORY}" || exit 1 + mkdir -p "${PKG_CONFIG_DIRECTORY}" || return 1 fi # FILTER WHICH EXTERNAL LIBRARIES WILL BE BUILT @@ -221,7 +221,7 @@ if [[ ${SKIP_ffmpeg} -ne 1 ]]; then export LDFLAGS=$(get_ldflags "${LIB_NAME}") export PKG_CONFIG_LIBDIR="${INSTALL_PKG_CONFIG_DIR}" - cd "${BASEDIR}"/src/"${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + cd "${BASEDIR}"/src/"${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 LIB_INSTALL_PREFIX="${LIB_INSTALL_BASE}/${LIB_NAME}" @@ -239,7 +239,7 @@ fi if [[ ${SKIP_ffmpeg_kit} -ne 1 ]]; then # BUILD FFMPEG KIT - . "${BASEDIR}"/scripts/apple/ffmpeg-kit.sh "$@" || exit 1 + . "${BASEDIR}"/scripts/apple/ffmpeg-kit.sh "$@" || return 1 else echo -e "\nffmpeg-kit: skipped" fi diff --git a/scripts/main-tvos.sh b/scripts/main-tvos.sh index bee6d23..c11d177 100755 --- a/scripts/main-tvos.sh +++ b/scripts/main-tvos.sh @@ -29,7 +29,7 @@ export LIB_INSTALL_BASE="${BASEDIR}/prebuilt/$(get_build_directory)" # CREATE PACKAGE CONFIG DIRECTORY FOR THIS ARCHITECTURE PKG_CONFIG_DIRECTORY="${LIB_INSTALL_BASE}/pkgconfig" if [ ! -d "${PKG_CONFIG_DIRECTORY}" ]; then - mkdir -p "${PKG_CONFIG_DIRECTORY}" || exit 1 + mkdir -p "${PKG_CONFIG_DIRECTORY}" || return 1 fi # FILTER WHICH EXTERNAL LIBRARIES WILL BE BUILT @@ -220,7 +220,7 @@ if [[ ${SKIP_ffmpeg} -ne 1 ]]; then export LDFLAGS=$(get_ldflags "${LIB_NAME}") export PKG_CONFIG_LIBDIR="${INSTALL_PKG_CONFIG_DIR}" - cd "${BASEDIR}"/src/"${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || exit 1 + cd "${BASEDIR}"/src/"${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 LIB_INSTALL_PREFIX="${LIB_INSTALL_BASE}/${LIB_NAME}" @@ -238,7 +238,7 @@ fi if [[ ${SKIP_ffmpeg_kit} -ne 1 ]]; then # BUILD FFMPEG - . "${BASEDIR}"/scripts/apple/ffmpeg-kit.sh "$@" || exit 1 + . "${BASEDIR}"/scripts/apple/ffmpeg-kit.sh "$@" || return 1 else echo -e "\nffmpeg-kit: skipped" fi diff --git a/scripts/source.sh b/scripts/source.sh index b4b346a..bec2696 100755 --- a/scripts/source.sh +++ b/scripts/source.sh @@ -13,7 +13,7 @@ get_library_source() { ;; chromaprint) SOURCE_REPO_URL="https://github.com/tanersener/chromaprint" - SOURCE_ID="v1.5.0" + SOURCE_ID="v1.5.1" SOURCE_TYPE="TAG" ;; cpu-features) @@ -28,28 +28,28 @@ get_library_source() { ;; expat) SOURCE_REPO_URL="https://github.com/tanersener/libexpat" - SOURCE_ID="R_2_4_1" + SOURCE_ID="R_2_4_2" SOURCE_TYPE="TAG" ;; ffmpeg) SOURCE_REPO_URL="https://github.com/tanersener/FFmpeg" - SOURCE_ID="b5ba74053c1ef9f38d9e7b3a036675f06d2b2714" + SOURCE_ID="30322ebe3c55d0fb18bea4ae04d0fcaf1f97d27f" SOURCE_TYPE="COMMIT" - SOURCE_GIT_DESCRIBE="n4.5-dev-3138-gb5ba74053c" # git describe --tags + SOURCE_GIT_DESCRIBE="n4.5-dev-3393-g30322ebe3c" # git describe --tags ;; fontconfig) SOURCE_REPO_URL="https://github.com/tanersener/fontconfig" - SOURCE_ID="2.13.93" + SOURCE_ID="2.13.94" SOURCE_TYPE="TAG" ;; freetype) SOURCE_REPO_URL="https://github.com/tanersener/freetype2" - SOURCE_ID="VER-2-11-0" + SOURCE_ID="VER-2-11-1" SOURCE_TYPE="TAG" ;; fribidi) SOURCE_REPO_URL="https://github.com/tanersener/fribidi" - SOURCE_ID="v1.0.10" + SOURCE_ID="v1.0.11" SOURCE_TYPE="TAG" ;; giflib) @@ -69,17 +69,17 @@ get_library_source() { ;; harfbuzz) SOURCE_REPO_URL="https://github.com/tanersener/harfbuzz" - SOURCE_ID="2.9.1" + SOURCE_ID="3.2.0" SOURCE_TYPE="TAG" ;; jpeg) SOURCE_REPO_URL="https://github.com/tanersener/libjpeg-turbo" - SOURCE_ID="2.1.1" + SOURCE_ID="2.1.2" SOURCE_TYPE="TAG" ;; kvazaar) SOURCE_REPO_URL="https://github.com/tanersener/kvazaar" - SOURCE_ID="v2.0.0" + SOURCE_ID="v2.1.0" SOURCE_TYPE="TAG" ;; lame) @@ -94,7 +94,7 @@ get_library_source() { ;; libaom) SOURCE_REPO_URL="https://github.com/tanersener/libaom" - SOURCE_ID="v3.1.2" + SOURCE_ID="v3.2.0" SOURCE_TYPE="TAG" ;; libass) @@ -154,7 +154,7 @@ get_library_source() { ;; libvpx) SOURCE_REPO_URL="https://github.com/tanersener/libvpx" - SOURCE_ID="v1.10.0" + SOURCE_ID="v1.11.0" SOURCE_TYPE="TAG" ;; libwebp) @@ -249,7 +249,7 @@ get_library_source() { ;; x264) SOURCE_REPO_URL="https://github.com/tanersener/x264" - SOURCE_ID="55d517bc4569272a2c9a367a4106c234aba2ffbc" + SOURCE_ID="5db6aa6cab1b146e07b60cc1736a01f21da01154" SOURCE_TYPE="COMMIT" # COMMIT -> r3027 ;; x265)