mirror of
https://github.com/levogevo/ffmpeg-builder.git
synced 2026-03-16 11:10:10 +00:00
fix freetype/harfbuzz circular dependency
This commit is contained in:
@@ -116,7 +116,7 @@ is_root_owned() {
|
|||||||
local path=$1
|
local path=$1
|
||||||
local uid
|
local uid
|
||||||
|
|
||||||
if stat --version >/dev/null 2>&1; then
|
if stat --version &>/dev/null; then
|
||||||
# GNU coreutils (Linux)
|
# GNU coreutils (Linux)
|
||||||
uid=$(stat -c '%u' "$path")
|
uid=$(stat -c '%u' "$path")
|
||||||
else
|
else
|
||||||
@@ -153,7 +153,7 @@ has_cmd() {
|
|||||||
local cmds=("$@")
|
local cmds=("$@")
|
||||||
local rv=0
|
local rv=0
|
||||||
for cmd in "${cmds[@]}"; do
|
for cmd in "${cmds[@]}"; do
|
||||||
command -v "${cmd}" >/dev/null 2>&1 || rv=1
|
command -v "${cmd}" &>/dev/null || rv=1
|
||||||
done
|
done
|
||||||
|
|
||||||
return ${rv}
|
return ${rv}
|
||||||
@@ -381,7 +381,8 @@ spinner() {
|
|||||||
local spinPidFile="${TMP_DIR}/.spinner-pid"
|
local spinPidFile="${TMP_DIR}/.spinner-pid"
|
||||||
case "${action}" in
|
case "${action}" in
|
||||||
start)
|
start)
|
||||||
test -f "${spinPidFile}" && rm "${spinPidFile}"
|
# if there is already a pidfile, we're spinning
|
||||||
|
test -f "${spinPidFile}" && return
|
||||||
|
|
||||||
# don't want to clutter logs if running headless
|
# don't want to clutter logs if running headless
|
||||||
test "${HEADLESS}" == '1' && return
|
test "${HEADLESS}" == '1' && return
|
||||||
@@ -390,7 +391,11 @@ spinner() {
|
|||||||
echo $! >"${spinPidFile}"
|
echo $! >"${spinPidFile}"
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
test -f "${spinPidFile}" && kill "$(<"${spinPidFile}")"
|
if [[ -f ${spinPidFile} ]]; then
|
||||||
|
local pid="$(<"${spinPidFile}")"
|
||||||
|
kill -0 "${pid}" &>/dev/null && kill "${pid}"
|
||||||
|
rm "${spinPidFile}"
|
||||||
|
fi
|
||||||
echo -ne ' \n'
|
echo -ne ' \n'
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
27
lib/build.sh
27
lib/build.sh
@@ -286,14 +286,14 @@ fi' >"${compilerDir}/which"
|
|||||||
else
|
else
|
||||||
arch_flags+=("-march=${ARCH}")
|
arch_flags+=("-march=${ARCH}")
|
||||||
fi
|
fi
|
||||||
CFLAGS_ARR+=("${arch_flags[@]}")
|
CFLAGS_ARR+=("${arch_flags[@]}")
|
||||||
RUSTFLAGS_ARR+=(-C "target-cpu=${ARCH}")
|
RUSTFLAGS_ARR+=(-C "target-cpu=${ARCH}")
|
||||||
|
|
||||||
# can fail static builds with -fpic
|
# can fail static builds with -fpic
|
||||||
# warning: too many GOT entries for -fpic, please recompile with -fPIC
|
# warning: too many GOT entries for -fpic, please recompile with -fPIC
|
||||||
CFLAGS_ARR+=("-fPIC")
|
CFLAGS_ARR+=("-fPIC")
|
||||||
# add preprocessor flags
|
# add preprocessor flags
|
||||||
CFLAGS_ARR+=("${CPPFLAGS_ARR[@]}")
|
CFLAGS_ARR+=("${CPPFLAGS_ARR[@]}")
|
||||||
|
|
||||||
# set exported env names to stringified arrays
|
# set exported env names to stringified arrays
|
||||||
CPPFLAGS="${CPPFLAGS_ARR[*]}"
|
CPPFLAGS="${CPPFLAGS_ARR[*]}"
|
||||||
@@ -373,7 +373,8 @@ libnuma 2.0.19 tar.gz https://github.com/numactl/numactl/arch
|
|||||||
|
|
||||||
libass 0.17.4 tar.xz https://github.com/libass/libass/releases/download/${ver}/libass-${ver}.${ext} libfontconfig,libfreetype,libharfbuzz,libfribidi,libunibreak,libxml2,xz
|
libass 0.17.4 tar.xz https://github.com/libass/libass/releases/download/${ver}/libass-${ver}.${ext} libfontconfig,libfreetype,libharfbuzz,libfribidi,libunibreak,libxml2,xz
|
||||||
libfontconfig 2.17.1 tar.xz https://gitlab.freedesktop.org/api/v4/projects/890/packages/generic/fontconfig/${ver}/fontconfig-${ver}.${ext} libharfbuzz,expat,brotli
|
libfontconfig 2.17.1 tar.xz https://gitlab.freedesktop.org/api/v4/projects/890/packages/generic/fontconfig/${ver}/fontconfig-${ver}.${ext} libharfbuzz,expat,brotli
|
||||||
libfreetype 2.14.1 tar.xz https://downloads.sourceforge.net/freetype/freetype-${ver}.${ext} bzip,libpng,zlib,brotli
|
libfreetype 2.14.1 tar.xz https://downloads.sourceforge.net/freetype/freetype-${ver}.${ext} bzip,libpng,zlib,brotli,libharfbuzzNFTP
|
||||||
|
libharfbuzzNFTP 12.3.0 tar.xz https://github.com/harfbuzz/harfbuzz/releases/download/${ver}/harfbuzz-${ver}.${ext}
|
||||||
libharfbuzz 12.3.0 tar.xz https://github.com/harfbuzz/harfbuzz/releases/download/${ver}/harfbuzz-${ver}.${ext} libfreetype
|
libharfbuzz 12.3.0 tar.xz https://github.com/harfbuzz/harfbuzz/releases/download/${ver}/harfbuzz-${ver}.${ext} libfreetype
|
||||||
libunibreak 6.1 tar.gz https://github.com/adah1972/libunibreak/releases/download/libunibreak_${ver//./_}/libunibreak-${ver}.${ext}
|
libunibreak 6.1 tar.gz https://github.com/adah1972/libunibreak/releases/download/libunibreak_${ver//./_}/libunibreak-${ver}.${ext}
|
||||||
libxml2 2.15.1 tar.gz https://github.com/GNOME/libxml2/archive/refs/tags/v${ver}.${ext}
|
libxml2 2.15.1 tar.gz https://github.com/GNOME/libxml2/archive/refs/tags/v${ver}.${ext}
|
||||||
@@ -1046,8 +1047,16 @@ build_libfontconfig() {
|
|||||||
sanitize_sysroot_libs libfontconfig || return 1
|
sanitize_sysroot_libs libfontconfig || return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# harfbuzz No FreeType
|
||||||
|
build_libharfbuzzNFTP() {
|
||||||
|
DISABLE_FREETYPE=1 build_libharfbuzz
|
||||||
|
}
|
||||||
|
|
||||||
build_libharfbuzz() {
|
build_libharfbuzz() {
|
||||||
meta_meson_build \
|
local addFlag
|
||||||
|
test "${DISABLE_FREETYPE}" -eq 1 && addFlag="-Dfreetype=disabled"
|
||||||
|
|
||||||
|
meta_meson_build ${addFlag} \
|
||||||
-D tests=disabled \
|
-D tests=disabled \
|
||||||
-D docs=disabled \
|
-D docs=disabled \
|
||||||
-D doc_tests=false || return 1
|
-D doc_tests=false || return 1
|
||||||
@@ -1105,8 +1114,8 @@ meta_configure_build() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
build_libvpx() {
|
build_libvpx() {
|
||||||
# remove preprocessor flags to not break the build
|
# remove preprocessor flags to not break the build
|
||||||
# when including old pre-built headers
|
# when including old pre-built headers
|
||||||
CFLAGS="${CFLAGS//${CPPFLAGS}/}" meta_configure_build \
|
CFLAGS="${CFLAGS//${CPPFLAGS}/}" meta_configure_build \
|
||||||
--disable-examples \
|
--disable-examples \
|
||||||
--disable-tools \
|
--disable-tools \
|
||||||
@@ -1118,7 +1127,7 @@ build_libvpx() {
|
|||||||
--enable-vp9 \
|
--enable-vp9 \
|
||||||
--enable-vp9-highbitdepth \
|
--enable-vp9-highbitdepth \
|
||||||
--enable-better-hw-compatibility \
|
--enable-better-hw-compatibility \
|
||||||
--enable-runtime-cpu-detect \
|
--enable-runtime-cpu-detect \
|
||||||
--enable-webm-io \
|
--enable-webm-io \
|
||||||
--enable-libyuv || return 1
|
--enable-libyuv || return 1
|
||||||
sanitize_sysroot_libs libvpx || return 1
|
sanitize_sysroot_libs libvpx || return 1
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ check_for_req_pkgs() {
|
|||||||
for pkg in $(print_req_pkgs); do
|
for pkg in $(print_req_pkgs); do
|
||||||
# pkg_check has ${pkg} unexpanded
|
# pkg_check has ${pkg} unexpanded
|
||||||
eval "pkg_check=\"${pkg_check}\""
|
eval "pkg_check=\"${pkg_check}\""
|
||||||
${pkg_check} "${pkg}" >/dev/null 2>&1 || missing_pkgs+=("${pkg}")
|
${pkg_check} "${pkg}" &>/dev/null || missing_pkgs+=("${pkg}")
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ ${#missing_pkgs[@]} -gt 0 ]]; then
|
if [[ ${#missing_pkgs[@]} -gt 0 ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user