Compare commits

..

14 Commits

Author SHA1 Message Date
Taner Sener 95261c1ade update libaom .gitignore 2020-02-28 22:03:22 +00:00
Taner Sener ca0bb9fd0f fix libaom linking error on mac catalyst 2020-02-28 20:07:21 +00:00
Taner Sener 12f52514b8 fix sdl linking error on mac catalyst 2020-02-28 07:47:33 +00:00
Taner Sener 64488a818a disable asm for external libraries on mac catalyst 2020-02-25 22:52:55 +00:00
Taner Sener c7e7cc20ef fix mac catalyst build errors 2020-02-25 19:55:22 +00:00
Taner Sener efe1c59a20 use build host and target host in build scripts 2020-02-24 21:24:58 +00:00
Taner Sener 4605e778c5 update mac catalyst arch name 2020-02-24 00:29:20 +00:00
Taner Sener ec851d33a3 disable asm for ffmpeg on x86-64h 2020-02-23 19:21:24 +00:00
Taner Sener b5565bd359 disable asm for x265 on x86-64h 2020-02-23 18:37:29 +00:00
Taner Sener 9229cf50c4 use system uuid library for ios 2020-02-23 14:12:43 +00:00
Taner Sener 7cf14d21e4 add mac catalyst support 2020-02-23 09:22:16 +00:00
Taner Sener 4e92d550fd fix travis builds 2020-02-16 15:38:02 +00:00
Taner Sener 1157681271 fix travis ios builds 2020-02-15 23:18:23 +00:00
Taner Sener 78e5411df9 update SIMD_OPTIONS as ARCH_OPTIONS 2020-02-15 22:20:51 +00:00
98 changed files with 2197 additions and 325 deletions
+63 -24
View File
@@ -2,36 +2,32 @@ branches:
only:
- master
- development
sudo: false
git:
quiet: true
addons:
apt:
packages:
- autoconf
- automake
- libtool
- pkg-config
- curl
- git
- cmake
- gcc
- gperf
- texinfo
- yasm
- nasm
- bison
- autogen
- patch
homebrew:
packages:
- nasm
update: true
matrix:
jobs:
include:
- name: "Android Main Build"
language: android
os: linux
dist : trusty
addons:
apt:
packages:
- autoconf
- automake
- libtool
- pkg-config
- curl
- git
- cmake
- gcc
- gperf
- texinfo
- yasm
- nasm
- bison
- autogen
- patch
android:
components:
- tools
@@ -59,7 +55,26 @@ matrix:
- bash ./android.sh --no-output-redirection
- name: "Android LTS Build"
language: android
os: linux
dist : trusty
addons:
apt:
packages:
- autoconf
- automake
- libtool
- pkg-config
- curl
- git
- cmake
- gcc
- gperf
- texinfo
- yasm
- nasm
- bison
- autogen
- patch
android:
components:
- tools
@@ -88,7 +103,13 @@ matrix:
- bash ./android.sh --lts --no-output-redirection
- name: "iOS Main Build"
language: objective-c
os: osx
osx_image: xcode10.2
addons:
homebrew:
packages:
- nasm
update: true
before_script:
- rm -f ./build.log
after_success:
@@ -101,6 +122,12 @@ matrix:
- name: "iOS LTS Build"
language: objective-c
osx_image: xcode7.3
os: osx
addons:
homebrew:
packages:
- nasm
update: true
before_script:
- rm -f ./build.log
after_success:
@@ -112,7 +139,13 @@ matrix:
- bash ./ios.sh --lts --no-output-redirection
- name: "tvOS Main Build"
language: objective-c
os: osx
osx_image: xcode10.2
addons:
homebrew:
packages:
- nasm
update: true
before_script:
- rm -f ./build.log
after_success:
@@ -124,7 +157,13 @@ matrix:
- bash ./tvos.sh --no-output-redirection
- name: "tvOS LTS Build"
language: objective-c
os: osx
osx_image: xcode7.3
addons:
homebrew:
packages:
- nasm
update: true
before_script:
- rm -f ./build.log
after_success:
+2 -2
View File
@@ -36,8 +36,8 @@ FFmpeg for Android, iOS and tvOS
- Supports `API Level 16+`
#### 1.2 iOS
- Builds `armv7`, `armv7s`, `arm64`, `arm64e`, `i386` and `x86_64` architectures
- Supports `bzip2`, `zlib`, `iconv` system libraries and `AudioToolbox`, `CoreImage`, `VideoToolbox`, `AVFoundation` system frameworks
- Builds `armv7`, `armv7s`, `arm64`, `arm64e`, `i386`, `x86_64` and `x86_64` (Mac Catalyst) architectures
- Supports `bzip2`, `iconv`, `libuuid`, `zlib` system libraries and `AudioToolbox`, `CoreImage`, `VideoToolbox`, `AVFoundation` system frameworks
- Objective-C API
- Camera access
- `ARC` enabled library
+1 -1
View File
@@ -28,7 +28,7 @@ LIB_NAME="chromaprint"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
CFLAGS=$(get_cflags ${LIB_NAME})
CXXFLAGS=$(get_cxxflags ${LIB_NAME})
LDFLAGS=$(get_ldflags ${LIB_NAME})
+12 -12
View File
@@ -75,7 +75,7 @@ get_arch_name() {
esac
}
get_target_host() {
get_build_host() {
case ${ARCH} in
arm-v7a | arm-v7a-neon)
echo "arm-linux-androideabi"
@@ -359,7 +359,7 @@ get_cxxflags() {
}
get_common_linked_libraries() {
local COMMON_LIBRARY_PATHS="-L${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/${TOOLCHAIN}/${TARGET_HOST}/lib -L${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/${TOOLCHAIN}/sysroot/usr/lib/${TARGET_HOST}/${API} -L${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/${TOOLCHAIN}/lib"
local COMMON_LIBRARY_PATHS="-L${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/${TOOLCHAIN}/${BUILD_HOST}/lib -L${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/${TOOLCHAIN}/sysroot/usr/lib/${BUILD_HOST}/${API} -L${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/${TOOLCHAIN}/lib"
case $1 in
ffmpeg)
@@ -1003,16 +1003,16 @@ download_gpl_library_source() {
set_toolchain_clang_paths() {
export PATH=$PATH:${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/${TOOLCHAIN}/bin
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export AR=${TARGET_HOST}-ar
export AR=${BUILD_HOST}-ar
export CC=$(get_clang_target_host)-clang
export CXX=$(get_clang_target_host)-clang++
if [ "$1" == "x264" ]; then
export AS=${CC}
else
export AS=${TARGET_HOST}-as
export AS=${BUILD_HOST}-as
fi
case ${ARCH} in
@@ -1021,9 +1021,9 @@ set_toolchain_clang_paths() {
;;
esac
export LD=${TARGET_HOST}-ld
export RANLIB=${TARGET_HOST}-ranlib
export STRIP=${TARGET_HOST}-strip
export LD=${BUILD_HOST}-ld
export RANLIB=${BUILD_HOST}-ranlib
export STRIP=${BUILD_HOST}-strip
export INSTALL_PKG_CONFIG_DIR="${BASEDIR}/prebuilt/android-$(get_target_build)/pkgconfig"
export ZLIB_PACKAGE_CONFIG_PATH="${INSTALL_PKG_CONFIG_DIR}/zlib.pc"
@@ -1050,14 +1050,14 @@ build_cpufeatures() {
set_toolchain_clang_paths "cpu-features"
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags "cpu-features")
export CXXFLAGS=$(get_cxxflags "cpu-features")
export LDFLAGS=$(get_ldflags "cpu-features")
# THEN BUILD FOR THIS ABI
$(get_clang_target_host)-clang -c ${ANDROID_NDK_ROOT}/sources/android/cpufeatures/cpu-features.c -o ${ANDROID_NDK_ROOT}/sources/android/cpufeatures/cpu-features.o 1>>${BASEDIR}/build.log 2>&1
${TARGET_HOST}-ar rcs ${ANDROID_NDK_ROOT}/sources/android/cpufeatures/libcpufeatures.a ${ANDROID_NDK_ROOT}/sources/android/cpufeatures/cpu-features.o 1>>${BASEDIR}/build.log 2>&1
${BUILD_HOST}-ar rcs ${ANDROID_NDK_ROOT}/sources/android/cpufeatures/libcpufeatures.a ${ANDROID_NDK_ROOT}/sources/android/cpufeatures/cpu-features.o 1>>${BASEDIR}/build.log 2>&1
$(get_clang_target_host)-clang -shared ${ANDROID_NDK_ROOT}/sources/android/cpufeatures/cpu-features.o -o ${ANDROID_NDK_ROOT}/sources/android/cpufeatures/libcpufeatures.so 1>>${BASEDIR}/build.log 2>&1
create_cpufeatures_package_config
@@ -1076,13 +1076,13 @@ build_android_lts_support() {
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
CFLAGS=$(get_cflags ${LIB_NAME})
LDFLAGS=$(get_ldflags ${LIB_NAME})
# THEN BUILD FOR THIS ABI
$(get_clang_target_host)-clang ${CFLAGS} -Wno-unused-command-line-argument -c ${BASEDIR}/android/app/src/main/cpp/android_lts_support.c -o ${BASEDIR}/android/app/src/main/cpp/android_lts_support.o ${LDFLAGS} 1>>${BASEDIR}/build.log 2>&1
${TARGET_HOST}-ar rcs ${BASEDIR}/android/app/src/main/cpp/libandroidltssupport.a ${BASEDIR}/android/app/src/main/cpp/android_lts_support.o 1>>${BASEDIR}/build.log 2>&1
${BUILD_HOST}-ar rcs ${BASEDIR}/android/app/src/main/cpp/libandroidltssupport.a ${BASEDIR}/android/app/src/main/cpp/android_lts_support.o 1>>${BASEDIR}/build.log 2>&1
}
autoreconf_library() {
+2 -2
View File
@@ -28,7 +28,7 @@ LIB_NAME="expat"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -51,7 +51,7 @@ fi
--enable-static \
--disable-shared \
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+2 -2
View File
@@ -34,7 +34,7 @@ LIB_NAME="ffmpeg"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
CFLAGS=$(get_cflags ${LIB_NAME})
CXXFLAGS=$(get_cxxflags ${LIB_NAME})
LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -341,7 +341,7 @@ rm -f ${BASEDIR}/src/${LIB_NAME}/libswscale/aarch64/hscale.S 1>>${BASEDIR}/build
cp ${BASEDIR}/tools/make/ffmpeg/libswscale/aarch64/hscale.S ${BASEDIR}/src/${LIB_NAME}/libswscale/aarch64/hscale.S 1>>${BASEDIR}/build.log 2>&1
./configure \
--cross-prefix="${TARGET_HOST}-" \
--cross-prefix="${BUILD_HOST}-" \
--sysroot="${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/${TOOLCHAIN}/sysroot" \
--prefix="${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME}" \
--pkg-config="${HOST_PKG_CONFIG_PATH}" \
+2 -2
View File
@@ -28,7 +28,7 @@ LIB_NAME="fontconfig"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -55,7 +55,7 @@ fi
--disable-rpath \
--disable-libxml2 \
--disable-docs \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+2 -2
View File
@@ -28,7 +28,7 @@ LIB_NAME="freetype"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -58,7 +58,7 @@ export LIBPNG_LIBS="-L${BASEDIR}/prebuilt/android-$(get_target_build)/libpng/lib
--disable-shared \
--disable-fast-install \
--disable-mmap \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+2 -2
View File
@@ -28,7 +28,7 @@ LIB_NAME="fribidi"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -52,7 +52,7 @@ fi
--disable-fast-install \
--disable-debug \
--disable-deprecated \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+2 -2
View File
@@ -28,7 +28,7 @@ LIB_NAME="giflib"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})" -DS_IREAD=S_IRUSR -DS_IWRITE=S_IWUSR"
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -50,7 +50,7 @@ fi
--enable-static \
--disable-shared \
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+2 -2
View File
@@ -28,7 +28,7 @@ LIB_NAME="gmp"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -51,7 +51,7 @@ fi
--disable-shared \
--disable-fast-install \
--disable-maintainer-mode \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+2 -2
View File
@@ -28,7 +28,7 @@ LIB_NAME="gnutls"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
COMMON_CFLAGS=$(get_cflags ${LIB_NAME})
COMMON_CXXFLAGS=$(get_cxxflags ${LIB_NAME})
COMMON_LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -83,7 +83,7 @@ fi
--disable-tests \
--disable-tools \
--disable-maintainer-mode \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+1 -1
View File
@@ -28,7 +28,7 @@ LIB_NAME="jpeg"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
+2 -2
View File
@@ -28,7 +28,7 @@ LIB_NAME="kvazaar"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -62,7 +62,7 @@ LIBS="${ARCH_SPECIFIC_LIBS}" ./configure \
--enable-static \
--disable-shared \
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make || exit 1
+2 -2
View File
@@ -28,7 +28,7 @@ LIB_NAME="lame"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -55,7 +55,7 @@ fi
--disable-frontend \
--disable-efence \
--disable-gtktest \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+2 -2
View File
@@ -28,7 +28,7 @@ LIB_NAME="leptonica"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export CPPFLAGS="-I${BASEDIR}/prebuilt/android-$(get_target_build)/giflib/include"
@@ -72,7 +72,7 @@ fi
--disable-shared \
--disable-fast-install \
--disable-programs \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+1 -1
View File
@@ -28,7 +28,7 @@ LIB_NAME="libaom"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
CFLAGS=$(get_cflags ${LIB_NAME})
CXXFLAGS=$(get_cxxflags ${LIB_NAME})
LDFLAGS=$(get_ldflags ${LIB_NAME})
+2 -2
View File
@@ -28,7 +28,7 @@ LIB_NAME="libass"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -69,7 +69,7 @@ esac
--disable-profile \
--disable-coretext \
${ASM_FLAGS} \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+2 -2
View File
@@ -28,7 +28,7 @@ LIB_NAME="libiconv"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -50,7 +50,7 @@ fi
--disable-shared \
--disable-fast-install \
--disable-rpath \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+2 -2
View File
@@ -28,7 +28,7 @@ LIB_NAME="libilbc"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -49,7 +49,7 @@ fi
--enable-static \
--disable-shared \
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+2 -2
View File
@@ -28,7 +28,7 @@ LIB_NAME="libogg"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -49,7 +49,7 @@ fi
--enable-static \
--disable-shared \
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+2 -2
View File
@@ -28,7 +28,7 @@ LIB_NAME="libpng"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -68,7 +68,7 @@ fi
--disable-unversioned-libpng-pc \
--disable-unversioned-libpng-config \
${CPU_SPECIFIC_OPTIONS} \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+2 -2
View File
@@ -28,7 +28,7 @@ LIB_NAME="libsndfile"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -53,7 +53,7 @@ fi
--disable-alsa \
--disable-full-suite \
--disable-external-libs \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+2 -2
View File
@@ -28,7 +28,7 @@ LIB_NAME="libtheora"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -60,7 +60,7 @@ fi
--disable-sdltest \
${ASM_FLAGS} \
--disable-valgrind-testing \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+2 -2
View File
@@ -28,7 +28,7 @@ LIB_NAME="libuuid"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -49,7 +49,7 @@ fi
--enable-static \
--disable-shared \
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+1 -1
View File
@@ -28,7 +28,7 @@ LIB_NAME="libvidstab"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
CFLAGS=$(get_cflags ${LIB_NAME})
CXXFLAGS=$(get_cxxflags ${LIB_NAME})
LDFLAGS=$(get_ldflags ${LIB_NAME})
+2 -2
View File
@@ -28,7 +28,7 @@ LIB_NAME="libvorbis"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -55,7 +55,7 @@ PKG_CONFIG= ./configure \
--disable-docs \
--disable-examples \
--disable-oggtest \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+5 -5
View File
@@ -28,18 +28,18 @@ LIB_NAME="libwebp"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
CFLAGS=$(get_cflags ${LIB_NAME})
CXXFLAGS=$(get_cxxflags ${LIB_NAME})
LDFLAGS=$(get_ldflags ${LIB_NAME})
SIMD_OPTIONS=""
ARCH_OPTIONS=""
case ${ARCH} in
arm-v7a)
SIMD_OPTIONS="-DWEBP_ENABLE_SIMD=OFF"
ARCH_OPTIONS="-DWEBP_ENABLE_SIMD=OFF"
;;
*)
SIMD_OPTIONS="-DWEBP_ENABLE_SIMD=ON"
ARCH_OPTIONS="-DWEBP_ENABLE_SIMD=ON"
;;
esac
@@ -95,7 +95,7 @@ cmake -Wno-dev \
-DWEBP_BUILD_IMG2WEBP=0 \
-DWEBP_BUILD_WEBPMUX=0 \
-DWEBP_BUILD_WEBPINFO=0 \
${SIMD_OPTIONS} \
${ARCH_OPTIONS} \
-DCMAKE_SYSTEM_PROCESSOR=$(get_cmake_target_processor) \
-DBUILD_SHARED_LIBS=0 .. || exit 1
+2 -2
View File
@@ -28,7 +28,7 @@ LIB_NAME="libxml2"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -60,7 +60,7 @@ autoreconf_library ${LIB_NAME}
--enable-static \
--disable-shared \
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+2 -2
View File
@@ -28,7 +28,7 @@ LIB_NAME="nettle"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -65,7 +65,7 @@ fi
--disable-gcov \
--disable-documentation \
${OPTIONAL_CPU_SUPPORT} \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+2 -2
View File
@@ -28,7 +28,7 @@ LIB_NAME="opencore-amr"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -50,7 +50,7 @@ fi
--disable-shared \
--disable-fast-install \
--disable-maintainer-mode \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+1 -1
View File
@@ -28,7 +28,7 @@ LIB_NAME="openh264"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
CFLAGS=$(get_cflags ${LIB_NAME})
CXXFLAGS=$(get_cxxflags ${LIB_NAME})
LDFLAGS=$(get_ldflags ${LIB_NAME})
+2 -2
View File
@@ -28,7 +28,7 @@ LIB_NAME="opus"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -56,7 +56,7 @@ fi
--disable-maintainer-mode \
--disable-doc \
--disable-extra-programs \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+2 -2
View File
@@ -28,7 +28,7 @@ LIB_NAME="sdl"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -51,7 +51,7 @@ fi
--enable-static \
--disable-shared \
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+2 -2
View File
@@ -28,7 +28,7 @@ LIB_NAME="shine"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -49,7 +49,7 @@ fi
--enable-static \
--disable-shared \
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+1 -1
View File
@@ -28,7 +28,7 @@ LIB_NAME="snappy"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
+1 -1
View File
@@ -28,7 +28,7 @@ LIB_NAME="soxr"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
CFLAGS=$(get_cflags ${LIB_NAME})
CXXFLAGS=$(get_cxxflags ${LIB_NAME})
LDFLAGS=$(get_ldflags ${LIB_NAME})
+2 -2
View File
@@ -28,7 +28,7 @@ LIB_NAME="speex"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -56,7 +56,7 @@ fi
--disable-shared \
--disable-binaries \
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+2 -2
View File
@@ -28,7 +28,7 @@ LIB_NAME="tesseract"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -60,7 +60,7 @@ export ac_cv_c_bigendian=no
--disable-cube \
--disable-tessdata-prefix \
--disable-largefile \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
${SED_INLINE} 's/\-lrt//g' ${BASEDIR}/src/${LIB_NAME}/api/Makefile
+2 -2
View File
@@ -28,7 +28,7 @@ LIB_NAME="tiff"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -55,7 +55,7 @@ fi
--disable-cxx \
--disable-win32-io \
--disable-lzma \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+2 -2
View File
@@ -28,7 +28,7 @@ LIB_NAME="twolame"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -53,7 +53,7 @@ export SNDFILE_LIBS="$(pkg-config --libs --static sndfile)"
--enable-static \
--disable-shared \
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+2 -2
View File
@@ -28,7 +28,7 @@ LIB_NAME="wavpack"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -52,7 +52,7 @@ fi
--disable-apps \
--disable-fast-install \
--disable-tests \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+2 -2
View File
@@ -33,7 +33,7 @@ LIB_NAME="x264"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -71,7 +71,7 @@ esac
--enable-static \
--disable-cli \
${ASM_FLAGS} \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+1 -1
View File
@@ -28,7 +28,7 @@ LIB_NAME="x265"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
CFLAGS=$(get_cflags ${LIB_NAME})
CXXFLAGS=$(get_cxxflags ${LIB_NAME})
LDFLAGS=$(get_ldflags ${LIB_NAME})
+2 -2
View File
@@ -28,7 +28,7 @@ LIB_NAME="xvidcore"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -55,7 +55,7 @@ esac
./configure \
--prefix=${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME} \
${ASM_FLAGS} \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+1 -1
View File
@@ -32,7 +32,7 @@ LIB_NAME="chromaprint"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
CFLAGS=$(get_cflags ${LIB_NAME})
CXXFLAGS=$(get_cxxflags ${LIB_NAME})
LDFLAGS=$(get_ldflags ${LIB_NAME})
+74 -62
View File
@@ -53,19 +53,19 @@ get_library_name() {
32) echo "jpeg" ;;
33) echo "libogg" ;;
34) echo "libpng" ;;
35) echo "libuuid" ;;
36) echo "nettle" ;;
37) echo "tiff" ;;
38) echo "expat" ;;
39) echo "libsndfile" ;;
40) echo "leptonica" ;;
41) echo "ios-zlib" ;;
42) echo "ios-audiotoolbox" ;;
43) echo "ios-coreimage" ;;
44) echo "ios-bzip2" ;;
45) echo "ios-videotoolbox" ;;
46) echo "ios-avfoundation" ;;
47) echo "ios-libiconv" ;;
35) echo "nettle" ;;
36) echo "tiff" ;;
37) echo "expat" ;;
38) echo "libsndfile" ;;
39) echo "leptonica" ;;
40) echo "ios-zlib" ;;
41) echo "ios-audiotoolbox" ;;
42) echo "ios-coreimage" ;;
43) echo "ios-bzip2" ;;
44) echo "ios-videotoolbox" ;;
45) echo "ios-avfoundation" ;;
46) echo "ios-libiconv" ;;
47) echo "ios-libuuid" ;;
esac
}
@@ -84,10 +84,10 @@ get_package_config_file_name() {
28) echo "sdl2" ;;
32) echo "libjpeg" ;;
33) echo "ogg" ;;
35) echo "uuid" ;;
37) echo "libtiff-4" ;;
39) echo "sndfile" ;;
40) echo "lept" ;;
36) echo "libtiff-4" ;;
38) echo "sndfile" ;;
39) echo "lept" ;;
47) echo "uuid" ;;
*) echo $(get_library_name $1)
esac
}
@@ -111,9 +111,8 @@ get_static_archive_name() {
31) echo "libgif.a" ;;
33) echo "libogg.a" ;;
34) echo "libpng.a" ;;
35) echo "libuuid.a" ;;
39) echo "libsndfile.a" ;;
40) echo "liblept.a" ;;
38) echo "libsndfile.a" ;;
39) echo "liblept.a" ;;
*) echo lib$(get_library_name $1).a
esac
}
@@ -126,20 +125,35 @@ get_arch_name() {
3) echo "arm64e" ;;
4) echo "i386" ;;
5) echo "x86-64" ;;
6) echo "x86-64-mac-catalyst" ;;
esac
}
get_target_host() {
case ${ARCH} in
x86-64-mac-catalyst)
echo "x86_64-apple-ios13.0-macabi"
;;
*)
echo "$(get_target_arch)-ios-darwin"
;;
esac
}
get_build_host() {
echo "$(get_target_arch)-ios-darwin"
}
get_target_build_directory() {
case ${ARCH} in
x86-64)
echo "ios-x86_64-apple-darwin"
echo "ios-x86_64"
;;
x86-64-mac-catalyst)
echo "ios-x86_64-mac-catalyst"
;;
*)
echo "ios-${ARCH}-apple-darwin"
echo "ios-${ARCH}"
;;
esac
}
@@ -149,7 +163,7 @@ get_target_arch() {
arm64 | arm64e)
echo "aarch64"
;;
x86-64)
x86-64 | x86-64-mac-catalyst)
echo "x86_64"
;;
*)
@@ -170,6 +184,9 @@ get_sdk_name() {
i386 | x86-64)
echo "iphonesimulator"
;;
x86-64-mac-catalyst)
echo "macosx"
;;
esac
}
@@ -185,6 +202,9 @@ get_min_version_cflags() {
i386 | x86-64)
echo "-mios-simulator-version-min=${IOS_MIN_VERSION}"
;;
x86-64-mac-catalyst)
echo "-miphoneos-version-min=13.0"
;;
esac
}
@@ -203,6 +223,9 @@ get_common_cflags() {
i386 | x86-64)
echo "-fstrict-aliasing -DIOS ${LTS_BUILD_FLAG}${BUILD_DATE} -isysroot ${SDK_PATH}"
;;
x86-64-mac-catalyst)
echo "-fstrict-aliasing -fembed-bitcode ${LTS_BUILD_FLAG}${BUILD_DATE} -isysroot ${SDK_PATH}"
;;
*)
echo "-fstrict-aliasing -fembed-bitcode -DIOS ${LTS_BUILD_FLAG}${BUILD_DATE} -isysroot ${SDK_PATH}"
;;
@@ -229,6 +252,9 @@ get_arch_specific_cflags() {
x86-64)
echo "-arch x86_64 -target $(get_target_host) -march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel -DMOBILE_FFMPEG_X86_64"
;;
x86-64-mac-catalyst)
echo "-arch x86_64 -target $(get_target_host) -march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel -DMOBILE_FFMPEG_X86_64_MAC_CATALYST -isysroot ${SDK_PATH} -isystem ${SDK_PATH}/System/iOSSupport/usr/include -iframework ${SDK_PATH}/System/iOSSupport/System/Library/Frameworks"
;;
esac
}
@@ -236,31 +262,11 @@ get_size_optimization_cflags() {
local ARCH_OPTIMIZATION=""
case ${ARCH} in
armv7 | armv7s | arm64 | arm64e)
case $1 in
x264 | x265)
ARCH_OPTIMIZATION="-Oz -Wno-ignored-optimization-argument"
;;
ffmpeg | mobile-ffmpeg)
ARCH_OPTIMIZATION="-Oz -Wno-ignored-optimization-argument"
;;
*)
ARCH_OPTIMIZATION="-Oz -Wno-ignored-optimization-argument"
;;
esac
armv7 | armv7s | arm64 | arm64e | x86-64-mac-catalyst)
ARCH_OPTIMIZATION="-Oz -Wno-ignored-optimization-argument"
;;
i386 | x86-64)
case $1 in
x264 | ffmpeg)
ARCH_OPTIMIZATION="-O2 -Wno-ignored-optimization-argument"
;;
x265)
ARCH_OPTIMIZATION="-O2 -Wno-ignored-optimization-argument"
;;
*)
ARCH_OPTIMIZATION="-O2 -Wno-ignored-optimization-argument"
;;
esac
ARCH_OPTIMIZATION="-O2 -Wno-ignored-optimization-argument"
;;
esac
@@ -273,7 +279,7 @@ get_size_optimization_asm_cflags() {
case $1 in
jpeg | ffmpeg)
case ${ARCH} in
armv7 | armv7s | arm64 | arm64e)
armv7 | armv7s | arm64 | arm64e | x86-64-mac-catalyst)
ARCH_OPTIMIZATION="-Oz"
;;
i386 | x86-64)
@@ -381,7 +387,7 @@ get_cxxflags() {
local BITCODE_FLAGS=""
case ${ARCH} in
armv7 | armv7s | arm64 | arm64e)
armv7 | armv7s | arm64 | arm64e | x86-64-mac-catalyst)
local BITCODE_FLAGS="-fembed-bitcode"
;;
esac
@@ -418,7 +424,7 @@ get_common_ldflags() {
get_size_optimization_ldflags() {
case ${ARCH} in
armv7 | armv7s | arm64 | arm64e)
armv7 | armv7s | arm64 | arm64e | x86-64-mac-catalyst)
case $1 in
ffmpeg | mobile-ffmpeg)
echo "-Oz -dead_strip"
@@ -444,22 +450,25 @@ get_size_optimization_ldflags() {
get_arch_specific_ldflags() {
case ${ARCH} in
armv7)
echo "-arch armv7 -march=armv7 -mfpu=neon -mfloat-abi=softfp -fembed-bitcode"
echo "-arch armv7 -march=armv7 -mfpu=neon -mfloat-abi=softfp -fembed-bitcode -target $(get_target_host)"
;;
armv7s)
echo "-arch armv7s -march=armv7s -mfpu=neon -mfloat-abi=softfp -fembed-bitcode"
echo "-arch armv7s -march=armv7s -mfpu=neon -mfloat-abi=softfp -fembed-bitcode -target $(get_target_host)"
;;
arm64)
echo "-arch arm64 -march=armv8-a+crc+crypto -fembed-bitcode"
echo "-arch arm64 -march=armv8-a+crc+crypto -fembed-bitcode -target $(get_target_host)"
;;
arm64e)
echo "-arch arm64e -march=armv8.3-a+crc+crypto -fembed-bitcode"
echo "-arch arm64e -march=armv8.3-a+crc+crypto -fembed-bitcode -target $(get_target_host)"
;;
i386)
echo "-arch i386 -march=i386"
echo "-arch i386 -march=i386 -target $(get_target_host)"
;;
x86-64)
echo "-arch x86_64 -march=x86-64"
echo "-arch x86_64 -march=x86-64 -target $(get_target_host)"
;;
x86-64-mac-catalyst)
echo "-arch x86_64 -march=x86-64 -target $(get_target_host) -isysroot ${SDK_PATH} -L${SDK_PATH}/System/iOSSupport/usr/lib -iframework ${SDK_PATH}/System/iOSSupport/System/Library/Frameworks"
;;
esac
}
@@ -477,7 +486,7 @@ get_ldflags() {
case $1 in
mobile-ffmpeg)
case ${ARCH} in
armv7 | armv7s | arm64 | arm64e)
armv7 | armv7s | arm64 | arm64e | x86-64-mac-catalyst)
echo "${ARCH_FLAGS} ${LINKED_LIBRARIES} ${COMMON_FLAGS} -fembed-bitcode -Wc,-fembed-bitcode ${OPTIMIZATION_FLAGS}"
;;
*)
@@ -802,13 +811,13 @@ Cflags: -I\${includedir}
EOF
}
create_uuid_package_config() {
create_uuid_system_package_config() {
local UUID_VERSION="$1"
cat > "${INSTALL_PKG_CONFIG_DIR}/uuid.pc" << EOF
prefix=${BASEDIR}/prebuilt/$(get_target_build_directory)/libuuid
prefix=${SDK_PATH}
exec_prefix=\${prefix}
libdir=\${exec_prefix}/lib
libdir=\${exec_prefix}/usr/lib
includedir=\${prefix}/include
Name: uuid
@@ -816,7 +825,7 @@ Description: Universally unique id library
Version: ${UUID_VERSION}
Requires:
Cflags: -I\${includedir}
Libs: -L\${libdir} -luuid
Libs: -L\${libdir}
EOF
}
@@ -1028,8 +1037,6 @@ set_toolchain_clang_paths() {
LOCAL_GAS_PREPROCESSOR="${BASEDIR}/src/x264/tools/gas-preprocessor.pl"
fi
TARGET_HOST=$(get_target_host)
export AR="$(xcrun --sdk $(get_sdk_name) -f ar)"
export CC="clang"
export OBJC="$(xcrun --sdk $(get_sdk_name) -f clang)"
@@ -1068,6 +1075,7 @@ set_toolchain_clang_paths() {
export ZLIB_PACKAGE_CONFIG_PATH="${INSTALL_PKG_CONFIG_DIR}/zlib.pc"
export BZIP2_PACKAGE_CONFIG_PATH="${INSTALL_PKG_CONFIG_DIR}/bzip2.pc"
export LIB_ICONV_PACKAGE_CONFIG_PATH="${INSTALL_PKG_CONFIG_DIR}/libiconv.pc"
export LIB_UUID_PACKAGE_CONFIG_PATH="${INSTALL_PKG_CONFIG_DIR}/uuid.pc"
if [ ! -d ${INSTALL_PKG_CONFIG_DIR} ]; then
mkdir -p ${INSTALL_PKG_CONFIG_DIR}
@@ -1085,6 +1093,10 @@ set_toolchain_clang_paths() {
create_bzip2_package_config
fi
if [ ! -f ${LIB_UUID_PACKAGE_CONFIG_PATH} ]; then
create_uuid_system_package_config
fi
prepare_inline_sed
}
+2 -2
View File
@@ -32,7 +32,7 @@ LIB_NAME="expat"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -55,7 +55,7 @@ fi
--enable-static \
--disable-shared \
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+24 -13
View File
@@ -37,7 +37,7 @@ LIB_NAME="ffmpeg"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
FFMPEG_CFLAGS=""
FFMPEG_LDFLAGS=""
export PKG_CONFIG_LIBDIR="${INSTALL_PKG_CONFIG_DIR}"
@@ -46,6 +46,7 @@ TARGET_CPU=""
TARGET_ARCH=""
BITCODE_FLAGS=""
NEON_FLAG=""
ARCH_OPTIONS="--enable-asm"
case ${ARCH} in
armv7)
TARGET_CPU="armv7"
@@ -83,6 +84,13 @@ case ${ARCH} in
NEON_FLAG=" --disable-neon"
BITCODE_FLAGS=""
;;
x86-64-mac-catalyst)
ARCH_OPTIONS="--disable-asm"
TARGET_CPU="x86_64"
TARGET_ARCH="x86_64"
NEON_FLAG=" --disable-neon"
BITCODE_FLAGS="-fembed-bitcode -Wc,-fembed-bitcode"
;;
esac
if [[ ${APPLE_TVOS_BUILD} -eq 1 ]]; then
@@ -274,10 +282,6 @@ do
FFMPEG_CFLAGS+=" $(pkg-config --cflags libpng)"
FFMPEG_LDFLAGS+=" $(pkg-config --libs --static libpng)"
;;
libuuid)
FFMPEG_CFLAGS+=" $(pkg-config --cflags uuid)"
FFMPEG_LDFLAGS+=" $(pkg-config --libs --static uuid)"
;;
nettle)
FFMPEG_CFLAGS+=" $(pkg-config --cflags nettle)"
FFMPEG_LDFLAGS+=" $(pkg-config --libs --static nettle)"
@@ -321,19 +325,19 @@ do
# THE FOLLOWING LIBRARIES SHOULD BE EXPLICITLY DISABLED TO PREVENT AUTODETECT
if [[ ${library} -eq 29 ]]; then
CONFIGURE_POSTFIX+=" --disable-sdl2"
elif [[ ${library} -eq 42 ]]; then
elif [[ ${library} -eq 41 ]]; then
CONFIGURE_POSTFIX+=" --disable-zlib"
elif [[ ${library} -eq 43 ]]; then
elif [[ ${library} -eq 42 ]]; then
CONFIGURE_POSTFIX+=" --disable-audiotoolbox"
elif [[ ${library} -eq 44 ]]; then
elif [[ ${library} -eq 43 ]]; then
CONFIGURE_POSTFIX+=" --disable-coreimage"
elif [[ ${library} -eq 45 ]]; then
elif [[ ${library} -eq 44 ]]; then
CONFIGURE_POSTFIX+=" --disable-bzlib"
elif [[ ${library} -eq 46 ]]; then
elif [[ ${library} -eq 45 ]]; then
CONFIGURE_POSTFIX+=" --disable-videotoolbox"
elif [[ ${library} -eq 47 ]]; then
elif [[ ${library} -eq 46 ]]; then
CONFIGURE_POSTFIX+=" --disable-avfoundation"
elif [[ ${library} -eq 48 ]]; then
elif [[ ${library} -eq 47 ]]; then
CONFIGURE_POSTFIX+=" --disable-iconv"
fi
fi
@@ -400,6 +404,13 @@ ${SED_INLINE} 's/check_cflags -mdynamic-no-pic && add_asflags -mdynamic-no-pic;/
rm -f ${BASEDIR}/src/${LIB_NAME}/libswscale/aarch64/hscale.S 1>>${BASEDIR}/build.log 2>&1
cp ${BASEDIR}/tools/make/ffmpeg/libswscale/aarch64/hscale.S ${BASEDIR}/src/${LIB_NAME}/libswscale/aarch64/hscale.S 1>>${BASEDIR}/build.log 2>&1
# Workaround for videotoolbox on mac catalyst
if [ ${ARCH} == "x86-64-mac-catalyst" ]; then
${SED_INLINE} 's/ CFDictionarySetValue(buffer_attributes\, kCVPixelBufferOpenGLESCompatibilityKey/ \/\/ CFDictionarySetValue(buffer_attributes\, kCVPixelBufferOpenGLESCompatibilityKey/g' ${BASEDIR}/src/${LIB_NAME}/libavcodec/videotoolbox.c
else
${SED_INLINE} 's/ \/\/ CFDictionarySetValue(buffer_attributes\, kCVPixelBufferOpenGLESCompatibilityKey/ CFDictionarySetValue(buffer_attributes\, kCVPixelBufferOpenGLESCompatibilityKey/g' ${BASEDIR}/src/${LIB_NAME}/libavcodec/videotoolbox.c
fi
./configure \
--sysroot=${SDK_PATH} \
--prefix=${BASEDIR}/prebuilt/$(get_target_build_directory)/${LIB_NAME} \
@@ -416,7 +427,7 @@ cp ${BASEDIR}/tools/make/ffmpeg/libswscale/aarch64/hscale.S ${BASEDIR}/src/${LIB
${NEON_FLAG} \
--enable-cross-compile \
--enable-pic \
--enable-asm \
${ARCH_OPTIONS} \
--enable-inline-asm \
--enable-optimizations \
--enable-swscale \
+2 -2
View File
@@ -32,7 +32,7 @@ LIB_NAME="fontconfig"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -59,7 +59,7 @@ fi
--disable-rpath \
--disable-libxml2 \
--disable-docs \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
# DISABLE IOS TESTS with system() calls - system() is deprecated for IOS
# 1. test-bz106632.c
+2 -2
View File
@@ -32,7 +32,7 @@ LIB_NAME="freetype"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -62,7 +62,7 @@ export LIBPNG_LIBS="-L${BASEDIR}/prebuilt/$(get_target_build_directory)/libpng/l
--disable-shared \
--disable-fast-install \
--disable-mmap \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+2 -2
View File
@@ -32,7 +32,7 @@ LIB_NAME="fribidi"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -56,7 +56,7 @@ fi
--disable-fast-install \
--disable-debug \
--disable-deprecated \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+2 -2
View File
@@ -32,7 +32,7 @@ LIB_NAME="giflib"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})" -DS_IREAD=S_IRUSR -DS_IWRITE=S_IWUSR"
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -54,7 +54,7 @@ fi
--enable-static \
--disable-shared \
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+10 -3
View File
@@ -47,10 +47,17 @@ fi
# PREPARING FLAGS
case ${ARCH} in
i386)
TARGET_HOST="x86-apple-darwin"
unset gmp_cv_asm_w32
BUILD_HOST="x86-apple-darwin"
;;
x86-64-mac-catalyst)
# Workaround for 'cannot determine how to define a 32-bit word' error
export gmp_cv_asm_w32=".long"
BUILD_HOST=$(get_build_host)
;;
*)
TARGET_HOST=$(get_target_host)
unset gmp_cv_asm_w32
BUILD_HOST=$(get_build_host)
;;
esac
@@ -63,7 +70,7 @@ esac
--disable-assembly \
--disable-fast-install \
--disable-maintainer-mode \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+2 -2
View File
@@ -32,7 +32,7 @@ LIB_NAME="gnutls"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
COMMON_CFLAGS=$(get_cflags ${LIB_NAME})
COMMON_CXXFLAGS=$(get_cxxflags ${LIB_NAME})
COMMON_LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -96,7 +96,7 @@ fi
--disable-tests \
--disable-tools \
--disable-maintainer-mode \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+5 -5
View File
@@ -33,19 +33,19 @@ set_toolchain_clang_paths ${LIB_NAME}
export CCAS=${AS}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
export ASM_FLAGS=$(get_asmflags ${LIB_NAME})
SIMD_OPTIONS=""
ARCH_OPTIONS=""
case ${ARCH} in
armv7 | armv7s | arm64 | arm64e)
SIMD_OPTIONS="-DWITH_SIMD=1"
ARCH_OPTIONS="-DWITH_SIMD=1"
;;
*)
SIMD_OPTIONS="-DWITH_SIMD=0"
ARCH_OPTIONS="-DWITH_SIMD=0"
;;
esac
@@ -80,7 +80,7 @@ cmake -Wno-dev \
-DENABLE_STATIC=1 \
-DENABLE_SHARED=0 \
-DWITH_JPEG8=1 \
${SIMD_OPTIONS} \
${ARCH_OPTIONS} \
-DWITH_TURBOJPEG=0 \
-DWITH_JAVA=0 \
-DCMAKE_SYSTEM_PROCESSOR=$(get_target_arch) \
+9 -3
View File
@@ -32,12 +32,17 @@ LIB_NAME="kvazaar"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
ARCH_OPTIONS=""
case ${ARCH} in
i386)
TARGET_HOST="x86-apple-darwin"
BUILD_HOST="x86-apple-darwin"
;;
x86-64-mac-catalyst)
ARCH_OPTIONS="--disable-asm"
BUILD_HOST=$(get_build_host)
;;
*)
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
;;
esac
export CFLAGS=$(get_cflags ${LIB_NAME})
@@ -63,7 +68,8 @@ fi
--enable-static \
--disable-shared \
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
${ARCH_OPTIONS} \
--host=${BUILD_HOST} || exit 1
make || exit 1
+2 -2
View File
@@ -32,7 +32,7 @@ LIB_NAME="lame"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -59,7 +59,7 @@ fi
--disable-frontend \
--disable-efence \
--disable-gtktest \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+2 -2
View File
@@ -32,7 +32,7 @@ LIB_NAME="leptonica"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS="$(get_cflags ${LIB_NAME})"
export CXXFLAGS="$(get_cxxflags ${LIB_NAME})"
export CPPFLAGS="-I${BASEDIR}/prebuilt/$(get_target_build_directory)/giflib/include"
@@ -76,7 +76,7 @@ fi
--disable-shared \
--disable-fast-install \
--disable-programs \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+18 -2
View File
@@ -32,7 +32,7 @@ LIB_NAME="libaom"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
CFLAGS="$(get_cflags ${LIB_NAME})"
CXXFLAGS="$(get_cxxflags ${LIB_NAME})"
LDFLAGS="$(get_ldflags ${LIB_NAME})"
@@ -62,7 +62,12 @@ case ${ARCH} in
;;
x86-64)
TOOLCHAIN_FILE="${BASEDIR}/src/${LIB_NAME}/build/cmake/toolchains/x86_64-ios-simulator.cmake"
ARCH_OPTIONS="-DARCH_X86_64=1 -DENABLE_SSE4_2=1 -DHAVE_SSE4_2=1"
ARCH_OPTIONS="-DARCH_X86_64=1 -DENABLE_SSE4_1=1 -DHAVE_SSE4_2=1"
;;
x86-64-mac-catalyst)
cp ${BASEDIR}/tools/cmake/libaom.x86_64-mac-catalyst.cmake ${BASEDIR}/src/${LIB_NAME}/build/cmake/toolchains/x86_64-mac-catalyst.cmake
TOOLCHAIN_FILE="${BASEDIR}/src/${LIB_NAME}/build/cmake/toolchains/x86_64-mac-catalyst.cmake"
ARCH_OPTIONS="-DARCH_X86_64=0 -DENABLE_SSE=0 -DENABLE_SSE2=0 -DENABLE_SSE3=0 -DENABLE_SSE4_1=0 -DENABLE_SSE4_2=0 -DENABLE_MMX=0 -DCONFIG_OS_SUPPORT=0 -DCONFIG_RUNTIME_CPU_DETECT=0"
;;
esac
@@ -75,6 +80,17 @@ fi
mkdir cmake-build;
cd cmake-build
# Workaround to disable asm on mac catalyst
if [ ${ARCH} == "x86-64-mac-catalyst" ]; then
${SED_INLINE} 's/define aom_clear_system_state() aom_reset_mmx_state()/define aom_clear_system_state()/g' ${BASEDIR}/src/${LIB_NAME}/aom_ports/system_state.h
${SED_INLINE} 's/ add_asm_library("aom_ports/#add_asm_library("aom_ports/g' ${BASEDIR}/src/${LIB_NAME}/aom_ports/aom_ports.cmake
${SED_INLINE} 's/ target_sources(aom_ports/#target_sources(aom_ports/g' ${BASEDIR}/src/${LIB_NAME}/aom_ports/aom_ports.cmake
else
${SED_INLINE} 's/define aom_clear_system_state()/define aom_clear_system_state() aom_reset_mmx_state()/g' ${BASEDIR}/src/${LIB_NAME}/aom_ports/system_state.h
${SED_INLINE} 's/#add_asm_library("aom_ports/ add_asm_library("aom_ports/g' ${BASEDIR}/src/${LIB_NAME}/aom_ports/aom_ports.cmake
${SED_INLINE} 's/#target_sources(aom_ports/ target_sources(aom_ports/g' ${BASEDIR}/src/${LIB_NAME}/aom_ports/aom_ports.cmake
fi
cmake -Wno-dev \
-DCMAKE_VERBOSE_MAKEFILE=0 \
-DCONFIG_PIC=1 \
+13 -2
View File
@@ -32,12 +32,22 @@ LIB_NAME="libass"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
export PKG_CONFIG_LIBDIR=${INSTALL_PKG_CONFIG_DIR}
ARCH_OPTIONS=""
case ${ARCH} in
x86-64-mac-catalyst)
ARCH_OPTIONS="--disable-asm"
;;
*)
ARCH_OPTIONS="--enable-asm"
;;
esac
cd ${BASEDIR}/src/${LIB_NAME} || exit 1
make distclean 2>/dev/null 1>/dev/null
@@ -57,9 +67,10 @@ fi
--disable-harfbuzz \
--disable-fast-install \
--disable-test \
${ARCH_OPTIONS} \
--disable-profile \
--disable-coretext \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+2 -2
View File
@@ -32,7 +32,7 @@ LIB_NAME="libilbc"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -53,7 +53,7 @@ fi
--enable-static \
--disable-shared \
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+2 -2
View File
@@ -32,7 +32,7 @@ LIB_NAME="libogg"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -56,7 +56,7 @@ ${SED_INLINE} 's/sys\/types/stdint/g' ${BASEDIR}/src/libogg/include/ogg/os_types
--enable-static \
--disable-shared \
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+3 -3
View File
@@ -32,7 +32,7 @@ LIB_NAME="libpng"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CPPFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
@@ -40,7 +40,7 @@ export LDFLAGS=$(get_ldflags ${LIB_NAME})
CPU_SPECIFIC_OPTIONS="--enable-hardware-optimizations=yes"
case ${ARCH} in
x86 | x86-64)
x86 | x86-64 | x86-64-mac-catalyst)
CPU_SPECIFIC_OPTIONS+=" --enable-intel-sse=yes"
;;
armv7 | armv7s | arm64 | arm64e)
@@ -67,7 +67,7 @@ fi
--disable-unversioned-libpng-pc \
--disable-unversioned-libpng-config \
${CPU_SPECIFIC_OPTIONS} \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+2 -2
View File
@@ -32,7 +32,7 @@ LIB_NAME="libsndfile"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -57,7 +57,7 @@ fi
--disable-alsa \
--disable-full-suite \
--disable-external-libs \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+2 -2
View File
@@ -32,7 +32,7 @@ LIB_NAME="libtheora"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -57,7 +57,7 @@ fi
--disable-telemetry \
--disable-sdltest \
--disable-valgrind-testing \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+2 -2
View File
@@ -32,7 +32,7 @@ LIB_NAME="libuuid"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -53,7 +53,7 @@ fi
--enable-static \
--disable-shared \
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+1 -1
View File
@@ -32,7 +32,7 @@ LIB_NAME="libvidstab"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
CFLAGS=$(get_cflags ${LIB_NAME})
CXXFLAGS=$(get_cxxflags ${LIB_NAME})
LDFLAGS=$(get_ldflags ${LIB_NAME})
+2 -2
View File
@@ -32,7 +32,7 @@ LIB_NAME="libvorbis"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -63,7 +63,7 @@ PKG_CONFIG= ./configure \
--disable-docs \
--disable-examples \
--disable-oggtest \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+7
View File
@@ -70,6 +70,10 @@ case ${ARCH} in
TARGET="x86_64-iphonesimulator-gcc"
ASM_FLAGS="--enable-runtime-cpu-detect --disable-avx512"
;;
x86-64-mac-catalyst)
TARGET="x86_64-macosx-gcc"
ASM_FLAGS="--enable-runtime-cpu-detect --disable-avx512 --disable-sse --disable-sse2 --disable-mmx"
;;
esac
# PREPARE CONFIGURE OPTIONS
@@ -78,6 +82,9 @@ case ${ARCH} in
arm64e)
cp ${BASEDIR}/tools/make/configure.libvpx.arm64e.sh ${BASEDIR}/src/${LIB_NAME}/build/make/configure.sh
;;
x86-64-mac-catalyst)
cp ${BASEDIR}/tools/make/configure.libvpx.x86_64_mac_catalyst.sh ${BASEDIR}/src/${LIB_NAME}/build/make/configure.sh
;;
*)
cp ${BASEDIR}/tools/make/configure.libvpx.all.sh ${BASEDIR}/src/${LIB_NAME}/build/make/configure.sh
;;
+1 -1
View File
@@ -32,7 +32,7 @@ LIB_NAME="libwebp"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
CFLAGS=$(get_cflags ${LIB_NAME})
CXXFLAGS=$(get_cxxflags ${LIB_NAME})
LDFLAGS=$(get_ldflags ${LIB_NAME})
+2 -2
View File
@@ -32,7 +32,7 @@ LIB_NAME="libxml2"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -58,7 +58,7 @@ autoreconf_library ${LIB_NAME}
--enable-static \
--disable-shared \
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+5 -2
View File
@@ -32,7 +32,10 @@ LIB_NAME="mobile-ffmpeg"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
if [ ${ARCH} == "x86-64-mac-catalyst" ]; then
BUILD_HOST="x86_64-apple-darwin"
fi
COMMON_CFLAGS=$(get_cflags ${LIB_NAME})
COMMON_LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -76,7 +79,7 @@ ${SED_INLINE} 's/${wl}suppress//g' configure
${VIDEOTOOLBOX_SUPPORT_FLAG} \
--disable-fast-install \
--disable-maintainer-mode \
--host=${TARGET_HOST} 1>>${BASEDIR}/build.log 2>&1
--host=${BUILD_HOST} 1>>${BASEDIR}/build.log 2>&1
if [ $? -ne 0 ]; then
echo "failed"
+3 -3
View File
@@ -32,7 +32,7 @@ LIB_NAME="nettle"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -42,7 +42,7 @@ case ${ARCH} in
armv7 | armv7s | arm64 | arm64e)
OPTIONAL_CPU_SUPPORT="--enable-arm-neon"
;;
i386 | x86-64)
i386 | x86-64 | x86-64-mac-catalyst)
OPTIONAL_CPU_SUPPORT="--enable-x86-aesni"
;;
esac
@@ -69,7 +69,7 @@ fi
--disable-gcov \
--disable-documentation \
${OPTIONAL_CPU_SUPPORT} \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+3 -3
View File
@@ -32,14 +32,14 @@ LIB_NAME="opencore-amr"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
# OVERRIDE CXX
case ${ARCH} in
x86-64)
x86-64 | x86-64-mac-catalyst)
export CXX="xcrun --sdk $(get_sdk_name) clang++ -arch x86_64"
;;
*)
@@ -64,7 +64,7 @@ fi
--disable-shared \
--disable-fast-install \
--disable-maintainer-mode \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+7 -2
View File
@@ -32,11 +32,12 @@ LIB_NAME="openh264"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
CFLAGS=$(get_cflags ${LIB_NAME})
CXXFLAGS=$(get_cxxflags ${LIB_NAME})
LDFLAGS=$(get_ldflags ${LIB_NAME})
OS_OPTIONS="OS=ios"
case ${ARCH} in
armv7 | armv7s)
CFLAGS+=" -DHAVE_NEON"
@@ -44,6 +45,10 @@ case ${ARCH} in
arm64 | arm64e)
CFLAGS+=" -DHAVE_NEON_AARCH64"
;;
x86-64-mac-catalyst)
OS_OPTIONS=""
CFLAGS+=" -DHAVE_AVX2"
;;
*)
CFLAGS+=" -DHAVE_AVX2"
;;
@@ -70,7 +75,7 @@ CFLAGS="$CFLAGS" \
CXX="${CXX}" \
CXXFLAGS="${CXXFLAGS}" \
LDFLAGS="$LDFLAGS" \
OS=ios \
${OS_OPTIONS} \
PREFIX="${BASEDIR}/prebuilt/$(get_target_build_directory)/${LIB_NAME}" \
SDK_MIN="${IOS_MIN_VERSION}" \
SDKROOT="${SDK_PATH}" \
+2 -2
View File
@@ -32,7 +32,7 @@ LIB_NAME="opus"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -60,7 +60,7 @@ fi
--disable-maintainer-mode \
--disable-doc \
--disable-extra-programs \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+13 -2
View File
@@ -32,12 +32,22 @@ LIB_NAME="sdl"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
export PKG_CONFIG_LIBDIR="${INSTALL_PKG_CONFIG_DIR}"
case ${ARCH} in
x86-64-mac-catalyst)
BUILD_HOST="x86_64-apple-macosx"
ARCH_OPTIONS="--disable-video-cocoa --disable-render-metal --disable-haptic --disable-diskaudio"
;;
*)
ARCH_OPTIONS=""
;;
esac
cd ${BASEDIR}/src/${LIB_NAME} || exit 1
make distclean 2>/dev/null 1>/dev/null
@@ -59,7 +69,8 @@ cp ${BASEDIR}/tools/make/configure.sdl ${BASEDIR}/src/${LIB_NAME}/configure
--enable-static \
--disable-shared \
--disable-video-opengl \
--host=${TARGET_HOST} || exit 1
${ARCH_OPTIONS} \
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+2 -2
View File
@@ -32,7 +32,7 @@ LIB_NAME="shine"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -53,7 +53,7 @@ fi
--enable-static \
--disable-shared \
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+1 -1
View File
@@ -32,7 +32,7 @@ LIB_NAME="snappy"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
CFLAGS="$(get_cflags ${LIB_NAME}) -I${SDK_PATH}/usr/include"
CXXFLAGS="$(get_cxxflags ${LIB_NAME})"
LDFLAGS="$(get_ldflags ${LIB_NAME}) -L${SDK_PATH}/usr/lib"
+1 -1
View File
@@ -32,7 +32,7 @@ LIB_NAME="soxr"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
CFLAGS=$(get_cflags ${LIB_NAME})
CXXFLAGS=$(get_cxxflags ${LIB_NAME})
LDFLAGS=$(get_ldflags ${LIB_NAME})
+2 -2
View File
@@ -32,7 +32,7 @@ LIB_NAME="speex"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -61,7 +61,7 @@ fi
--disable-shared \
--disable-binaries \
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+4 -3
View File
@@ -32,7 +32,7 @@ LIB_NAME="tesseract"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -61,9 +61,10 @@ export LEPTONICA_LIBS="-L${BASEDIR}/prebuilt/$(get_target_build_directory)/lepto
--disable-cube \
--disable-tessdata-prefix \
--disable-largefile \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
${SED_INLINE} 's/$wl-bind_at_load//g' libtool
${SED_INLINE} 's/$wl-bind_at_load//g' ${BASEDIR}/src/${LIB_NAME}/libtool
${SED_INLINE} 's/-lrt//g' ${BASEDIR}/src/${LIB_NAME}/api/Makefile
make -j$(get_cpu_count) || exit 1
+2 -2
View File
@@ -32,7 +32,7 @@ LIB_NAME="tiff"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -59,7 +59,7 @@ fi
--disable-cxx \
--disable-win32-io \
--disable-lzma \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+2 -2
View File
@@ -32,7 +32,7 @@ LIB_NAME="twolame"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -57,7 +57,7 @@ export SNDFILE_LIBS="$(pkg-config --libs --static sndfile)"
--enable-static \
--disable-shared \
--disable-fast-install \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+2 -2
View File
@@ -32,7 +32,7 @@ LIB_NAME="wavpack"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -67,7 +67,7 @@ esac
--disable-apps \
--disable-fast-install \
--disable-tests \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+7 -3
View File
@@ -37,7 +37,7 @@ LIB_NAME="x264"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -48,7 +48,7 @@ make distclean 2>/dev/null 1>/dev/null
ASM_FLAGS=""
case ${ARCH} in
i386 |x86-64)
i386 | x86-64 | x86-64-mac-catalyst)
ASM_FLAGS="--disable-asm"
if ! [ -x "$(command -v nasm)" ]; then
@@ -60,6 +60,10 @@ case ${ARCH} in
;;
esac
# DISABLE INLINE -arch DEFINITIONS
${SED_INLINE} 's/CFLAGS=\"\$CFLAGS \-arch x86_64/CFLAGS=\"\$CFLAGS/g' configure
${SED_INLINE} 's/LDFLAGS=\"\$LDFLAGS \-arch x86_64/LDFLAGS=\"\$CFLAGS/g' configure
./configure \
--prefix=${BASEDIR}/prebuilt/$(get_target_build_directory)/${LIB_NAME} \
--enable-pic \
@@ -67,7 +71,7 @@ esac
--enable-static \
${ASM_FLAGS} \
--disable-cli \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+4 -1
View File
@@ -32,7 +32,7 @@ LIB_NAME="x265"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
CFLAGS=$(get_cflags ${LIB_NAME})
CXXFLAGS=$(get_cxxflags ${LIB_NAME})
LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -54,6 +54,9 @@ case ${ARCH} in
arm64 | arm64e)
ASM_OPTIONS="-DENABLE_ASSEMBLY=0 -DCROSS_COMPILE_ARM=1"
;;
x86-64-mac-catalyst)
ASM_OPTIONS="-DENABLE_ASSEMBLY=0 -DCROSS_COMPILE_ARM=0"
;;
*)
ASM_OPTIONS="-DENABLE_ASSEMBLY=1 -DCROSS_COMPILE_ARM=0"
;;
+3 -3
View File
@@ -32,7 +32,7 @@ LIB_NAME="xvidcore"
set_toolchain_clang_paths ${LIB_NAME}
# PREPARING FLAGS
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
@@ -60,7 +60,7 @@ case ${ARCH} in
${SED_INLINE} 's/-Wl,-read_only_relocs,suppress//g' configure
;;
i386 | x86-64)
i386 | x86-64 | x86-64-mac-catalyst)
ASM_FLAGS="--disable-assembly"
;;
esac
@@ -68,7 +68,7 @@ esac
./configure \
--prefix=${BASEDIR}/prebuilt/$(get_target_build_directory)/${LIB_NAME} \
${ASM_FLAGS} \
--host=${TARGET_HOST} || exit 1
--host=${BUILD_HOST} || exit 1
make -j$(get_cpu_count) || exit 1
+4 -8
View File
@@ -73,10 +73,6 @@ check_if_dependency_rebuilt() {
libsndfile)
set_dependency_rebuilt_flag "twolame"
;;
libuuid)
set_dependency_rebuilt_flag "fontconfig"
set_dependency_rebuilt_flag "libass"
;;
libvorbis)
set_dependency_rebuilt_flag "libtheora"
;;
@@ -116,7 +112,7 @@ fi
# FILTERING WHICH EXTERNAL LIBRARIES WILL BE BUILT
# NOTE THAT BUILT-IN LIBRARIES ARE FORWARDED TO FFMPEG SCRIPT WITHOUT ANY PROCESSING
enabled_library_list=()
for library in {1..41}
for library in {1..40}
do
if [[ ${!library} -eq 1 ]]; then
ENABLED_LIBRARY=$(get_library_name $((library - 1)))
@@ -133,7 +129,7 @@ while [ ${#enabled_library_list[@]} -gt $completed ]; do
let run=0
case $library in
fontconfig)
if [[ ! -z $OK_libuuid ]] && [[ ! -z $OK_expat ]] && [[ ! -z $OK_freetype ]]; then
if [[ ! -z $OK_expat ]] && [[ ! -z $OK_freetype ]]; then
run=1
fi
;;
@@ -153,7 +149,7 @@ while [ ${#enabled_library_list[@]} -gt $completed ]; do
fi
;;
libass)
if [[ ! -z $OK_libuuid ]] && [[ ! -z $OK_expat ]] && [[ ! -z $OK_freetype ]] && [[ ! -z $OK_fribidi ]] && [[ ! -z $OK_fontconfig ]] && [[ ! -z $OK_libpng ]]; then
if [[ ! -z $OK_expat ]] && [[ ! -z $OK_freetype ]] && [[ ! -z $OK_fribidi ]] && [[ ! -z $OK_fontconfig ]] && [[ ! -z $OK_libpng ]]; then
run=1
fi
;;
@@ -229,7 +225,7 @@ while [ ${#enabled_library_list[@]} -gt $completed ]; do
cd ${BASEDIR}
# BUILD EACH LIBRARY ALONE FIRST
# BUILD EACH LIBRARY ALONE
${SCRIPT_PATH} 1>>${BASEDIR}/build.log 2>&1
if [ $? -eq 0 ]; then
+4 -4
View File
@@ -124,7 +124,7 @@ get_arch_name() {
esac
}
get_target_host() {
get_build_host() {
echo "$(get_target_arch)-tvos-darwin"
}
@@ -207,10 +207,10 @@ get_common_cflags() {
get_arch_specific_cflags() {
case ${ARCH} in
arm64)
echo "-arch arm64 -target $(get_target_host) -march=armv8-a+crc+crypto -mcpu=generic -DMOBILE_FFMPEG_ARM64"
echo "-arch arm64 -target $(get_build_host) -march=armv8-a+crc+crypto -mcpu=generic -DMOBILE_FFMPEG_ARM64"
;;
x86-64)
echo "-arch x86_64 -target $(get_target_host) -march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel -DMOBILE_FFMPEG_X86_64"
echo "-arch x86_64 -target $(get_build_host) -march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel -DMOBILE_FFMPEG_X86_64"
;;
esac
}
@@ -999,7 +999,7 @@ set_toolchain_clang_paths() {
LOCAL_GAS_PREPROCESSOR="${BASEDIR}/src/x264/tools/gas-preprocessor.pl"
fi
TARGET_HOST=$(get_target_host)
BUILD_HOST=$(get_build_host)
export AR="$(xcrun --sdk $(get_sdk_name) -f ar)"
export CC="clang"
+62 -33
View File
@@ -7,6 +7,7 @@ ARCH_ARM64=2
ARCH_ARM64E=3
ARCH_I386=4
ARCH_X86_64=5
ARCH_X86_64_MAC_CATALYST=6
# LIBRARY INDEXES
LIBRARY_FONTCONFIG=0
@@ -44,22 +45,22 @@ LIBRARY_GIFLIB=31
LIBRARY_JPEG=32
LIBRARY_LIBOGG=33
LIBRARY_LIBPNG=34
LIBRARY_LIBUUID=35
LIBRARY_NETTLE=36
LIBRARY_TIFF=37
LIBRARY_EXPAT=38
LIBRARY_SNDFILE=39
LIBRARY_LEPTONICA=40
LIBRARY_ZLIB=41
LIBRARY_AUDIOTOOLBOX=42
LIBRARY_COREIMAGE=43
LIBRARY_BZIP2=44
LIBRARY_VIDEOTOOLBOX=45
LIBRARY_AVFOUNDATION=46
LIBRARY_LIBICONV=47
LIBRARY_NETTLE=35
LIBRARY_TIFF=36
LIBRARY_EXPAT=37
LIBRARY_SNDFILE=38
LIBRARY_LEPTONICA=39
LIBRARY_ZLIB=40
LIBRARY_AUDIOTOOLBOX=41
LIBRARY_COREIMAGE=42
LIBRARY_BZIP2=43
LIBRARY_VIDEOTOOLBOX=44
LIBRARY_AVFOUNDATION=45
LIBRARY_LIBICONV=46
LIBRARY_LIBUUID=47
# ENABLE ARCH
ENABLED_ARCHITECTURES=(1 1 1 1 1 1)
ENABLED_ARCHITECTURES=(1 1 1 1 1 1 1)
# ENABLE LIBRARIES
ENABLED_LIBRARIES=(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
@@ -76,7 +77,7 @@ if ! [ -x "$(command -v xcrun)" ]; then
exit 1
fi
# USE 12.1 AS IOS_MIN_VERSION
# USE 12.1 AS DEFAULT IOS_MIN_VERSION
export IOS_MIN_VERSION=12.1
get_mobile_ffmpeg_version() {
@@ -93,7 +94,7 @@ display_help() {
COMMAND=`echo $0 | sed -e 's/\.\///g'`
if [[ -z ${MOBILE_FFMPEG_LTS_BUILD} ]]; then
echo -e "\n'"$COMMAND"' builds FFmpeg and MobileFFmpeg for iOS platform. By default six architectures (armv7, armv7s, arm64, arm64e, i386 and x86_64) are built without any external libraries enabled. Options can be used to disable architectures and/or enable external libraries. Please note that GPL libraries (external libraries with GPL license) need --enable-gpl flag to be set explicitly. When compilation ends universal fat binaries and iOS frameworks are created with enabled architectures inside.\n"
echo -e "\n'"$COMMAND"' builds FFmpeg and MobileFFmpeg for iOS platform. By default seven architectures (armv7, armv7s, arm64, arm64e, i386, x86_64 and x86_64 for Mac Catalyst) are built without any external libraries enabled. Options can be used to disable architectures and/or enable external libraries. Please note that GPL libraries (external libraries with GPL license) need --enable-gpl flag to be set explicitly. When compilation ends universal fat binaries and iOS frameworks are created with enabled architectures inside.\n"
else
echo -e "\n'"$COMMAND"' builds FFmpeg and MobileFFmpeg for iOS platform. By default five architectures (armv7, armv7s, arm64, i386 and x86_64) are built without any external libraries enabled. Options can be used to disable architectures and/or enable external libraries. Please note that GPL libraries (external libraries with GPL license) need --enable-gpl flag to be set explicitly. When compilation ends universal fat binaries and iOS frameworks are created with enabled architectures inside.\n"
fi
@@ -124,7 +125,8 @@ display_help() {
echo -e " --disable-arm64e\t\tdo not build arm64e platform [yes]"
fi
echo -e " --disable-i386\t\tdo not build i386 platform [yes]"
echo -e " --disable-x86-64\t\tdo not build x86-64 platform [yes]\n"
echo -e " --disable-x86-64\t\tdo not build x86-64 platform [yes]"
echo -e " --disable-x86-64-mac-catalyst\tdo not build x86-64-mac-catalyst platform [yes]\n"
echo -e "Libraries:"
@@ -223,13 +225,14 @@ enable_lts_build() {
export IOS_MIN_VERSION=9.3
disable_arch "arm64e"
disable_arch "x86-64-mac-catalyst"
}
reconf_library() {
local RECONF_VARIABLE=$(echo "RECONF_$1" | sed "s/\-/\_/g")
local library_supported=0
for library in {1..41}
for library in {1..40}
do
library_name=$(get_library_name $((library - 1)))
@@ -249,7 +252,7 @@ rebuild_library() {
local REBUILD_VARIABLE=$(echo "REBUILD_$1" | sed "s/\-/\_/g")
local library_supported=0
for library in {1..41}
for library in {1..40}
do
library_name=$(get_library_name $((library - 1)))
@@ -292,6 +295,9 @@ set_library() {
ios-libiconv)
ENABLED_LIBRARIES[LIBRARY_LIBICONV]=$2
;;
ios-libuuid)
ENABLED_LIBRARIES[LIBRARY_LIBUUID]=$2
;;
chromaprint)
ENABLED_LIBRARIES[LIBRARY_CHROMAPRINT]=$2
;;
@@ -464,6 +470,9 @@ set_arch() {
x86-64)
ENABLED_ARCHITECTURES[ARCH_X86_64]=$2
;;
x86-64-mac-catalyst)
ENABLED_ARCHITECTURES[ARCH_X86_64_MAC_CATALYST]=$2
;;
*)
print_unknown_platform $1
;;
@@ -489,7 +498,7 @@ print_enabled_architectures() {
echo -n "Architectures: "
let enabled=0;
for print_arch in {0..5}
for print_arch in {0..6}
do
if [[ ${ENABLED_ARCHITECTURES[$print_arch]} -eq 1 ]]; then
if [[ ${enabled} -ge 1 ]]; then
@@ -513,7 +522,7 @@ print_enabled_libraries() {
let enabled=0;
# FIRST BUILT-IN LIBRARIES
for library in {41..47}
for library in {40..47}
do
if [[ ${ENABLED_LIBRARIES[$library]} -eq 1 ]]; then
if [[ ${enabled} -ge 1 ]]; then
@@ -660,7 +669,7 @@ create_static_fat_library() {
for TARGET_ARCH in "${TARGET_ARCH_LIST[@]}"
do
LIPO_COMMAND+=" $(find ${BASEDIR}/prebuilt/ios-${TARGET_ARCH}-apple-darwin -name $1)"
LIPO_COMMAND+=" $(find ${BASEDIR}/prebuilt/ios-${TARGET_ARCH} -name $1)"
done
LIPO_COMMAND+=" -output ${FAT_LIBRARY_PATH}/lib/$1"
@@ -695,16 +704,16 @@ get_external_library_license_path() {
26) echo "${BASEDIR}/src/$(get_library_name $1)/LICENSE.md" ;;
28) echo "${BASEDIR}/src/$(get_library_name $1)/COPYING.txt" ;;
32) echo "${BASEDIR}/src/$(get_library_name $1)/LICENSE.md " ;;
36) echo "${BASEDIR}/src/$(get_library_name $1)/COPYING.LESSERv3" ;;
37) echo "${BASEDIR}/src/$(get_library_name $1)/COPYRIGHT" ;;
40) echo "${BASEDIR}/src/$(get_library_name $1)/leptonica-license.txt" ;;
35) echo "${BASEDIR}/src/$(get_library_name $1)/COPYING.LESSERv3" ;;
36) echo "${BASEDIR}/src/$(get_library_name $1)/COPYRIGHT" ;;
39) echo "${BASEDIR}/src/$(get_library_name $1)/leptonica-license.txt" ;;
4 | 9 | 12 | 18 | 20 | 25 | 30 | 34) echo "${BASEDIR}/src/$(get_library_name $1)/LICENSE" ;;
*) echo "${BASEDIR}/src/$(get_library_name $1)/COPYING" ;;
esac
}
get_external_library_version() {
echo "$(grep Version ${BASEDIR}/prebuilt/ios-${TARGET_ARCH_LIST[0]}-apple-darwin/pkgconfig/$1.pc 2>>${BASEDIR}/build.log | sed 's/Version://g;s/\ //g')"
echo "$(grep Version ${BASEDIR}/prebuilt/ios-${TARGET_ARCH_LIST[0]}/pkgconfig/$1.pc 2>>${BASEDIR}/build.log | sed 's/Version://g;s/\ //g')"
}
# ENABLE COMMON FUNCTIONS
@@ -833,6 +842,22 @@ if [[ ${DETECTED_IOS_SDK_VERSION} == 11* ]] || [[ ${DETECTED_IOS_SDK_VERSION} ==
echo -e "INFO: Disabled i386 architecture which is not supported on SDK ${DETECTED_IOS_SDK_VERSION}\n" 1>>${BASEDIR}/build.log 2>&1
disable_arch "i386"
fi
if [[ -z ${BUILD_FORCE} ]] && [[ ${ENABLED_ARCHITECTURES[${ARCH_I386}]} -eq 1 ]]; then
echo -e "INFO: Disabled i386 architecture which is not supported on SDK ${DETECTED_IOS_SDK_VERSION}\n" 1>>${BASEDIR}/build.log 2>&1
disable_arch "i386"
fi
fi
# DISABLE x86-64-mac-catalyst architecture on IOS versions lower than 13
if [[ ${DETECTED_IOS_SDK_VERSION} != 13* ]] && [[ -z ${BUILD_FORCE} ]] && [[ ${ENABLED_ARCHITECTURES[${ARCH_X86_64_MAC_CATALYST}]} -eq 1 ]]; then
echo -e "INFO: Disabled x86-64-mac-catalyst architecture which is not supported on SDK ${DETECTED_IOS_SDK_VERSION}\n" 1>>${BASEDIR}/build.log 2>&1
disable_arch "x86-64-mac-catalyst"
fi
# DISABLE x86-64-mac-catalyst when x86-64 is enabled
if [[ ${ENABLED_ARCHITECTURES[${ARCH_X86_64}]} -eq 1 ]] && [[ ${ENABLED_ARCHITECTURES[${ARCH_X86_64_MAC_CATALYST}]} -eq 1 ]]; then
echo -e "INFO: Disabled x86-64-mac-catalyst architecture which can not co-exist with x86-64.\n" 1>>${BASEDIR}/build.log 2>&1
disable_arch "x86-64-mac-catalyst"
fi
echo -e "\nBuilding mobile-ffmpeg ${BUILD_TYPE_ID}static library for iOS\n"
@@ -868,7 +893,7 @@ done
TARGET_ARCH_LIST=()
for run_arch in {0..5}
for run_arch in {0..6}
do
if [[ ${ENABLED_ARCHITECTURES[$run_arch]} -eq 1 ]]; then
export ARCH=$(get_arch_name $run_arch)
@@ -883,6 +908,9 @@ do
x86-64)
TARGET_ARCH="x86_64"
;;
x86-64-mac-catalyst)
TARGET_ARCH="x86_64-mac-catalyst"
;;
*)
TARGET_ARCH="${ARCH}"
;;
@@ -914,7 +942,7 @@ if [[ ! -z ${TARGET_ARCH_LIST} ]]; then
mkdir -p ${BASEDIR}/prebuilt/ios-framework 1>>${BASEDIR}/build.log 2>&1
# 1. EXTERNAL LIBRARIES
for library in {0..40}
for library in {0..39}
do
if [[ ${ENABLED_LIBRARIES[$library]} -eq 1 ]]; then
@@ -1254,6 +1282,7 @@ if [[ ! -z ${TARGET_ARCH_LIST} ]]; then
fi
else
library_name=$(get_library_name $((library)))
static_archive_name=$(get_static_archive_name $((library)))
LIBRARY_CREATED=$(create_static_fat_library $static_archive_name $library_name)
@@ -1290,8 +1319,8 @@ if [[ ! -z ${TARGET_ARCH_LIST} ]]; then
mkdir -p ${FFMPEG_UNIVERSAL}/include 1>>${BASEDIR}/build.log 2>&1
mkdir -p ${FFMPEG_UNIVERSAL}/lib 1>>${BASEDIR}/build.log 2>&1
cp -r ${BASEDIR}/prebuilt/ios-${TARGET_ARCH_LIST[0]}-apple-darwin/ffmpeg/include/* ${FFMPEG_UNIVERSAL}/include 1>>${BASEDIR}/build.log 2>&1
cp ${BASEDIR}/prebuilt/ios-${TARGET_ARCH_LIST[0]}-apple-darwin/ffmpeg/include/config.h ${FFMPEG_UNIVERSAL}/include 1>>${BASEDIR}/build.log 2>&1
cp -r ${BASEDIR}/prebuilt/ios-${TARGET_ARCH_LIST[0]}/ffmpeg/include/* ${FFMPEG_UNIVERSAL}/include 1>>${BASEDIR}/build.log 2>&1
cp ${BASEDIR}/prebuilt/ios-${TARGET_ARCH_LIST[0]}/ffmpeg/include/config.h ${FFMPEG_UNIVERSAL}/include 1>>${BASEDIR}/build.log 2>&1
for FFMPEG_LIB in ${FFMPEG_LIBS}
do
@@ -1299,7 +1328,7 @@ if [[ ! -z ${TARGET_ARCH_LIST} ]]; then
for TARGET_ARCH in "${TARGET_ARCH_LIST[@]}"
do
LIPO_COMMAND+=" ${BASEDIR}/prebuilt/ios-${TARGET_ARCH}-apple-darwin/ffmpeg/lib/${FFMPEG_LIB}.${BUILD_LIBRARY_EXTENSION}"
LIPO_COMMAND+=" ${BASEDIR}/prebuilt/ios-${TARGET_ARCH}/ffmpeg/lib/${FFMPEG_LIB}.${BUILD_LIBRARY_EXTENSION}"
done
LIPO_COMMAND+=" -output ${FFMPEG_UNIVERSAL}/lib/${FFMPEG_LIB}.${BUILD_LIBRARY_EXTENSION}"
@@ -1364,7 +1393,7 @@ if [[ ! -z ${TARGET_ARCH_LIST} ]]; then
LIPO_COMMAND="${LIPO} -create"
for TARGET_ARCH in "${TARGET_ARCH_LIST[@]}"
do
LIPO_COMMAND+=" ${BASEDIR}/prebuilt/ios-${TARGET_ARCH}-apple-darwin/mobile-ffmpeg/lib/libmobileffmpeg.${BUILD_LIBRARY_EXTENSION}"
LIPO_COMMAND+=" ${BASEDIR}/prebuilt/ios-${TARGET_ARCH}/mobile-ffmpeg/lib/libmobileffmpeg.${BUILD_LIBRARY_EXTENSION}"
done
LIPO_COMMAND+=" -output ${MOBILE_FFMPEG_UNIVERSAL}/lib/libmobileffmpeg.${BUILD_LIBRARY_EXTENSION}"
@@ -1375,7 +1404,7 @@ if [[ ! -z ${TARGET_ARCH_LIST} ]]; then
exit 1
fi
cp -r ${BASEDIR}/prebuilt/ios-${TARGET_ARCH_LIST[0]}-apple-darwin/mobile-ffmpeg/include/* ${MOBILE_FFMPEG_UNIVERSAL}/include 1>>${BASEDIR}/build.log 2>&1
cp -r ${BASEDIR}/prebuilt/ios-${TARGET_ARCH_LIST[0]}/mobile-ffmpeg/include/* ${MOBILE_FFMPEG_UNIVERSAL}/include 1>>${BASEDIR}/build.log 2>&1
cp -r ${MOBILE_FFMPEG_UNIVERSAL}/include/* ${MOBILE_FFMPEG_FRAMEWORK_PATH}/Headers 1>>${BASEDIR}/build.log 2>&1
cp ${MOBILE_FFMPEG_UNIVERSAL}/lib/libmobileffmpeg.${BUILD_LIBRARY_EXTENSION} ${MOBILE_FFMPEG_FRAMEWORK_PATH}/mobileffmpeg 1>>${BASEDIR}/build.log 2>&1
+2
View File
@@ -161,6 +161,8 @@
[arch appendString:@"i386"];
#elif MOBILE_FFMPEG_X86_64
[arch appendString:@"x86_64"];
#elif MOBILE_FFMPEG_X86_64_MAC_CATALYST
[arch appendString:@"x86_64_mac_catalyst"];
#endif
return arch;
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.device.camera</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
</dict>
</plist>
+1
View File
@@ -4,5 +4,6 @@ cmbuild
.project
.vscode
.gitignore
.git
TAGS
/cmake-build/
@@ -0,0 +1,28 @@
#
# Copyright (c) 2017, Alliance for Open Media. All rights reserved
#
# This source code is subject to the terms of the BSD 2 Clause License and the
# Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License was
# not distributed with this source code in the LICENSE file, you can obtain it
# at www.aomedia.org/license/software. If the Alliance for Open Media Patent
# License 1.0 was not distributed with this source code in the PATENTS file, you
# can obtain it at www.aomedia.org/license/patent.
#
if(AOM_BUILD_CMAKE_TOOLCHAINS_X86_64_MAC_CATALYST_CMAKE_)
return()
endif() # AOM_BUILD_CMAKE_TOOLCHAINS_X86_64_MAC_CATALYST_CMAKE_
set(AOM_BUILD_CMAKE_TOOLCHAINS_X86_64_MAC_CATALYST_CMAKE_ 1)
if(XCODE)
message(FATAL_ERROR "This toolchain does not support Xcode.")
endif()
set(CMAKE_SYSTEM_PROCESSOR "x86_64")
set(CMAKE_OSX_ARCHITECTURES "x86_64")
set(CMAKE_SYSTEM_NAME "Darwin")
set(CMAKE_OSX_SYSROOT ${SDK_PATH})
set(CMAKE_C_COMPILER clang)
set(CMAKE_C_COMPILER_ARG1 "-arch ${CMAKE_SYSTEM_PROCESSOR}")
set(CMAKE_CXX_COMPILER clang++)
set(CMAKE_CXX_COMPILER_ARG1 "-arch ${CMAKE_SYSTEM_PROCESSOR}")
File diff suppressed because it is too large Load Diff
+93 -1
View File
@@ -24540,7 +24540,7 @@ $as_echo "#define SDL_VIDEO_RENDER_OGL_ES2 1" >>confdefs.h
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Metal"
fi
;;
*-*-darwin* )
*-*-darwin*)
# This could be either full "Mac OS X", or plain "Darwin" which is
# just the OS X kernel sans upper layers like Carbon and Cocoa.
# Next line is broken, and a few files below require Mac OS X (full)
@@ -24628,6 +24628,98 @@ $as_echo "#define SDL_TIMER_UNIX 1" >>confdefs.h
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Carbon"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,IOKit"
if test x$enable_render = xyes -a x$enable_render_metal = xyes; then
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-weak_framework,QuartzCore -Wl,-weak_framework,Metal"
fi
;;
*-macosx)
# This could be either full "Mac OS X", or plain "Darwin" which is
# just the OS X kernel sans upper layers like Carbon and Cocoa.
# Next line is broken, and a few files below require Mac OS X (full)
ARCH=macosx
# Mac OS X builds with both the Carbon and OSX APIs at the moment
EXTRA_CFLAGS="$EXTRA_CFLAGS -DTARGET_API_MAC_CARBON"
EXTRA_CFLAGS="$EXTRA_CFLAGS -DTARGET_API_MAC_OSX"
CheckVisibilityHidden
CheckDeclarationAfterStatement
CheckDummyVideo
CheckDiskAudio
CheckDummyAudio
CheckDLOPEN
CheckCOCOA
CheckMETAL
CheckX11
CheckMacGL
CheckOpenGLX11
CheckVulkan
CheckPTHREAD
# Set up files for the audio library
if test x$enable_audio = xyes; then
$as_echo "#define SDL_AUDIO_DRIVER_COREAUDIO 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/audio/coreaudio/*.m"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox"
SUMMARY_audio="${SUMMARY_audio} coreaudio"
have_audio=yes
fi
# Set up files for the joystick library
if test x$enable_joystick = xyes; then
$as_echo "#define SDL_JOYSTICK_IOKIT 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/joystick/darwin/*.c"
have_joystick=yes
fi
# Set up files for the haptic library
if test x$enable_haptic = xyes; then
$as_echo "#define SDL_HAPTIC_IOKIT 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/haptic/darwin/*.c"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,ForceFeedback"
have_haptic=yes
fi
# Set up files for the power library
if test x$enable_power = xyes; then
$as_echo "#define SDL_POWER_MACOSX 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/power/macosx/*.c"
have_power=yes
fi
# Set up files for the filesystem library
if test x$enable_filesystem = xyes; then
$as_echo "#define SDL_FILESYSTEM_COCOA 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/filesystem/cocoa/*.m"
have_filesystem=yes
fi
# Set up files for the timer library
if test x$enable_timers = xyes; then
$as_echo "#define SDL_TIMER_UNIX 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
have_timers=yes
fi
# Set up additional files for the file library
if test x$enable_file = xyes; then
SOURCES="$SOURCES $srcdir/src/file/cocoa/*.m"
fi
# Set up other core UNIX files
SOURCES="$SOURCES $srcdir/src/core/unix/*.c"
# The Mac OS X platform requires special setup.
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lobjc"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,CoreVideo"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AVFoundation"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Foundation"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,IOKit"
if test x$enable_render = xyes -a x$enable_render_metal = xyes; then
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-weak_framework,QuartzCore -Wl,-weak_framework,Metal"
fi