Compare commits

...

3 Commits

Author SHA1 Message Date
Taner Sener 7e821df9a5 android cpu abi implemented 2018-11-10 14:39:21 +03:00
Taner Sener ce7e8f55eb Using different implementations for getCpuArch() and getArch() methods 2018-11-10 01:00:27 +03:00
Taner Sener 19ffadd640 new architecture: ios arm64e 2018-11-08 20:13:46 +03:00
61 changed files with 3572 additions and 213 deletions
@@ -25,7 +25,8 @@ const char *abiDetectClassName = "com/arthenica/mobileffmpeg/AbiDetect";
/** Prototypes of native functions defined by this file. */
JNINativeMethod abiDetectMethods[] = {
{"getAbi", "()Ljava/lang/String;", (void*) Java_com_arthenica_mobileffmpeg_AbiDetect_getAbi}
{"getNativeAbi", "()Ljava/lang/String;", (void*) Java_com_arthenica_mobileffmpeg_AbiDetect_getNativeAbi},
{"getCpuAbi", "()Ljava/lang/String;", (void*) Java_com_arthenica_mobileffmpeg_AbiDetect_getCpuAbi}
};
/**
@@ -48,7 +49,7 @@ jint JNI_OnLoad(JavaVM *vm, void *reserved) {
return JNI_FALSE;
}
if ((*env)->RegisterNatives(env, abiDetectClass, abiDetectMethods, 1) < 0) {
if ((*env)->RegisterNatives(env, abiDetectClass, abiDetectMethods, 2) < 0) {
LOGE("OnLoad failed to RegisterNatives for class %s.\n", abiDetectClassName);
return JNI_FALSE;
}
@@ -57,13 +58,36 @@ jint JNI_OnLoad(JavaVM *vm, void *reserved) {
}
/**
* Returns running ABI name.
* Returns loaded ABI name.
*
* \param env pointer to native method interface
* \param object reference to the class on which this method is invoked
* \return running ABI name as UTF string
* \return loaded ABI name as UTF string
*/
JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_AbiDetect_getAbi(JNIEnv *env, jclass object) {
JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_AbiDetect_getNativeAbi(JNIEnv *env, jclass object) {
#ifdef MOBILE_FFMPEG_ARM_V7A
return (*env)->NewStringUTF(env, "arm-v7a");
#elif MOBILE_FFMPEG_ARM64_V8A
return (*env)->NewStringUTF(env, "arm64-v8a");
#elif MOBILE_FFMPEG_X86
return (*env)->NewStringUTF(env, "x86");
#elif MOBILE_FFMPEG_X86_64
return (*env)->NewStringUTF(env, "x86_64");
#else
return (*env)->NewStringUTF(env, "unknown");
#endif
}
/**
* Returns ABI name of the running cpu.
*
* \param env pointer to native method interface
* \param object reference to the class on which this method is invoked
* \return ABI name of the running cpu as UTF string
*/
JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_AbiDetect_getCpuAbi(JNIEnv *env, jclass object) {
AndroidCpuFamily family = android_getCpuFamily();
if (family == ANDROID_CPU_FAMILY_ARM) {
@@ -46,9 +46,17 @@
/*
* Class: com_arthenica_mobileffmpeg_AbiDetect
* Method: getAbi
* Method: getNativeAbi
* Signature: ()Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_AbiDetect_getAbi(JNIEnv *, jclass);
JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_AbiDetect_getNativeAbi(JNIEnv *, jclass);
/*
* Class: com_arthenica_mobileffmpeg_AbiDetect
* Method: getCpuAbi
* Signature: ()Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_com_arthenica_mobileffmpeg_AbiDetect_getCpuAbi(JNIEnv *, jclass);
#endif /* MOBILE_FFMPEG_ABIDETECT_H */
@@ -29,6 +29,7 @@ package com.arthenica.mobileffmpeg;
public class AbiDetect {
static {
armV7aNeonLoaded = false;
System.loadLibrary("mobileffmpeg-abidetect");
/* ALL LIBRARIES LOADED AT STARTUP */
@@ -36,17 +37,43 @@ public class AbiDetect {
FFmpeg.class.getName();
}
private static boolean armV7aNeonLoaded;
/**
* Default constructor hidden.
*/
private AbiDetect() {
}
static void setArmV7aNeonLoaded(final boolean armV7aNeonLoaded) {
AbiDetect.armV7aNeonLoaded = armV7aNeonLoaded;
}
/**
* <p>Returns running ABI name.
* <p>Returns loaded ABI name.
*
* @return running ABI name
* @return loaded ABI name
*/
public native static String getAbi();
public static String getAbi() {
if (armV7aNeonLoaded) {
return "arm-v7a-neon";
} else {
return getNativeAbi();
}
}
/**
* <p>Returns native loaded ABI name.
*
* @return native loaded ABI name
*/
private native static String getNativeAbi();
/**
* <p>Returns ABI name of the running cpu.
*
* @return ABI name of the running cpu
*/
public native static String getCpuAbi();
}
@@ -81,21 +81,20 @@ public class Config {
Log.i(Config.TAG, "Loading mobile-ffmpeg.");
/* ALL LIBRARIES LOADED AT STARTUP */
String abiName = AbiDetect.getAbi();
Abi abi = Abi.from(abiName);
Abi cpuAbi = Abi.from(AbiDetect.getCpuAbi());
FFmpeg.class.getName();
/*
* NEON supported arm-v7a library has a different name
*/
boolean nativeLibraryLoaded = false;
if (abi == Abi.ABI_ARMV7A_NEON) {
if (cpuAbi == Abi.ABI_ARMV7A_NEON) {
try {
System.loadLibrary("mobileffmpeg-armv7a-neon");
nativeLibraryLoaded = true;
AbiDetect.setArmV7aNeonLoaded(true);
} catch (final UnsatisfiedLinkError e) {
Log.i(Config.TAG, "NEON supported armeabi-v7a library not found. Loading default armeabi-v7a library.", e);
abi = Abi.ABI_ARMV7A;
}
}
@@ -103,7 +102,7 @@ public class Config {
System.loadLibrary("mobileffmpeg");
}
Log.i(Config.TAG, String.format("Loaded mobile-ffmpeg-%s-%s-%s.", getPackageName(), abi.getName(), getVersion()));
Log.i(Config.TAG, String.format("Loaded mobile-ffmpeg-%s-%s-%s.", getPackageName(), AbiDetect.getAbi(), getVersion()));
/* NATIVE LOG LEVEL IS RECEIVED ONLY ON STARTUP */
activeLogLevel = Level.from(getNativeLogLevel());
+15 -1
View File
@@ -4,6 +4,20 @@ $(call import-add-path, $(LOCAL_PATH))
MY_ARM_MODE := arm
MY_PATH := ../app/src/main/cpp
# DEFINE ARCH FLAGS
ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
MY_ARCH_FLAGS := ARM_V7A
endif
ifeq ($(TARGET_ARCH_ABI), arm64-v8a)
MY_ARCH_FLAGS := ARM64_V8A
endif
ifeq ($(TARGET_ARCH_ABI), x86)
MY_ARCH_FLAGS := X86
endif
ifeq ($(TARGET_ARCH_ABI), x86_64)
MY_ARCH_FLAGS := X86_64
endif
include $(CLEAR_VARS)
LOCAL_ARM_MODE := $(MY_ARM_MODE)
LOCAL_MODULE := cpufeatures
@@ -17,7 +31,7 @@ include $(CLEAR_VARS)
LOCAL_ARM_MODE := $(MY_ARM_MODE)
LOCAL_MODULE := mobileffmpeg-abidetect
LOCAL_SRC_FILES := $(MY_PATH)/mobileffmpeg_abidetect.c
LOCAL_CFLAGS := -Wall -Wextra -Werror -Wno-unused-parameter -I${LOCAL_PATH}/../../prebuilt/android-$(TARGET_ARCH)/ffmpeg/include -I$(NDK_ROOT)/sources/android/cpufeatures
LOCAL_CFLAGS := -Wall -Wextra -Werror -Wno-unused-parameter -I${LOCAL_PATH}/../../prebuilt/android-$(TARGET_ARCH)/ffmpeg/include -I$(NDK_ROOT)/sources/android/cpufeatures -DMOBILE_FFMPEG_${MY_ARCH_FLAGS}
LOCAL_LDLIBS := -llog -lz -landroid
LOCAL_SHARED_LIBRARIES := cpufeatures
include $(BUILD_SHARED_LIBRARY)
+2 -1
View File
@@ -20,7 +20,8 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.arthenica:mobile-ffmpeg-full:3.0'
// implementation 'com.arthenica:mobile-ffmpeg-full:3.0'
implementation project(':app')
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
+5 -5
View File
@@ -190,19 +190,19 @@ get_common_cflags() {
get_arch_specific_cflags() {
case ${ARCH} in
arm-v7a)
echo "-march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp"
echo "-march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp -DMOBILE_FFMPEG_ARM_V7A"
;;
arm-v7a-neon)
echo "-march=armv7-a -mfpu=neon -mfloat-abi=softfp"
echo "-march=armv7-a -mfpu=neon -mfloat-abi=softfp -DMOBILE_FFMPEG_ARM_V7A_NEON"
;;
arm64-v8a)
echo "-march=armv8-a"
echo "-march=armv8-a -DMOBILE_FFMPEG_ARM64_V8A"
;;
x86)
echo "-march=i686 -mtune=intel -mssse3 -mfpmath=sse -m32"
echo "-march=i686 -mtune=intel -mssse3 -mfpmath=sse -m32 -DMOBILE_FFMPEG_X86"
;;
x86-64)
echo "-march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel"
echo "-march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel -DMOBILE_FFMPEG_X86_64"
;;
esac
}
+1 -1
View File
@@ -73,7 +73,7 @@ case ${ARCH} in
;;
esac
CONFIGURE_POSTFIX=""
CONFIGURE_POSTFIX="--disable-autodetect"
for library in {1..43}
do
+1 -1
View File
@@ -55,7 +55,7 @@ cmake -Wno-dev \
-DCMAKE_SYSROOT="${SDK_PATH}" \
-DCMAKE_FIND_ROOT_PATH="${SDK_PATH}" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME}" \
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME}" \
-DCMAKE_SYSTEM_NAME=Darwin \
-DCMAKE_C_COMPILER="$CC" \
-DCMAKE_LINKER="$LD" \
+53 -35
View File
@@ -95,8 +95,9 @@ get_arch_name() {
0) echo "armv7" ;;
1) echo "armv7s" ;;
2) echo "arm64" ;;
3) echo "i386" ;;
4) echo "x86-64" ;;
3) echo "arm64e" ;;
4) echo "i386" ;;
5) echo "x86-64" ;;
esac
}
@@ -104,9 +105,20 @@ get_target_host() {
echo "$(get_target_arch)-ios-darwin"
}
get_target_build_directory() {
case ${ARCH} in
x86-64)
echo "x86_64-ios-darwin"
;;
*)
echo "${ARCH}-ios-darwin"
;;
esac
}
get_target_arch() {
case ${ARCH} in
arm64)
arm64 | arm64e)
echo "aarch64"
;;
x86-64)
@@ -124,7 +136,7 @@ get_target_sdk() {
get_sdk_name() {
case ${ARCH} in
armv7 | armv7s | arm64)
armv7 | armv7s | arm64 | arm64e)
echo "iphoneos"
;;
i386 | x86-64)
@@ -145,7 +157,7 @@ get_min_version_cflags() {
fi
case ${ARCH} in
armv7 | armv7s | arm64)
armv7 | armv7s | arm64 | arm64e)
echo "-miphoneos-version-min=${min_version}"
;;
i386 | x86-64)
@@ -172,19 +184,22 @@ get_common_cflags() {
get_arch_specific_cflags() {
case ${ARCH} in
armv7)
echo "-arch armv7 -target $(get_target_host) -march=armv7 -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
echo "-arch armv7 -target $(get_target_host) -march=armv7 -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -DMOBILE_FFMPEG_ARMV7"
;;
armv7s)
echo "-arch armv7s -target $(get_target_host) -march=armv7s -mcpu=generic -mfpu=neon -mfloat-abi=softfp"
echo "-arch armv7s -target $(get_target_host) -march=armv7s -mcpu=generic -mfpu=neon -mfloat-abi=softfp -DMOBILE_FFMPEG_ARMV7S"
;;
arm64)
echo "-arch arm64 -target $(get_target_host) -march=armv8-a+crc+crypto -mcpu=generic"
echo "-arch arm64 -target $(get_target_host) -march=armv8-a+crc+crypto -mcpu=generic -DMOBILE_FFMPEG_ARM64"
;;
arm64e)
echo "-arch arm64e -target $(get_target_host) -march=armv8.3-a+dotprod -mcpu=generic -DMOBILE_FFMPEG_ARM64E"
;;
i386)
echo "-arch i386 -target $(get_target_host) -march=i386 -mtune=intel -mssse3 -mfpmath=sse -m32"
echo "-arch i386 -target $(get_target_host) -march=i386 -mtune=intel -mssse3 -mfpmath=sse -m32 -DMOBILE_FFMPEG_I386"
;;
x86-64)
echo "-arch x86_64 -target $(get_target_host) -march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel"
echo "-arch x86_64 -target $(get_target_host) -march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel -DMOBILE_FFMPEG_X86_64"
;;
esac
}
@@ -193,7 +208,7 @@ get_size_optimization_cflags() {
ARCH_OPTIMIZATION=""
case ${ARCH} in
armv7 | armv7s | arm64)
armv7 | armv7s | arm64 | arm64e)
if [[ $1 -eq libwebp ]]; then
ARCH_OPTIMIZATION="-Os -Wno-ignored-optimization-argument"
else
@@ -219,7 +234,7 @@ get_app_specific_cflags() {
case $1 in
fontconfig)
case ${ARCH} in
armv7 | armv7s | arm64)
armv7 | armv7s | arm64 | arm64e)
APP_FLAGS="-std=c99 -Wno-unused-function -D__IPHONE_OS_MIN_REQUIRED -D__IPHONE_VERSION_MIN_REQUIRED=30000"
;;
*)
@@ -294,7 +309,7 @@ get_cxxflags() {
local BITCODE_FLAGS=""
case ${ARCH} in
armv7 | armv7s | arm64)
armv7 | armv7s | arm64 | arm64e)
BITCODE_FLAGS="-fembed-bitcode"
;;
esac
@@ -340,6 +355,9 @@ get_arch_specific_ldflags() {
arm64)
echo "-arch arm64 -march=armv8-a+crc+crypto -fembed-bitcode"
;;
arm64e)
echo "-arch arm64e -march=armv8.3-a+dotprod -fembed-bitcode"
;;
i386)
echo "-arch i386 -march=i386"
;;
@@ -357,8 +375,8 @@ get_ldflags() {
case $1 in
mobile-ffmpeg)
case ${ARCH} in
armv7 | armv7s | arm64)
echo "${ARCH_FLAGS} ${LINKED_LIBRARIES} ${COMMON_FLAGS} -fembed-bitcode -Wc,-fembed-bitcode"
armv7 | armv7s | arm64 | arm64e)
echo "${ARCH_FLAGS} ${LINKED_LIBRARIES} ${COMMON_FLAGS} -fembed-bitcode -Wc,-fembed-bitcode -ObjC"
;;
*)
echo "${ARCH_FLAGS} ${LINKED_LIBRARIES} ${COMMON_FLAGS}"
@@ -375,7 +393,7 @@ create_fontconfig_package_config() {
local FONTCONFIG_VERSION="$1"
cat > "${INSTALL_PKG_CONFIG_DIR}/fontconfig.pc" << EOF
prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/fontconfig
prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/fontconfig
exec_prefix=\${prefix}
libdir=\${exec_prefix}/lib
includedir=\${prefix}/include
@@ -400,7 +418,7 @@ create_freetype_package_config() {
local FREETYPE_VERSION="$1"
cat > "${INSTALL_PKG_CONFIG_DIR}/freetype2.pc" << EOF
prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/freetype
prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/freetype
exec_prefix=\${prefix}
libdir=\${exec_prefix}/lib
includedir=\${prefix}/include
@@ -421,7 +439,7 @@ create_giflib_package_config() {
local GIFLIB_VERSION="$1"
cat > "${INSTALL_PKG_CONFIG_DIR}/giflib.pc" << EOF
prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/giflib
prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/giflib
exec_prefix=\${prefix}
libdir=\${prefix}/lib
includedir=\${prefix}/include
@@ -440,7 +458,7 @@ create_gmp_package_config() {
local GMP_VERSION="$1"
cat > "${INSTALL_PKG_CONFIG_DIR}/gmp.pc" << EOF
prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/gmp
prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/gmp
exec_prefix=\${prefix}
libdir=\${prefix}/lib
includedir=\${prefix}/include
@@ -459,7 +477,7 @@ create_gnutls_package_config() {
local GNUTLS_VERSION="$1"
cat > "${INSTALL_PKG_CONFIG_DIR}/gnutls.pc" << EOF
prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/gnutls
prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/gnutls
exec_prefix=\${prefix}
libdir=\${exec_prefix}/lib
includedir=\${prefix}/include
@@ -479,7 +497,7 @@ create_libmp3lame_package_config() {
local LAME_VERSION="$1"
cat > "${INSTALL_PKG_CONFIG_DIR}/libmp3lame.pc" << EOF
prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/lame
prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/lame
exec_prefix=\${prefix}
libdir=\${exec_prefix}/lib
includedir=\${prefix}/include
@@ -498,7 +516,7 @@ create_libiconv_package_config() {
local LIB_ICONV_VERSION="$1"
cat > "${INSTALL_PKG_CONFIG_DIR}/libiconv.pc" << EOF
prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/libiconv
prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/libiconv
exec_prefix=\${prefix}
libdir=\${exec_prefix}/lib
includedir=\${prefix}/include
@@ -517,7 +535,7 @@ create_libpng_package_config() {
local LIBPNG_VERSION="$1"
cat > "${INSTALL_PKG_CONFIG_DIR}/libpng.pc" << EOF
prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/libpng
prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/libpng
exec_prefix=\${prefix}
libdir=\${exec_prefix}/lib
includedir=\${prefix}/include
@@ -535,7 +553,7 @@ create_libvorbis_package_config() {
local LIBVORBIS_VERSION="$1"
cat > "${INSTALL_PKG_CONFIG_DIR}/vorbis.pc" << EOF
prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/libvorbis
prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/libvorbis
exec_prefix=\${prefix}
libdir=\${prefix}/lib
includedir=\${prefix}/include
@@ -550,7 +568,7 @@ Cflags: -I\${includedir}
EOF
cat > "${INSTALL_PKG_CONFIG_DIR}/vorbisenc.pc" << EOF
prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/libvorbis
prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/libvorbis
exec_prefix=\${prefix}
libdir=\${prefix}/lib
includedir=\${prefix}/include
@@ -566,7 +584,7 @@ Cflags: -I\${includedir}
EOF
cat > "${INSTALL_PKG_CONFIG_DIR}/vorbisfile.pc" << EOF
prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/libvorbis
prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/libvorbis
exec_prefix=\${prefix}
libdir=\${prefix}/lib
includedir=\${prefix}/include
@@ -586,7 +604,7 @@ create_libwebp_package_config() {
local LIB_WEBP_VERSION="$1"
cat > "${INSTALL_PKG_CONFIG_DIR}/libwebp.pc" << EOF
prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/libwebp
prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/libwebp
exec_prefix=\${prefix}
libdir=\${prefix}/lib
includedir=\${prefix}/include
@@ -605,7 +623,7 @@ create_libxml2_package_config() {
local LIBXML2_VERSION="$1"
cat > "${INSTALL_PKG_CONFIG_DIR}/libxml-2.0.pc" << EOF
prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/libxml2
prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/libxml2
exec_prefix=\${prefix}
libdir=\${exec_prefix}/lib
includedir=\${prefix}/include
@@ -625,7 +643,7 @@ create_snappy_package_config() {
local SNAPPY_VERSION="$1"
cat > "${INSTALL_PKG_CONFIG_DIR}/snappy.pc" << EOF
prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/snappy
prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/snappy
exec_prefix=\${prefix}
libdir=\${prefix}/lib
includedir=\${prefix}/include
@@ -644,7 +662,7 @@ create_soxr_package_config() {
local SOXR_VERSION="$1"
cat > "${INSTALL_PKG_CONFIG_DIR}/soxr.pc" << EOF
prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/soxr
prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/soxr
exec_prefix=\${prefix}
libdir=\${prefix}/lib
includedir=\${prefix}/include
@@ -663,7 +681,7 @@ create_tesseract_package_config() {
local TESSERACT_VERSION="$1"
cat > "${INSTALL_PKG_CONFIG_DIR}/tesseract.pc" << EOF
prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/tesseract
prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/tesseract
exec_prefix=\${prefix}
bindir=\${exec_prefix}/bin
datarootdir=\${prefix}/share
@@ -686,7 +704,7 @@ create_uuid_package_config() {
local UUID_VERSION="$1"
cat > "${INSTALL_PKG_CONFIG_DIR}/uuid.pc" << EOF
prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/libuuid
prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/libuuid
exec_prefix=\${prefix}
libdir=\${exec_prefix}/lib
includedir=\${prefix}/include
@@ -704,7 +722,7 @@ create_xvidcore_package_config() {
local XVIDCORE_VERSION="$1"
cat > "${INSTALL_PKG_CONFIG_DIR}/xvidcore.pc" << EOF
prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/xvidcore
prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/xvidcore
exec_prefix=\${prefix}
libdir=\${prefix}/lib
includedir=\${prefix}/include
@@ -922,7 +940,7 @@ set_toolchain_clang_paths() {
export AS="${LOCAL_GAS_PREPROCESSOR} -arch arm -- ${CC} ${LOCAL_ASMFLAGS}"
fi
;;
arm64)
arm64 | arm64e)
if [ "$1" == "x265" ]; then
export AS="${LOCAL_GAS_PREPROCESSOR}"
export AS_ARGUMENTS="-arch aarch64"
@@ -940,7 +958,7 @@ set_toolchain_clang_paths() {
export RANLIB="$(xcrun --sdk $(get_sdk_name) -f ranlib)"
export STRIP="$(xcrun --sdk $(get_sdk_name) -f strip)"
export INSTALL_PKG_CONFIG_DIR="${BASEDIR}/prebuilt/ios-$(get_target_host)/pkgconfig"
export INSTALL_PKG_CONFIG_DIR="${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/pkgconfig"
export ZLIB_PACKAGE_CONFIG_PATH="${INSTALL_PKG_CONFIG_DIR}/zlib.pc"
export BZIP2_PACKAGE_CONFIG_PATH="${INSTALL_PKG_CONFIG_DIR}/bzip2.pc"
+1 -1
View File
@@ -48,7 +48,7 @@ if [[ ${RECONF_expat} -eq 1 ]]; then
fi
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
--with-pic \
--with-sysroot=${SDK_PATH} \
--without-docbook \
+30 -24
View File
@@ -66,6 +66,12 @@ case ${ARCH} in
NEON_FLAG=" --enable-neon"
BITCODE_FLAGS="-fembed-bitcode -Wc,-fembed-bitcode"
;;
arm64e)
TARGET_CPU="armv8.3-a"
TARGET_ARCH="aarch64"
NEON_FLAG=" --enable-neon"
BITCODE_FLAGS="-fembed-bitcode -Wc,-fembed-bitcode"
;;
i386)
TARGET_CPU="i386"
TARGET_ARCH="i386"
@@ -80,7 +86,7 @@ case ${ARCH} in
;;
esac
CONFIGURE_POSTFIX=""
CONFIGURE_POSTFIX="--disable-autodetect"
for library in {1..47}
do
@@ -362,7 +368,7 @@ make distclean 2>/dev/null 1>/dev/null
./configure \
--sysroot=${SDK_PATH} \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
--extra-cflags="${CFLAGS}" \
--extra-cxxflags="${CXXFLAGS}" \
--extra-ldflags="${LDFLAGS}" \
@@ -434,28 +440,28 @@ if [ $? -ne 0 ]; then
fi
# MANUALLY ADD REQUIRED HEADERS
mkdir -p ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavutil/x86
mkdir -p ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavutil/arm
mkdir -p ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavutil/aarch64
mkdir -p ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavcodec/x86
mkdir -p ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavcodec/arm
cp -f ${BASEDIR}/src/ffmpeg/config.h ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include
cp -f ${BASEDIR}/src/ffmpeg/libavcodec/mathops.h ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavcodec
cp -f ${BASEDIR}/src/ffmpeg/libavcodec/x86/mathops.h ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavcodec/x86
cp -f ${BASEDIR}/src/ffmpeg/libavcodec/arm/mathops.h ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavcodec/arm
cp -f ${BASEDIR}/src/ffmpeg/libavformat/network.h ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavformat
cp -f ${BASEDIR}/src/ffmpeg/libavformat/os_support.h ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavformat
cp -f ${BASEDIR}/src/ffmpeg/libavformat/url.h ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavformat
cp -f ${BASEDIR}/src/ffmpeg/libavutil/internal.h ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavutil
cp -f ${BASEDIR}/src/ffmpeg/libavutil/libm.h ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavutil
cp -f ${BASEDIR}/src/ffmpeg/libavutil/reverse.h ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavutil
cp -f ${BASEDIR}/src/ffmpeg/libavutil/thread.h ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavutil
cp -f ${BASEDIR}/src/ffmpeg/libavutil/timer.h ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavutil
cp -f ${BASEDIR}/src/ffmpeg/libavutil/x86/asm.h ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavutil/x86
cp -f ${BASEDIR}/src/ffmpeg/libavutil/x86/timer.h ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavutil/x86
cp -f ${BASEDIR}/src/ffmpeg/libavutil/arm/timer.h ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavutil/arm
cp -f ${BASEDIR}/src/ffmpeg/libavutil/aarch64/timer.h ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavutil/aarch64
cp -f ${BASEDIR}/src/ffmpeg/libavutil/x86/emms.h ${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include/libavutil/x86
mkdir -p ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavutil/x86
mkdir -p ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavutil/arm
mkdir -p ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavutil/aarch64
mkdir -p ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavcodec/x86
mkdir -p ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavcodec/arm
cp -f ${BASEDIR}/src/ffmpeg/config.h ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include
cp -f ${BASEDIR}/src/ffmpeg/libavcodec/mathops.h ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavcodec
cp -f ${BASEDIR}/src/ffmpeg/libavcodec/x86/mathops.h ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavcodec/x86
cp -f ${BASEDIR}/src/ffmpeg/libavcodec/arm/mathops.h ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavcodec/arm
cp -f ${BASEDIR}/src/ffmpeg/libavformat/network.h ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavformat
cp -f ${BASEDIR}/src/ffmpeg/libavformat/os_support.h ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavformat
cp -f ${BASEDIR}/src/ffmpeg/libavformat/url.h ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavformat
cp -f ${BASEDIR}/src/ffmpeg/libavutil/internal.h ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavutil
cp -f ${BASEDIR}/src/ffmpeg/libavutil/libm.h ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavutil
cp -f ${BASEDIR}/src/ffmpeg/libavutil/reverse.h ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavutil
cp -f ${BASEDIR}/src/ffmpeg/libavutil/thread.h ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavutil
cp -f ${BASEDIR}/src/ffmpeg/libavutil/timer.h ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavutil
cp -f ${BASEDIR}/src/ffmpeg/libavutil/x86/asm.h ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavutil/x86
cp -f ${BASEDIR}/src/ffmpeg/libavutil/x86/timer.h ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavutil/x86
cp -f ${BASEDIR}/src/ffmpeg/libavutil/arm/timer.h ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavutil/arm
cp -f ${BASEDIR}/src/ffmpeg/libavutil/aarch64/timer.h ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavutil/aarch64
cp -f ${BASEDIR}/src/ffmpeg/libavutil/x86/emms.h ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include/libavutil/x86
if [ $? -eq 0 ]; then
echo "ok"
+8 -3
View File
@@ -49,10 +49,10 @@ if [[ ${RECONF_fontconfig} -eq 1 ]]; then
fi
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
--with-pic \
--with-libiconv-prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/libiconv \
--with-expat=${BASEDIR}/prebuilt/ios-$(get_target_host)/expat \
--with-libiconv-prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/libiconv \
--with-expat=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/expat \
--without-libintl-prefix \
--enable-static \
--disable-shared \
@@ -62,6 +62,11 @@ fi
--disable-docs \
--host=${TARGET_HOST} || exit 1
# DISABLE IOS TESTS with system() calls - system() is deprecated for IOS
# 1. test-bz106632.c
rm -f ${BASEDIR}/src/${LIB_NAME}/test/test-bz106632.c
cp ${BASEDIR}/src/${LIB_NAME}/test/test-bz106618.c ${BASEDIR}/src/${LIB_NAME}/test/test-bz106632.c
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
# CREATE PACKAGE CONFIG MANUALLY
+3 -3
View File
@@ -44,11 +44,11 @@ cd ${BASEDIR}/src/${LIB_NAME} || exit 1
make distclean 2>/dev/null 1>/dev/null
# OVERRIDING PKG-CONFIG
export LIBPNG_CFLAGS="-I${BASEDIR}/prebuilt/ios-$(get_target_host)/libpng/include"
export LIBPNG_LIBS="-L${BASEDIR}/prebuilt/ios-$(get_target_host)/libpng/lib"
export LIBPNG_CFLAGS="-I${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/libpng/include"
export LIBPNG_LIBS="-L${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/libpng/lib"
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
--with-pic \
--with-zlib \
--with-png \
+1 -1
View File
@@ -49,7 +49,7 @@ if [[ ${RECONF_fribidi} -eq 1 ]]; then
fi
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
--with-pic \
--with-sysroot=${SDK_PATH} \
--enable-static \
+1 -1
View File
@@ -49,7 +49,7 @@ if [[ ${RECONF_giflib} -eq 1 ]]; then
fi
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
--with-pic \
--with-sysroot=${SDK_PATH} \
--enable-static \
+1 -1
View File
@@ -56,7 +56,7 @@ case ${ARCH} in
esac
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
--with-pic \
--with-sysroot=${SDK_PATH} \
--enable-static \
+10 -10
View File
@@ -38,20 +38,20 @@ COMMON_CFLAGS=$(get_cflags ${LIB_NAME})
COMMON_CXXFLAGS=$(get_cxxflags ${LIB_NAME})
COMMON_LDFLAGS=$(get_ldflags ${LIB_NAME})
export CFLAGS="${COMMON_CFLAGS} -I${BASEDIR}/prebuilt/ios-$(get_target_host)/libiconv/include"
export CFLAGS="${COMMON_CFLAGS} -I${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/libiconv/include"
export CXXFLAGS="${COMMON_CXXFLAGS}"
export LDFLAGS="${COMMON_LDFLAGS} -L${BASEDIR}/prebuilt/ios-$(get_target_host)/libiconv/lib"
export LDFLAGS="${COMMON_LDFLAGS} -L${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/libiconv/lib"
export NETTLE_CFLAGS="-I${BASEDIR}/prebuilt/ios-$(get_target_host)/nettle/include"
export NETTLE_LIBS="-L${BASEDIR}/prebuilt/ios-$(get_target_host)/nettle/lib"
export HOGWEED_CFLAGS="-I${BASEDIR}/prebuilt/ios-$(get_target_host)/nettle/include"
export HOGWEED_LIBS="-L${BASEDIR}/prebuilt/ios-$(get_target_host)/nettle/lib"
export GMP_CFLAGS="-I${BASEDIR}/prebuilt/ios-$(get_target_host)/gmp/include"
export GMP_LIBS="-L${BASEDIR}/prebuilt/ios-$(get_target_host)/gmp/lib"
export NETTLE_CFLAGS="-I${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/nettle/include"
export NETTLE_LIBS="-L${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/nettle/lib"
export HOGWEED_CFLAGS="-I${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/nettle/include"
export HOGWEED_LIBS="-L${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/nettle/lib"
export GMP_CFLAGS="-I${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/gmp/include"
export GMP_LIBS="-L${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/gmp/lib"
HARDWARE_ACCELERATION=""
case ${ARCH} in
arm64)
arm64 | arm64e)
# HARDWARE ACCELERATION IS DISABLED DUE TO THE FOLLOWING ERROR
#
@@ -74,7 +74,7 @@ if [[ ${RECONF_gnutls} -eq 1 ]]; then
fi
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
--with-pic \
--with-sysroot=${SDK_PATH} \
--with-included-libtasn1 \
+1 -1
View File
@@ -56,7 +56,7 @@ cmake -Wno-dev \
-DCMAKE_SYSROOT="${SDK_PATH}" \
-DCMAKE_FIND_ROOT_PATH="${SDK_PATH}" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME}" \
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME}" \
-DCMAKE_SYSTEM_NAME=Darwin \
-DCMAKE_C_COMPILER="$CC" \
-DCMAKE_LINKER="$LD" \
+1 -1
View File
@@ -56,7 +56,7 @@ if [[ ${RECONF_kvazaar} -eq 1 ]]; then
fi
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
--with-pic \
--with-sysroot=${SDK_PATH} \
--enable-static \
+2 -2
View File
@@ -49,10 +49,10 @@ if [[ ${RECONF_lame} -eq 1 ]]; then
fi
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
--with-pic \
--with-sysroot=${SDK_PATH} \
--with-libiconv-prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/libiconv \
--with-libiconv-prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/libiconv \
--enable-static \
--disable-shared \
--disable-fast-install \
+3 -3
View File
@@ -36,8 +36,8 @@ set_toolchain_clang_paths ${LIB_NAME}
TARGET_HOST=$(get_target_host)
export CFLAGS="$(get_cflags ${LIB_NAME})"
export CXXFLAGS="$(get_cxxflags ${LIB_NAME})"
export CPPFLAGS="-I${BASEDIR}/prebuilt/ios-$(get_target_host)/giflib/include"
export LDFLAGS="$(get_ldflags ${LIB_NAME}) -L${BASEDIR}/prebuilt/ios-$(get_target_host)/giflib/lib -lgif"
export CPPFLAGS="-I${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/giflib/include"
export LDFLAGS="$(get_ldflags ${LIB_NAME}) -L${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/giflib/lib -lgif"
export PKG_CONFIG_LIBDIR="${INSTALL_PKG_CONFIG_DIR}"
export LIBPNG_CFLAGS="$(pkg-config --cflags libpng)"
@@ -65,7 +65,7 @@ if [[ ${RECONF_leptonica} -eq 1 ]]; then
fi
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
--with-pic \
--with-zlib \
--with-libpng \
+2 -2
View File
@@ -49,7 +49,7 @@ case ${ARCH} in
TOOLCHAIN_FILE="${BASEDIR}/src/${LIB_NAME}/build/cmake/toolchains/armv7s-ios.cmake"
ARCH_OPTIONS="-DARCH_ARM=1 -DENABLE_NEON=1 -DHAVE_NEON=1"
;;
arm64)
arm64 | arm64e)
TOOLCHAIN_FILE="${BASEDIR}/src/${LIB_NAME}/build/cmake/toolchains/arm64-ios.cmake"
ARCH_OPTIONS="-DARCH_ARM=1 -DENABLE_NEON=1 -DHAVE_NEON=1"
;;
@@ -81,7 +81,7 @@ cmake -Wno-dev \
-DCMAKE_SYSROOT="${SDK_PATH}" \
-DCMAKE_FIND_ROOT_PATH="${SDK_PATH}" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME}" \
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME}" \
-DCMAKE_CXX_COMPILER="$CXX" \
-DCMAKE_C_COMPILER="$CC" \
-DCMAKE_LINKER="$LD" \
+1 -1
View File
@@ -49,7 +49,7 @@ if [[ ${RECONF_libass} -eq 1 ]]; then
fi
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
--with-pic \
--with-sysroot=${SDK_PATH} \
--disable-libtool-lock \
+1 -1
View File
@@ -48,7 +48,7 @@ if [[ ${RECONF_libiconv} -eq 1 ]]; then
fi
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
--with-pic \
--with-sysroot=${SDK_PATH} \
--enable-static \
+1 -1
View File
@@ -48,7 +48,7 @@ if [[ ${RECONF_libilbc} -eq 1 ]]; then
fi
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
--with-pic \
--with-sysroot=${SDK_PATH} \
--enable-static \
+1 -1
View File
@@ -48,7 +48,7 @@ if [[ ${RECONF_libogg} -eq 1 ]]; then
fi
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
--with-pic \
--with-sysroot=${SDK_PATH} \
--enable-static \
+2 -2
View File
@@ -44,7 +44,7 @@ case ${ARCH} in
x86 | x86-64)
CPU_SPECIFIC_OPTIONS+=" --enable-sse=yes"
;;
armv7 | armv7s | arm64)
armv7 | armv7s | arm64 | arm64e)
CPU_SPECIFIC_OPTIONS+=" --enable-arm-neon=yes"
;;
esac
@@ -59,7 +59,7 @@ if [[ ${RECONF_libpng} -eq 1 ]]; then
fi
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
--with-pic \
--with-sysroot=${SDK_PATH} \
--enable-static \
+1 -1
View File
@@ -48,7 +48,7 @@ if [[ ! -f ${BASEDIR}/src/${LIB_NAME}/configure ]] || [[ ${RECONF_libsndfile} -e
fi
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
--with-pic \
--with-sysroot=${SDK_PATH} \
--enable-static \
+1 -1
View File
@@ -49,7 +49,7 @@ if [[ ${RECONF_libtheora} -eq 1 ]]; then
fi
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
--with-pic \
--enable-static \
--disable-shared \
+1 -1
View File
@@ -48,7 +48,7 @@ if [[ ${RECONF_libuuid} -eq 1 ]]; then
fi
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
--with-pic \
--with-sysroot=${SDK_PATH} \
--enable-static \
+2 -2
View File
@@ -49,7 +49,7 @@ cd build
ASM_FLAGS=""
case ${ARCH} in
armv7 | armv7s | arm64)
armv7 | armv7s | arm64 | arm64e)
ASM_FLAGS="-DSSE2_FOUND=0 -DSSE3_FOUND=0 -DSSSE3_FOUND=0 -DSSE4_1_FOUND=0"
;;
*)
@@ -65,7 +65,7 @@ cmake -Wno-dev \
-DCMAKE_SYSROOT="${SDK_PATH}" \
-DCMAKE_FIND_ROOT_PATH="${SDK_PATH}" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME}" \
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME}" \
-DCMAKE_SYSTEM_NAME=Darwin \
-DCMAKE_C_COMPILER="$CC" \
-DCMAKE_LINKER="$LD" \
+1 -1
View File
@@ -49,7 +49,7 @@ if [[ ${RECONF_libvorbis} -eq 1 ]]; then
fi
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
--with-pic \
--with-sysroot=${SDK_PATH} \
--enable-static \
+24 -5
View File
@@ -37,14 +37,16 @@ export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
# note that --disable-runtime-cpu-detect is used for arm
# using --enable-runtime-cpu-detect cause the following error
# vpx_ports/arm_cpudetect.c:151:2: error: "--enable-runtime-cpu-detect selected, but no CPU detection method " "available for your platform. Reconfigure with --disable-runtime-cpu-detect."
# PREPARE CPU & ARCH OPTIONS
TARGET=""
ASM_FLAGS=""
case ${ARCH} in
armv7 | armv7s)
# note that --disable-runtime-cpu-detect is used for arm
# using --enable-runtime-cpu-detect cause the following error
# vpx_ports/arm_cpudetect.c:151:2: error: "--enable-runtime-cpu-detect selected, but no CPU detection method " "available for your platform. Reconfigure with --disable-runtime-cpu-detect."
TARGET="$(get_target_arch)-darwin-gcc"
ASM_FLAGS="--disable-runtime-cpu-detect --enable-neon --enable-neon-asm"
;;
@@ -56,6 +58,12 @@ case ${ARCH} in
# vst1.64
ASM_FLAGS="--disable-runtime-cpu-detect --enable-neon"
;;
arm64e)
TARGET="arm64-darwin-gcc"
# arm64e assembly support disabled
ASM_FLAGS="--disable-runtime-cpu-detect"
;;
i386)
TARGET="x86-iphonesimulator-gcc"
ASM_FLAGS="--enable-runtime-cpu-detect --disable-avx512"
@@ -66,12 +74,23 @@ case ${ARCH} in
;;
esac
# PREPARE CONFIGURE OPTIONS
rm -f ${BASEDIR}/src/${LIB_NAME}/build/make/configure.sh
case ${ARCH} in
arm64e)
cp ${BASEDIR}/tools/make/configure.libvpx.arm64e.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
;;
esac
cd ${BASEDIR}/src/${LIB_NAME} || exit 1
make distclean 2>/dev/null 1>/dev/null
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
--target="${TARGET}" \
--extra-cflags="${CFLAGS}" \
--extra-cxxflags="${CXXFLAGS}" \
+9 -9
View File
@@ -55,20 +55,20 @@ cmake -Wno-dev \
-DCMAKE_SYSROOT="${SDK_PATH}" \
-DCMAKE_FIND_ROOT_PATH="${SDK_PATH}" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME}" \
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME}" \
-DCMAKE_SYSTEM_NAME=Darwin \
-DCMAKE_C_COMPILER="$CC" \
-DCMAKE_LINKER="$LD" \
-DCMAKE_AR="$AR" \
-DCMAKE_AS="$AS" \
-DGIF_INCLUDE_DIR="${BASEDIR}/prebuilt/ios-$(get_target_host)/giflib/include" \
-DGIF_LIBRARY="${BASEDIR}/prebuilt/ios-$(get_target_host)/giflib/lib" \
-DJPEG_INCLUDE_DIR="${BASEDIR}/prebuilt/ios-$(get_target_host)/jpeg/include" \
-DJPEG_LIBRARY="${BASEDIR}/prebuilt/ios-$(get_target_host)/jpeg/lib" \
-DPNG_PNG_INCLUDE_DIR="${BASEDIR}/prebuilt/ios-$(get_target_host)/libpng/include" \
-DPNG_LIBRARY="${BASEDIR}/prebuilt/ios-$(get_target_host)/libpng/lib" \
-DTIFF_INCLUDE_DIR="${BASEDIR}/prebuilt/ios-$(get_target_host)/tiff/include" \
-DTIFF_LIBRARY="${BASEDIR}/prebuilt/ios-$(get_target_host)/tiff/lib" \
-DGIF_INCLUDE_DIR="${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/giflib/include" \
-DGIF_LIBRARY="${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/giflib/lib" \
-DJPEG_INCLUDE_DIR="${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/jpeg/include" \
-DJPEG_LIBRARY="${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/jpeg/lib" \
-DPNG_PNG_INCLUDE_DIR="${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/libpng/include" \
-DPNG_LIBRARY="${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/libpng/lib" \
-DTIFF_INCLUDE_DIR="${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/tiff/include" \
-DTIFF_LIBRARY="${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/tiff/lib" \
-DZLIB_INCLUDE_DIR="${SDK_PATH}/usr/include" \
-DZLIB_LIBRARY="${SDK_PATH}/usr/lib" \
-DCMAKE_SYSTEM_PROCESSOR=$(get_target_arch) \
+2 -2
View File
@@ -47,11 +47,11 @@ make distclean 2>/dev/null 1>/dev/null
autoreconf_library ${LIB_NAME}
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
--with-pic \
--with-sysroot=${SDK_PATH} \
--with-zlib \
--with-iconv=${BASEDIR}/prebuilt/ios-$(get_target_host)/libiconv \
--with-iconv=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/libiconv \
--with-sax1 \
--without-python \
--without-debug \
+3 -3
View File
@@ -37,9 +37,9 @@ TARGET_HOST=$(get_target_host)
COMMON_CFLAGS=$(get_cflags ${LIB_NAME})
COMMON_LDFLAGS=$(get_ldflags ${LIB_NAME})
export CFLAGS="${COMMON_CFLAGS} -I${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/include"
export CFLAGS="${COMMON_CFLAGS} -I${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/include"
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS="${COMMON_LDFLAGS} -L${BASEDIR}/prebuilt/ios-$(get_target_host)/ffmpeg/lib -framework Foundation -framework CoreVideo -lavdevice"
export LDFLAGS="${COMMON_LDFLAGS} -L${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/ffmpeg/lib -framework Foundation -framework CoreVideo -lavdevice"
export PKG_CONFIG_LIBDIR="${INSTALL_PKG_CONFIG_DIR}"
# BUILD SHARED (DEFAULT) OR STATIC LIBRARIES
@@ -72,7 +72,7 @@ ${SED_INLINE} 's/$wl-undefined //g' configure
${SED_INLINE} 's/${wl}suppress//g' configure
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
--with-pic \
--with-sysroot=${SDK_PATH} \
${BUILD_LIBRARY_OPTIONS} \
+4 -4
View File
@@ -40,7 +40,7 @@ export LDFLAGS=$(get_ldflags ${LIB_NAME})
OPTIONAL_CPU_SUPPORT=""
case ${ARCH} in
armv7 | armv7s | arm64)
armv7 | armv7s | arm64 | arm64e)
OPTIONAL_CPU_SUPPORT="--enable-arm-neon"
;;
i386 | x86-64)
@@ -58,11 +58,11 @@ if [[ ${RECONF_nettle} -eq 1 ]]; then
fi
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
--enable-pic \
--enable-static \
--with-include-path=${BASEDIR}/prebuilt/ios-$(get_target_host)/gmp/include \
--with-lib-path=${BASEDIR}/prebuilt/ios-$(get_target_host)/gmp/lib \
--with-include-path=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/gmp/include \
--with-lib-path=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/gmp/lib \
--disable-shared \
--disable-mini-gmp \
--disable-assembler \
+1 -1
View File
@@ -58,7 +58,7 @@ if [[ ${RECONF_opencore_amr} -eq 1 ]]; then
fi
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
--with-pic \
--with-sysroot=${SDK_PATH} \
--enable-static \
+1 -1
View File
@@ -48,7 +48,7 @@ if [[ ${RECONF_opus} -eq 1 ]]; then
fi
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
--with-pic \
--with-sysroot=${SDK_PATH} \
--enable-static \
+1 -1
View File
@@ -51,7 +51,7 @@ fi
export ac_cv_header_libunwind_h=no
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
--with-pic \
--with-sysroot=${SDK_PATH} \
--enable-static \
+1 -1
View File
@@ -48,7 +48,7 @@ if [[ ${RECONF_shine} -eq 1 ]]; then
fi
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
--with-pic \
--with-sysroot=${SDK_PATH} \
--enable-static \
+1 -1
View File
@@ -55,7 +55,7 @@ cmake -Wno-dev \
-DCMAKE_SYSROOT="${SDK_PATH}" \
-DCMAKE_FIND_ROOT_PATH="${SDK_PATH}" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME}" \
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME}" \
-DCMAKE_SYSTEM_NAME=Darwin \
-DCMAKE_CXX_COMPILER="$CXX" \
-DCMAKE_C_COMPILER="$CC" \
+1 -1
View File
@@ -55,7 +55,7 @@ cmake -Wno-dev \
-DCMAKE_SYSROOT="${SDK_PATH}" \
-DCMAKE_FIND_ROOT_PATH="${SDK_PATH}" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME}" \
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME}" \
-DCMAKE_SYSTEM_NAME=Generic \
-DCMAKE_C_COMPILER="$CC" \
-DCMAKE_LINKER="$LD" \
+1 -1
View File
@@ -54,7 +54,7 @@ if [[ ${RECONF_speex} -eq 1 ]]; then
fi
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
--with-pic \
--with-sysroot=${SDK_PATH} \
--enable-static \
+3 -3
View File
@@ -47,11 +47,11 @@ if [[ ! -f ${BASEDIR}/src/${LIB_NAME}/configure ]] || [[ ${RECONF_tesseract} -eq
autoreconf_library ${LIB_NAME}
fi
export LEPTONICA_CFLAGS="-I${BASEDIR}/prebuilt/ios-$(get_target_host)/leptonica/include/leptonica"
export LEPTONICA_LIBS="-L${BASEDIR}/prebuilt/ios-$(get_target_host)/leptonica/lib -llept"
export LEPTONICA_CFLAGS="-I${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/leptonica/include/leptonica"
export LEPTONICA_LIBS="-L${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/leptonica/lib -llept"
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
--with-pic \
--with-sysroot=${SDK_PATH} \
--enable-static \
+3 -3
View File
@@ -48,11 +48,11 @@ if [[ ${RECONF_tiff} -eq 1 ]]; then
fi
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
--with-pic \
--with-sysroot=${SDK_PATH} \
--with-jpeg-include-dir=${BASEDIR}/prebuilt/ios-$(get_target_host)/jpeg/include \
--with-jpeg-lib-dir=${BASEDIR}/prebuilt/ios-$(get_target_host)/jpeg/lib \
--with-jpeg-include-dir=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/jpeg/include \
--with-jpeg-lib-dir=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/jpeg/lib \
--enable-static \
--disable-shared \
--disable-fast-install \
+1 -1
View File
@@ -52,7 +52,7 @@ export SNDFILE_CFLAGS="$(pkg-config --cflags sndfile)"
export SNDFILE_LIBS="$(pkg-config --libs --static sndfile)"
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
--with-pic \
--with-sysroot=${SDK_PATH} \
--enable-static \
+1 -1
View File
@@ -48,7 +48,7 @@ if [[ ${RECONF_wavpack} -eq 1 ]]; then
fi
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
--with-pic \
--with-sysroot=${SDK_PATH} \
--without-iconv \
+1 -1
View File
@@ -60,7 +60,7 @@ case ${ARCH} in
esac
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
--enable-pic \
--sysroot=${SDK_PATH} \
--enable-static \
+2 -2
View File
@@ -52,7 +52,7 @@ case ${ARCH} in
armv7 | armv7s)
ASM_OPTIONS="-DENABLE_ASSEMBLY=1 -DCROSS_COMPILE_ARM=1"
;;
arm64)
arm64 | arm64e)
ASM_OPTIONS="-DENABLE_ASSEMBLY=0 -DCROSS_COMPILE_ARM=1"
;;
*)
@@ -120,7 +120,7 @@ cmake -Wno-dev \
-DCMAKE_SYSROOT="${SDK_PATH}" \
-DCMAKE_FIND_ROOT_PATH="${SDK_PATH}" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME}" \
-DCMAKE_INSTALL_PREFIX="${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME}" \
-DCMAKE_SYSTEM_NAME=Generic \
-DCMAKE_C_COMPILER="$CC" \
-DCMAKE_CXX_COMPILER="$CXX" \
+3 -3
View File
@@ -49,7 +49,7 @@ fi
ASM_FLAGS=""
case ${ARCH} in
armv7 | armv7s | arm64)
armv7 | armv7s | arm64 | arm64e)
ASM_FLAGS=""
# REMOVING -flat_namespace OPTION FROM CONFIGURE TO FIX THE FOLLOWING ERROR
@@ -70,7 +70,7 @@ case ${ARCH} in
esac
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME} \
${ASM_FLAGS} \
--host=${TARGET_HOST} || exit 1
@@ -82,4 +82,4 @@ create_xvidcore_package_config "1.3.5"
make install || exit 1
# REMOVE DYNAMIC LIBS
rm -f ${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME}/lib/libxvidcore.dylib*
rm -f ${BASEDIR}/prebuilt/ios-$(get_target_build_directory)/${LIB_NAME}/lib/libxvidcore.dylib*
+1 -1
View File
@@ -112,7 +112,7 @@ set_dependency_rebuilt_flag() {
echo -e "\nBuilding ${ARCH} platform\n"
echo -e "\nINFO: Starting new build for ${ARCH} at "$(date)"\n" 1>>${BASEDIR}/build.log 2>&1
INSTALL_BASE="${BASEDIR}/prebuilt/ios-$(get_target_host)"
INSTALL_BASE="${BASEDIR}/prebuilt/ios-$(get_target_build_directory)"
# CREATING PACKAGE CONFIG DIRECTORY
PKG_CONFIG_DIRECTORY="${INSTALL_BASE}/pkgconfig"
+21 -13
View File
@@ -4,8 +4,9 @@
ARCH_ARMV7=0
ARCH_ARMV7S=1
ARCH_ARM64=2
ARCH_I386=3
ARCH_X86_64=4
ARCH_ARM64E=3
ARCH_I386=4
ARCH_X86_64=5
# LIBRARY INDEXES
LIBRARY_FONTCONFIG=0
@@ -57,7 +58,7 @@ LIBRARY_VIDEOTOOLBOX=45
LIBRARY_AVFOUNDATION=46
# ENABLE ARCH
ENABLED_ARCHITECTURES=(1 1 1 1 1)
ENABLED_ARCHITECTURES=(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)
@@ -67,10 +68,10 @@ export BASEDIR=$(pwd)
export MOBILE_FFMPEG_TMPDIR="${BASEDIR}/.tmp"
# MIN VERSION IOS7
export IOS_MIN_VERSION=8.0
export IOS_MIN_VERSION=9.0
# UPDATE THIS TO 8.0 WHEN GNUTLS IS UPGRADED TO 3.6.x line
export GNUTLS_IOS_MIN_VERSION=8.0
export GNUTLS_IOS_MIN_VERSION=9.0
get_mobile_ffmpeg_version() {
local MOBILE_FFMPEG_VERSION=$(grep 'MOBILE_FFMPEG_VERSION' ${BASEDIR}/ios/src/MobileFFmpeg.m | grep -Eo '\".*\"' | sed -e 's/\"//g')
@@ -81,10 +82,7 @@ get_mobile_ffmpeg_version() {
display_help() {
COMMAND=`echo $0 | sed -e 's/\.\///g'`
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 a universal fat binary and an IOS framework is created with enabled architectures inside.\n"
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 a universal fat binary and an IOS framework is created with enabled architectures inside.\n"
echo -e "Usage: ./"$COMMAND" [OPTION]...\n"
@@ -107,6 +105,7 @@ When compilation ends a universal fat binary and an IOS framework is created wit
echo -e " --disable-armv7\t\tdo not build armv7 platform [yes]"
echo -e " --disable-armv7s\t\tdo not build armv7s platform [yes]"
echo -e " --disable-arm64\t\tdo not build arm64 platform [yes]"
echo -e " --disable-arm64e\t\tdo not build arm64e platform [yes]"
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"
@@ -390,6 +389,9 @@ set_arch() {
arm64)
ENABLED_ARCHITECTURES[ARCH_ARM64]=$2
;;
arm64e)
ENABLED_ARCHITECTURES[ARCH_ARM64E]=$2
;;
i386)
ENABLED_ARCHITECTURES[ARCH_I386]=$2
;;
@@ -421,7 +423,7 @@ print_enabled_architectures() {
echo -n "Architectures: "
let enabled=0;
for print_arch in {0..4}
for print_arch in {0..5}
do
if [[ ${ENABLED_ARCHITECTURES[$print_arch]} -eq 1 ]]; then
if [[ ${enabled} -ge 1 ]]; then
@@ -652,7 +654,7 @@ fi
TARGET_ARCH_LIST=()
for run_arch in {0..4}
for run_arch in {0..5}
do
if [[ ${ENABLED_ARCHITECTURES[$run_arch]} -eq 1 ]]; then
export ARCH=$(get_arch_name $run_arch)
@@ -661,8 +663,14 @@ do
export LIPO="$(xcrun --sdk $(get_sdk_name) -f lipo)"
. ${BASEDIR}/build/main-ios.sh "${ENABLED_LIBRARIES[@]}"
TARGET_ARCH=$(get_target_arch)
case ${ARCH} in
x86-64)
TARGET_ARCH="x86_64"
;;
*)
TARGET_ARCH="${ARCH}"
;;
esac
TARGET_ARCH_LIST+=(${TARGET_ARCH})
# CLEAR FLAGS
+10 -10
View File
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for mobile-ffmpeg 2.1.
# Generated by GNU Autoconf 2.69 for mobile-ffmpeg 3.1.
#
# Report bugs to <https://github.com/tanersener/mobile-ffmpeg/issues/new>.
#
@@ -591,8 +591,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='mobile-ffmpeg'
PACKAGE_TARNAME='mobile-ffmpeg'
PACKAGE_VERSION='2.1'
PACKAGE_STRING='mobile-ffmpeg 2.1'
PACKAGE_VERSION='3.1'
PACKAGE_STRING='mobile-ffmpeg 3.1'
PACKAGE_BUGREPORT='https://github.com/tanersener/mobile-ffmpeg/issues/new'
PACKAGE_URL=''
@@ -1330,7 +1330,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures mobile-ffmpeg 2.1 to adapt to many kinds of systems.
\`configure' configures mobile-ffmpeg 3.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1400,7 +1400,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of mobile-ffmpeg 2.1:";;
short | recursive ) echo "Configuration of mobile-ffmpeg 3.1:";;
esac
cat <<\_ACEOF
@@ -1516,7 +1516,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
mobile-ffmpeg configure 2.1
mobile-ffmpeg configure 3.1
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2107,7 +2107,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by mobile-ffmpeg $as_me 2.1, which was
It was created by mobile-ffmpeg $as_me 3.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2973,7 +2973,7 @@ fi
# Define the identity of the package.
PACKAGE='mobile-ffmpeg'
VERSION='2.1'
VERSION='3.1'
cat >>confdefs.h <<_ACEOF
@@ -14511,7 +14511,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by mobile-ffmpeg $as_me 2.1, which was
This file was extended by mobile-ffmpeg $as_me 3.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -14568,7 +14568,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
mobile-ffmpeg config.status 2.1
mobile-ffmpeg config.status 3.1
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
+2 -2
View File
@@ -1,6 +1,6 @@
# mobile-ffmpeg 2.1 configure.ac
# mobile-ffmpeg 3.1 configure.ac
AC_INIT([mobile-ffmpeg], [2.1], [https://github.com/tanersener/mobile-ffmpeg/issues/new])
AC_INIT([mobile-ffmpeg], [3.1], [https://github.com/tanersener/mobile-ffmpeg/issues/new])
AC_CONFIG_SRCDIR([src/MobileFFmpeg.m])
AC_CONFIG_MACRO_DIR([m4])
+9 -2
View File
@@ -28,9 +28,16 @@
@interface ArchDetect : NSObject
/**
* Returns running architecture name.
* Returns running cpu architecture name.
*
* \return running architecture name as NSString
* \return running cpu architecture name as NSString
*/
+ (NSString*)getCpuArch;
/**
* Returns loaded architecture name.
*
* \return loaded architecture name as NSString
*/
+ (NSString*)getArch;
+41 -17
View File
@@ -29,11 +29,11 @@
}
/**
* Returns running architecture name.
* Returns running cpu architecture name.
*
* \return running architecture name as NSString
* \return running cpu architecture name as NSString
*/
+ (NSString*)getArch {
+ (NSString*)getCpuArch {
NSMutableString *cpu = [[NSMutableString alloc] init];
size_t size;
cpu_type_t type;
@@ -47,20 +47,8 @@
if (type == CPU_TYPE_X86_64) {
[cpu appendString:@"x86_64"];
} else if (type == CPU_TYPE_X86) {
[cpu appendString:@"x86"];
switch(subtype) {
case CPU_SUBTYPE_X86_64_H:
[cpu appendString:@"_64h"];
break;
case CPU_SUBTYPE_X86_64_ALL:
[cpu appendString:@"_64all"];
break;
case CPU_SUBTYPE_X86_ARCH1:
[cpu appendString:@"_arch1"];
break;
}
} else if (type == CPU_TYPE_X86 || type == CPU_TYPE_I386) {
[cpu appendString:@"i386"];
} else if (type == CPU_TYPE_ARM64) {
[cpu appendString:@"arm64"];
@@ -69,6 +57,9 @@
case CPU_SUBTYPE_ARM64_V8:
[cpu appendString:@"v8"];
break;
case CPU_SUBTYPE_ARM64E:
[cpu appendString:@"e"];
break;
}
} else if (type == CPU_TYPE_ARM) {
@@ -112,6 +103,14 @@
[cpu appendString:@"v8"];
break;
}
} else if (type == CPU_TYPE_ARM64_32) {
[cpu appendString:@"arm64_32"];
switch(subtype) {
case CPU_SUBTYPE_ARM64_32_V8:
[cpu appendString:@"v8"];
break;
}
} else {
[cpu appendString:[NSString stringWithFormat:@"%d", type]];
}
@@ -119,4 +118,29 @@
return cpu;
}
/**
* Returns loaded architecture name.
*
* \return loaded architecture name as NSString
*/
+ (NSString*)getArch {
NSMutableString *arch = [[NSMutableString alloc] init];
#ifdef MOBILE_FFMPEG_ARMV7
[arch appendString:@"armv7"];
#elif MOBILE_FFMPEG_ARMV7S
[arch appendString:@"armv7s"];
#elif MOBILE_FFMPEG_ARM64
[arch appendString:@"arm64"];
#elif MOBILE_FFMPEG_ARM64E
[arch appendString:@"arm64e"];
#elif MOBILE_FFMPEG_I386
[arch appendString:@"i386"];
#elif MOBILE_FFMPEG_X86_64
[arch appendString:@"x86_64"];
#endif
return arch;
}
@end
+1
View File
@@ -0,0 +1 @@
/configure.sh.tmp
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff