diff --git a/README.md b/README.md index 9500006..276137a 100644 --- a/README.md +++ b/README.md @@ -22,23 +22,9 @@ This project supports multiple ways to build. ## Configuration Configuration is done through environment variables. By default, this project will build a static `ffmpeg` binary in `./gitignore/sysroot/bin/ffmpeg`. -The default enabled libraries included in the `ffmpeg` build are: -- libsvtav1_psy -- libopus -- libdav1d -- libaom -- librav1e -- libvmaf -- libx264 -- libx265 -- libwebp -- libvpx -- libass -- libvorbis -- libmp3lame The user-overridable compile options are: -- `ENABLE`: configure what ffmpeg enables (default: libsvtav1_psy libopus libdav1d libaom librav1e libvmaf libx264 libx265 libwebp libvpx libass libvorbis libmp3lame) +- `ENABLE`: configure what ffmpeg enables (default: libaom libass libvpx libxml2 libvmaf libx264 libx265 libwebp libopus librav1e libdav1d libvorbis libmp3lame libfribidi libfreetype libharfbuzz libsvtav1_psy libfontconfig ) - `PREFIX`: prefix to install to, default is local install in ./gitignore/sysroot (default: local) - `STATIC`: static or shared build (default: ON) - `LTO`: enable link time optimization (default: ON) diff --git a/lib/build.sh b/lib/build.sh index 77991dc..b9d2de0 100644 --- a/lib/build.sh +++ b/lib/build.sh @@ -368,11 +368,17 @@ glad 2.0.8 tar.gz https://github.com/Dav1dde/glad/archive libx265 4.1 tar.gz https://bitbucket.org/multicoreware/x265_git/downloads/x265_${ver}.${ext} libnuma libnuma 2.0.19 tar.gz https://github.com/numactl/numactl/archive/refs/tags/v${ver}.${ext} -libass 0.17.4 tar.xz https://github.com/libass/libass/releases/download/${ver}/libass-${ver}.${ext} freetype,fribidi,libunibreak -freetype 2.14.1 tar.xz https://downloads.sourceforge.net/freetype/freetype-${ver}.${ext} libpng,harfbuzz -harfbuzz 12.3.0 tar.xz https://github.com/harfbuzz/harfbuzz/releases/download/${ver}/harfbuzz-${ver}.${ext} -fribidi 1.0.16 tar.xz https://github.com/fribidi/fribidi/releases/download/v${ver}/fribidi-${ver}.${ext} +libass 0.17.4 tar.xz https://github.com/libass/libass/releases/download/${ver}/libass-${ver}.${ext} libfreetype,libfribidi,libunibreak,libxml2,xz,libfontconfig 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} +xz 5.8.2 tar.xz https://github.com/tukaani-project/xz/releases/download/v${ver}/xz-${ver}.${ext} +libfribidi 1.0.16 tar.xz https://github.com/fribidi/fribidi/releases/download/v${ver}/fribidi-${ver}.${ext} +libfreetype 2.14.1 tar.xz https://downloads.sourceforge.net/freetype/freetype-${ver}.${ext} zlib,bzip,libpng,libharfbuzz,brotli +bzip latest git https://github.com/libarchive/bzip2.git +libharfbuzz 12.3.0 tar.xz https://github.com/harfbuzz/harfbuzz/releases/download/${ver}/harfbuzz-${ver}.${ext} +brotli 1.2.0 tar.gz https://github.com/google/brotli/archive/refs/tags/v${ver}.${ext} +libfontconfig 2.17.1 tar.xz https://gitlab.freedesktop.org/api/v4/projects/890/packages/generic/fontconfig/${ver}/fontconfig-${ver}.${ext} expat +expat 2.7.3 tar.xz https://github.com/libexpat/libexpat/releases/download/R_${ver//./_}/expat-${ver}.${ext} ' local supported_builds=() unset ver ext url deps extractedDir @@ -892,6 +898,27 @@ build_libx265() { del_pkgconfig_gcc_s x265.pc || return 1 } +build_brotli() { + meta_cmake_build || return 1 + sanitize_sysroot_libs \ + libbrotlicommon libbrotlidec libbrotlienc || return 1 +} + +build_libxml2() { + meta_cmake_build || return 1 + sanitize_sysroot_libs libxml2 || return 1 +} + +build_xz() { + meta_cmake_build || return 1 + sanitize_sysroot_libs liblzma || return 1 +} + +build_expat() { + meta_cmake_build || return 1 + sanitize_sysroot_libs libexpat || return 1 +} + ### MESON ### meta_meson_build() { local addFlags=("$@") @@ -964,13 +991,23 @@ build_libvmaf() { fi } -build_freetype() { +build_libfreetype() { meta_meson_build \ -D tests=disabled || return 1 sanitize_sysroot_libs libfreetype || return 1 } -build_harfbuzz() { +build_bzip() { + meta_meson_build || return 1 + sanitize_sysroot_libs libbz2 || return 1 +} + +build_libfontconfig() { + meta_meson_build || return 1 + sanitize_sysroot_libs libfontconfig || return 1 +} + +build_libharfbuzz() { meta_meson_build \ -D tests=disabled \ -D docs=disabled \ @@ -978,7 +1015,7 @@ build_harfbuzz() { sanitize_sysroot_libs libharfbuzz || return 1 } -build_fribidi() { +build_libfribidi() { meta_meson_build \ -D tests=false || return 1 sanitize_sysroot_libs libfribidi || return 1 diff --git a/lib/compile_opts.sh b/lib/compile_opts.sh index c8872d8..d164dd0 100644 --- a/lib/compile_opts.sh +++ b/lib/compile_opts.sh @@ -31,18 +31,24 @@ DEFAULT_PREFIX='local' FB_COMP_OPTS_DESC['ENABLE']='configure what ffmpeg enables' DEFAULT_ENABLE="\ -libsvtav1_psy \ -libopus \ -libdav1d \ libaom \ -librav1e \ +libass \ +libvpx \ +libxml2 \ libvmaf \ libx264 \ libx265 \ libwebp \ -libvpx \ +libopus \ +librav1e \ +libdav1d \ libvorbis \ -libmp3lame\ +libmp3lame \ +libfribidi \ +libfreetype \ +libharfbuzz \ +libsvtav1_psy \ +libfontconfig \ " # user-overridable compile option variable names diff --git a/lib/install_deps.sh b/lib/install_deps.sh index 041f959..be6b924 100644 --- a/lib/install_deps.sh +++ b/lib/install_deps.sh @@ -68,7 +68,7 @@ print_req_pkgs() { build-essential libssl-dev gobjc++ mawk libc6-dev mediainfo ninja-build mkvtoolnix libgtest-dev lld - libfontconfig-dev libglib2.0-dev + libglib2.0-dev ) # shellcheck disable=SC2034 local pacman_pkgs=( @@ -78,8 +78,8 @@ print_req_pkgs() { ) # shellcheck disable=SC2034 local dnf_pkgs=( - "${common_linux_pkgs[@]}" openssl-devel - pipx ninja-build fontconfig-devel wget2 + "${common_linux_pkgs[@]}" pipx + openssl-devel ninja-build wget2 glibc-static glibc-devel patch libstdc++-static libstdc++-devel llvm-cmake-utils llvm-devel diff --git a/lib/readme.sh b/lib/readme.sh index 453b461..3b14637 100644 --- a/lib/readme.sh +++ b/lib/readme.sh @@ -44,8 +44,6 @@ This project supports multiple ways to build. ## Configuration Configuration is done through environment variables. By default, this project will build a static \`ffmpeg\` binary in \`./gitignore/sysroot/bin/ffmpeg\`. -The default enabled libraries included in the \`ffmpeg\` build are: -$(make_bullet_points ${DEFAULT_ENABLE}) The user-overridable compile options are: $(gen_compile_opts_info) diff --git a/patches/brotli/add-brotlicommon-to-enc-dec.patch b/patches/brotli/add-brotlicommon-to-enc-dec.patch new file mode 100644 index 0000000..8433d48 --- /dev/null +++ b/patches/brotli/add-brotlicommon-to-enc-dec.patch @@ -0,0 +1,24 @@ +diff --git a/scripts/libbrotlidec.pc.in b/scripts/libbrotlidec.pc.in +index 419a608..bae9f81 100644 +--- a/scripts/libbrotlidec.pc.in ++++ b/scripts/libbrotlidec.pc.in +@@ -7,6 +7,6 @@ Name: libbrotlidec + URL: https://github.com/google/brotli + Description: Brotli decoder library + Version: @PACKAGE_VERSION@ +-Libs: -L${libdir} -lbrotlidec ++Libs: -L${libdir} -lbrotlidec -lbrotlicommon + Requires.private: libbrotlicommon >= 1.2.0 + Cflags: -I${includedir} +diff --git a/scripts/libbrotlienc.pc.in b/scripts/libbrotlienc.pc.in +index effa6ce..b7a9857 100644 +--- a/scripts/libbrotlienc.pc.in ++++ b/scripts/libbrotlienc.pc.in +@@ -7,6 +7,6 @@ Name: libbrotlienc + URL: https://github.com/google/brotli + Description: Brotli encoder library + Version: @PACKAGE_VERSION@ +-Libs: -L${libdir} -lbrotlienc ++Libs: -L${libdir} -lbrotlienc -lbrotlicommon + Requires.private: libbrotlicommon >= 1.2.0 + Cflags: -I${includedir}