Skip to content
This repository has been archived by the owner on Oct 7, 2021. It is now read-only.

Commit

Permalink
use system uuid library for tvos
Browse files Browse the repository at this point in the history
  • Loading branch information
tanersener committed Feb 29, 2020
1 parent 6fc1ed0 commit 6d5cb88
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 56 deletions.
12 changes: 4 additions & 8 deletions build/main-tvos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
;;
Expand Down Expand Up @@ -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)))
Expand All @@ -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
;;
Expand All @@ -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
;;
Expand Down Expand Up @@ -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
Expand Down
50 changes: 27 additions & 23 deletions build/tvos-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,18 @@ 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 "tvos-zlib" ;;
42) echo "tvos-audiotoolbox" ;;
43) echo "tvos-coreimage" ;;
44) echo "tvos-bzip2" ;;
45) echo "tvos-videotoolbox" ;;
46) echo "tvos-libiconv" ;;
35) echo "nettle" ;;
36) echo "tiff" ;;
37) echo "expat" ;;
38) echo "libsndfile" ;;
39) echo "leptonica" ;;
40) echo "tvos-zlib" ;;
41) echo "tvos-audiotoolbox" ;;
42) echo "tvos-coreimage" ;;
43) echo "tvos-bzip2" ;;
44) echo "tvos-videotoolbox" ;;
45) echo "tvos-libiconv" ;;
46) echo "tvos-libuuid" ;;
esac
}

Expand All @@ -83,10 +83,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" ;;
46) echo "uuid" ;;
*) echo $(get_library_name $1)
esac
}
Expand All @@ -110,9 +110,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
}
Expand Down Expand Up @@ -773,21 +772,21 @@ Cflags: -I\${includedir}
EOF
}

create_uuid_package_config() {
create_libuuid_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
Description: Universally unique id library
Version: ${UUID_VERSION}
Requires:
Cflags: -I\${includedir}
Libs: -L\${libdir} -luuid
Libs: -L\${libdir}
EOF
}

Expand Down Expand Up @@ -1030,6 +1029,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}
Expand All @@ -1047,6 +1047,10 @@ set_toolchain_clang_paths() {
create_bzip2_system_package_config
fi

if [ ! -f ${LIB_UUID_PACKAGE_CONFIG_PATH} ]; then
create_libuuid_system_package_config
fi

prepare_inline_sed
}

Expand Down
2 changes: 1 addition & 1 deletion tools/release/ios/mobile-ffmpeg-full-gpl.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ Pod::Spec.new do |s|

s.ios.deployment_target = '9.3'
s.ios.frameworks = 'AudioToolbox','AVFoundation','CoreMedia','VideoToolbox'
s.ios.vendored_frameworks = 'mobileffmpeg.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework', 'expat.framework', 'fontconfig.framework', 'freetype.framework', 'fribidi.framework', 'giflib.framework', 'gmp.framework', 'gnutls.framework', 'jpeg.framework', 'kvazaar.framework', 'lame.framework', 'libaom.framework', 'libass.framework', 'libhogweed.framework', 'libilbc.framework', 'libnettle.framework', 'libogg.framework', 'libopencore-amrnb.framework', 'libopencore-amrwb.framework', 'libpng.framework', 'libsndfile.framework', 'libtheora.framework', 'libtheoradec.framework', 'libtheoraenc.framework', 'libuuid.framework', 'libvorbis.framework', 'libvorbisenc.framework', 'libvorbisfile.framework', 'libvpx.framework', 'libwebp.framework', 'libwebpdecoder.framework', 'libwebpdemux.framework', 'libxml2.framework', 'opus.framework', 'shine.framework', 'snappy.framework', 'soxr.framework', 'speex.framework', 'tiff.framework', 'twolame.framework', 'wavpack.framework', 'libvidstab.framework', 'x264.framework', 'x265.framework', 'xvidcore.framework'
s.ios.vendored_frameworks = 'mobileffmpeg.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework', 'expat.framework', 'fontconfig.framework', 'freetype.framework', 'fribidi.framework', 'giflib.framework', 'gmp.framework', 'gnutls.framework', 'jpeg.framework', 'kvazaar.framework', 'lame.framework', 'libaom.framework', 'libass.framework', 'libhogweed.framework', 'libilbc.framework', 'libnettle.framework', 'libogg.framework', 'libopencore-amrnb.framework', 'libopencore-amrwb.framework', 'libpng.framework', 'libsndfile.framework', 'libtheora.framework', 'libtheoradec.framework', 'libtheoraenc.framework', 'libvorbis.framework', 'libvorbisenc.framework', 'libvorbisfile.framework', 'libvpx.framework', 'libwebp.framework', 'libwebpdecoder.framework', 'libwebpdemux.framework', 'libxml2.framework', 'opus.framework', 'shine.framework', 'snappy.framework', 'soxr.framework', 'speex.framework', 'tiff.framework', 'twolame.framework', 'wavpack.framework', 'libvidstab.framework', 'x264.framework', 'x265.framework', 'xvidcore.framework'

end
2 changes: 1 addition & 1 deletion tools/release/ios/mobile-ffmpeg-full.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ Pod::Spec.new do |s|

s.ios.deployment_target = '9.3'
s.ios.frameworks = 'AudioToolbox','AVFoundation','CoreMedia','VideoToolbox'
s.ios.vendored_frameworks = 'mobileffmpeg.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework', 'expat.framework', 'fontconfig.framework', 'freetype.framework', 'fribidi.framework', 'giflib.framework', 'gmp.framework', 'gnutls.framework', 'jpeg.framework', 'kvazaar.framework', 'lame.framework', 'libaom.framework', 'libass.framework', 'libhogweed.framework', 'libilbc.framework', 'libnettle.framework', 'libogg.framework', 'libopencore-amrnb.framework', 'libopencore-amrwb.framework', 'libpng.framework', 'libsndfile.framework', 'libtheora.framework', 'libtheoradec.framework', 'libtheoraenc.framework', 'libuuid.framework', 'libvorbis.framework', 'libvorbisenc.framework', 'libvorbisfile.framework', 'libvpx.framework', 'libwebp.framework', 'libwebpdecoder.framework', 'libwebpdemux.framework', 'libxml2.framework', 'opus.framework', 'shine.framework', 'snappy.framework', 'soxr.framework', 'speex.framework', 'tiff.framework', 'twolame.framework', 'wavpack.framework'
s.ios.vendored_frameworks = 'mobileffmpeg.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework', 'expat.framework', 'fontconfig.framework', 'freetype.framework', 'fribidi.framework', 'giflib.framework', 'gmp.framework', 'gnutls.framework', 'jpeg.framework', 'kvazaar.framework', 'lame.framework', 'libaom.framework', 'libass.framework', 'libhogweed.framework', 'libilbc.framework', 'libnettle.framework', 'libogg.framework', 'libopencore-amrnb.framework', 'libopencore-amrwb.framework', 'libpng.framework', 'libsndfile.framework', 'libtheora.framework', 'libtheoradec.framework', 'libtheoraenc.framework', 'libvorbis.framework', 'libvorbisenc.framework', 'libvorbisfile.framework', 'libvpx.framework', 'libwebp.framework', 'libwebpdecoder.framework', 'libwebpdemux.framework', 'libxml2.framework', 'opus.framework', 'shine.framework', 'snappy.framework', 'soxr.framework', 'speex.framework', 'tiff.framework', 'twolame.framework', 'wavpack.framework'

end
2 changes: 1 addition & 1 deletion tools/release/ios/mobile-ffmpeg-video.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ Pod::Spec.new do |s|

s.ios.deployment_target = '9.3'
s.ios.frameworks = 'AudioToolbox','AVFoundation','CoreMedia','VideoToolbox'
s.ios.vendored_frameworks = 'mobileffmpeg.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework', 'expat.framework', 'fontconfig.framework', 'freetype.framework', 'fribidi.framework', 'giflib.framework', 'jpeg.framework', 'kvazaar.framework', 'libaom.framework', 'libass.framework', 'libogg.framework', 'libpng.framework', 'libtheora.framework', 'libtheoradec.framework', 'libtheoraenc.framework', 'libuuid.framework', 'libvorbis.framework', 'libvorbisenc.framework', 'libvorbisfile.framework', 'libvpx.framework', 'libwebp.framework', 'libwebpdecoder.framework', 'libwebpdemux.framework', 'snappy.framework', 'tiff.framework'
s.ios.vendored_frameworks = 'mobileffmpeg.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework', 'expat.framework', 'fontconfig.framework', 'freetype.framework', 'fribidi.framework', 'giflib.framework', 'jpeg.framework', 'kvazaar.framework', 'libaom.framework', 'libass.framework', 'libogg.framework', 'libpng.framework', 'libtheora.framework', 'libtheoradec.framework', 'libtheoraenc.framework', 'libvorbis.framework', 'libvorbisenc.framework', 'libvorbisfile.framework', 'libvpx.framework', 'libwebp.framework', 'libwebpdecoder.framework', 'libwebpdemux.framework', 'snappy.framework', 'tiff.framework'

end
2 changes: 1 addition & 1 deletion tools/release/tvos/mobile-ffmpeg-tvos-full-gpl.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ Pod::Spec.new do |s|

s.tvos.deployment_target = '9.2'
s.tvos.frameworks = 'AudioToolbox','VideoToolbox','CoreMedia'
s.tvos.vendored_frameworks = 'mobileffmpeg.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework', 'expat.framework', 'fontconfig.framework', 'freetype.framework', 'fribidi.framework', 'giflib.framework', 'gmp.framework', 'gnutls.framework', 'jpeg.framework', 'kvazaar.framework', 'lame.framework', 'libaom.framework', 'libass.framework', 'libhogweed.framework', 'libilbc.framework', 'libnettle.framework', 'libogg.framework', 'libopencore-amrnb.framework', 'libopencore-amrwb.framework', 'libpng.framework', 'libsndfile.framework', 'libtheora.framework', 'libtheoradec.framework', 'libtheoraenc.framework', 'libuuid.framework', 'libvorbis.framework', 'libvorbisenc.framework', 'libvorbisfile.framework', 'libvpx.framework', 'libwebp.framework', 'libwebpdecoder.framework', 'libwebpdemux.framework', 'libxml2.framework', 'opus.framework', 'shine.framework', 'snappy.framework', 'soxr.framework', 'speex.framework', 'tiff.framework', 'twolame.framework', 'wavpack.framework', 'libvidstab.framework', 'x264.framework', 'x265.framework', 'xvidcore.framework'
s.tvos.vendored_frameworks = 'mobileffmpeg.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework', 'expat.framework', 'fontconfig.framework', 'freetype.framework', 'fribidi.framework', 'giflib.framework', 'gmp.framework', 'gnutls.framework', 'jpeg.framework', 'kvazaar.framework', 'lame.framework', 'libaom.framework', 'libass.framework', 'libhogweed.framework', 'libilbc.framework', 'libnettle.framework', 'libogg.framework', 'libopencore-amrnb.framework', 'libopencore-amrwb.framework', 'libpng.framework', 'libsndfile.framework', 'libtheora.framework', 'libtheoradec.framework', 'libtheoraenc.framework', 'libvorbis.framework', 'libvorbisenc.framework', 'libvorbisfile.framework', 'libvpx.framework', 'libwebp.framework', 'libwebpdecoder.framework', 'libwebpdemux.framework', 'libxml2.framework', 'opus.framework', 'shine.framework', 'snappy.framework', 'soxr.framework', 'speex.framework', 'tiff.framework', 'twolame.framework', 'wavpack.framework', 'libvidstab.framework', 'x264.framework', 'x265.framework', 'xvidcore.framework'

end
2 changes: 1 addition & 1 deletion tools/release/tvos/mobile-ffmpeg-tvos-full.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ Pod::Spec.new do |s|

s.tvos.deployment_target = '9.2'
s.tvos.frameworks = 'AudioToolbox','VideoToolbox','CoreMedia'
s.tvos.vendored_frameworks = 'mobileffmpeg.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework', 'expat.framework', 'fontconfig.framework', 'freetype.framework', 'fribidi.framework', 'giflib.framework', 'gmp.framework', 'gnutls.framework', 'jpeg.framework', 'kvazaar.framework', 'lame.framework', 'libaom.framework', 'libass.framework', 'libhogweed.framework', 'libilbc.framework', 'libnettle.framework', 'libogg.framework', 'libopencore-amrnb.framework', 'libopencore-amrwb.framework', 'libpng.framework', 'libsndfile.framework', 'libtheora.framework', 'libtheoradec.framework', 'libtheoraenc.framework', 'libuuid.framework', 'libvorbis.framework', 'libvorbisenc.framework', 'libvorbisfile.framework', 'libvpx.framework', 'libwebp.framework', 'libwebpdecoder.framework', 'libwebpdemux.framework', 'libxml2.framework', 'opus.framework', 'shine.framework', 'snappy.framework', 'soxr.framework', 'speex.framework', 'tiff.framework', 'twolame.framework', 'wavpack.framework'
s.tvos.vendored_frameworks = 'mobileffmpeg.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework', 'expat.framework', 'fontconfig.framework', 'freetype.framework', 'fribidi.framework', 'giflib.framework', 'gmp.framework', 'gnutls.framework', 'jpeg.framework', 'kvazaar.framework', 'lame.framework', 'libaom.framework', 'libass.framework', 'libhogweed.framework', 'libilbc.framework', 'libnettle.framework', 'libogg.framework', 'libopencore-amrnb.framework', 'libopencore-amrwb.framework', 'libpng.framework', 'libsndfile.framework', 'libtheora.framework', 'libtheoradec.framework', 'libtheoraenc.framework', 'libvorbis.framework', 'libvorbisenc.framework', 'libvorbisfile.framework', 'libvpx.framework', 'libwebp.framework', 'libwebpdecoder.framework', 'libwebpdemux.framework', 'libxml2.framework', 'opus.framework', 'shine.framework', 'snappy.framework', 'soxr.framework', 'speex.framework', 'tiff.framework', 'twolame.framework', 'wavpack.framework'

end
2 changes: 1 addition & 1 deletion tools/release/tvos/mobile-ffmpeg-tvos-video.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ Pod::Spec.new do |s|

s.tvos.deployment_target = '9.2'
s.tvos.frameworks = 'AudioToolbox','VideoToolbox','CoreMedia'
s.tvos.vendored_frameworks = 'mobileffmpeg.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework', 'expat.framework', 'fontconfig.framework', 'freetype.framework', 'fribidi.framework', 'giflib.framework', 'jpeg.framework', 'kvazaar.framework', 'libaom.framework', 'libass.framework', 'libogg.framework', 'libpng.framework', 'libtheora.framework', 'libtheoradec.framework', 'libtheoraenc.framework', 'libuuid.framework', 'libvorbis.framework', 'libvorbisenc.framework', 'libvorbisfile.framework', 'libvpx.framework', 'libwebp.framework', 'libwebpdecoder.framework', 'libwebpdemux.framework', 'snappy.framework', 'tiff.framework'
s.tvos.vendored_frameworks = 'mobileffmpeg.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework', 'expat.framework', 'fontconfig.framework', 'freetype.framework', 'fribidi.framework', 'giflib.framework', 'jpeg.framework', 'kvazaar.framework', 'libaom.framework', 'libass.framework', 'libogg.framework', 'libpng.framework', 'libtheora.framework', 'libtheoradec.framework', 'libtheoraenc.framework', 'libvorbis.framework', 'libvorbisenc.framework', 'libvorbisfile.framework', 'libvpx.framework', 'libwebp.framework', 'libwebpdecoder.framework', 'libwebpdemux.framework', 'snappy.framework', 'tiff.framework'

end
Loading

0 comments on commit 6d5cb88

Please sign in to comment.