├── addins ├── onevpl.sh ├── 4.4.sh ├── 5.0.sh ├── 5.1.sh └── debug.sh ├── .github ├── buildkit.toml └── workflows │ ├── pr.yml │ └── build.yml ├── .gitignore ├── variants ├── linux64-gpl.sh ├── win32-gpl.sh ├── win32-lgpl.sh ├── win64-gpl.sh ├── win64-lgpl.sh ├── defaults-gpl-shared.sh ├── defaults-lgpl-shared.sh ├── linux64-lgpl.sh ├── linuxarm64-gpl.sh ├── linuxarm64-lgpl.sh ├── win32-nonfree-shared.sh ├── win64-nonfree-shared.sh ├── linux64-nonfree-shared.sh ├── win32-nonfree.sh ├── win64-nonfree.sh ├── linux64-nonfree.sh ├── linuxarm64-nonfree-shared.sh ├── linux64-gpl-shared.sh ├── linux64-lgpl-shared.sh ├── linuxarm64-nonfree.sh ├── win32-gpl-shared.sh ├── win32-lgpl-shared.sh ├── win64-gpl-shared.sh ├── win64-lgpl-shared.sh ├── linuxarm64-gpl-shared.sh ├── linuxarm64-lgpl-shared.sh ├── defaults-lgpl.sh ├── defaults-gpl.sh ├── default-install.sh ├── linux-install-shared.sh └── windows-install-shared.sh ├── images ├── base │ ├── check-wget.sh │ ├── git-mini-clone.sh │ ├── retry-tool.sh │ ├── run_stage.sh │ └── Dockerfile ├── base-linux64 │ ├── cross.meson │ ├── gen-implib.sh │ ├── toolchain.cmake │ └── Dockerfile ├── base-linuxarm64 │ ├── cross.meson │ ├── gen-implib.sh │ ├── toolchain.cmake │ └── Dockerfile ├── base-win32 │ ├── cross.meson │ ├── toolchain.cmake │ └── Dockerfile └── base-win64 │ ├── cross.meson │ ├── toolchain.cmake │ ├── Dockerfile │ └── ct-ng-config ├── scripts.d ├── 50-vaapi │ ├── 99-finalize.sh │ ├── 30-libpciaccess.sh │ ├── 40-libdrm.sh │ └── 50-libva.sh ├── 50-schannel.sh ├── 10-mingw-std-threads.sh ├── 45-x11 │ ├── 99-finalize.sh │ ├── 10-xproto.sh │ ├── 10-xcbproto.sh │ ├── 10-xtrans.sh │ ├── 60-libglvnd.sh │ ├── 20-libxau.sh │ ├── 50-libxfixes.sh │ ├── 60-libxcursor.sh │ ├── 50-libxi.sh │ ├── 60-libxrandr.sh │ ├── 50-libxrender.sh │ ├── 50-libxscrnsaver.sh │ ├── 50-libxxf86vm.sh │ ├── 50-libxinerama.sh │ ├── 30-libxcb.sh │ ├── 50-libxext.sh │ ├── 60-libxv.sh │ └── 40-libx11.sh ├── 50-amf.sh ├── 99-rpath.sh ├── 45-libsamplerate.sh ├── 50-ffnvcodec.sh ├── 10-xorg-macros.sh ├── 50-gme.sh ├── 50-avisynth.sh ├── 50-uavs3d.sh ├── 50-openjpeg.sh ├── 25-libogg.sh ├── 50-svtav1.sh ├── 45-harfbuzz.sh ├── 50-librist │ ├── 40-mbedtls.sh │ └── 50-librist.sh ├── 20-zlib.sh ├── 50-lilv │ ├── 98-sratom.sh │ ├── 96-serd.sh │ ├── 97-sord.sh │ ├── 96-lv2.sh │ └── 99-lilv.sh ├── 50-srt.sh ├── 50-aribb24 │ ├── 25-libpng.sh │ └── 50-libaribb24.sh ├── 45-libudfread.sh ├── 50-soxr.sh ├── 50-libass.sh ├── 50-dav1d.sh ├── 25-freetype.sh ├── 50-libopus.sh ├── 45-libvorbis.sh ├── 20-libxml2.sh ├── 25-gmp.sh ├── 25-xz.sh ├── 50-libssh.sh ├── 50-vulkan │ ├── 45-vulkan.sh │ ├── 60-libplacebo.sh │ ├── 55-spirv-cross.sh │ └── 50-shaderc.sh ├── 50-zimg.sh ├── 20-libiconv.sh ├── 50-fdk-aac.sh ├── 35-fontconfig.sh ├── 50-kvazaar.sh ├── 50-mfx.sh ├── 50-libtheora.sh ├── 50-frei0r.sh ├── 50-libmp3lame.sh ├── 50-rubberband.sh ├── 25-fribidi.sh ├── 50-opencore-amr.sh ├── 50-libjxl │ ├── 45-brotli.sh │ └── 50-libjxl.sh ├── 50-davs2.sh ├── 50-x264.sh ├── 50-twolame.sh ├── 50-vidstab.sh ├── 50-libbluray.sh ├── 50-libwebp.sh ├── 50-aom.sh ├── 25-fftw3.sh ├── 45-vmaf.sh ├── 50-xvid.sh ├── 50-xavs2.sh ├── 50-onevpl.sh ├── 50-openh264.sh ├── 25-openssl.sh ├── 50-zvbi.sh ├── 50-libvpx.sh ├── 10-mingw.sh ├── 50-rav1e.sh ├── 50-openmpt.sh ├── 45-pulseaudio.sh ├── 50-sdl.sh ├── 45-opencl.sh └── 50-x265.sh ├── patches ├── zvbi │ ├── 0002-fix-static-linking.patch │ ├── 0001-ioctl.patch │ ├── 0004-fix-clang-support.patch │ ├── 0000-ssize_max.patch │ └── 0003-win32.patch ├── aribb24 │ ├── 13.patch │ ├── 12.patch │ └── 17.patch └── aom │ └── 0001-Fall-back-to-built-in-vmaf-model-on-load-failure.patch ├── util ├── prunetags.sh ├── update_wiki.sh ├── repack_latest.sh ├── vars.sh └── update_scripts.sh ├── LICENSE ├── generate.sh ├── makeimage.sh └── README.md /addins/onevpl.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | -------------------------------------------------------------------------------- /addins/4.4.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | GIT_BRANCH="release/4.4" 3 | -------------------------------------------------------------------------------- /addins/5.0.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | GIT_BRANCH="release/5.0" 3 | -------------------------------------------------------------------------------- /addins/5.1.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | GIT_BRANCH="release/5.1" 3 | -------------------------------------------------------------------------------- /.github/buildkit.toml: -------------------------------------------------------------------------------- 1 | [worker.oci] 2 | max-parallelism = 4 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /Dockerfile 2 | /ffbuild/ 3 | /artifacts/ 4 | /.cache/ 5 | -------------------------------------------------------------------------------- /addins/debug.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | FF_CONFIGURE="${FF_CONFIGURE/--disable-debug/} --optflags='-Og' --disable-stripping" 3 | -------------------------------------------------------------------------------- /variants/linux64-gpl.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source "$(dirname "$BASH_SOURCE")"/default-install.sh 3 | source "$(dirname "$BASH_SOURCE")"/defaults-gpl.sh 4 | -------------------------------------------------------------------------------- /variants/win32-gpl.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source "$(dirname "$BASH_SOURCE")"/default-install.sh 3 | source "$(dirname "$BASH_SOURCE")"/defaults-gpl.sh 4 | -------------------------------------------------------------------------------- /variants/win32-lgpl.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source "$(dirname "$BASH_SOURCE")"/default-install.sh 3 | source "$(dirname "$BASH_SOURCE")"/defaults-lgpl.sh 4 | -------------------------------------------------------------------------------- /variants/win64-gpl.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source "$(dirname "$BASH_SOURCE")"/default-install.sh 3 | source "$(dirname "$BASH_SOURCE")"/defaults-gpl.sh 4 | -------------------------------------------------------------------------------- /variants/win64-lgpl.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source "$(dirname "$BASH_SOURCE")"/default-install.sh 3 | source "$(dirname "$BASH_SOURCE")"/defaults-lgpl.sh 4 | -------------------------------------------------------------------------------- /variants/defaults-gpl-shared.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source "$(dirname "$BASH_SOURCE")"/defaults-gpl.sh 3 | FF_CONFIGURE+=" --enable-shared --disable-static" 4 | -------------------------------------------------------------------------------- /variants/defaults-lgpl-shared.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source "$(dirname "$BASH_SOURCE")"/defaults-lgpl.sh 3 | FF_CONFIGURE+=" --enable-shared --disable-static" 4 | -------------------------------------------------------------------------------- /variants/linux64-lgpl.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source "$(dirname "$BASH_SOURCE")"/default-install.sh 3 | source "$(dirname "$BASH_SOURCE")"/defaults-lgpl.sh 4 | -------------------------------------------------------------------------------- /variants/linuxarm64-gpl.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source "$(dirname "$BASH_SOURCE")"/default-install.sh 3 | source "$(dirname "$BASH_SOURCE")"/defaults-gpl.sh 4 | -------------------------------------------------------------------------------- /variants/linuxarm64-lgpl.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source "$(dirname "$BASH_SOURCE")"/default-install.sh 3 | source "$(dirname "$BASH_SOURCE")"/defaults-lgpl.sh 4 | -------------------------------------------------------------------------------- /variants/win32-nonfree-shared.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source "$(dirname "$BASH_SOURCE")"/win32-gpl-shared.sh 3 | FF_CONFIGURE="--enable-nonfree $FF_CONFIGURE" 4 | -------------------------------------------------------------------------------- /variants/win64-nonfree-shared.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source "$(dirname "$BASH_SOURCE")"/win64-gpl-shared.sh 3 | FF_CONFIGURE="--enable-nonfree $FF_CONFIGURE" 4 | -------------------------------------------------------------------------------- /variants/linux64-nonfree-shared.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source "$(dirname "$BASH_SOURCE")"/linux64-gpl-shared.sh 3 | FF_CONFIGURE="--enable-nonfree $FF_CONFIGURE" 4 | -------------------------------------------------------------------------------- /variants/win32-nonfree.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source "$(dirname "$BASH_SOURCE")"/win32-gpl.sh 3 | FF_CONFIGURE="--enable-nonfree $FF_CONFIGURE" 4 | LICENSE_FILE="" 5 | -------------------------------------------------------------------------------- /variants/win64-nonfree.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source "$(dirname "$BASH_SOURCE")"/win64-gpl.sh 3 | FF_CONFIGURE="--enable-nonfree $FF_CONFIGURE" 4 | LICENSE_FILE="" 5 | -------------------------------------------------------------------------------- /variants/linux64-nonfree.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source "$(dirname "$BASH_SOURCE")"/linux64-gpl.sh 3 | FF_CONFIGURE="--enable-nonfree $FF_CONFIGURE" 4 | LICENSE_FILE="" 5 | -------------------------------------------------------------------------------- /variants/linuxarm64-nonfree-shared.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source "$(dirname "$BASH_SOURCE")"/linuxarm64-gpl-shared.sh 3 | FF_CONFIGURE="--enable-nonfree $FF_CONFIGURE" 4 | -------------------------------------------------------------------------------- /variants/linux64-gpl-shared.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source "$(dirname "$BASH_SOURCE")"/linux-install-shared.sh 3 | source "$(dirname "$BASH_SOURCE")"/defaults-gpl-shared.sh 4 | -------------------------------------------------------------------------------- /variants/linux64-lgpl-shared.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source "$(dirname "$BASH_SOURCE")"/linux-install-shared.sh 3 | source "$(dirname "$BASH_SOURCE")"/defaults-lgpl-shared.sh 4 | -------------------------------------------------------------------------------- /variants/linuxarm64-nonfree.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source "$(dirname "$BASH_SOURCE")"/linuxarm64-gpl.sh 3 | FF_CONFIGURE="--enable-nonfree $FF_CONFIGURE" 4 | LICENSE_FILE="" 5 | -------------------------------------------------------------------------------- /variants/win32-gpl-shared.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source "$(dirname "$BASH_SOURCE")"/windows-install-shared.sh 3 | source "$(dirname "$BASH_SOURCE")"/defaults-gpl-shared.sh 4 | -------------------------------------------------------------------------------- /variants/win32-lgpl-shared.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source "$(dirname "$BASH_SOURCE")"/windows-install-shared.sh 3 | source "$(dirname "$BASH_SOURCE")"/defaults-lgpl-shared.sh 4 | -------------------------------------------------------------------------------- /variants/win64-gpl-shared.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source "$(dirname "$BASH_SOURCE")"/windows-install-shared.sh 3 | source "$(dirname "$BASH_SOURCE")"/defaults-gpl-shared.sh 4 | -------------------------------------------------------------------------------- /variants/win64-lgpl-shared.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source "$(dirname "$BASH_SOURCE")"/windows-install-shared.sh 3 | source "$(dirname "$BASH_SOURCE")"/defaults-lgpl-shared.sh 4 | -------------------------------------------------------------------------------- /variants/linuxarm64-gpl-shared.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source "$(dirname "$BASH_SOURCE")"/linux-install-shared.sh 3 | source "$(dirname "$BASH_SOURCE")"/defaults-gpl-shared.sh 4 | -------------------------------------------------------------------------------- /variants/linuxarm64-lgpl-shared.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source "$(dirname "$BASH_SOURCE")"/linux-install-shared.sh 3 | source "$(dirname "$BASH_SOURCE")"/defaults-lgpl-shared.sh 4 | -------------------------------------------------------------------------------- /variants/defaults-lgpl.sh: -------------------------------------------------------------------------------- 1 | FF_CONFIGURE="--enable-version3 --disable-debug" 2 | FF_CFLAGS="" 3 | FF_CXXFLAGS="" 4 | FF_LDFLAGS="" 5 | GIT_BRANCH="master" 6 | LICENSE_FILE="COPYING.LGPLv3" 7 | -------------------------------------------------------------------------------- /variants/defaults-gpl.sh: -------------------------------------------------------------------------------- 1 | FF_CONFIGURE="--enable-gpl --enable-version3 --disable-debug" 2 | FF_CFLAGS="" 3 | FF_CXXFLAGS="" 4 | FF_LDFLAGS="" 5 | GIT_BRANCH="master" 6 | LICENSE_FILE="COPYING.GPLv3" 7 | -------------------------------------------------------------------------------- /variants/default-install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | package_variant() { 4 | IN="$1" 5 | OUT="$2" 6 | 7 | mkdir -p "$OUT"/bin 8 | cp "$IN"/bin/* "$OUT"/bin 9 | 10 | mkdir -p "$OUT/doc" 11 | cp -r "$IN"/share/doc/ffmpeg/* "$OUT"/doc 12 | } 13 | -------------------------------------------------------------------------------- /images/base/check-wget.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -xe 3 | FNAME="$1" 4 | URL="$2" 5 | SHA512="$3" 6 | SHAFILE="${FNAME}.sha512" 7 | wget -O "${FNAME}" "${URL}" 8 | trap "rm -f ${SHAFILE}" EXIT 9 | echo "${SHA512} ${FNAME}" > "${SHAFILE}" 10 | sha512sum -c "${SHAFILE}" 11 | -------------------------------------------------------------------------------- /scripts.d/50-vaapi/99-finalize.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_SKIP="1" 4 | 5 | ffbuild_enabled() { 6 | [[ $TARGET != linux* ]] && return -1 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | rm "$FFBUILD_PREFIX"/lib/lib*.so* || true 12 | rm "$FFBUILD_PREFIX"/lib/*.la || true 13 | } 14 | -------------------------------------------------------------------------------- /images/base/git-mini-clone.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -xe 3 | REPO="$1" 4 | REF="$2" 5 | DEST="$3" 6 | git init "$DEST" 7 | git -C "$DEST" remote add origin "$REPO" 8 | 9 | retry-tool git -C "$DEST" fetch --depth=1 origin "$REF" 10 | 11 | git -C "$DEST" config advice.detachedHead false 12 | git -C "$DEST" checkout FETCH_HEAD 13 | -------------------------------------------------------------------------------- /images/base-linux64/cross.meson: -------------------------------------------------------------------------------- 1 | [binaries] 2 | c = 'x86_64-ffbuild-linux-gnu-gcc' 3 | cpp = 'x86_64-ffbuild-linux-gnu-g++' 4 | ld = 'x86_64-ffbuild-linux-gnu-ld' 5 | ar = 'x86_64-ffbuild-linux-gnu-ar' 6 | strip = 'x86_64-ffbuild-linux-gnu-strip' 7 | 8 | [host_machine] 9 | system = 'linux' 10 | cpu_family = 'x86_64' 11 | cpu = 'x86_64' 12 | endian = 'little' 13 | -------------------------------------------------------------------------------- /images/base-linuxarm64/cross.meson: -------------------------------------------------------------------------------- 1 | [binaries] 2 | c = 'aarch64-ffbuild-linux-gnu-gcc' 3 | cpp = 'aarch64-ffbuild-linux-gnu-g++' 4 | ld = 'aarch64-ffbuild-linux-gnu-ld' 5 | ar = 'aarch64-ffbuild-linux-gnu-ar' 6 | strip = 'aarch64-ffbuild-linux-gnu-strip' 7 | 8 | [host_machine] 9 | system = 'linux' 10 | cpu_family = 'aarch64' 11 | cpu = 'aarch64' 12 | endian = 'little' 13 | -------------------------------------------------------------------------------- /scripts.d/50-schannel.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_SKIP="1" 4 | 5 | ffbuild_enabled() { 6 | [[ $TARGET == win* ]] 7 | } 8 | 9 | ffbuild_dockerstage() { 10 | return 0 11 | } 12 | 13 | ffbuild_dockerbuild() { 14 | return 0 15 | } 16 | 17 | ffbuild_configure() { 18 | echo --enable-schannel 19 | } 20 | 21 | ffbuild_unconfigure() { 22 | echo --disable-schannel 23 | } 24 | -------------------------------------------------------------------------------- /images/base-win32/cross.meson: -------------------------------------------------------------------------------- 1 | [binaries] 2 | c = 'i686-w64-mingw32-gcc' 3 | cpp = 'i686-w64-mingw32-g++' 4 | ar = 'i686-w64-mingw32-ar' 5 | strip = 'i686-w64-mingw32-strip' 6 | windres = 'i686-w64-mingw32-windres' 7 | exe_wrapper = ['wine'] 8 | 9 | [properties] 10 | needs_exe_wrapper = true 11 | 12 | [host_machine] 13 | system = 'windows' 14 | cpu_family = 'i686' 15 | cpu = 'i686' 16 | endian = 'little' 17 | -------------------------------------------------------------------------------- /images/base-win64/cross.meson: -------------------------------------------------------------------------------- 1 | [binaries] 2 | c = 'x86_64-w64-mingw32-gcc' 3 | cpp = 'x86_64-w64-mingw32-g++' 4 | ar = 'x86_64-w64-mingw32-ar' 5 | strip = 'x86_64-w64-mingw32-strip' 6 | windres = 'x86_64-w64-mingw32-windres' 7 | exe_wrapper = ['wine'] 8 | 9 | [properties] 10 | needs_exe_wrapper = true 11 | 12 | [host_machine] 13 | system = 'windows' 14 | cpu_family = 'x86_64' 15 | cpu = 'x86_64' 16 | endian = 'little' 17 | -------------------------------------------------------------------------------- /images/base/retry-tool.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -xe 3 | 4 | RETRY_COUNTER=0 5 | MAX_RETRY=10 6 | CUR_TIMEOUT=120 7 | while [[ $RETRY_COUNTER -lt $MAX_RETRY ]]; do 8 | timeout $CUR_TIMEOUT "$@" && break || sleep $(shuf -i 5-90 -n 1) 9 | RETRY_COUNTER=$(( $RETRY_COUNTER + 1 )) 10 | CUR_TIMEOUT=$(( $CUR_TIMEOUT + 60 )) 11 | echo "Retry $RETRY_COUNTER..." 12 | done 13 | if [[ $RETRY_COUNTER -ge $MAX_RETRY ]]; then 14 | echo "Max retry count exceeded." 15 | exit 1 16 | fi 17 | -------------------------------------------------------------------------------- /patches/zvbi/0002-fix-static-linking.patch: -------------------------------------------------------------------------------- 1 | --- zvbi/configure.in 2013-08-28 13:52:48.000000000 +0000 2 | +++ zvbi.patched/configure.in 2016-11-02 21:25:34.292580446 +0000 3 | @@ -244,7 +244,7 @@ 4 | dnl 5 | HAVE_PNG="yes" 6 | AC_CHECK_LIB(png, png_destroy_write_struct, 7 | - LIBS="$LIBS -lpng -lz", HAVE_PNG="no", -lz -lm) 8 | + LIBS="-lpng -lz $LIBS", HAVE_PNG="no", -lz -lm) 9 | if test "x$HAVE_PNG" = xyes; then 10 | AC_DEFINE(HAVE_LIBPNG, 1, [Define if you have libpng]) 11 | fi 12 | -------------------------------------------------------------------------------- /images/base/run_stage.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -xe 3 | 4 | export RAW_CFLAGS="$CFLAGS" 5 | export RAW_CXXFLAGS="$CXXFLAGS" 6 | export RAW_LDFLAGS="$LDFLAGS" 7 | [[ -n "$STAGE_CFLAGS" ]] && export CFLAGS="$CFLAGS $STAGE_CFLAGS" 8 | [[ -n "$STAGE_CXXFLAGS" ]] && export CXXFLAGS="$CXXFLAGS $STAGE_CXXFLAGS" 9 | [[ -n "$STAGE_LDFLAGS" ]] && export LDFLAGS="$LDFLAGS $STAGE_LDFLAGS" 10 | 11 | mkdir -p /stage 12 | source "$1" 13 | cd /stage 14 | ffbuild_dockerbuild 15 | rm -rf /stage "$FFBUILD_PREFIX"/bin 16 | -------------------------------------------------------------------------------- /scripts.d/10-mingw-std-threads.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/meganz/mingw-std-threads.git" 4 | SCRIPT_COMMIT="6c2061b7da41d6aa1b2162ff4383ec3ece864bc6" 5 | 6 | ffbuild_enabled() { 7 | [[ $TARGET == win* ]] || return -1 8 | return 0 9 | } 10 | 11 | ffbuild_dockerbuild() { 12 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" mingw-std-threads 13 | cd mingw-std-threads 14 | 15 | mkdir -p "$FFBUILD_PREFIX"/include 16 | cp *.h "$FFBUILD_PREFIX"/include 17 | } 18 | -------------------------------------------------------------------------------- /images/base-win32/toolchain.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_SYSTEM_NAME Windows) 2 | set(CMAKE_SYSTEM_PROCESSOR i686) 3 | 4 | set(CMAKE_C_COMPILER i686-w64-mingw32-gcc) 5 | set(CMAKE_CXX_COMPILER i686-w64-mingw32-g++) 6 | set(CMAKE_RC_COMPILER i686-w64-mingw32-windres) 7 | set(CMAKE_RANLIB i686-w64-mingw32-ranlib) 8 | 9 | set(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32 /opt/ffbuild) 10 | 11 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 12 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 13 | set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 14 | -------------------------------------------------------------------------------- /images/base-linux64/gen-implib.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | if [[ $# != 2 ]]; then 4 | echo "Invalid arguments" 5 | exit 1 6 | fi 7 | IN="$1" 8 | OUT="$2" 9 | 10 | TMPDIR="$(mktemp -d)" 11 | trap "rm -rf '$TMPDIR'" EXIT 12 | cd "$TMPDIR" 13 | 14 | set -x 15 | python3 /opt/implib/implib-gen.py --target x86_64-linux-gnu --dlopen --lazy-load --verbose "$IN" 16 | ${FFBUILD_CROSS_PREFIX}gcc $CFLAGS $STAGE_CFLAGS -DIMPLIB_HIDDEN_SHIMS -c *.tramp.S *.init.c 17 | ${FFBUILD_CROSS_PREFIX}ar -rcs "$OUT" *.tramp.o *.init.o 18 | -------------------------------------------------------------------------------- /images/base-linuxarm64/gen-implib.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | if [[ $# != 2 ]]; then 4 | echo "Invalid arguments" 5 | exit 1 6 | fi 7 | IN="$1" 8 | OUT="$2" 9 | 10 | TMPDIR="$(mktemp -d)" 11 | trap "rm -rf '$TMPDIR'" EXIT 12 | cd "$TMPDIR" 13 | 14 | set -x 15 | python3 /opt/implib/implib-gen.py --target aarch64-linux-gnu --dlopen --lazy-load --verbose "$IN" 16 | ${FFBUILD_CROSS_PREFIX}gcc $CFLAGS $STAGE_CFLAGS -DIMPLIB_HIDDEN_SHIMS -c *.tramp.S *.init.c 17 | ${FFBUILD_CROSS_PREFIX}ar -rcs "$OUT" *.tramp.o *.init.o 18 | -------------------------------------------------------------------------------- /images/base-win64/toolchain.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_SYSTEM_NAME Windows) 2 | set(CMAKE_SYSTEM_PROCESSOR x86_64) 3 | 4 | set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc) 5 | set(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++) 6 | set(CMAKE_RC_COMPILER x86_64-w64-mingw32-windres) 7 | set(CMAKE_RANLIB x86_64-w64-mingw32-ranlib) 8 | 9 | set(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32 /opt/ffbuild) 10 | 11 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 12 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 13 | set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 14 | -------------------------------------------------------------------------------- /scripts.d/45-x11/99-finalize.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_SKIP="1" 4 | 5 | ffbuild_enabled() { 6 | [[ $TARGET != linux* ]] && return -1 7 | return 0 8 | } 9 | 10 | ffbuild_dockerlayer() { 11 | to_df "COPY --from=${SELFLAYER} \$FFBUILD_PREFIX/. \$FFBUILD_PREFIX" 12 | to_df "COPY --from=${SELFLAYER} \$FFBUILD_PREFIX/share/aclocal/. /usr/share/aclocal" 13 | } 14 | 15 | ffbuild_dockerbuild() { 16 | rm "$FFBUILD_PREFIX"/lib/lib*.so* || true 17 | rm "$FFBUILD_PREFIX"/lib/*.la || true 18 | } 19 | 20 | ffbuild_libs() { 21 | echo -ldl 22 | } 23 | -------------------------------------------------------------------------------- /scripts.d/50-amf.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/GPUOpen-LibrariesAndSDKs/AMF.git" 4 | SCRIPT_COMMIT="9f558757af85029541110139586c35f8d4c6b2ad" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" amf 12 | cd amf 13 | 14 | mkdir -p "$FFBUILD_PREFIX"/include 15 | mv amf/public/include "$FFBUILD_PREFIX"/include/AMF 16 | } 17 | 18 | ffbuild_configure() { 19 | echo --enable-amf 20 | } 21 | 22 | ffbuild_unconfigure() { 23 | echo --disable-amf 24 | } 25 | -------------------------------------------------------------------------------- /images/base-linux64/toolchain.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_SYSTEM_NAME Linux) 2 | set(CMAKE_SYSTEM_PROCESSOR x86_64) 3 | 4 | set(triple x86_64-ffbuild-linux-gnu) 5 | 6 | set(CMAKE_C_COMPILER ${triple}-gcc) 7 | set(CMAKE_CXX_COMPILER ${triple}-g++) 8 | set(CMAKE_RANLIB ${triple}-ranlib) 9 | set(CMAKE_AR ${triple}-ar) 10 | 11 | set(CMAKE_SYSROOT /opt/ct-ng/${triple}/sysroot) 12 | set(CMAKE_FIND_ROOT_PATH /opt/ct-ng /opt/ct-ng/${triple}/sysroot /opt/ffbuild) 13 | 14 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 15 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 16 | set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 17 | -------------------------------------------------------------------------------- /images/base-linuxarm64/toolchain.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_SYSTEM_NAME Linux) 2 | set(CMAKE_SYSTEM_PROCESSOR aarch64) 3 | 4 | set(triple aarch64-ffbuild-linux-gnu) 5 | 6 | set(CMAKE_C_COMPILER ${triple}-gcc) 7 | set(CMAKE_CXX_COMPILER ${triple}-g++) 8 | set(CMAKE_RANLIB ${triple}-ranlib) 9 | set(CMAKE_AR ${triple}-ar) 10 | 11 | set(CMAKE_SYSROOT /opt/ct-ng/${triple}/sysroot) 12 | set(CMAKE_FIND_ROOT_PATH /opt/ct-ng /opt/ct-ng/${triple}/sysroot /opt/ffbuild) 13 | 14 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 15 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 16 | set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 17 | -------------------------------------------------------------------------------- /patches/zvbi/0001-ioctl.patch: -------------------------------------------------------------------------------- 1 | diff -ru zvbi.orig/contrib/ntsc-cc.c zvbi/contrib/ntsc-cc.c 2 | --- zvbi.orig/contrib/ntsc-cc.c 2011-11-06 11:22:47.000000000 +0200 3 | +++ zvbi/contrib/ntsc-cc.c 2011-11-06 11:29:04.000000000 +0200 4 | @@ -32,7 +32,6 @@ 5 | #include 6 | #include 7 | #include 8 | -#include 9 | #include 10 | #include 11 | #ifdef HAVE_GETOPT_LONG 12 | @@ -44,6 +43,7 @@ 13 | #include "src/libzvbi.h" 14 | 15 | #ifdef ENABLE_V4L2 16 | +# include 17 | # include 18 | # include "src/videodev2k.h" 19 | #endif 20 | -------------------------------------------------------------------------------- /scripts.d/99-rpath.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_SKIP="1" 4 | 5 | ffbuild_enabled() { 6 | [[ $TARGET == linux* ]] 7 | } 8 | 9 | ffbuild_dockerfinal() { 10 | return 0 11 | } 12 | 13 | ffbuild_dockerlayer() { 14 | return 0 15 | } 16 | 17 | ffbuild_dockerstage() { 18 | return 0 19 | } 20 | 21 | ffbuild_dockerbuild() { 22 | return 0 23 | } 24 | 25 | ffbuild_ldexeflags() { 26 | echo '-pie' 27 | 28 | if [[ $VARIANT == *shared* ]]; then 29 | # Can't escape escape hell 30 | echo -Wl,-rpath='\\\\\\\$\\\$ORIGIN' 31 | echo -Wl,-rpath='\\\\\\\$\\\$ORIGIN/../lib' 32 | fi 33 | } 34 | -------------------------------------------------------------------------------- /scripts.d/45-libsamplerate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/libsndfile/libsamplerate.git" 4 | SCRIPT_COMMIT="aee38d0bc797d0d1a3774ef574af1d5d248d2398" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" libsr 12 | cd libsr 13 | 14 | mkdir build 15 | cd build 16 | 17 | cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" -DBUILD_SHARED_LIBS=NO -DBUILD_TESTING=NO -DLIBSAMPLERATE_EXAMPLES=OFF -DLIBSAMPLERATE_INSTALL=YES .. 18 | make -j$(nproc) 19 | make install 20 | } 21 | -------------------------------------------------------------------------------- /scripts.d/50-ffnvcodec.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/FFmpeg/nv-codec-headers.git" 4 | SCRIPT_COMMIT="3ed7c9a0a2c0b698b83088e13008f3ec983219b2" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" ffnvcodec 12 | cd ffnvcodec 13 | 14 | make PREFIX="$FFBUILD_PREFIX" install 15 | } 16 | 17 | ffbuild_configure() { 18 | echo --enable-ffnvcodec --enable-cuda-llvm 19 | } 20 | 21 | ffbuild_unconfigure() { 22 | echo --disable-ffnvcodec --disable-cuda-llvm 23 | } 24 | 25 | ffbuild_cflags() { 26 | return 0 27 | } 28 | 29 | ffbuild_ldflags() { 30 | return 0 31 | } 32 | -------------------------------------------------------------------------------- /variants/linux-install-shared.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | package_variant() { 4 | IN="$1" 5 | OUT="$2" 6 | 7 | mkdir -p "$OUT"/bin 8 | cp "$IN"/bin/* "$OUT"/bin 9 | 10 | mkdir -p "$OUT"/lib 11 | cp -a "$IN"/lib/*.so* "$OUT"/lib 12 | 13 | mkdir -p "$OUT"/lib/pkgconfig 14 | cp -a "$IN"/lib/pkgconfig/*.pc "$OUT"/lib/pkgconfig 15 | sed -i \ 16 | -e 's|^prefix=.*|prefix=${pcfiledir}/../..|' \ 17 | -e 's|/ffbuild/prefix|${prefix}|' \ 18 | -e '/Libs.private:/d' \ 19 | "$OUT"/lib/pkgconfig/*.pc 20 | 21 | mkdir -p "$OUT"/include 22 | cp -r "$IN"/include/* "$OUT"/include 23 | 24 | mkdir -p "$OUT"/doc 25 | cp -r "$IN"/share/doc/ffmpeg/* "$OUT"/doc 26 | } 27 | -------------------------------------------------------------------------------- /scripts.d/10-xorg-macros.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://gitlab.freedesktop.org/xorg/util/macros.git" 4 | SCRIPT_COMMIT="0326ba3c4caa34116c0e7e4af98661858cf25d1c" 5 | 6 | ffbuild_enabled() { 7 | [[ $TARGET != linux* ]] && return -1 8 | return 0 9 | } 10 | 11 | ffbuild_dockerlayer() { 12 | to_df "COPY --from=${SELFLAYER} \$FFBUILD_PREFIX/. \$FFBUILD_PREFIX" 13 | to_df "COPY --from=${SELFLAYER} \$FFBUILD_PREFIX/share/aclocal/. /usr/share/aclocal" 14 | } 15 | 16 | ffbuild_dockerbuild() { 17 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" xorg-macros 18 | cd xorg-macros 19 | 20 | autoreconf -i 21 | ./configure --prefix="$FFBUILD_PREFIX" 22 | make -j"$(nproc)" 23 | make install 24 | } 25 | -------------------------------------------------------------------------------- /scripts.d/50-gme.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://bitbucket.org/mpyne/game-music-emu.git" 4 | SCRIPT_COMMIT="6cd4bdb69be304f58c9253fb08b8362f541b3b4b" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git clone "$SCRIPT_REPO" gme 12 | cd gme 13 | git checkout "$SCRIPT_COMMIT" 14 | 15 | mkdir build && cd build 16 | 17 | cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" -DBUILD_SHARED_LIBS=OFF -DENABLE_UBSAN=OFF .. 18 | make -j$(nproc) 19 | make install 20 | } 21 | 22 | ffbuild_configure() { 23 | echo --enable-libgme 24 | } 25 | 26 | ffbuild_unconfigure() { 27 | echo --disable-libgme 28 | } 29 | -------------------------------------------------------------------------------- /scripts.d/50-avisynth.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/AviSynth/AviSynthPlus.git" 4 | SCRIPT_COMMIT="f26fab3120a71c712238d6ec2f5469db65cc24a3" 5 | 6 | ffbuild_enabled() { 7 | [[ $VARIANT == lgpl* ]] && return -1 8 | return 0 9 | } 10 | 11 | ffbuild_dockerbuild() { 12 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" avisynth 13 | cd avisynth 14 | 15 | mkdir build && cd build 16 | 17 | cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" -DHEADERS_ONLY=ON .. 18 | make -j$(nproc) 19 | make VersionGen install 20 | } 21 | 22 | ffbuild_configure() { 23 | echo --enable-avisynth 24 | } 25 | 26 | ffbuild_unconfigure() { 27 | echo --disable-avisynth 28 | } 29 | -------------------------------------------------------------------------------- /variants/windows-install-shared.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | package_variant() { 4 | IN="$1" 5 | OUT="$2" 6 | 7 | mkdir -p "$OUT"/bin 8 | cp "$IN"/bin/*.{exe,dll} "$OUT"/bin 9 | 10 | mkdir -p "$OUT"/lib 11 | cp "$IN"/bin/*.lib "$OUT"/lib 12 | cp "$IN"/lib/*.{def,dll.a} "$OUT"/lib 13 | 14 | mkdir -p "$OUT"/lib/pkgconfig 15 | cp -a "$IN"/lib/pkgconfig/*.pc "$OUT"/lib/pkgconfig 16 | sed -i \ 17 | -e 's|^prefix=.*|prefix=${pcfiledir}/../..|' \ 18 | -e 's|/ffbuild/prefix|${prefix}|' \ 19 | -e '/Libs.private:/d' \ 20 | "$OUT"/lib/pkgconfig/*.pc 21 | 22 | mkdir -p "$OUT"/include 23 | cp -r "$IN"/include/* "$OUT"/include 24 | 25 | mkdir -p "$OUT"/doc 26 | cp -r "$IN"/share/doc/ffmpeg/* "$OUT"/doc 27 | } 28 | -------------------------------------------------------------------------------- /scripts.d/50-uavs3d.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/uavs3/uavs3d.git" 4 | SCRIPT_COMMIT="0133ee4b4bbbef7b88802e7ad019b14b9b852c2b" 5 | 6 | ffbuild_enabled() { 7 | [[ $TARGET == win32 ]] && return -1 8 | return 0 9 | } 10 | 11 | ffbuild_dockerbuild() { 12 | git clone "$SCRIPT_REPO" uavs3d 13 | cd uavs3d 14 | git checkout "$SCRIPT_COMMIT" 15 | 16 | mkdir build/linux 17 | cd build/linux 18 | 19 | cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" -DBUILD_SHARED_LIBS=NO ../.. 20 | make -j$(nproc) 21 | make install 22 | } 23 | 24 | ffbuild_configure() { 25 | echo --enable-libuavs3d 26 | } 27 | 28 | ffbuild_unconfigure() { 29 | echo --disable-libuavs3d 30 | } 31 | -------------------------------------------------------------------------------- /scripts.d/45-x11/10-xproto.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://gitlab.freedesktop.org/xorg/proto/xorgproto.git" 4 | SCRIPT_COMMIT="ae81c3c694b7cc0a810e55eb5d410dc8e7f55e21" 5 | 6 | ffbuild_enabled() { 7 | [[ $TARGET != linux* ]] && return -1 8 | return 0 9 | } 10 | 11 | ffbuild_dockerbuild() { 12 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" xproto 13 | cd xproto 14 | 15 | autoreconf -i 16 | 17 | local myconf=( 18 | --prefix="$FFBUILD_PREFIX" 19 | ) 20 | 21 | if [[ $TARGET == linux* ]]; then 22 | myconf+=( 23 | --host="$FFBUILD_TOOLCHAIN" 24 | ) 25 | else 26 | echo "Unknown target" 27 | return -1 28 | fi 29 | 30 | ./configure "${myconf[@]}" 31 | make -j$(nproc) 32 | make install 33 | } 34 | -------------------------------------------------------------------------------- /scripts.d/45-x11/10-xcbproto.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://gitlab.freedesktop.org/xorg/proto/xcbproto.git" 4 | SCRIPT_COMMIT="0d440c579b0f364bd655d97d1976d4eeddecf488" 5 | 6 | ffbuild_enabled() { 7 | [[ $TARGET != linux* ]] && return -1 8 | return 0 9 | } 10 | 11 | ffbuild_dockerbuild() { 12 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" xcbproto 13 | cd xcbproto 14 | 15 | autoreconf -i 16 | 17 | local myconf=( 18 | --prefix="$FFBUILD_PREFIX" 19 | ) 20 | 21 | if [[ $TARGET == linux* ]]; then 22 | myconf+=( 23 | --host="$FFBUILD_TOOLCHAIN" 24 | ) 25 | else 26 | echo "Unknown target" 27 | return -1 28 | fi 29 | 30 | ./configure "${myconf[@]}" 31 | make -j$(nproc) 32 | make install 33 | } 34 | -------------------------------------------------------------------------------- /scripts.d/50-openjpeg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/uclouvain/openjpeg.git" 4 | SCRIPT_COMMIT="be95561917aa9b1d8ea4614820a534917cfa6bbe" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" openjpeg 12 | cd openjpeg 13 | 14 | mkdir build && cd build 15 | 16 | cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" -DBUILD_SHARED_LIBS=OFF -DBUILD_PKGCONFIG_FILES=ON -DBUILD_CODEC=OFF -DWITH_ASTYLE=OFF -DBUILD_TESTING=OFF .. 17 | make -j$(nproc) 18 | make install 19 | } 20 | 21 | ffbuild_configure() { 22 | echo --enable-libopenjpeg 23 | } 24 | 25 | ffbuild_unconfigure() { 26 | echo --disable-libopenjpeg 27 | } 28 | -------------------------------------------------------------------------------- /scripts.d/25-libogg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/xiph/ogg.git" 4 | SCRIPT_COMMIT="3069cc2bb44160982cdb21b2b8f0660c76b17572" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" ogg 12 | cd ogg 13 | 14 | ./autogen.sh 15 | 16 | local myconf=( 17 | --prefix="$FFBUILD_PREFIX" 18 | --disable-shared 19 | --enable-static 20 | --with-pic 21 | ) 22 | 23 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 24 | myconf+=( 25 | --host="$FFBUILD_TOOLCHAIN" 26 | ) 27 | else 28 | echo "Unknown target" 29 | return -1 30 | fi 31 | 32 | ./configure "${myconf[@]}" 33 | make -j$(nproc) 34 | make install 35 | } 36 | -------------------------------------------------------------------------------- /patches/aribb24/13.patch: -------------------------------------------------------------------------------- 1 | From facc51923d43f26dec09a9391566de7cba29f8db Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?Jan=20Ekstr=C3=B6m?= 3 | Date: Sun, 17 Feb 2019 22:42:31 +0200 4 | Subject: [PATCH] decoder: reset control_time when finalizing decoder 5 | 6 | This way finalize_decoder() can properly be utilized as a flush 7 | function. 8 | --- 9 | src/decoder.c | 1 + 10 | 1 file changed, 1 insertion(+) 11 | 12 | diff --git a/src/decoder.c b/src/decoder.c 13 | index 2b77f38..24c0f06 100644 14 | --- a/src/decoder.c 15 | +++ b/src/decoder.c 16 | @@ -1506,6 +1506,7 @@ void arib_finalize_decoder( arib_decoder_t* decoder ) 17 | free( p_region ); 18 | } 19 | decoder->p_region = NULL; 20 | + decoder->i_control_time = 0; 21 | } 22 | 23 | size_t arib_decode_buffer( arib_decoder_t* decoder, 24 | -------------------------------------------------------------------------------- /scripts.d/50-svtav1.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://gitlab.com/AOMediaCodec/SVT-AV1.git" 4 | SCRIPT_COMMIT="02b12fdb6353993b088b63fa04c2dd2b71fbb1b5" 5 | 6 | ffbuild_enabled() { 7 | [[ $TARGET == win32 ]] && return -1 8 | return 0 9 | } 10 | 11 | ffbuild_dockerbuild() { 12 | git clone "$SCRIPT_REPO" svtav1 13 | cd svtav1 14 | git checkout "$SCRIPT_COMMIT" 15 | 16 | mkdir build && cd build 17 | 18 | cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF -DBUILD_APPS=OFF .. 19 | make -j$(nproc) 20 | make install 21 | } 22 | 23 | ffbuild_configure() { 24 | echo --enable-libsvtav1 25 | } 26 | 27 | ffbuild_unconfigure() { 28 | echo --disable-libsvtav1 29 | } 30 | -------------------------------------------------------------------------------- /scripts.d/45-harfbuzz.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/harfbuzz/harfbuzz.git" 4 | SCRIPT_COMMIT="99f4668e1969a0a688044433803b3e7797391688" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" harfbuzz 12 | cd harfbuzz 13 | 14 | local myconf=( 15 | --prefix="$FFBUILD_PREFIX" 16 | --disable-shared 17 | --enable-static 18 | --with-pic 19 | ) 20 | 21 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 22 | myconf+=( 23 | --host="$FFBUILD_TOOLCHAIN" 24 | ) 25 | else 26 | echo "Unknown target" 27 | return -1 28 | fi 29 | 30 | export LIBS="-lpthread" 31 | 32 | ./autogen.sh "${myconf[@]}" 33 | make -j$(nproc) 34 | make install 35 | } 36 | -------------------------------------------------------------------------------- /scripts.d/50-librist/40-mbedtls.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/ARMmbed/mbedtls.git" 4 | SCRIPT_COMMIT="v3.2.1" 5 | SCRIPT_TAGFILTER="v3.*" 6 | 7 | ffbuild_enabled() { 8 | return 0 9 | } 10 | 11 | ffbuild_dockerbuild() { 12 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" mbedtls 13 | cd mbedtls 14 | 15 | mkdir build && cd build 16 | 17 | cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" \ 18 | -DENABLE_PROGRAMS=OFF -DENABLE_TESTING=OFF -DGEN_FILES=ON \ 19 | -DUSE_STATIC_MBEDTLS_LIBRARY=ON -DUSE_SHARED_MBEDTLS_LIBRARY=OFF -DINSTALL_MBEDTLS_HEADERS=ON \ 20 | .. 21 | make -j$(nproc) 22 | make install 23 | } 24 | 25 | ffbuild_configure() { 26 | [[ $TARGET == win* ]] && return -1 27 | echo --enable-mbedtls 28 | } 29 | -------------------------------------------------------------------------------- /patches/aom/0001-Fall-back-to-built-in-vmaf-model-on-load-failure.patch: -------------------------------------------------------------------------------- 1 | From cc9db1c519dc00966ba8d8cdb4328698dfff9f80 Mon Sep 17 00:00:00 2001 2 | From: BtbN 3 | Date: Thu, 15 Apr 2021 21:38:32 +0200 4 | Subject: [PATCH] Fall back to built-in vmaf model on load failure 5 | 6 | --- 7 | aom_dsp/vmaf.c | 1 + 8 | 1 file changed, 1 insertion(+) 9 | 10 | diff --git a/aom_dsp/vmaf.c b/aom_dsp/vmaf.c 11 | index 219e27830..6625f05c1 100644 12 | --- a/aom_dsp/vmaf.c 13 | +++ b/aom_dsp/vmaf.c 14 | @@ -37,6 +37,7 @@ void aom_init_vmaf_model(VmafModel **vmaf_model, const char *model_path) { 15 | model_cfg.name = "vmaf"; 16 | 17 | if (vmaf_model_load_from_path(vmaf_model, &model_cfg, model_path)) { 18 | + if (vmaf_model_load(vmaf_model, &model_cfg, "vmaf_v0.6.1")) 19 | vmaf_fatal_error("Failed to load VMAF model."); 20 | } 21 | } 22 | -- 23 | 2.25.1 24 | 25 | -------------------------------------------------------------------------------- /scripts.d/20-zlib.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/madler/zlib.git" 4 | SCRIPT_COMMIT="21767c654d31d2dccdde4330529775c6c5fd5389" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" zlib 12 | cd zlib 13 | 14 | local myconf=( 15 | --prefix="$FFBUILD_PREFIX" 16 | --static 17 | ) 18 | 19 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 20 | export CC="${FFBUILD_CROSS_PREFIX}gcc" 21 | export AR="${FFBUILD_CROSS_PREFIX}ar" 22 | else 23 | echo "Unknown target" 24 | return -1 25 | fi 26 | 27 | ./configure "${myconf[@]}" 28 | make -j$(nproc) 29 | make install 30 | } 31 | 32 | ffbuild_configure() { 33 | echo --enable-zlib 34 | } 35 | 36 | ffbuild_unconfigure() { 37 | echo --disable-zlib 38 | } 39 | -------------------------------------------------------------------------------- /scripts.d/50-lilv/98-sratom.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/lv2/sratom.git" 4 | SCRIPT_COMMIT="482374c4e4f9fee9477ee53b8fa6d51d5602f3cd" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" sratom 12 | cd sratom 13 | 14 | mkdir build && cd build 15 | 16 | local myconf=( 17 | --prefix="$FFBUILD_PREFIX" 18 | --buildtype=release 19 | --default-library=static 20 | -Ddocs=disabled 21 | -Dtests=disabled 22 | ) 23 | 24 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 25 | myconf+=( 26 | --cross-file=/cross.meson 27 | ) 28 | else 29 | echo "Unknown target" 30 | return -1 31 | fi 32 | 33 | meson "${myconf[@]}" .. 34 | ninja -j"$(nproc)" 35 | ninja install 36 | } 37 | -------------------------------------------------------------------------------- /scripts.d/50-srt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/Haivision/srt.git" 4 | SCRIPT_COMMIT="1b20a48ce1617c4a36220d173191065210ee65e1" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" srt 12 | cd srt 13 | 14 | mkdir build && cd build 15 | 16 | cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" \ 17 | -DENABLE_SHARED=OFF -DENABLE_STATIC=ON -DENABLE_CXX_DEPS=ON -DUSE_STATIC_LIBSTDCXX=ON -DENABLE_ENCRYPTION=ON -DENABLE_APPS=OFF .. 18 | make -j$(nproc) 19 | make install 20 | 21 | echo "Libs.private: -lstdc++" >> "$FFBUILD_PREFIX"/lib/pkgconfig/srt.pc 22 | } 23 | 24 | ffbuild_configure() { 25 | echo --enable-libsrt 26 | } 27 | 28 | ffbuild_unconfigure() { 29 | echo --disable-libsrt 30 | } 31 | -------------------------------------------------------------------------------- /scripts.d/50-aribb24/25-libpng.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/glennrp/libpng.git" 4 | SCRIPT_COMMIT="12222e6fbdc90523be77633ed430144cfee22772" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" libpng 12 | cd libpng 13 | 14 | autoreconf -i 15 | 16 | local myconf=( 17 | --prefix="$FFBUILD_PREFIX" 18 | --disable-shared 19 | --enable-static 20 | --with-pic 21 | ) 22 | 23 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 24 | myconf+=( 25 | --host="$FFBUILD_TOOLCHAIN" 26 | ) 27 | else 28 | echo "Unknown target" 29 | return -1 30 | fi 31 | 32 | export CPPFLAGS="$CPPFLAGS -I$FFBUILD_PREFIX/include" 33 | 34 | ./configure "${myconf[@]}" 35 | make -j$(nproc) 36 | make install 37 | } 38 | -------------------------------------------------------------------------------- /patches/zvbi/0004-fix-clang-support.patch: -------------------------------------------------------------------------------- 1 | diff -ru zvbi/src/misc.h zvbi-fixed/src/misc.h 2 | --- zvbi/src/misc.h 2013-07-02 04:32:31.000000000 +0200 3 | +++ zvbi-fixed/src/misc.h 2013-08-08 21:37:22.000000000 +0200 4 | @@ -52,17 +52,6 @@ 5 | # define unlikely(expr) __builtin_expect(expr, 0) 6 | #endif 7 | 8 | -#undef __i386__ 9 | -#undef __i686__ 10 | -/* FIXME #cpu is deprecated 11 | -#if #cpu (i386) 12 | -# define __i386__ 1 13 | -#endif 14 | -#if #cpu (i686) 15 | -# define __i686__ 1 16 | -#endif 17 | -*/ 18 | - 19 | /* &x == PARENT (&x.tm_min, struct tm, tm_min), 20 | safer than &x == (struct tm *) &x.tm_min. A NULL _ptr is safe and 21 | will return NULL, not -offsetof(_member). */ 22 | @@ -156,8 +145,6 @@ 23 | 24 | #define likely(expr) (expr) 25 | #define unlikely(expr) (expr) 26 | -#undef __i386__ 27 | -#undef __i686__ 28 | 29 | static char * 30 | PARENT_HELPER (char *p, unsigned int offset) 31 | -------------------------------------------------------------------------------- /scripts.d/50-lilv/96-serd.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/drobilla/serd.git" 4 | SCRIPT_COMMIT="1a8312b6cc119788ea0d3f4e6ebf3a2ae2a3075f" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" serd 12 | cd serd 13 | 14 | mkdir build && cd build 15 | 16 | local myconf=( 17 | --prefix="$FFBUILD_PREFIX" 18 | --buildtype=release 19 | --default-library=static 20 | -Ddocs=disabled 21 | -Dtools=disabled 22 | -Dtests=disabled 23 | ) 24 | 25 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 26 | myconf+=( 27 | --cross-file=/cross.meson 28 | ) 29 | else 30 | echo "Unknown target" 31 | return -1 32 | fi 33 | 34 | meson "${myconf[@]}" .. 35 | ninja -j"$(nproc)" 36 | ninja install 37 | } 38 | -------------------------------------------------------------------------------- /scripts.d/50-lilv/97-sord.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/drobilla/sord.git" 4 | SCRIPT_COMMIT="d877d78c98d90fbf57136bb73919524e618fd859" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" sord 12 | cd sord 13 | 14 | mkdir build && cd build 15 | 16 | local myconf=( 17 | --prefix="$FFBUILD_PREFIX" 18 | --buildtype=release 19 | --default-library=static 20 | -Ddocs=disabled 21 | -Dtools=disabled 22 | -Dtests=disabled 23 | ) 24 | 25 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 26 | myconf+=( 27 | --cross-file=/cross.meson 28 | ) 29 | else 30 | echo "Unknown target" 31 | return -1 32 | fi 33 | 34 | meson "${myconf[@]}" .. 35 | ninja -j"$(nproc)" 36 | ninja install 37 | } 38 | -------------------------------------------------------------------------------- /scripts.d/45-libudfread.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://code.videolan.org/videolan/libudfread.git" 4 | SCRIPT_COMMIT="b3e6936a23f8af30a0be63d88f4695bdc0ea26e1" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" libudfread 12 | cd libudfread 13 | 14 | ./bootstrap 15 | 16 | local myconf=( 17 | --prefix="$FFBUILD_PREFIX" 18 | --disable-shared 19 | --enable-static 20 | --with-pic 21 | ) 22 | 23 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 24 | myconf+=( 25 | --host="$FFBUILD_TOOLCHAIN" 26 | ) 27 | else 28 | echo "Unknown target" 29 | return -1 30 | fi 31 | 32 | ./configure "${myconf[@]}" 33 | make -j$(nproc) 34 | make install 35 | 36 | ln -s libudfread.pc "$FFBUILD_PREFIX"/lib/pkgconfig/udfread.pc 37 | } 38 | -------------------------------------------------------------------------------- /scripts.d/50-lilv/96-lv2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/lv2/lv2.git" 4 | SCRIPT_COMMIT="3a3da7a493507655b4d6f83878692280b48a8579" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" lv2 12 | cd lv2 13 | 14 | mkdir build && cd build 15 | 16 | local myconf=( 17 | --prefix="$FFBUILD_PREFIX" 18 | --buildtype=release 19 | --default-library=static 20 | -Ddocs=disabled 21 | -Dplugins=disabled 22 | -Dtests=disabled 23 | -Donline_docs=false 24 | ) 25 | 26 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 27 | myconf+=( 28 | --cross-file=/cross.meson 29 | ) 30 | else 31 | echo "Unknown target" 32 | return -1 33 | fi 34 | 35 | meson "${myconf[@]}" .. 36 | ninja -j"$(nproc)" 37 | ninja install 38 | } 39 | -------------------------------------------------------------------------------- /util/prunetags.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | git fetch --tags 4 | TAGS=( $(git tag -l "autobuild-*" | sort -r) ) 5 | 6 | KEEP_LATEST=14 7 | KEEP_MONTHLY=24 8 | 9 | LATEST_TAGS=() 10 | MONTHLY_TAGS=() 11 | 12 | CUR_MONTH="-1" 13 | 14 | for TAG in ${TAGS[@]}; do 15 | if [[ ${#LATEST_TAGS[@]} -lt ${KEEP_LATEST} ]]; then 16 | LATEST_TAGS+=( "$TAG" ) 17 | fi 18 | 19 | if [[ ${#MONTHLY_TAGS[@]} -lt ${KEEP_MONTHLY} ]]; then 20 | TAG_MONTH="$(echo $TAG | cut -d- -f3)" 21 | 22 | if [[ ${TAG_MONTH} != ${CUR_MONTH} ]]; then 23 | CUR_MONTH="${TAG_MONTH}" 24 | MONTHLY_TAGS+=( "$TAG" ) 25 | fi 26 | fi 27 | done 28 | 29 | for TAG in ${LATEST_TAGS[@]} ${MONTHLY_TAGS[@]}; do 30 | TAGS=( "${TAGS[@]/$TAG}" ) 31 | done 32 | 33 | for TAG in ${TAGS[@]}; do 34 | echo "Deleting ${TAG}" 35 | hub release delete "${TAG}" 36 | git tag -d "${TAG}" 37 | done 38 | 39 | git push --tags --prune 40 | -------------------------------------------------------------------------------- /patches/zvbi/0000-ssize_max.patch: -------------------------------------------------------------------------------- 1 | Linear memory extents over SSIZE_MAX are undefined, so there is no 2 | point in protecting against them. 3 | diff -ru zvbi.orig/src/export.c zvbi/src/export.c 4 | --- zvbi.orig/src/export.c 2011-11-06 11:22:47.000000000 +0200 5 | +++ zvbi/src/export.c 2011-11-06 11:27:39.000000000 +0200 6 | @@ -1076,8 +1076,6 @@ 7 | size_t count; 8 | 9 | count = src_size; 10 | - if (unlikely (src_size > SSIZE_MAX)) 11 | - count = SSIZE_MAX & -4096; 12 | 13 | for (retry = 10;; --retry) { 14 | actual = write (e->_handle.fd, src, count); 15 | @@ -1632,12 +1630,7 @@ 16 | free (e->buffer.data); 17 | } 18 | 19 | - if (unlikely (e->buffer.offset > (size_t) SSIZE_MAX)) { 20 | - errno = EOVERFLOW; 21 | - actual = -1; /* failed */ 22 | - } else { 23 | - actual = e->buffer.offset; 24 | - } 25 | + actual = e->buffer.offset; 26 | } else { 27 | if (VBI_EXPORT_TARGET_ALLOC == e->target) 28 | free (e->buffer.data); 29 | -------------------------------------------------------------------------------- /scripts.d/50-soxr.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://git.code.sf.net/p/soxr/code" 4 | SCRIPT_COMMIT="945b592b70470e29f917f4de89b4281fbbd540c0" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" soxr 12 | cd soxr 13 | 14 | mkdir build && cd build 15 | 16 | cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" -DWITH_OPENMP=ON -DBUILD_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_SHARED_LIBS=OFF .. 17 | make -j$(nproc) 18 | make install 19 | 20 | echo "Libs.private: -lgomp" >> "$FFBUILD_PREFIX"/lib/pkgconfig/soxr.pc 21 | } 22 | 23 | ffbuild_configure() { 24 | echo --enable-libsoxr 25 | } 26 | 27 | ffbuild_unconfigure() { 28 | echo --disable-libsoxr 29 | } 30 | 31 | ffbuild_ldflags() { 32 | echo -pthread 33 | } 34 | 35 | ffbuild_libs() { 36 | echo -lgomp 37 | } 38 | -------------------------------------------------------------------------------- /scripts.d/45-x11/10-xtrans.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://gitlab.freedesktop.org/xorg/lib/libxtrans.git" 4 | SCRIPT_COMMIT="c761c6505d49e8381a3eae94f2e5e118cbdf6487" 5 | 6 | ffbuild_enabled() { 7 | [[ $TARGET != linux* ]] && return -1 8 | return 0 9 | } 10 | 11 | ffbuild_dockerbuild() { 12 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" libxtrans 13 | cd libxtrans 14 | 15 | autoreconf -i 16 | 17 | local myconf=( 18 | --prefix="$FFBUILD_PREFIX" 19 | --without-xmlto 20 | --without-fop 21 | --without-xsltproc 22 | ) 23 | 24 | if [[ $TARGET == linux* ]]; then 25 | myconf+=( 26 | --host="$FFBUILD_TOOLCHAIN" 27 | ) 28 | else 29 | echo "Unknown target" 30 | return -1 31 | fi 32 | 33 | ./configure "${myconf[@]}" 34 | make -j$(nproc) 35 | make install 36 | 37 | cp -r "$FFBUILD_PREFIX"/share/aclocal/. /usr/share/aclocal 38 | } 39 | -------------------------------------------------------------------------------- /scripts.d/50-libass.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/libass/libass.git" 4 | SCRIPT_COMMIT="44f6532daf5eb13cb1aa95f5449a77b5df1dd85b" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" ass 12 | cd ass 13 | 14 | ./autogen.sh 15 | 16 | local myconf=( 17 | --prefix="$FFBUILD_PREFIX" 18 | --disable-shared 19 | --enable-static 20 | --with-pic 21 | ) 22 | 23 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 24 | myconf+=( 25 | --host="$FFBUILD_TOOLCHAIN" 26 | ) 27 | else 28 | echo "Unknown target" 29 | return -1 30 | fi 31 | 32 | ./configure "${myconf[@]}" 33 | make -j$(nproc) 34 | make install 35 | } 36 | 37 | ffbuild_configure() { 38 | echo --enable-libass 39 | } 40 | 41 | ffbuild_unconfigure() { 42 | echo --disable-libass 43 | } 44 | -------------------------------------------------------------------------------- /scripts.d/50-dav1d.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://code.videolan.org/videolan/dav1d.git" 4 | SCRIPT_COMMIT="cac76e4b6641dd26dd87fd749261526ae7469d3e" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" dav1d 12 | cd dav1d 13 | 14 | mkdir build && cd build 15 | 16 | local myconf=( 17 | --prefix="$FFBUILD_PREFIX" 18 | --buildtype=release 19 | --default-library=static 20 | ) 21 | 22 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 23 | myconf+=( 24 | --cross-file=/cross.meson 25 | ) 26 | else 27 | echo "Unknown target" 28 | return -1 29 | fi 30 | 31 | meson "${myconf[@]}" .. 32 | ninja -j$(nproc) 33 | ninja install 34 | } 35 | 36 | ffbuild_configure() { 37 | echo --enable-libdav1d 38 | } 39 | 40 | ffbuild_unconfigure() { 41 | echo --disable-libdav1d 42 | } 43 | -------------------------------------------------------------------------------- /scripts.d/25-freetype.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://gitlab.freedesktop.org/freetype/freetype.git" 4 | SCRIPT_COMMIT="15f687349528fb0d7cba1ee7a8becf0af29116ec" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" freetype 12 | cd freetype 13 | 14 | ./autogen.sh 15 | 16 | local myconf=( 17 | --prefix="$FFBUILD_PREFIX" 18 | --disable-shared 19 | --enable-static 20 | ) 21 | 22 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 23 | myconf+=( 24 | --host="$FFBUILD_TOOLCHAIN" 25 | ) 26 | else 27 | echo "Unknown target" 28 | return -1 29 | fi 30 | 31 | ./configure "${myconf[@]}" 32 | make -j$(nproc) 33 | make install 34 | } 35 | 36 | ffbuild_configure() { 37 | echo --enable-libfreetype 38 | } 39 | 40 | ffbuild_unconfigure() { 41 | echo --disable-libfreetype 42 | } 43 | -------------------------------------------------------------------------------- /scripts.d/50-libopus.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/xiph/opus.git" 4 | SCRIPT_COMMIT="bce1f392353d72d77d543bb2069a044ae1045e9d" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" opus 12 | cd opus 13 | 14 | ./autogen.sh 15 | 16 | local myconf=( 17 | --prefix="$FFBUILD_PREFIX" 18 | --disable-shared 19 | --enable-static 20 | --disable-extra-programs 21 | ) 22 | 23 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 24 | myconf+=( 25 | --host="$FFBUILD_TOOLCHAIN" 26 | ) 27 | else 28 | echo "Unknown target" 29 | return -1 30 | fi 31 | 32 | ./configure "${myconf[@]}" 33 | make -j$(nproc) 34 | make install 35 | } 36 | 37 | ffbuild_configure() { 38 | echo --enable-libopus 39 | } 40 | 41 | ffbuild_unconfigure() { 42 | echo --disable-libopus 43 | } 44 | -------------------------------------------------------------------------------- /scripts.d/45-libvorbis.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/xiph/vorbis.git" 4 | SCRIPT_COMMIT="84c023699cdf023a32fa4ded32019f194afcdad0" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" vorbis 12 | cd vorbis 13 | 14 | ./autogen.sh 15 | 16 | local myconf=( 17 | --prefix="$FFBUILD_PREFIX" 18 | --disable-shared 19 | --enable-static 20 | --disable-oggtest 21 | ) 22 | 23 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 24 | myconf+=( 25 | --host="$FFBUILD_TOOLCHAIN" 26 | ) 27 | else 28 | echo "Unknown target" 29 | return -1 30 | fi 31 | 32 | ./configure "${myconf[@]}" 33 | make -j$(nproc) 34 | make install 35 | } 36 | 37 | ffbuild_configure() { 38 | echo --enable-libvorbis 39 | } 40 | 41 | ffbuild_unconfigure() { 42 | echo --disable-libvorbis 43 | } 44 | -------------------------------------------------------------------------------- /scripts.d/20-libxml2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://gitlab.gnome.org/GNOME/libxml2.git" 4 | SCRIPT_COMMIT="e2bae1bc049f7ffac9c35eefa33f8a00d4032170" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" libxml2 12 | cd libxml2 13 | 14 | local myconf=( 15 | --prefix="$FFBUILD_PREFIX" 16 | --without-python 17 | --disable-maintainer-mode 18 | --disable-shared 19 | --enable-static 20 | ) 21 | 22 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 23 | myconf+=( 24 | --host="$FFBUILD_TOOLCHAIN" 25 | ) 26 | else 27 | echo "Unknown target" 28 | return -1 29 | fi 30 | 31 | ./autogen.sh "${myconf[@]}" 32 | make -j$(nproc) 33 | make install 34 | } 35 | 36 | ffbuild_configure() { 37 | echo --enable-libxml2 38 | } 39 | 40 | ffbuild_unconfigure() { 41 | echo --disable-libxml2 42 | } 43 | -------------------------------------------------------------------------------- /scripts.d/25-gmp.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://gmplib.org/repo/gmp/" 4 | SCRIPT_HGREV="261268754dec" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | retry-tool sh -c "rm -rf gmp && hg clone -r '$SCRIPT_HGREV' -u '$SCRIPT_HGREV' '$SCRIPT_REPO' gmp" 12 | cd gmp 13 | 14 | ./.bootstrap 15 | 16 | local myconf=( 17 | --prefix="$FFBUILD_PREFIX" 18 | --enable-maintainer-mode 19 | --disable-shared 20 | --enable-static 21 | --with-pic 22 | ) 23 | 24 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 25 | myconf+=( 26 | --host="$FFBUILD_TOOLCHAIN" 27 | ) 28 | else 29 | echo "Unknown target" 30 | return -1 31 | fi 32 | 33 | ./configure "${myconf[@]}" 34 | make -j$(nproc) 35 | make install 36 | } 37 | 38 | ffbuild_configure() { 39 | echo --enable-gmp 40 | } 41 | 42 | ffbuild_unconfigure() { 43 | echo --disable-gmp 44 | } 45 | -------------------------------------------------------------------------------- /scripts.d/25-xz.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/xz-mirror/xz.git" 4 | SCRIPT_COMMIT="508a44372c5b0dede8863fd0d358d4a9d8645c95" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" xz 12 | cd xz 13 | 14 | ./autogen.sh --no-po4a 15 | 16 | local myconf=( 17 | --prefix="$FFBUILD_PREFIX" 18 | --disable-symbol-versions 19 | --disable-shared 20 | --enable-static 21 | --with-pic 22 | ) 23 | 24 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 25 | myconf+=( 26 | --host="$FFBUILD_TOOLCHAIN" 27 | ) 28 | else 29 | echo "Unknown target" 30 | return -1 31 | fi 32 | 33 | ./configure "${myconf[@]}" 34 | make -j$(nproc) 35 | make install 36 | } 37 | 38 | ffbuild_configure() { 39 | echo --enable-lzma 40 | } 41 | 42 | ffbuild_unconfigure() { 43 | echo --disable-lzma 44 | } 45 | -------------------------------------------------------------------------------- /scripts.d/50-libssh.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://git.libssh.org/projects/libssh.git" 4 | SCRIPT_COMMIT="37deed27d66ba342e7e8c0a993bfe519f3967337" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" libssh 12 | cd libssh 13 | 14 | mkdir build && cd build 15 | 16 | cmake -GNinja -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" \ 17 | -DBUILD_SHARED_LIBS=OFF \ 18 | -DWITH_EXAMPLES=OFF -DWITH_SERVER=OFF \ 19 | -DWITH_SFTP=ON -DWITH_ZLIB=ON .. 20 | 21 | ninja -j$(nproc) 22 | ninja install 23 | 24 | { 25 | echo "Requires.private: libssl libcrypto zlib" 26 | echo "Cflags.private: -DLIBSSH_STATIC" 27 | } >> "$FFBUILD_PREFIX"/lib/pkgconfig/libssh.pc 28 | } 29 | 30 | ffbuild_configure() { 31 | echo --enable-libssh 32 | } 33 | 34 | ffbuild_unconfigure() { 35 | echo --disable-libssh 36 | } 37 | -------------------------------------------------------------------------------- /scripts.d/50-vulkan/45-vulkan.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/KhronosGroup/Vulkan-Headers.git" 4 | SCRIPT_COMMIT="v1.3.230" 5 | SCRIPT_TAGFILTER="v?.*.*" 6 | 7 | ffbuild_enabled() { 8 | [[ $ADDINS_STR == *4.4* ]] && return -1 9 | return 0 10 | } 11 | 12 | ffbuild_dockerbuild() { 13 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" vkheaders 14 | cd vkheaders 15 | 16 | mkdir build && cd build 17 | 18 | cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" .. 19 | make -j$(nproc) 20 | make install 21 | 22 | cat >"$FFBUILD_PREFIX"/lib/pkgconfig/vulkan.pc < "${WIKIPATH}/${WIKIFILE}" 22 | for f in "${INPUTS}"/*.txt; do 23 | VARIANT="$(basename "${f::-4}")" 24 | echo >> "${WIKIPATH}/${WIKIFILE}" 25 | echo "[${VARIANT}](https://github.com/${GITHUB_REPOSITORY}/releases/download/${TAGNAME}/$(cat "${f}"))" >> "${WIKIPATH}/${WIKIFILE}" 26 | done 27 | 28 | cd "${WIKIPATH}" 29 | git config user.email "actions@github.com" 30 | git config user.name "Github Actions" 31 | git add "$WIKIFILE" 32 | git commit -m "Update latest version info" 33 | git push 34 | 35 | cd .. 36 | rm -rf "$WIKIPATH" 37 | -------------------------------------------------------------------------------- /scripts.d/35-fontconfig.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://gitlab.freedesktop.org/fontconfig/fontconfig.git" 4 | SCRIPT_COMMIT="b9e2f17c43c32400328259c7b4c06f89b6a44c94" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" fc 12 | cd fc 13 | 14 | ./autogen.sh --noconf 15 | 16 | local myconf=( 17 | --prefix="$FFBUILD_PREFIX" 18 | --disable-docs 19 | --enable-libxml2 20 | --enable-iconv 21 | --disable-shared 22 | --enable-static 23 | ) 24 | 25 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 26 | myconf+=( 27 | --host="$FFBUILD_TOOLCHAIN" 28 | ) 29 | else 30 | echo "Unknown target" 31 | return -1 32 | fi 33 | 34 | ./configure "${myconf[@]}" 35 | make -j$(nproc) 36 | make install 37 | } 38 | 39 | ffbuild_configure() { 40 | echo --enable-fontconfig 41 | } 42 | 43 | ffbuild_unconfigure() { 44 | echo --disable-fontconfig 45 | } 46 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2020-2021 BtbN 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /scripts.d/45-x11/20-libxau.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://gitlab.freedesktop.org/xorg/lib/libxau.git" 4 | SCRIPT_COMMIT="4fbefa02d6c842401ff79065d364edd7087a12a6" 5 | 6 | ffbuild_enabled() { 7 | [[ $TARGET != linux* ]] && return -1 8 | return 0 9 | } 10 | 11 | ffbuild_dockerbuild() { 12 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" libxau 13 | cd libxau 14 | 15 | autoreconf -i 16 | 17 | local myconf=( 18 | --prefix="$FFBUILD_PREFIX" 19 | --enable-shared 20 | --disable-static 21 | --with-pic 22 | ) 23 | 24 | if [[ $TARGET == linux* ]]; then 25 | myconf+=( 26 | --host="$FFBUILD_TOOLCHAIN" 27 | ) 28 | else 29 | echo "Unknown target" 30 | return -1 31 | fi 32 | 33 | export CFLAGS="$RAW_CFLAGS" 34 | export LDFLAFS="$RAW_LDFLAGS" 35 | 36 | ./configure "${myconf[@]}" 37 | make -j$(nproc) 38 | make install 39 | 40 | gen-implib "$FFBUILD_PREFIX"/lib/{libXau.so.6,libXau.a} 41 | rm "$FFBUILD_PREFIX"/lib/libXau{.so*,.la} 42 | } 43 | -------------------------------------------------------------------------------- /scripts.d/50-lilv/99-lilv.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/lv2/lilv.git" 4 | SCRIPT_COMMIT="3386725522269a1bbdd342cb9e3fa6fb00e0f37f" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" lilv 12 | cd lilv 13 | 14 | mkdir build && cd build 15 | 16 | local myconf=( 17 | --prefix="$FFBUILD_PREFIX" 18 | --buildtype=release 19 | --default-library=static 20 | -Ddocs=disabled 21 | -Dtools=disabled 22 | -Dtests=disabled 23 | -Dbindings_py=disabled 24 | ) 25 | 26 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 27 | myconf+=( 28 | --cross-file=/cross.meson 29 | ) 30 | else 31 | echo "Unknown target" 32 | return -1 33 | fi 34 | 35 | meson "${myconf[@]}" .. 36 | ninja -j"$(nproc)" 37 | ninja install 38 | } 39 | 40 | ffbuild_configure() { 41 | echo --enable-lv2 42 | } 43 | 44 | ffbuild_unconfigure() { 45 | echo --disable-lv2 46 | } 47 | -------------------------------------------------------------------------------- /scripts.d/50-kvazaar.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/ultravideo/kvazaar.git" 4 | SCRIPT_COMMIT="a085e802ec6d24319160fec32c4027122e73580f" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" kvazaar 12 | cd kvazaar 13 | 14 | ./autogen.sh 15 | 16 | local myconf=( 17 | --prefix="$FFBUILD_PREFIX" 18 | --disable-shared 19 | --enable-static 20 | --with-pic 21 | ) 22 | 23 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 24 | myconf+=( 25 | --host="$FFBUILD_TOOLCHAIN" 26 | ) 27 | else 28 | echo "Unknown target" 29 | return -1 30 | fi 31 | 32 | ./configure "${myconf[@]}" 33 | make -j$(nproc) 34 | make install 35 | 36 | echo "Cflags.private: -DKVZ_STATIC_LIB" >> "$FFBUILD_PREFIX"/lib/pkgconfig/kvazaar.pc 37 | } 38 | 39 | ffbuild_configure() { 40 | echo --enable-libkvazaar 41 | } 42 | 43 | ffbuild_unconfigure() { 44 | echo --disable-libkvazaar 45 | } 46 | -------------------------------------------------------------------------------- /scripts.d/45-x11/50-libxfixes.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://gitlab.freedesktop.org/xorg/lib/libxfixes.git" 4 | SCRIPT_COMMIT="d10ec36c81a6b488d1f700a28c5bff4714287b78" 5 | 6 | ffbuild_enabled() { 7 | [[ $TARGET != linux* ]] && return -1 8 | return 0 9 | } 10 | 11 | ffbuild_dockerbuild() { 12 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" libxfixes 13 | cd libxfixes 14 | 15 | autoreconf -i 16 | 17 | local myconf=( 18 | --prefix="$FFBUILD_PREFIX" 19 | --enable-shared 20 | --disable-static 21 | --with-pic 22 | ) 23 | 24 | if [[ $TARGET == linux* ]]; then 25 | myconf+=( 26 | --host="$FFBUILD_TOOLCHAIN" 27 | ) 28 | else 29 | echo "Unknown target" 30 | return -1 31 | fi 32 | 33 | export CFLAGS="$RAW_CFLAGS" 34 | export LDFLAFS="$RAW_LDFLAGS" 35 | 36 | ./configure "${myconf[@]}" 37 | make -j$(nproc) 38 | make install 39 | 40 | gen-implib "$FFBUILD_PREFIX"/lib/{libXfixes.so.3,libXfixes.a} 41 | rm "$FFBUILD_PREFIX"/lib/libXfixes{.so*,.la} 42 | } 43 | -------------------------------------------------------------------------------- /scripts.d/45-x11/60-libxcursor.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://gitlab.freedesktop.org/xorg/lib/libxcursor.git" 4 | SCRIPT_COMMIT="27adb16027fa99d83818a0ed9f6623cb03f0c574" 5 | 6 | ffbuild_enabled() { 7 | [[ $TARGET != linux* ]] && return -1 8 | return 0 9 | } 10 | 11 | ffbuild_dockerbuild() { 12 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" libxcursor 13 | cd libxcursor 14 | 15 | autoreconf -i 16 | 17 | local myconf=( 18 | --prefix="$FFBUILD_PREFIX" 19 | --enable-shared 20 | --disable-static 21 | --with-pic 22 | ) 23 | 24 | if [[ $TARGET == linux* ]]; then 25 | myconf+=( 26 | --host="$FFBUILD_TOOLCHAIN" 27 | ) 28 | else 29 | echo "Unknown target" 30 | return -1 31 | fi 32 | 33 | export CFLAGS="$RAW_CFLAGS" 34 | export LDFLAFS="$RAW_LDFLAGS" 35 | 36 | ./configure "${myconf[@]}" 37 | make -j$(nproc) 38 | make install 39 | 40 | gen-implib "$FFBUILD_PREFIX"/lib/{libXcursor.so.1,libXcursor.a} 41 | rm "$FFBUILD_PREFIX"/lib/libXcursor{.so*,.la} 42 | } 43 | -------------------------------------------------------------------------------- /scripts.d/50-mfx.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/lu-zero/mfx_dispatch.git" 4 | SCRIPT_COMMIT="7e4d221c36c630c1250b23a5dfa15657bc04c10c" 5 | 6 | ffbuild_enabled() { 7 | [[ $TARGET == linuxarm64 ]] && return -1 8 | return 0 9 | } 10 | 11 | ffbuild_dockerbuild() { 12 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" mfx 13 | cd mfx 14 | 15 | autoreconf -i 16 | 17 | local myconf=( 18 | --prefix="$FFBUILD_PREFIX" 19 | --disable-shared 20 | --enable-static 21 | --with-pic 22 | ) 23 | 24 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 25 | myconf+=( 26 | --host="$FFBUILD_TOOLCHAIN" 27 | ) 28 | else 29 | echo "Unknown target" 30 | return -1 31 | fi 32 | 33 | ./configure "${myconf[@]}" 34 | make -j$(nproc) 35 | make install 36 | 37 | ln -s libmfx.pc "$FFBUILD_PREFIX"/lib/pkgconfig/mfx.pc 38 | } 39 | 40 | ffbuild_configure() { 41 | [[ $ADDINS_STR == *onevpl* ]] || echo --enable-libmfx 42 | } 43 | 44 | ffbuild_unconfigure() { 45 | echo --disable-libmfx 46 | } 47 | -------------------------------------------------------------------------------- /scripts.d/50-libtheora.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/xiph/theora.git" 4 | SCRIPT_COMMIT="7180717276af1ebc7da15c83162d6c5d6203aabf" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" theora 12 | cd theora 13 | 14 | ./autogen.sh 15 | 16 | local myconf=( 17 | --prefix="$FFBUILD_PREFIX" 18 | --disable-shared 19 | --enable-static 20 | --with-pic 21 | --disable-examples 22 | --disable-oggtest 23 | --disable-vorbistest 24 | --disable-spec 25 | --disable-doc 26 | ) 27 | 28 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 29 | myconf+=( 30 | --host="$FFBUILD_TOOLCHAIN" 31 | ) 32 | else 33 | echo "Unknown target" 34 | return -1 35 | fi 36 | 37 | ./configure "${myconf[@]}" 38 | make -j$(nproc) 39 | make install 40 | } 41 | 42 | ffbuild_configure() { 43 | echo --enable-libtheora 44 | } 45 | 46 | ffbuild_unconfigure() { 47 | echo --disable-libtheora 48 | } 49 | -------------------------------------------------------------------------------- /scripts.d/50-frei0r.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/dyne/frei0r.git" 4 | SCRIPT_COMMIT="a9d15ff07e130baf3408da6e1f1b22f82e7c62b6" 5 | 6 | ffbuild_enabled() { 7 | [[ $VARIANT == lgpl* ]] && return -1 8 | [[ $ADDINS_STR == *4.4* ]] && return -1 9 | return 0 10 | } 11 | 12 | ffbuild_dockerbuild() { 13 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" frei0r 14 | cd frei0r 15 | 16 | ./autogen.sh 17 | 18 | local myconf=( 19 | --prefix="$FFBUILD_PREFIX" 20 | --disable-shared 21 | --enable-static 22 | --with-pic 23 | --enable-cpuflags 24 | ) 25 | 26 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 27 | myconf+=( 28 | --host="$FFBUILD_TOOLCHAIN" 29 | ) 30 | else 31 | echo "Unknown target" 32 | return -1 33 | fi 34 | 35 | ./configure "${myconf[@]}" 36 | make -C include -j$(nproc) 37 | make -C include install 38 | make install-pkgconfigDATA 39 | } 40 | 41 | ffbuild_configure() { 42 | echo --enable-frei0r 43 | } 44 | 45 | ffbuild_unconfigure() { 46 | echo --disable-frei0r 47 | } 48 | -------------------------------------------------------------------------------- /scripts.d/50-libmp3lame.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://svn.code.sf.net/p/lame/svn/trunk/lame" 4 | SCRIPT_REV="6507" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | retry-tool sh -c "rm -rf lame && svn checkout '${SCRIPT_REPO}@${SCRIPT_REV}' lame" 12 | cd lame 13 | 14 | autoreconf -i 15 | 16 | local myconf=( 17 | --prefix="$FFBUILD_PREFIX" 18 | --disable-shared 19 | --enable-static 20 | --enable-nasm 21 | --disable-gtktest 22 | --disable-cpml 23 | --disable-frontend 24 | --disable-decoder 25 | ) 26 | 27 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 28 | myconf+=( 29 | --host="$FFBUILD_TOOLCHAIN" 30 | ) 31 | else 32 | echo "Unknown target" 33 | return -1 34 | fi 35 | 36 | export CFLAGS="$CFLAGS -DNDEBUG" 37 | 38 | ./configure "${myconf[@]}" 39 | make -j$(nproc) 40 | make install 41 | } 42 | 43 | ffbuild_configure() { 44 | echo --enable-libmp3lame 45 | } 46 | 47 | ffbuild_unconfigure() { 48 | echo --disable-libmp3lame 49 | } 50 | -------------------------------------------------------------------------------- /scripts.d/50-rubberband.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/breakfastquay/rubberband.git" 4 | SCRIPT_COMMIT="64d2989d28db8a171e82777f91ef4c571a58783f" 5 | 6 | ffbuild_enabled() { 7 | [[ $VARIANT == lgpl* ]] && return -1 8 | return 0 9 | } 10 | 11 | ffbuild_dockerbuild() { 12 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" rubberband 13 | cd rubberband 14 | 15 | mkdir build && cd build 16 | 17 | local myconf=( 18 | --prefix="$FFBUILD_PREFIX" 19 | -Ddefault_library=static 20 | ) 21 | 22 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 23 | myconf+=( 24 | --cross-file=/cross.meson 25 | ) 26 | else 27 | echo "Unknown target" 28 | return -1 29 | fi 30 | 31 | meson "${myconf[@]}" .. 32 | ninja -j$(nproc) 33 | ninja install 34 | 35 | # Fix static linking 36 | echo "Requires.private: fftw3 samplerate" >> "$FFBUILD_PREFIX"/lib/pkgconfig/rubberband.pc 37 | } 38 | 39 | ffbuild_configure() { 40 | echo --enable-librubberband 41 | } 42 | 43 | ffbuild_unconfigure() { 44 | echo --disable-librubberband 45 | } 46 | -------------------------------------------------------------------------------- /scripts.d/25-fribidi.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/fribidi/fribidi.git" 4 | SCRIPT_COMMIT="a6a4defff24aabf9195f462f9a7736f3d9e9c120" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" fribidi 12 | cd fribidi 13 | 14 | mkdir build && cd build 15 | 16 | local myconf=( 17 | --prefix="$FFBUILD_PREFIX" 18 | --buildtype=release 19 | --default-library=static 20 | -Dbin=false 21 | -Ddocs=false 22 | -Dtests=false 23 | ) 24 | 25 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 26 | myconf+=( 27 | --cross-file=/cross.meson 28 | ) 29 | else 30 | echo "Unknown target" 31 | return -1 32 | fi 33 | 34 | meson "${myconf[@]}" .. 35 | ninja -j$(nproc) 36 | ninja install 37 | 38 | sed -i 's/Cflags:/Cflags: -DFRIBIDI_LIB_STATIC/' "$FFBUILD_PREFIX"/lib/pkgconfig/fribidi.pc 39 | } 40 | 41 | ffbuild_configure() { 42 | echo --enable-libfribidi 43 | } 44 | 45 | ffbuild_unconfigure() { 46 | echo --disable-libfribidi 47 | } 48 | -------------------------------------------------------------------------------- /scripts.d/50-opencore-amr.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://git.code.sf.net/p/opencore-amr/code" 4 | SCRIPT_COMMIT="7dba8c32238418ce0b316a852b2224df586ca896" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" opencore 12 | cd opencore 13 | 14 | autoreconf -i 15 | 16 | local myconf=( 17 | --prefix="$FFBUILD_PREFIX" 18 | --disable-shared 19 | --enable-static 20 | --with-pic 21 | --enable-amrnb-encoder 22 | --enable-amrnb-decoder 23 | --disable-examples 24 | ) 25 | 26 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 27 | myconf+=( 28 | --host="$FFBUILD_TOOLCHAIN" 29 | ) 30 | else 31 | echo "Unknown target" 32 | return -1 33 | fi 34 | 35 | ./configure "${myconf[@]}" 36 | make -j$(nproc) 37 | make install 38 | } 39 | 40 | ffbuild_configure() { 41 | echo --enable-libopencore-amrnb --enable-libopencore-amrwb 42 | } 43 | 44 | ffbuild_unconfigure() { 45 | echo --disable-libopencore-amrnb --disable-libopencore-amrwb 46 | } 47 | -------------------------------------------------------------------------------- /scripts.d/50-libjxl/45-brotli.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/google/brotli.git" 4 | SCRIPT_COMMIT="9801a2c5d6c67c467ffad676ac301379bb877fc3" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" brotli 12 | cd brotli 13 | 14 | mkdir build && cd build 15 | 16 | cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" -DCMAKE_POSITION_INDEPENDENT_CODE=ON .. 17 | ninja -j$(nproc) 18 | ninja install 19 | 20 | # Build system is severely lacking in options, clean up after it 21 | rm -r "${FFBUILD_PREFIX}"/bin 22 | mv "${FFBUILD_PREFIX}"/lib/libbrotlienc{-static,}.a 23 | mv "${FFBUILD_PREFIX}"/lib/libbrotlidec{-static,}.a 24 | mv "${FFBUILD_PREFIX}"/lib/libbrotlicommon{-static,}.a 25 | 26 | if [[ $TARGET == win* ]]; then 27 | rm "${FFBUILD_PREFIX}"/lib/libbrotli*.dll.a 28 | elif [[ $TARGET == linux* ]]; then 29 | rm "${FFBUILD_PREFIX}"/lib/libbrotli*.so* 30 | else 31 | echo "Unknown target" 32 | return -1 33 | fi 34 | } 35 | -------------------------------------------------------------------------------- /scripts.d/50-davs2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/pkuvcl/davs2.git" 4 | SCRIPT_COMMIT="b41cf117452e2d73d827f02d3e30aa20f1c721ac" 5 | 6 | ffbuild_enabled() { 7 | [[ $VARIANT == lgpl* ]] && return -1 8 | [[ $TARGET == win32 ]] && return -1 9 | # davs2 aarch64 support is broken 10 | [[ $TARGET == linuxarm64 ]] && return -1 11 | return 0 12 | } 13 | 14 | ffbuild_dockerbuild() { 15 | git clone "$SCRIPT_REPO" davs2 16 | cd davs2 17 | git checkout "$SCRIPT_COMMIT" 18 | cd build/linux 19 | 20 | local myconf=( 21 | --disable-cli 22 | --enable-pic 23 | --prefix="$FFBUILD_PREFIX" 24 | ) 25 | 26 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 27 | myconf+=( 28 | --host="$FFBUILD_TOOLCHAIN" 29 | --cross-prefix="$FFBUILD_CROSS_PREFIX" 30 | ) 31 | else 32 | echo "Unknown target" 33 | return -1 34 | fi 35 | 36 | ./configure "${myconf[@]}" 37 | make -j$(nproc) 38 | make install 39 | } 40 | 41 | ffbuild_configure() { 42 | echo --enable-libdavs2 43 | } 44 | 45 | ffbuild_unconfigure() { 46 | echo --disable-libdavs2 47 | } 48 | -------------------------------------------------------------------------------- /scripts.d/50-x264.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/mirror/x264.git" 4 | SCRIPT_COMMIT="ed0f7a634050a62c1da27c99eea710824d4c3705" 5 | 6 | ffbuild_enabled() { 7 | [[ $VARIANT == lgpl* ]] && return -1 8 | return 0 9 | } 10 | 11 | ffbuild_dockerbuild() { 12 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" x264 13 | cd x264 14 | 15 | local myconf=( 16 | --disable-cli 17 | --enable-static 18 | --enable-pic 19 | --disable-lavf 20 | --disable-swscale 21 | --prefix="$FFBUILD_PREFIX" 22 | ) 23 | 24 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 25 | myconf+=( 26 | --host="$FFBUILD_TOOLCHAIN" 27 | --cross-prefix="$FFBUILD_CROSS_PREFIX" 28 | ) 29 | else 30 | echo "Unknown target" 31 | return -1 32 | fi 33 | 34 | ./configure "${myconf[@]}" 35 | make -j$(nproc) 36 | make install 37 | } 38 | 39 | ffbuild_configure() { 40 | echo --enable-libx264 41 | } 42 | 43 | ffbuild_unconfigure() { 44 | echo --disable-libx264 45 | } 46 | 47 | ffbuild_cflags() { 48 | return 0 49 | } 50 | 51 | ffbuild_ldflags() { 52 | return 0 53 | } 54 | -------------------------------------------------------------------------------- /scripts.d/45-x11/50-libxi.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://gitlab.freedesktop.org/xorg/lib/libxi.git" 4 | SCRIPT_COMMIT="08431d0684f9a1edf199f6c6060d2bef1ac78399" 5 | 6 | ffbuild_enabled() { 7 | [[ $TARGET != linux* ]] && return -1 8 | return 0 9 | } 10 | 11 | ffbuild_dockerbuild() { 12 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" libxi 13 | cd libxi 14 | 15 | autoreconf -i 16 | 17 | local myconf=( 18 | --prefix="$FFBUILD_PREFIX" 19 | --enable-shared 20 | --disable-static 21 | --with-pic 22 | ) 23 | 24 | if [[ $TARGET == linuxarm64 ]]; then 25 | myconf+=( 26 | --disable-malloc0returnsnull 27 | ) 28 | fi 29 | 30 | if [[ $TARGET == linux* ]]; then 31 | myconf+=( 32 | --host="$FFBUILD_TOOLCHAIN" 33 | ) 34 | else 35 | echo "Unknown target" 36 | return -1 37 | fi 38 | 39 | export CFLAGS="$RAW_CFLAGS" 40 | export LDFLAFS="$RAW_LDFLAGS" 41 | 42 | ./configure "${myconf[@]}" 43 | make -j$(nproc) 44 | make install 45 | 46 | gen-implib "$FFBUILD_PREFIX"/lib/{libXi.so.6,libXi.a} 47 | rm "$FFBUILD_PREFIX"/lib/libXi{.so*,.la} 48 | } 49 | -------------------------------------------------------------------------------- /scripts.d/50-twolame.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/njh/twolame.git" 4 | SCRIPT_COMMIT="90b694b6125dbe23a346bd5607a7fb63ad2785dc" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" twolame 12 | cd twolame 13 | 14 | NOCONFIGURE=1 ./autogen.sh 15 | touch doc/twolame.1 16 | 17 | local myconf=( 18 | --prefix="$FFBUILD_PREFIX" 19 | --with-pic 20 | --disable-shared 21 | --enable-static 22 | --disable-sndfile 23 | ) 24 | 25 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 26 | myconf+=( 27 | --host="$FFBUILD_TOOLCHAIN" 28 | ) 29 | else 30 | echo "Unknown target" 31 | return -1 32 | fi 33 | 34 | ./configure "${myconf[@]}" 35 | make -j$(nproc) 36 | make install 37 | 38 | sed -i 's/Cflags:/Cflags: -DLIBTWOLAME_STATIC/' "$FFBUILD_PREFIX"/lib/pkgconfig/twolame.pc 39 | } 40 | 41 | ffbuild_configure() { 42 | echo --enable-libtwolame 43 | } 44 | 45 | ffbuild_unconfigure() { 46 | echo --disable-libtwolame 47 | } 48 | 49 | ffbuild_cflags() { 50 | echo -DLIBTWOLAME_STATIC 51 | } 52 | -------------------------------------------------------------------------------- /scripts.d/50-vaapi/30-libpciaccess.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://gitlab.freedesktop.org/xorg/lib/libpciaccess.git" 4 | SCRIPT_COMMIT="d193fa690415333420b435edb5782789a6f3ea57" 5 | 6 | ffbuild_enabled() { 7 | [[ $TARGET != linux* ]] && return -1 8 | return 0 9 | } 10 | 11 | ffbuild_dockerbuild() { 12 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" libpciaccess 13 | cd libpciaccess 14 | 15 | autoreconf -fi 16 | 17 | local myconf=( 18 | --prefix="$FFBUILD_PREFIX" 19 | --enable-shared 20 | --disable-static 21 | --with-pic 22 | --with-zlib 23 | ) 24 | 25 | if [[ $TARGET == linux* ]]; then 26 | myconf+=( 27 | --host="$FFBUILD_TOOLCHAIN" 28 | ) 29 | else 30 | echo "Unknown target" 31 | return -1 32 | fi 33 | 34 | export CFLAGS="$RAW_CFLAGS" 35 | export LDFLAFS="$RAW_LDFLAGS" 36 | 37 | ./configure "${myconf[@]}" 38 | make -j$(nproc) 39 | make install 40 | 41 | gen-implib "$FFBUILD_PREFIX"/lib/{libpciaccess.so.0,libpciaccess.a} 42 | rm "$FFBUILD_PREFIX"/lib/libpciaccess{.so*,.la} 43 | 44 | echo "Libs: -ldl" >> "$FFBUILD_PREFIX"/lib/pkgconfig/pciaccess.pc 45 | } 46 | -------------------------------------------------------------------------------- /scripts.d/50-vidstab.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/georgmartius/vid.stab.git" 4 | # TODO: clamp to e7715fc until georgmartius/vid.stab#104 get fixed 5 | SCRIPT_COMMIT_PINNED="e7715fcf329573cdcff5c57d0e4a25f4c3a0cb7f" 6 | 7 | ffbuild_enabled() { 8 | [[ $VARIANT == lgpl* ]] && return -1 9 | return 0 10 | } 11 | 12 | ffbuild_dockerbuild() { 13 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT_PINNED" vidstab 14 | cd vidstab 15 | 16 | mkdir build && cd build 17 | 18 | local mycmake=( 19 | -DBUILD_SHARED_LIBS=OFF 20 | -DUSE_OMP=ON 21 | ) 22 | 23 | if [[ $TARGET == *arm64 ]]; then 24 | mycmake+=( 25 | -DSSE2_FOUND=FALSE 26 | ) 27 | fi 28 | 29 | cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" "${mycmake[@]}" .. 30 | make -j$(nproc) 31 | make install 32 | 33 | if [[ $TARGET == linux* ]]; then 34 | echo "Libs.private: -ldl" >> "$FFBUILD_PREFIX"/lib/pkgconfig/vidstab.pc 35 | fi 36 | } 37 | 38 | ffbuild_configure() { 39 | echo --enable-libvidstab 40 | } 41 | 42 | ffbuild_unconfigure() { 43 | echo --disable-libvidstab 44 | } 45 | -------------------------------------------------------------------------------- /scripts.d/50-libbluray.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://code.videolan.org/videolan/libbluray.git" 4 | SCRIPT_COMMIT="5539addbbf8c26d756fc2cb76b3919f8b73be66a" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" libbluray 12 | cd libbluray 13 | 14 | ./bootstrap 15 | 16 | local myconf=( 17 | --prefix="$FFBUILD_PREFIX" 18 | --disable-shared 19 | --enable-static 20 | --with-pic 21 | --disable-doxygen-doc 22 | --disable-doxygen-dot 23 | --disable-doxygen-html 24 | --disable-doxygen-ps 25 | --disable-doxygen-pdf 26 | --disable-examples 27 | --disable-bdjava-jar 28 | ) 29 | 30 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 31 | myconf+=( 32 | --host="$FFBUILD_TOOLCHAIN" 33 | ) 34 | else 35 | echo "Unknown target" 36 | return -1 37 | fi 38 | 39 | ./configure "${myconf[@]}" 40 | make -j$(nproc) 41 | make install 42 | } 43 | 44 | ffbuild_configure() { 45 | echo --enable-libbluray 46 | } 47 | 48 | ffbuild_unconfigure() { 49 | echo --disable-libbluray 50 | } 51 | -------------------------------------------------------------------------------- /scripts.d/45-x11/60-libxrandr.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://gitlab.freedesktop.org/xorg/lib/libxrandr.git" 4 | SCRIPT_COMMIT="d66693441f688867e6fd4a5d4a4bdade9a338755" 5 | 6 | ffbuild_enabled() { 7 | [[ $TARGET != linux* ]] && return -1 8 | return 0 9 | } 10 | 11 | ffbuild_dockerbuild() { 12 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" libxrandr 13 | cd libxrandr 14 | 15 | autoreconf -i 16 | 17 | local myconf=( 18 | --prefix="$FFBUILD_PREFIX" 19 | --enable-shared 20 | --disable-static 21 | --with-pic 22 | ) 23 | 24 | if [[ $TARGET == linuxarm64 ]]; then 25 | myconf+=( 26 | --disable-malloc0returnsnull 27 | ) 28 | fi 29 | 30 | if [[ $TARGET == linux* ]]; then 31 | myconf+=( 32 | --host="$FFBUILD_TOOLCHAIN" 33 | ) 34 | else 35 | echo "Unknown target" 36 | return -1 37 | fi 38 | 39 | export CFLAGS="$RAW_CFLAGS" 40 | export LDFLAFS="$RAW_LDFLAGS" 41 | 42 | ./configure "${myconf[@]}" 43 | make -j$(nproc) 44 | make install 45 | 46 | gen-implib "$FFBUILD_PREFIX"/lib/{libXrandr.so.2,libXrandr.a} 47 | rm "$FFBUILD_PREFIX"/lib/libXrandr{.so*,.la} 48 | } 49 | -------------------------------------------------------------------------------- /scripts.d/50-libwebp.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://chromium.googlesource.com/webm/libwebp" 4 | SCRIPT_COMMIT="e407d4b37c296643e3824d8f19466fe6211dc5eb" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" webp 12 | cd webp 13 | 14 | ./autogen.sh 15 | 16 | local myconf=( 17 | --prefix="$FFBUILD_PREFIX" 18 | --disable-shared 19 | --enable-static 20 | --with-pic 21 | --enable-libwebpmux 22 | --disable-libwebpextras 23 | --disable-libwebpdemux 24 | --disable-sdl 25 | --disable-gl 26 | --disable-png 27 | --disable-jpeg 28 | --disable-tiff 29 | --disable-gif 30 | ) 31 | 32 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 33 | myconf+=( 34 | --host="$FFBUILD_TOOLCHAIN" 35 | ) 36 | else 37 | echo "Unknown target" 38 | return -1 39 | fi 40 | 41 | ./configure "${myconf[@]}" 42 | make -j$(nproc) 43 | make install 44 | } 45 | 46 | ffbuild_configure() { 47 | echo --enable-libwebp 48 | } 49 | 50 | ffbuild_unconfigure() { 51 | echo --disable-libwebp 52 | } 53 | -------------------------------------------------------------------------------- /scripts.d/45-x11/50-libxrender.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://gitlab.freedesktop.org/xorg/lib/libxrender.git" 4 | SCRIPT_COMMIT="f6504f02ade1d27950ad0486a2032e1d665d72b8" 5 | 6 | ffbuild_enabled() { 7 | [[ $TARGET != linux* ]] && return -1 8 | return 0 9 | } 10 | 11 | ffbuild_dockerbuild() { 12 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" libxrender 13 | cd libxrender 14 | 15 | autoreconf -i 16 | 17 | local myconf=( 18 | --prefix="$FFBUILD_PREFIX" 19 | --enable-shared 20 | --disable-static 21 | --with-pic 22 | ) 23 | 24 | if [[ $TARGET == linuxarm64 ]]; then 25 | myconf+=( 26 | --disable-malloc0returnsnull 27 | ) 28 | fi 29 | 30 | if [[ $TARGET == linux* ]]; then 31 | myconf+=( 32 | --host="$FFBUILD_TOOLCHAIN" 33 | ) 34 | else 35 | echo "Unknown target" 36 | return -1 37 | fi 38 | 39 | export CFLAGS="$RAW_CFLAGS" 40 | export LDFLAFS="$RAW_LDFLAGS" 41 | 42 | ./configure "${myconf[@]}" 43 | make -j$(nproc) 44 | make install 45 | 46 | gen-implib "$FFBUILD_PREFIX"/lib/{libXrender.so.1,libXrender.a} 47 | rm "$FFBUILD_PREFIX"/lib/libXrender{.so*,.la} 48 | } 49 | -------------------------------------------------------------------------------- /scripts.d/45-x11/50-libxscrnsaver.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://gitlab.freedesktop.org/xorg/lib/libxscrnsaver.git" 4 | SCRIPT_COMMIT="d39f92be6b513c28546ebb0baf335f32ab154a89" 5 | 6 | ffbuild_enabled() { 7 | [[ $TARGET != linux* ]] && return -1 8 | return 0 9 | } 10 | 11 | ffbuild_dockerbuild() { 12 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" libxscrnsaver 13 | cd libxscrnsaver 14 | 15 | autoreconf -i 16 | 17 | local myconf=( 18 | --prefix="$FFBUILD_PREFIX" 19 | --enable-shared 20 | --disable-static 21 | --with-pic 22 | ) 23 | 24 | if [[ $TARGET == linuxarm64 ]]; then 25 | myconf+=( 26 | --disable-malloc0returnsnull 27 | ) 28 | fi 29 | 30 | if [[ $TARGET == linux* ]]; then 31 | myconf+=( 32 | --host="$FFBUILD_TOOLCHAIN" 33 | ) 34 | else 35 | echo "Unknown target" 36 | return -1 37 | fi 38 | 39 | export CFLAGS="$RAW_CFLAGS" 40 | export LDFLAFS="$RAW_LDFLAGS" 41 | 42 | ./configure "${myconf[@]}" 43 | make -j$(nproc) 44 | make install 45 | 46 | gen-implib "$FFBUILD_PREFIX"/lib/{libXss.so.1,libXss.a} 47 | rm "$FFBUILD_PREFIX"/lib/libXss{.so*,.la} 48 | } 49 | -------------------------------------------------------------------------------- /scripts.d/45-x11/50-libxxf86vm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://gitlab.freedesktop.org/xorg/lib/libxxf86vm.git" 4 | SCRIPT_COMMIT="7fe2d41f164d3015216c1079cc7fbce1eea90c98" 5 | 6 | ffbuild_enabled() { 7 | [[ $TARGET != linux* ]] && return -1 8 | return 0 9 | } 10 | 11 | ffbuild_dockerbuild() { 12 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" libxxf86vm 13 | cd libxxf86vm 14 | 15 | autoreconf -i 16 | 17 | local myconf=( 18 | --prefix="$FFBUILD_PREFIX" 19 | --enable-shared 20 | --disable-static 21 | --with-pic 22 | ) 23 | 24 | if [[ $TARGET == linuxarm64 ]]; then 25 | myconf+=( 26 | --disable-malloc0returnsnull 27 | ) 28 | fi 29 | 30 | if [[ $TARGET == linux* ]]; then 31 | myconf+=( 32 | --host="$FFBUILD_TOOLCHAIN" 33 | ) 34 | else 35 | echo "Unknown target" 36 | return -1 37 | fi 38 | 39 | export CFLAGS="$RAW_CFLAGS" 40 | export LDFLAFS="$RAW_LDFLAGS" 41 | 42 | ./configure "${myconf[@]}" 43 | make -j$(nproc) 44 | make install 45 | 46 | gen-implib "$FFBUILD_PREFIX"/lib/{libXxf86vm.so.1,libXxf86vm.a} 47 | rm "$FFBUILD_PREFIX"/lib/libXxf86vm{.so*,.la} 48 | } 49 | -------------------------------------------------------------------------------- /scripts.d/50-librist/50-librist.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://code.videolan.org/rist/librist.git" 4 | SCRIPT_COMMIT="809390b3b75a259a704079d0fb4d8f1b5f7fa956" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" librist 12 | cd librist 13 | 14 | mkdir build && cd build 15 | 16 | local myconf=( 17 | --prefix="$FFBUILD_PREFIX" 18 | --buildtype=release 19 | --default-library=static 20 | -Duse_mbedtls=true 21 | -Dbuiltin_mbedtls=false 22 | -Dbuilt_tools=false 23 | -Dtest=false 24 | ) 25 | 26 | if [[ $TARGET == win* ]]; then 27 | myconf+=( 28 | -Dhave_mingw_pthreads=true 29 | ) 30 | fi 31 | 32 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 33 | myconf+=( 34 | --cross-file=/cross.meson 35 | ) 36 | else 37 | echo "Unknown target" 38 | return -1 39 | fi 40 | 41 | meson "${myconf[@]}" .. 42 | ninja -j"$(nproc)" 43 | ninja install 44 | } 45 | 46 | ffbuild_configure() { 47 | echo --enable-librist 48 | } 49 | 50 | ffbuild_unconfigure() { 51 | echo --disable-librist 52 | } 53 | -------------------------------------------------------------------------------- /scripts.d/45-x11/50-libxinerama.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://gitlab.freedesktop.org/xorg/lib/libxinerama.git" 4 | SCRIPT_COMMIT="f7c9b2cdd92cfcc1fcf0eb94c7fc5daaed2786f4" 5 | 6 | ffbuild_enabled() { 7 | [[ $TARGET != linux* ]] && return -1 8 | return 0 9 | } 10 | 11 | ffbuild_dockerbuild() { 12 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" libxinerama 13 | cd libxinerama 14 | 15 | autoreconf -i 16 | 17 | local myconf=( 18 | --prefix="$FFBUILD_PREFIX" 19 | --enable-shared 20 | --disable-static 21 | --with-pic 22 | ) 23 | 24 | if [[ $TARGET == linuxarm64 ]]; then 25 | myconf+=( 26 | --disable-malloc0returnsnull 27 | ) 28 | fi 29 | 30 | if [[ $TARGET == linux* ]]; then 31 | myconf+=( 32 | --host="$FFBUILD_TOOLCHAIN" 33 | ) 34 | else 35 | echo "Unknown target" 36 | return -1 37 | fi 38 | 39 | export CFLAGS="$RAW_CFLAGS" 40 | export LDFLAFS="$RAW_LDFLAGS" 41 | 42 | ./configure "${myconf[@]}" 43 | make -j$(nproc) 44 | make install 45 | 46 | gen-implib "$FFBUILD_PREFIX"/lib/{libXinerama.so.1,libXinerama.a} 47 | rm "$FFBUILD_PREFIX"/lib/libXinerama{.so*,.la} 48 | } 49 | -------------------------------------------------------------------------------- /scripts.d/50-aom.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://aomedia.googlesource.com/aom" 4 | SCRIPT_COMMIT="e9efda0ceb39a8702830d536b48b400727ecded8" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerstage() { 11 | to_df "RUN --mount=src=${SELF},dst=/stage.sh --mount=src=patches/aom,dst=/patches run_stage /stage.sh" 12 | } 13 | 14 | ffbuild_dockerbuild() { 15 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" aom 16 | cd aom 17 | 18 | for patch in /patches/*.patch; do 19 | echo "Applying $patch" 20 | git am < "$patch" 21 | done 22 | 23 | mkdir cmbuild && cd cmbuild 24 | 25 | # Workaround broken build system 26 | export CFLAGS="$CFLAGS -pthread -I/opt/ffbuild/include/libvmaf" 27 | 28 | cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" -DBUILD_SHARED_LIBS=OFF -DENABLE_EXAMPLES=NO -DENABLE_TESTS=NO -DENABLE_TOOLS=NO -DCONFIG_TUNE_VMAF=1 .. 29 | make -j$(nproc) 30 | make install 31 | 32 | echo "Requires.private: libvmaf" >> "$FFBUILD_PREFIX/lib/pkgconfig/aom.pc" 33 | } 34 | 35 | ffbuild_configure() { 36 | echo --enable-libaom 37 | } 38 | 39 | ffbuild_unconfigure() { 40 | echo --disable-libaom 41 | } 42 | -------------------------------------------------------------------------------- /images/base/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:22.04 2 | 3 | ENV DEBIAN_FRONTEND noninteractive 4 | RUN \ 5 | apt-get -y update && \ 6 | apt-get -y dist-upgrade && \ 7 | apt-get -y install build-essential yasm nasm \ 8 | xxd pkgconf curl wget unzip git subversion mercurial \ 9 | autoconf automake libtool libtool-bin autopoint gettext cmake clang meson ninja-build \ 10 | texinfo texi2html help2man flex bison groff \ 11 | gperf itstool ragel libc6-dev libssl-dev \ 12 | gtk-doc-tools gobject-introspection gawk \ 13 | ocaml ocamlbuild libnum-ocaml-dev indent p7zip-full \ 14 | python3-distutils python3-jinja2 python3-apt python-is-python3 && \ 15 | apt-get -y clean && \ 16 | git config --global user.email "builder@localhost" && \ 17 | git config --global user.name "Builder" && \ 18 | git config --global advice.detachedHead false 19 | 20 | ENV CARGO_HOME="/opt/cargo" RUSTUP_HOME="/opt/rustup" PATH="/opt/cargo/bin:${PATH}" 21 | RUN curl https://sh.rustup.rs -sSf | bash -s -- -y --no-modify-path && \ 22 | cargo install cargo-c && rm -rf "${CARGO_HOME}"/registry "${CARGO_HOME}"/git 23 | 24 | RUN --mount=src=.,dst=/input \ 25 | for s in /input/*.sh; do cp $s /usr/bin/$(echo $s | sed -e 's|.*/||' -e 's/\.sh$//'); done 26 | -------------------------------------------------------------------------------- /scripts.d/25-fftw3.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/FFTW/fftw3.git" 4 | SCRIPT_COMMIT="9426cd59106ffddde1f55131c07fa9c562fa2f8e" 5 | 6 | ffbuild_enabled() { 7 | # Dependency of GPL-Only librubberband 8 | [[ $VARIANT == lgpl* ]] && return -1 9 | return 0 10 | } 11 | 12 | ffbuild_dockerbuild() { 13 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT_PINNED" fftw3 14 | cd fftw3 15 | 16 | local myconf=( 17 | --prefix="$FFBUILD_PREFIX" 18 | --enable-maintainer-mode 19 | --disable-shared 20 | --enable-static 21 | --disable-fortran 22 | --disable-doc 23 | --with-our-malloc 24 | --enable-threads 25 | --with-combined-threads 26 | --with-incoming-stack-boundary=2 27 | ) 28 | 29 | if [[ $TARGET != *arm64 ]]; then 30 | myconf+=( 31 | --enable-sse2 32 | --enable-avx 33 | --enable-avx2 34 | ) 35 | fi 36 | 37 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 38 | myconf+=( 39 | --host="$FFBUILD_TOOLCHAIN" 40 | ) 41 | else 42 | echo "Unknown target" 43 | return -1 44 | fi 45 | 46 | ./bootstrap.sh "${myconf[@]}" 47 | make -j$(nproc) 48 | make install 49 | } 50 | -------------------------------------------------------------------------------- /scripts.d/45-x11/30-libxcb.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://gitlab.freedesktop.org/xorg/lib/libxcb.git" 4 | SCRIPT_COMMIT="d53ad60d774176c5b057e2ed4d03a4658ee13690" 5 | 6 | ffbuild_enabled() { 7 | [[ $TARGET != linux* ]] && return -1 8 | return 0 9 | } 10 | 11 | ffbuild_dockerbuild() { 12 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" libxcb 13 | cd libxcb 14 | 15 | autoreconf -i 16 | 17 | local myconf=( 18 | --prefix="$FFBUILD_PREFIX" 19 | --enable-shared 20 | --disable-static 21 | --with-pic 22 | --disable-devel-docs 23 | ) 24 | 25 | if [[ $TARGET == linux* ]]; then 26 | myconf+=( 27 | --host="$FFBUILD_TOOLCHAIN" 28 | ) 29 | else 30 | echo "Unknown target" 31 | return -1 32 | fi 33 | 34 | export CFLAGS="$RAW_CFLAGS" 35 | export LDFLAFS="$RAW_LDFLAGS" 36 | 37 | ./configure "${myconf[@]}" 38 | make -j$(nproc) 39 | make install 40 | 41 | for LIBNAME in "$FFBUILD_PREFIX"/lib/libxcb*.so.?; do 42 | gen-implib "$LIBNAME" "${LIBNAME%%.*}.a" 43 | rm "${LIBNAME%%.*}"{.so*,.la} 44 | done 45 | } 46 | 47 | ffbuild_configure() { 48 | echo --enable-libxcb 49 | } 50 | 51 | ffbuild_unconfigure() { 52 | echo --disable-libxcb 53 | } 54 | -------------------------------------------------------------------------------- /scripts.d/45-x11/50-libxext.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://gitlab.freedesktop.org/xorg/lib/libxext.git" 4 | SCRIPT_COMMIT="c6eded76e212419518bd955cad58c96b8653840e" 5 | 6 | ffbuild_enabled() { 7 | [[ $TARGET != linux* ]] && return -1 8 | return 0 9 | } 10 | 11 | ffbuild_dockerbuild() { 12 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" libxext 13 | cd libxext 14 | 15 | autoreconf -i 16 | 17 | local myconf=( 18 | --prefix="$FFBUILD_PREFIX" 19 | --enable-shared 20 | --disable-static 21 | --with-pic 22 | --without-xmlto 23 | --without-fop 24 | --without-xsltproc 25 | --without-lint 26 | ) 27 | 28 | if [[ $TARGET == linuxarm64 ]]; then 29 | myconf+=( 30 | --disable-malloc0returnsnull 31 | ) 32 | fi 33 | 34 | if [[ $TARGET == linux* ]]; then 35 | myconf+=( 36 | --host="$FFBUILD_TOOLCHAIN" 37 | ) 38 | else 39 | echo "Unknown target" 40 | return -1 41 | fi 42 | 43 | export CFLAGS="$RAW_CFLAGS -D_GNU_SOURCE" 44 | export LDFLAFS="$RAW_LDFLAGS" 45 | 46 | ./configure "${myconf[@]}" 47 | make -j$(nproc) 48 | make install 49 | 50 | gen-implib "$FFBUILD_PREFIX"/lib/{libXext.so.6,libXext.a} 51 | rm "$FFBUILD_PREFIX"/lib/libXext{.so*,.la} 52 | } 53 | -------------------------------------------------------------------------------- /scripts.d/45-vmaf.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/Netflix/vmaf.git" 4 | SCRIPT_COMMIT="ea1150057190f113a2c07ded0ff4fb5a6260c1d3" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" vmaf 12 | cd vmaf 13 | 14 | # Kill build of unused and broken tools 15 | echo > libvmaf/tools/meson.build 16 | 17 | mkdir build && cd build 18 | 19 | local myconf=( 20 | --prefix="$FFBUILD_PREFIX" 21 | --buildtype=release 22 | --default-library=static 23 | -Dbuilt_in_models=true 24 | -Denable_tests=false 25 | -Denable_docs=false 26 | -Denable_avx512=true 27 | -Denable_float=true 28 | ) 29 | 30 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 31 | myconf+=( 32 | --cross-file=/cross.meson 33 | ) 34 | else 35 | echo "Unknown target" 36 | return -1 37 | fi 38 | 39 | meson "${myconf[@]}" ../libvmaf 40 | ninja -j"$(nproc)" 41 | ninja install 42 | 43 | sed -i 's/Libs.private:/Libs.private: -lstdc++/; t; $ a Libs.private: -lstdc++' "$FFBUILD_PREFIX"/lib/pkgconfig/libvmaf.pc 44 | } 45 | 46 | ffbuild_configure() { 47 | echo --enable-libvmaf 48 | } 49 | 50 | ffbuild_unconfigure() { 51 | echo --disable-libvmaf 52 | } 53 | -------------------------------------------------------------------------------- /scripts.d/50-xvid.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="http://svn.xvid.org/trunk/xvidcore" 4 | SCRIPT_REV="2198" 5 | 6 | ffbuild_enabled() { 7 | [[ $VARIANT == lgpl* ]] && return -1 8 | return 0 9 | } 10 | 11 | ffbuild_dockerbuild() { 12 | retry-tool sh -c "rm -rf xvid && svn checkout --username 'anonymous' --password '' '${SCRIPT_REPO}@${SCRIPT_REV}' xvid" 13 | cd xvid 14 | 15 | cd build/generic 16 | 17 | # The original code fails on a two-digit major... 18 | sed -i\ 19 | -e 's/GCC_MAJOR=.*/GCC_MAJOR=10/' \ 20 | -e 's/GCC_MINOR=.*/GCC_MINOR=0/' \ 21 | configure.in 22 | 23 | ./bootstrap.sh 24 | 25 | local myconf=( 26 | --prefix="$FFBUILD_PREFIX" 27 | ) 28 | 29 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 30 | myconf+=( 31 | --host="$FFBUILD_TOOLCHAIN" 32 | ) 33 | else 34 | echo "Unknown target" 35 | return -1 36 | fi 37 | 38 | ./configure "${myconf[@]}" 39 | make -j$(nproc) 40 | make install 41 | 42 | if [[ $TARGET == win* ]]; then 43 | rm "$FFBUILD_PREFIX"/{bin/libxvidcore.dll,lib/libxvidcore.dll.a} 44 | elif [[ $TARGET == linux* ]]; then 45 | rm "$FFBUILD_PREFIX"/lib/libxvidcore.so* 46 | fi 47 | } 48 | 49 | ffbuild_configure() { 50 | echo --enable-libxvid 51 | } 52 | 53 | ffbuild_unconfigure() { 54 | echo --disable-libxvid 55 | } 56 | -------------------------------------------------------------------------------- /scripts.d/45-x11/60-libxv.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://gitlab.freedesktop.org/xorg/lib/libxv.git" 4 | SCRIPT_COMMIT="ee48980aca0bc9deb61458fdb5ebda3928d944a0" 5 | 6 | ffbuild_enabled() { 7 | [[ $TARGET != linux* ]] && return -1 8 | [[ $ADDINS_STR == *4.4* ]] && return -1 9 | return 0 10 | } 11 | 12 | ffbuild_dockerbuild() { 13 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" libxv 14 | cd libxv 15 | 16 | autoreconf -i 17 | 18 | local myconf=( 19 | --prefix="$FFBUILD_PREFIX" 20 | --enable-shared 21 | --disable-static 22 | --with-pic 23 | --without-lint 24 | ) 25 | 26 | if [[ $TARGET == linuxarm64 ]]; then 27 | myconf+=( 28 | --disable-malloc0returnsnull 29 | ) 30 | fi 31 | 32 | if [[ $TARGET == linux* ]]; then 33 | myconf+=( 34 | --host="$FFBUILD_TOOLCHAIN" 35 | ) 36 | else 37 | echo "Unknown target" 38 | return -1 39 | fi 40 | 41 | export CFLAGS="$RAW_CFLAGS" 42 | export LDFLAFS="$RAW_LDFLAGS" 43 | 44 | ./configure "${myconf[@]}" 45 | make -j$(nproc) 46 | make install 47 | 48 | gen-implib "$FFBUILD_PREFIX"/lib/{libXv.so.1,libXv.a} 49 | rm "$FFBUILD_PREFIX"/lib/libXv{.so*,.la} 50 | } 51 | 52 | ffbuild_configure() { 53 | echo --enable-xlib 54 | } 55 | 56 | ffbuild_unconfigure() { 57 | echo --disable-xlib 58 | } 59 | -------------------------------------------------------------------------------- /scripts.d/50-xavs2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/pkuvcl/xavs2.git" 4 | SCRIPT_COMMIT="eae1e8b9d12468059bdd7dee893508e470fa83d8" 5 | 6 | ffbuild_enabled() { 7 | [[ $VARIANT == lgpl* ]] && return -1 8 | [[ $TARGET == win32 ]] && return -1 9 | # xavs2 aarch64 support is broken 10 | [[ $TARGET == linuxarm64 ]] && return -1 11 | return 0 12 | } 13 | 14 | ffbuild_dockerbuild() { 15 | git clone "$SCRIPT_REPO" xavs2 16 | cd xavs2 17 | git checkout "$SCRIPT_COMMIT" 18 | cd build/linux 19 | 20 | local myconf=( 21 | --disable-cli 22 | --enable-static 23 | --enable-pic 24 | --disable-avs 25 | --disable-swscale 26 | --disable-lavf 27 | --disable-ffms 28 | --disable-gpac 29 | --disable-lsmash 30 | --extra-asflags="-w-macro-params-legacy" 31 | --prefix="$FFBUILD_PREFIX" 32 | ) 33 | 34 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 35 | myconf+=( 36 | --host="$FFBUILD_TOOLCHAIN" 37 | --cross-prefix="$FFBUILD_CROSS_PREFIX" 38 | ) 39 | else 40 | echo "Unknown target" 41 | return -1 42 | fi 43 | 44 | ./configure "${myconf[@]}" 45 | make -j$(nproc) 46 | make install 47 | } 48 | 49 | ffbuild_configure() { 50 | echo --enable-libxavs2 51 | } 52 | 53 | ffbuild_unconfigure() { 54 | echo --disable-libxavs2 55 | } 56 | -------------------------------------------------------------------------------- /scripts.d/50-aribb24/50-libaribb24.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/nkoriyama/aribb24.git" 4 | SCRIPT_COMMIT="5e9be272f96e00f15a2f3c5f8ba7e124862aec38" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerstage() { 11 | to_df "RUN --mount=src=${SELF},dst=/stage.sh --mount=src=patches/aribb24,dst=/patches run_stage /stage.sh" 12 | } 13 | 14 | ffbuild_dockerbuild() { 15 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" aribb24 16 | cd aribb24 17 | 18 | for patch in /patches/*.patch; do 19 | echo "Applying $patch" 20 | git am < "$patch" 21 | done 22 | 23 | # Library switched to LGPL on master, but didn't bump version since. 24 | # FFmpeg checks for >1.0.3 to allow LGPL builds. 25 | sed -i 's/1.0.3/1.0.4/' configure.ac 26 | 27 | autoreconf -i 28 | 29 | local myconf=( 30 | --prefix="$FFBUILD_PREFIX" 31 | --disable-shared 32 | --enable-static 33 | --with-pic 34 | ) 35 | 36 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 37 | myconf+=( 38 | --host="$FFBUILD_TOOLCHAIN" 39 | ) 40 | else 41 | echo "Unknown target" 42 | return -1 43 | fi 44 | 45 | ./configure "${myconf[@]}" 46 | make -j$(nproc) 47 | make install 48 | } 49 | 50 | ffbuild_configure() { 51 | echo --enable-libaribb24 52 | } 53 | 54 | ffbuild_unconfigure() { 55 | echo --disable-libaribb24 56 | } 57 | -------------------------------------------------------------------------------- /scripts.d/50-onevpl.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/oneapi-src/oneVPL.git" 4 | SCRIPT_COMMIT="250d806b58678bdce13820a2dcbc8fd73987724c" 5 | 6 | ffbuild_enabled() { 7 | [[ $TARGET == *arm64 ]] && return -1 8 | [[ $ADDINS_STR == *4.4* ]] && return -1 9 | [[ $ADDINS_STR == *5.0* ]] && return -1 10 | [[ $ADDINS_STR == *5.1* ]] && return -1 11 | return 0 12 | } 13 | 14 | ffbuild_dockerbuild() { 15 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" onevpl 16 | cd onevpl 17 | 18 | mkdir build && cd build 19 | 20 | cmake -GNinja -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" \ 21 | -DCMAKE_INSTALL_BINDIR="$FFBUILD_PREFIX"/bin -DCMAKE_INSTALL_LIBDIR="$FFBUILD_PREFIX"/lib \ 22 | -DBUILD_DISPATCHER=ON -DBUILD_DEV=ON \ 23 | -DBUILD_PREVIEW=OFF -DBUILD_TOOLS=OFF -DBUILD_TOOLS_ONEVPL_EXPERIMENTAL=OFF -DINSTALL_EXAMPLE_CODE=OFF \ 24 | -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=OFF .. 25 | 26 | ninja -j$(nproc) 27 | ninja install 28 | 29 | rm -rf "$FFBUILD_PREFIX"/{etc,share} 30 | 31 | cat /opt/ffbuild/lib/pkgconfig/vpl.pc 32 | } 33 | 34 | ffbuild_configure() { 35 | [[ $ADDINS_STR == *onevpl* ]] && echo --enable-libvpl 36 | } 37 | 38 | ffbuild_unconfigure() { 39 | [[ $ADDINS_STR == *4.4* ]] && return 0 40 | [[ $ADDINS_STR == *5.0* ]] && return 0 41 | [[ $ADDINS_STR == *5.1* ]] && return 0 42 | 43 | echo --disable-libvpl 44 | } 45 | -------------------------------------------------------------------------------- /scripts.d/50-openh264.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/cisco/openh264.git" 4 | SCRIPT_COMMIT="0c19a5c266275693484ed84edf6ff8cb7cd89d4e" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" openh264 12 | cd openh264 13 | 14 | local myconf=( 15 | PREFIX="$FFBUILD_PREFIX" 16 | INCLUDE_PREFIX="$FFBUILD_PREFIX"/include/wels 17 | BUILDTYPE=Release 18 | DEBUGSYMBOLS=False 19 | LIBDIR_NAME=lib 20 | CC="$FFBUILD_CROSS_PREFIX"gcc 21 | CXX="$FFBUILD_CROSS_PREFIX"g++ 22 | AR="$FFBUILD_CROSS_PREFIX"ar 23 | ) 24 | 25 | if [[ $TARGET == win32 ]]; then 26 | myconf+=( 27 | OS=mingw_nt 28 | ARCH=i686 29 | ) 30 | elif [[ $TARGET == win64 ]]; then 31 | myconf+=( 32 | OS=mingw_nt 33 | ARCH=x86_64 34 | ) 35 | elif [[ $TARGET == linux64 ]]; then 36 | myconf+=( 37 | OS=linux 38 | ARCH=x86_64 39 | ) 40 | elif [[ $TARGET == linuxarm64 ]]; then 41 | myconf+=( 42 | OS=linux 43 | ARCH=aarch64 44 | ) 45 | else 46 | echo "Unknown target" 47 | return -1 48 | fi 49 | 50 | make -j$(nproc) "${myconf[@]}" install-static 51 | } 52 | 53 | ffbuild_configure() { 54 | echo --enable-libopenh264 55 | } 56 | 57 | ffbuild_unconfigure() { 58 | echo --disable-libopenh264 59 | } 60 | -------------------------------------------------------------------------------- /scripts.d/25-openssl.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/openssl/openssl.git" 4 | SCRIPT_COMMIT="OpenSSL_1_1_1q" 5 | SCRIPT_TAGFILTER="OpenSSL_1_1_1*" 6 | 7 | ffbuild_enabled() { 8 | return 0 9 | } 10 | 11 | ffbuild_dockerbuild() { 12 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" openssl 13 | cd openssl 14 | 15 | local myconf=( 16 | threads 17 | zlib 18 | no-shared 19 | enable-camellia 20 | enable-ec 21 | enable-srp 22 | --prefix="$FFBUILD_PREFIX" 23 | ) 24 | 25 | if [[ $TARGET == win64 ]]; then 26 | myconf+=( 27 | --cross-compile-prefix="$FFBUILD_CROSS_PREFIX" 28 | mingw64 29 | ) 30 | elif [[ $TARGET == win32 ]]; then 31 | myconf+=( 32 | --cross-compile-prefix="$FFBUILD_CROSS_PREFIX" 33 | mingw 34 | ) 35 | elif [[ $TARGET == linux64 ]]; then 36 | myconf+=( 37 | --cross-compile-prefix="$FFBUILD_CROSS_PREFIX" 38 | linux-x86_64 39 | ) 40 | elif [[ $TARGET == linuxarm64 ]]; then 41 | myconf+=( 42 | --cross-compile-prefix="$FFBUILD_CROSS_PREFIX" 43 | linux-aarch64 44 | ) 45 | else 46 | echo "Unknown target" 47 | return -1 48 | fi 49 | 50 | ./Configure "${myconf[@]}" 51 | 52 | sed -i -e "/^CFLAGS=/s|=.*|=${CFLAGS}|" -e "/^LDFLAGS=/s|=[[:space:]]*$|=${LDFLAGS}|" Makefile 53 | 54 | make -j$(nproc) 55 | make install_sw 56 | } 57 | -------------------------------------------------------------------------------- /scripts.d/45-x11/40-libx11.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://gitlab.freedesktop.org/xorg/lib/libx11.git" 4 | SCRIPT_COMMIT="1f8fd7ff1cf688ec1d3b34397c6d58110bb0cae5" 5 | 6 | ffbuild_enabled() { 7 | [[ $TARGET != linux* ]] && return -1 8 | return 0 9 | } 10 | 11 | ffbuild_dockerbuild() { 12 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" libx11 13 | cd libx11 14 | 15 | autoreconf -i 16 | 17 | local myconf=( 18 | --prefix="$FFBUILD_PREFIX" 19 | --enable-shared 20 | --disable-static 21 | --with-pic 22 | --without-xmlto 23 | --without-fop 24 | --without-xsltproc 25 | --without-lint 26 | --disable-specs 27 | --enable-ipv6 28 | ) 29 | 30 | if [[ $TARGET == linuxarm64 ]]; then 31 | myconf+=( 32 | --disable-malloc0returnsnull 33 | ) 34 | fi 35 | 36 | if [[ $TARGET == linux* ]]; then 37 | myconf+=( 38 | --host="$FFBUILD_TOOLCHAIN" 39 | ) 40 | else 41 | echo "Unknown target" 42 | return -1 43 | fi 44 | 45 | export CFLAGS="$RAW_CFLAGS" 46 | export LDFLAFS="$RAW_LDFLAGS" 47 | 48 | ./configure "${myconf[@]}" 49 | make -j$(nproc) 50 | make install 51 | 52 | echo "Libs: -ldl" >> "$FFBUILD_PREFIX"/lib/pkgconfig/x11.pc 53 | 54 | gen-implib "$FFBUILD_PREFIX"/lib/{libX11-xcb.so.1,libX11-xcb.a} 55 | gen-implib "$FFBUILD_PREFIX"/lib/{libX11.so.6,libX11.a} 56 | rm "$FFBUILD_PREFIX"/lib/libX11{,-xcb}{.so*,.la} 57 | } 58 | -------------------------------------------------------------------------------- /scripts.d/50-zvbi.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://svn.code.sf.net/p/zapping/svn/trunk/vbi" 4 | SCRIPT_REV="4270" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerstage() { 11 | to_df "RUN --mount=src=${SELF},dst=/stage.sh --mount=src=patches/zvbi,dst=/patches run_stage /stage.sh" 12 | } 13 | 14 | ffbuild_dockerbuild() { 15 | retry-tool sh -c "rm -rf zvbi && svn checkout '${SCRIPT_REPO}@${SCRIPT_REV}' zvbi" 16 | cd zvbi 17 | 18 | for patch in /patches/*.patch; do 19 | echo "Applying $patch" 20 | patch -p1 < "$patch" 21 | done 22 | 23 | autoreconf -i 24 | 25 | local myconf=( 26 | --prefix="$FFBUILD_PREFIX" 27 | --disable-shared 28 | --enable-static 29 | --with-pic 30 | --without-doxygen 31 | --without-x 32 | --disable-dvb 33 | --disable-bktr 34 | --disable-nls 35 | --disable-proxy 36 | ) 37 | 38 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 39 | myconf+=( 40 | --host="$FFBUILD_TOOLCHAIN" 41 | ) 42 | else 43 | echo "Unknown target" 44 | return -1 45 | fi 46 | 47 | ./configure "${myconf[@]}" 48 | make -C src -j$(nproc) 49 | make -C src install 50 | make SUBDIRS=. install 51 | 52 | sed -i "s/\/[^ ]*libiconv.a/-liconv/" "$FFBUILD_PREFIX"/lib/pkgconfig/zvbi-0.2.pc 53 | } 54 | 55 | ffbuild_configure() { 56 | echo --enable-libzvbi 57 | } 58 | 59 | ffbuild_unconfigure() { 60 | echo --disable-libzvbi 61 | } 62 | -------------------------------------------------------------------------------- /scripts.d/50-vaapi/40-libdrm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://gitlab.freedesktop.org/mesa/drm.git" 4 | SCRIPT_COMMIT="0bd3e4e94f8270e64c7fd1e361a71da4a1547b1b" 5 | 6 | ffbuild_enabled() { 7 | [[ $TARGET != linux* ]] && return -1 8 | return 0 9 | } 10 | 11 | ffbuild_dockerbuild() { 12 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" libdrm 13 | cd libdrm 14 | 15 | mkdir build && cd build 16 | 17 | local myconf=( 18 | --prefix="$FFBUILD_PREFIX" 19 | -Ddefault_library=shared 20 | -Dudev=false 21 | -Dcairo-tests=disabled 22 | -Dvalgrind=disabled 23 | -Dexynos=disabled 24 | -Dfreedreno=disabled 25 | -Domap=disabled 26 | -Detnaviv=disabled 27 | -Dintel=enabled 28 | -Dnouveau=enabled 29 | -Dradeon=enabled 30 | -Damdgpu=enabled 31 | ) 32 | 33 | if [[ $TARGET == linux* ]]; then 34 | myconf+=( 35 | --cross-file=/cross.meson 36 | ) 37 | else 38 | echo "Unknown target" 39 | return -1 40 | fi 41 | 42 | export CFLAGS="$RAW_CFLAGS" 43 | export LDFLAFS="$RAW_LDFLAGS" 44 | 45 | meson "${myconf[@]}" .. 46 | ninja -j$(nproc) 47 | ninja install 48 | 49 | gen-implib "$FFBUILD_PREFIX"/lib/{libdrm.so.2,libdrm.a} 50 | rm "$FFBUILD_PREFIX"/lib/libdrm*.so* 51 | 52 | echo "Libs: -ldl" >> "$FFBUILD_PREFIX"/lib/pkgconfig/libdrm.pc 53 | } 54 | 55 | ffbuild_configure() { 56 | echo --enable-libdrm 57 | } 58 | 59 | ffbuild_unconfigure() { 60 | echo --disable-libdrm 61 | } 62 | -------------------------------------------------------------------------------- /scripts.d/50-libvpx.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://chromium.googlesource.com/webm/libvpx" 4 | SCRIPT_COMMIT="c03c882785dc96ed91799280e68f8998bec50b90" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" libvpx 12 | cd libvpx 13 | 14 | local myconf=( 15 | --disable-shared 16 | --enable-static 17 | --enable-pic 18 | --disable-examples 19 | --disable-tools 20 | --disable-docs 21 | --enable-vp9-highbitdepth 22 | --prefix="$FFBUILD_PREFIX" 23 | ) 24 | 25 | if [[ $TARGET == win64 ]]; then 26 | myconf+=( 27 | --target=x86_64-win64-gcc 28 | ) 29 | export CROSS="$FFBUILD_CROSS_PREFIX" 30 | elif [[ $TARGET == win32 ]]; then 31 | myconf+=( 32 | --target=x86-win32-gcc 33 | ) 34 | export CROSS="$FFBUILD_CROSS_PREFIX" 35 | elif [[ $TARGET == linux64 ]]; then 36 | myconf+=( 37 | --target=x86_64-linux-gcc 38 | ) 39 | export CROSS="$FFBUILD_CROSS_PREFIX" 40 | elif [[ $TARGET == linuxarm64 ]]; then 41 | myconf+=( 42 | --target=arm64-linux-gcc 43 | ) 44 | export CROSS="$FFBUILD_CROSS_PREFIX" 45 | else 46 | echo "Unknown target" 47 | return -1 48 | fi 49 | 50 | ./configure "${myconf[@]}" 51 | make -j$(nproc) 52 | make install 53 | } 54 | 55 | ffbuild_configure() { 56 | echo --enable-libvpx 57 | } 58 | 59 | ffbuild_unconfigure() { 60 | echo --disable-libvpx 61 | } 62 | -------------------------------------------------------------------------------- /scripts.d/10-mingw.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/mirror/mingw-w64.git" 4 | SCRIPT_COMMIT="ee5758234f77a6b573e415b26a1d387c46717f6b" 5 | 6 | ffbuild_enabled() { 7 | [[ $TARGET == win* ]] || return -1 8 | return 0 9 | } 10 | 11 | ffbuild_dockerlayer() { 12 | to_df "COPY --from=${SELFLAYER} /opt/mingw/. /" 13 | to_df "COPY --from=${SELFLAYER} /opt/mingw/. /opt/mingw" 14 | } 15 | 16 | ffbuild_dockerfinal() { 17 | to_df "COPY --from=${PREVLAYER} /opt/mingw/. /" 18 | } 19 | 20 | ffbuild_dockerbuild() { 21 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" mingw 22 | cd mingw 23 | 24 | cd mingw-w64-headers 25 | 26 | unset CFLAGS 27 | unset CXXFLAGS 28 | unset LDFLAGS 29 | unset PKG_CONFIG_LIBDIR 30 | 31 | GCC_SYSROOT="$(${FFBUILD_CROSS_PREFIX}gcc -print-sysroot)" 32 | 33 | local myconf=( 34 | --prefix="$GCC_SYSROOT/usr/$FFBUILD_TOOLCHAIN" 35 | --host="$FFBUILD_TOOLCHAIN" 36 | --with-default-win32-winnt="0x601" 37 | --enable-idl 38 | ) 39 | 40 | ./configure "${myconf[@]}" 41 | make -j$(nproc) 42 | make install DESTDIR="/opt/mingw" 43 | 44 | cd ../mingw-w64-libraries/winpthreads 45 | 46 | local myconf=( 47 | --prefix="$GCC_SYSROOT/usr/$FFBUILD_TOOLCHAIN" 48 | --host="$FFBUILD_TOOLCHAIN" 49 | --with-pic 50 | --disable-shared 51 | --enable-static 52 | ) 53 | 54 | ./configure "${myconf[@]}" 55 | make -j$(nproc) 56 | make install DESTDIR="/opt/mingw" 57 | } 58 | 59 | ffbuild_configure() { 60 | echo --disable-w32threads --enable-pthreads 61 | } 62 | -------------------------------------------------------------------------------- /patches/aribb24/12.patch: -------------------------------------------------------------------------------- 1 | From a5bcc6d17c20e18bdeec295089cc0cdfac9d35c8 Mon Sep 17 00:00:00 2001 2 | From: xtne6f 3 | Date: Thu, 7 Feb 2019 20:11:13 +0900 4 | Subject: [PATCH] Fix default macros 5 | 6 | --- 7 | src/decoder_macro.h | 4 ++-- 8 | 1 file changed, 2 insertions(+), 2 deletions(-) 9 | 10 | diff --git a/src/decoder_macro.h b/src/decoder_macro.h 11 | index 86edee4..513b81e 100644 12 | --- a/src/decoder_macro.h 13 | +++ b/src/decoder_macro.h 14 | @@ -30,7 +30,7 @@ static const unsigned char decoder_default_macro_1[] = { 15 | 0x1B,0x24,0x39,0x1B,0x29,0x31,0x1B,0x2A,0x30,0x1B,0x2B,0x20,0x70,0x0F,0x1B,0x7D 16 | }; 17 | static const unsigned char decoder_default_macro_2[] = { 18 | - 0x1B,0x24,0x39,0x1B,0x29,0x20,0x40,0x1B,0x2A,0x30,0x1B,0x2B,0x20,0x70,0x0F,0x1B,0x7D 19 | + 0x1B,0x24,0x39,0x1B,0x29,0x20,0x41,0x1B,0x2A,0x30,0x1B,0x2B,0x20,0x70,0x0F,0x1B,0x7D 20 | }; 21 | static const unsigned char decoder_default_macro_3[] = { 22 | 0x1B,0x28,0x32,0x1B,0x29,0x34,0x1B,0x2A,0x35,0x1B,0x2B,0x20,0x70,0x0F,0x1B,0x7D 23 | @@ -39,7 +39,7 @@ static const unsigned char decoder_default_macro_4[] = { 24 | 0x1B,0x28,0x32,0x1B,0x29,0x33,0x1B,0x2A,0x35,0x1B,0x2B,0x20,0x70,0x0F,0x1B,0x7D 25 | }; 26 | static const unsigned char decoder_default_macro_5[] = { 27 | - 0x1B,0x28,0x32,0x1B,0x29,0x20,0x40,0x1B,0x2A,0x35,0x1B,0x2B,0x20,0x70,0x0F,0x1B,0x7D 28 | + 0x1B,0x28,0x32,0x1B,0x29,0x20,0x41,0x1B,0x2A,0x35,0x1B,0x2B,0x20,0x70,0x0F,0x1B,0x7D 29 | }; 30 | static const unsigned char decoder_default_macro_6[] = { 31 | 0x1B,0x28,0x20,0x41,0x1B,0x29,0x20,0x42,0x1B,0x2A,0x20,0x43,0x1B,0x2B,0x20,0x70,0x0F,0x1B,0x7D 32 | -------------------------------------------------------------------------------- /scripts.d/50-vulkan/60-libplacebo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://code.videolan.org/videolan/libplacebo.git" 4 | SCRIPT_COMMIT="35cbea8b1b293998b5da44a1ce9d7d1f2b51da1e" 5 | 6 | ffbuild_enabled() { 7 | [[ $ADDINS_STR == *4.4* ]] && return -1 8 | return 0 9 | } 10 | 11 | ffbuild_dockerbuild() { 12 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" placebo 13 | cd placebo 14 | git submodule update --init --recursive 15 | 16 | mkdir build && cd build 17 | 18 | local myconf=( 19 | --prefix="$FFBUILD_PREFIX" 20 | --buildtype=release 21 | --default-library=static 22 | -Dvulkan=enabled 23 | -Dvk-proc-addr=disabled 24 | -Dvulkan-registry="$FFBUILD_PREFIX"/share/vulkan/registry/vk.xml 25 | -Dshaderc=enabled 26 | -Dglslang=disabled 27 | -Ddemos=false 28 | -Dtests=false 29 | -Dbench=false 30 | -Dfuzz=false 31 | ) 32 | 33 | if [[ $TARGET == win* ]]; then 34 | myconf+=( 35 | -Dd3d11=enabled 36 | ) 37 | fi 38 | 39 | if [[ $TARGET == win* || $TARGET == linux* ]]; then 40 | myconf+=( 41 | --cross-file=/cross.meson 42 | ) 43 | else 44 | echo "Unknown target" 45 | return -1 46 | fi 47 | 48 | meson "${myconf[@]}" .. 49 | ninja -j$(nproc) 50 | ninja install 51 | 52 | echo "Libs.private: -lstdc++" >> "$FFBUILD_PREFIX"/lib/pkgconfig/libplacebo.pc 53 | } 54 | 55 | ffbuild_configure() { 56 | echo --enable-libplacebo 57 | } 58 | 59 | ffbuild_unconfigure() { 60 | [[ $ADDINS_STR == *4.4* ]] && return 0 61 | echo --disable-libplacebo 62 | } 63 | -------------------------------------------------------------------------------- /.github/workflows/pr.yml: -------------------------------------------------------------------------------- 1 | name: Test Full Build 2 | on: 3 | pull_request: 4 | branches: 5 | - master 6 | paths-ignore: 7 | - '**.md' 8 | - 'LICENSE' 9 | 10 | env: 11 | DOCKER_BUILDKIT: 1 12 | 13 | jobs: 14 | build: 15 | name: Test Full Build 16 | runs-on: ubuntu-latest 17 | strategy: 18 | fail-fast: false 19 | matrix: 20 | target: [win32,win64,linux64,linuxarm64] 21 | variant: [lgpl,gpl 4.4,gpl 5.1,lgpl 4.4,lgpl 5.1,gpl-shared,lgpl-shared,gpl-shared 4.4,gpl-shared 5.1,lgpl-shared 4.4,lgpl-shared 5.1] 22 | quickbuild: [1] 23 | include: 24 | - target: win32 25 | variant: gpl 26 | quickbuild: '' 27 | - target: win64 28 | variant: gpl 29 | quickbuild: '' 30 | - target: linux64 31 | variant: gpl 32 | quickbuild: '' 33 | - target: linuxarm64 34 | variant: gpl 35 | quickbuild: '' 36 | steps: 37 | - name: Checkout 38 | uses: actions/checkout@v3 39 | - name: Install buildx 40 | uses: docker/setup-buildx-action@v2 41 | with: 42 | config: .github/buildkit.toml 43 | driver: docker 44 | - name: Build Image 45 | run: ./makeimage.sh ${{ matrix.target }} ${{ matrix.variant }} 46 | env: 47 | QUICKBUILD: ${{ matrix.quickbuild }} 48 | - name: Build ffmpeg 49 | run: ./build.sh ${{ matrix.target }} ${{ matrix.variant }} 50 | - name: Upload artifacts 51 | uses: actions/upload-artifact@v3 52 | with: 53 | name: ffmpeg 54 | path: artifacts/* 55 | -------------------------------------------------------------------------------- /scripts.d/50-rav1e.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/xiph/rav1e.git" 4 | SCRIPT_COMMIT="f9310a9aa994594f8e144d4b1d59a4034e6dff6c" 5 | 6 | ffbuild_enabled() { 7 | [[ $TARGET == win32 ]] && return -1 8 | return 0 9 | } 10 | 11 | ffbuild_dockerbuild() { 12 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" rav1e 13 | cd rav1e 14 | 15 | local myconf=( 16 | --prefix="$FFBUILD_PREFIX" \ 17 | --library-type=staticlib \ 18 | --crt-static \ 19 | ) 20 | 21 | if [[ $TARGET == win_not_yet ]]; then 22 | # CHECKME: back to release once lto is fixed 23 | myconf+=( 24 | --profile release-no-lto 25 | ) 26 | else 27 | myconf+=( 28 | --release 29 | ) 30 | fi 31 | 32 | if [[ -n "$FFBUILD_RUST_TARGET" ]]; then 33 | unset PKG_CONFIG_LIBDIR 34 | 35 | export CC="gcc" 36 | export CXX="g++" 37 | export TARGET_CC="${FFBUILD_CROSS_PREFIX}gcc" 38 | export TARGET_CXX="${FFBUILD_CROSS_PREFIX}g++" 39 | export CROSS_COMPILE=1 40 | export TARGET_CFLAGS="$CFLAGS" 41 | export TARGET_CXXFLAGS="$CFLAGS" 42 | unset CFLAGS 43 | unset CXXFLAGS 44 | 45 | myconf+=( 46 | --target="$FFBUILD_RUST_TARGET" 47 | ) 48 | cat <$CARGO_HOME/config.toml 49 | [target.$FFBUILD_RUST_TARGET] 50 | linker = "${FFBUILD_CROSS_PREFIX}gcc" 51 | ar = "${FFBUILD_CROSS_PREFIX}ar" 52 | EOF 53 | fi 54 | 55 | cargo cinstall -v "${myconf[@]}" 56 | } 57 | 58 | ffbuild_configure() { 59 | echo --enable-librav1e 60 | } 61 | 62 | ffbuild_unconfigure() { 63 | echo --disable-librav1e 64 | } 65 | -------------------------------------------------------------------------------- /scripts.d/50-vaapi/50-libva.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/intel/libva.git" 4 | SCRIPT_COMMIT="ef1df02f3ad45ac98b1fa57c373176d7c14dcc57" 5 | 6 | ffbuild_enabled() { 7 | [[ $TARGET != linux* ]] && return -1 8 | [[ $TARGET == linuxarm64 ]] && return -1 9 | return 0 10 | } 11 | 12 | ffbuild_dockerbuild() { 13 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" libva 14 | cd libva 15 | 16 | autoreconf -i 17 | 18 | local myconf=( 19 | --prefix="$FFBUILD_PREFIX" 20 | --enable-shared 21 | --disable-static 22 | --with-pic 23 | --disable-docs 24 | --enable-drm 25 | --enable-x11 26 | --disable-glx 27 | --disable-wayland 28 | ) 29 | 30 | if [[ $TARGET == linux64 ]]; then 31 | myconf+=( 32 | --host="$FFBUILD_TOOLCHAIN" 33 | --with-drivers-path="/usr/lib/x86_64-linux-gnu/dri" 34 | --sysconfdir="/etc" 35 | ) 36 | else 37 | echo "Unknown target" 38 | return -1 39 | fi 40 | 41 | export CFLAGS="$RAW_CFLAGS" 42 | export LDFLAFS="$RAW_LDFLAGS" 43 | 44 | ./configure "${myconf[@]}" 45 | make -j$(nproc) 46 | make install 47 | 48 | gen-implib "$FFBUILD_PREFIX"/lib/{libva.so.2,libva.a} 49 | gen-implib "$FFBUILD_PREFIX"/lib/{libva-drm.so.2,libva-drm.a} 50 | gen-implib "$FFBUILD_PREFIX"/lib/{libva-x11.so.2,libva-x11.a} 51 | rm "$FFBUILD_PREFIX"/lib/libva{,-drm,-x11}{.so*,.la} 52 | 53 | echo "Libs: -ldl" >> "$FFBUILD_PREFIX"/lib/pkgconfig/libva.pc 54 | } 55 | 56 | ffbuild_configure() { 57 | echo --enable-vaapi 58 | } 59 | 60 | ffbuild_unconfigure() { 61 | echo --disable-vaapi 62 | } 63 | -------------------------------------------------------------------------------- /scripts.d/50-vulkan/55-spirv-cross.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/KhronosGroup/SPIRV-Cross.git" 4 | SCRIPT_COMMIT="f09ba2777714871bddb70d049878af34b94fa54d" 5 | 6 | ffbuild_enabled() { 7 | [[ $ADDINS_STR == *4.4* ]] && return -1 8 | return 0 9 | } 10 | 11 | ffbuild_dockerbuild() { 12 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" spirv-cross 13 | cd spirv-cross 14 | 15 | VER_MAJ="$(grep 'set(spirv-cross-abi-major' CMakeLists.txt | sed -re 's/.* ([0-9]+)\)/\1/')" 16 | VER_MIN="$(grep 'set(spirv-cross-abi-minor' CMakeLists.txt | sed -re 's/.* ([0-9]+)\)/\1/')" 17 | VER_PCH="$(grep 'set(spirv-cross-abi-patch' CMakeLists.txt | sed -re 's/.* ([0-9]+)\)/\1/')" 18 | VER_FULL="$VER_MAJ.$VER_MIN.$VER_PCH" 19 | 20 | mkdir build && cd build 21 | 22 | cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" \ 23 | -DSPIRV_CROSS_SHARED=OFF -DSPIRV_CROSS_STATIC=ON -DSPIRV_CROSS_CLI=OFF -DSPIRV_CROSS_ENABLE_TESTS=OFF -DSPIRV_CROSS_FORCE_PIC=ON -DSPIRV_CROSS_ENABLE_CPP=OFF .. 24 | make -j$(nproc) 25 | make install 26 | 27 | cat >"$FFBUILD_PREFIX"/lib/pkgconfig/spirv-cross-c-shared.pc <> "$FFBUILD_PREFIX"/lib/pkgconfig/shaderc_combined.pc 30 | echo "Libs: -lstdc++" >> "$FFBUILD_PREFIX"/lib/pkgconfig/shaderc_static.pc 31 | 32 | cp "$FFBUILD_PREFIX"/lib/pkgconfig/{shaderc_combined,shaderc}.pc 33 | 34 | if [[ $TARGET == win* ]]; then 35 | rm -r "$FFBUILD_PREFIX"/bin "$FFBUILD_PREFIX"/lib/*.dll.a 36 | elif [[ $TARGET == linux* ]]; then 37 | rm -r "$FFBUILD_PREFIX"/bin "$FFBUILD_PREFIX"/lib/*.so* 38 | else 39 | echo "Unknown target" 40 | return -1 41 | fi 42 | } 43 | 44 | ffbuild_configure() { 45 | echo --enable-libshaderc 46 | } 47 | 48 | ffbuild_unconfigure() { 49 | [[ $ADDINS_STR == *4.4* ]] && return 0 50 | echo --disable-libshaderc 51 | } 52 | -------------------------------------------------------------------------------- /images/base-win32/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG GH_REPO=ghcr.io/btbn/ffmpeg-builds 2 | FROM $GH_REPO/base:latest 3 | 4 | RUN --mount=src=ct-ng-config,dst=/.config \ 5 | git clone --filter=blob:none https://github.com/crosstool-ng/crosstool-ng.git /ct-ng && cd /ct-ng && \ 6 | ./bootstrap && \ 7 | ./configure --enable-local && \ 8 | make -j$(nproc) && \ 9 | cp /.config .config && \ 10 | ./ct-ng build && \ 11 | cd / && \ 12 | rm -rf ct-ng 13 | 14 | # Prepare "cross" environment to heavily favour static builds 15 | RUN \ 16 | find /opt/ct-ng \ 17 | -name "*.dll" \ 18 | -or -name "*.dll.a" \ 19 | -delete && \ 20 | mkdir /opt/ffbuild 21 | 22 | RUN rustup target add i686-pc-windows-gnu 23 | 24 | ADD toolchain.cmake /toolchain.cmake 25 | ADD cross.meson /cross.meson 26 | 27 | ENV PATH="/opt/ct-ng/bin:${PATH}" \ 28 | FFBUILD_TARGET_FLAGS="--pkg-config=pkg-config --cross-prefix=i686-w64-mingw32- --arch=i686 --target-os=mingw32" \ 29 | FFBUILD_TOOLCHAIN=i686-w64-mingw32 \ 30 | FFBUILD_CROSS_PREFIX=i686-w64-mingw32- \ 31 | FFBUILD_RUST_TARGET=i686-pc-windows-gnu \ 32 | FFBUILD_PREFIX=/opt/ffbuild \ 33 | FFBUILD_CMAKE_TOOLCHAIN=/toolchain.cmake \ 34 | PKG_CONFIG=pkg-config \ 35 | PKG_CONFIG_LIBDIR=/opt/ffbuild/lib/pkgconfig:/opt/ffbuild/share/pkgconfig \ 36 | CFLAGS="-static-libgcc -static-libstdc++ -I/opt/ffbuild/include -O2 -pipe -D_FORTIFY_SOURCE=2 -fstack-protector-strong" \ 37 | CXXFLAGS="-static-libgcc -static-libstdc++ -I/opt/ffbuild/include -O2 -pipe -D_FORTIFY_SOURCE=2 -fstack-protector-strong" \ 38 | LDFLAGS="-static-libgcc -static-libstdc++ -L/opt/ffbuild/lib -O2 -pipe -fstack-protector-strong" \ 39 | DLLTOOL="i686-w64-mingw32-dlltool" \ 40 | STAGE_CFLAGS="-fno-semantic-interposition" \ 41 | STAGE_CXXFLAGS="-fno-semantic-interposition" 42 | -------------------------------------------------------------------------------- /scripts.d/45-pulseaudio.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git" 4 | SCRIPT_COMMIT="45df212d6614ad7f57d9e53616c0faac00195c86" 5 | 6 | ffbuild_enabled() { 7 | [[ $TARGET == linux* ]] || return 1 8 | return 0 9 | } 10 | 11 | ffbuild_dockerbuild() { 12 | git clone --filter=blob:none "$SCRIPT_REPO" pa 13 | cd pa 14 | git checkout "$SCRIPT_COMMIT" 15 | 16 | # Kill build of utils and their sndfile dep 17 | echo > src/utils/meson.build 18 | echo > src/pulsecore/sndfile-util.c 19 | echo > src/pulsecore/sndfile-util.h 20 | sed -ri -e 's/(sndfile_dep = .*)\)/\1, required : false)/' meson.build 21 | sed -ri -e 's/shared_library/library/g' src/meson.build src/pulse/meson.build 22 | 23 | mkdir build && cd build 24 | 25 | local myconf=( 26 | --prefix="$FFBUILD_PREFIX" 27 | --buildtype=release 28 | --default-library=static 29 | -Ddaemon=false 30 | -Dclient=true 31 | -Ddoxygen=false 32 | -Dgcov=false 33 | -Dman=false 34 | -Dtests=false 35 | -Dipv6=true 36 | -Dopenssl=enabled 37 | ) 38 | 39 | if [[ $TARGET == linux* ]]; then 40 | myconf+=( 41 | --cross-file=/cross.meson 42 | ) 43 | else 44 | echo "Unknown target" 45 | return -1 46 | fi 47 | 48 | meson "${myconf[@]}" .. 49 | ninja -j"$(nproc)" 50 | ninja install 51 | 52 | rm -r "$FFBUILD_PREFIX"/share 53 | 54 | echo "Libs.private: -ldl -lrt" >> "$FFBUILD_PREFIX"/lib/pkgconfig/libpulse.pc 55 | echo "Libs.private: -ldl -lrt" >> "$FFBUILD_PREFIX"/lib/pkgconfig/libpulse-simple.pc 56 | } 57 | 58 | ffbuild_configure() { 59 | echo --enable-libpulse 60 | } 61 | 62 | ffbuild_unconfigure() { 63 | echo --disable-libpulse 64 | } 65 | -------------------------------------------------------------------------------- /images/base-win64/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG GH_REPO=ghcr.io/btbn/ffmpeg-builds 2 | FROM $GH_REPO/base:latest 3 | 4 | RUN --mount=src=ct-ng-config,dst=/.config \ 5 | git clone --filter=blob:none https://github.com/crosstool-ng/crosstool-ng.git /ct-ng && cd /ct-ng && \ 6 | ./bootstrap && \ 7 | ./configure --enable-local && \ 8 | make -j$(nproc) && \ 9 | cp /.config .config && \ 10 | ./ct-ng build && \ 11 | cd / && \ 12 | rm -rf ct-ng 13 | 14 | # Prepare "cross" environment to heavily favour static builds 15 | RUN \ 16 | find /opt/ct-ng \ 17 | -name "*.dll" \ 18 | -or -name "*.dll.a" \ 19 | -delete && \ 20 | mkdir /opt/ffbuild 21 | 22 | RUN rustup target add x86_64-pc-windows-gnu 23 | 24 | ADD toolchain.cmake /toolchain.cmake 25 | ADD cross.meson /cross.meson 26 | 27 | ENV PATH="/opt/ct-ng/bin:${PATH}" \ 28 | FFBUILD_TARGET_FLAGS="--pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32" \ 29 | FFBUILD_TOOLCHAIN=x86_64-w64-mingw32 \ 30 | FFBUILD_CROSS_PREFIX=x86_64-w64-mingw32- \ 31 | FFBUILD_RUST_TARGET=x86_64-pc-windows-gnu \ 32 | FFBUILD_PREFIX=/opt/ffbuild \ 33 | FFBUILD_CMAKE_TOOLCHAIN=/toolchain.cmake \ 34 | PKG_CONFIG=pkg-config \ 35 | PKG_CONFIG_LIBDIR=/opt/ffbuild/lib/pkgconfig:/opt/ffbuild/share/pkgconfig \ 36 | CFLAGS="-static-libgcc -static-libstdc++ -I/opt/ffbuild/include -O2 -pipe -D_FORTIFY_SOURCE=2 -fstack-protector-strong" \ 37 | CXXFLAGS="-static-libgcc -static-libstdc++ -I/opt/ffbuild/include -O2 -pipe -D_FORTIFY_SOURCE=2 -fstack-protector-strong" \ 38 | LDFLAGS="-static-libgcc -static-libstdc++ -L/opt/ffbuild/lib -O2 -pipe -fstack-protector-strong" \ 39 | DLLTOOL="x86_64-w64-mingw32-dlltool" \ 40 | STAGE_CFLAGS="-fno-semantic-interposition" \ 41 | STAGE_CXXFLAGS="-fno-semantic-interposition" 42 | -------------------------------------------------------------------------------- /util/repack_latest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | if [[ $# -lt 2 ]]; then 5 | echo "Missing arguments" 6 | exit -1 7 | fi 8 | 9 | RELEASE_DIR="$(realpath "$1")" 10 | shift 11 | mkdir -p "$RELEASE_DIR" 12 | 13 | rm -rf repack_dir 14 | mkdir repack_dir 15 | trap "rm -rf repack_dir" EXIT 16 | 17 | while [[ $# -gt 0 ]]; do 18 | INPUT="$1" 19 | shift 20 | 21 | ( 22 | set -e 23 | REPACK_DIR="repack_dir/$BASHPID" 24 | rm -rf "$REPACK_DIR" 25 | mkdir "$REPACK_DIR" 26 | 27 | if [[ $INPUT == *.zip ]]; then 28 | unzip "$INPUT" -d "$REPACK_DIR" 29 | elif [[ $INPUT == *.tar.xz ]]; then 30 | tar xvaf "$INPUT" -C "$REPACK_DIR" 31 | else 32 | echo "Unknown input file type: $INPUT" 33 | exit 1 34 | fi 35 | 36 | cd "$REPACK_DIR" 37 | 38 | INAME="$(echo ffmpeg-*)" 39 | TAGNAME="$(cut -d- -f2 <<<"$INAME")" 40 | 41 | if [[ $TAGNAME == N ]]; then 42 | TAGNAME="master" 43 | elif [[ $TAGNAME == n* ]]; then 44 | TAGNAME="$(sed -re 's/([0-9]+\.[0-9]+).*/\1/' <<<"$TAGNAME")" 45 | fi 46 | 47 | if [[ "$INAME" =~ -[0-9]+-g ]]; then 48 | ONAME="ffmpeg-$TAGNAME-latest-$(cut -d- -f5- <<<"$INAME")" 49 | else 50 | ONAME="ffmpeg-$TAGNAME-latest-$(cut -d- -f3- <<<"$INAME")" 51 | fi 52 | 53 | mv "$INAME" "$ONAME" 54 | 55 | if [[ $INPUT == *.zip ]]; then 56 | zip -9 -r "$RELEASE_DIR/$ONAME.zip" "$ONAME" 57 | elif [[ $INPUT == *.tar.xz ]]; then 58 | tar cvJf "$RELEASE_DIR/$ONAME.tar.xz" "$ONAME" 59 | fi 60 | 61 | rm -rf "$REPACK_DIR" 62 | ) & 63 | 64 | while [[ $(jobs | wc -l) -gt 3 ]]; do 65 | wait %1 66 | done 67 | done 68 | 69 | while [[ $(jobs | wc -l) -gt 0 ]]; do 70 | wait %1 71 | done 72 | rm -rf repack_dir 73 | -------------------------------------------------------------------------------- /util/vars.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ $# -lt 2 ]]; then 4 | echo "Invalid Arguments" 5 | exit -1 6 | fi 7 | 8 | TARGET="$1" 9 | VARIANT="$2" 10 | shift 2 11 | 12 | if ! [[ -f "variants/${TARGET}-${VARIANT}.sh" ]]; then 13 | echo "Invalid target/variant" 14 | exit -1 15 | fi 16 | 17 | LICENSE_FILE="COPYING.LGPLv2.1" 18 | 19 | ADDINS=() 20 | ADDINS_STR="" 21 | while [[ "$#" -gt 0 ]]; do 22 | if ! [[ -f "addins/${1}.sh" ]]; then 23 | echo "Invalid addin: $1" 24 | exit -1 25 | fi 26 | 27 | ADDINS+=( "$1" ) 28 | ADDINS_STR="${ADDINS_STR}${ADDINS_STR:+-}$1" 29 | 30 | shift 31 | done 32 | 33 | REPO="${GITHUB_REPOSITORY:-btbn/ffmpeg-builds}" 34 | REPO="${REPO,,}" 35 | REGISTRY="${REGISTRY_OVERRIDE:-ghcr.io}" 36 | BASE_IMAGE="${REGISTRY}/${REPO}/base:latest" 37 | TARGET_IMAGE="${REGISTRY}/${REPO}/base-${TARGET}:latest" 38 | IMAGE="${REGISTRY}/${REPO}/${TARGET}-${VARIANT}${ADDINS_STR:+-}${ADDINS_STR}:latest" 39 | 40 | ffbuild_dockerstage() { 41 | to_df "RUN --mount=src=${SELF},dst=/stage.sh run_stage /stage.sh" 42 | } 43 | 44 | ffbuild_dockerlayer() { 45 | to_df "COPY --from=${SELFLAYER} \$FFBUILD_PREFIX/. \$FFBUILD_PREFIX" 46 | } 47 | 48 | ffbuild_dockerfinal() { 49 | to_df "COPY --from=${PREVLAYER} \$FFBUILD_PREFIX/. \$FFBUILD_PREFIX" 50 | } 51 | 52 | ffbuild_configure() { 53 | return 0 54 | } 55 | 56 | ffbuild_unconfigure() { 57 | return 0 58 | } 59 | 60 | ffbuild_cflags() { 61 | return 0 62 | } 63 | 64 | ffbuild_uncflags() { 65 | return 0 66 | } 67 | 68 | ffbuild_cxxflags() { 69 | return 0 70 | } 71 | 72 | ffbuild_uncxxflags() { 73 | return 0 74 | } 75 | 76 | ffbuild_ldexeflags() { 77 | return 0 78 | } 79 | 80 | ffbuild_unldexeflags() { 81 | return 0 82 | } 83 | 84 | ffbuild_ldflags() { 85 | return 0 86 | } 87 | 88 | ffbuild_unldflags() { 89 | return 0 90 | } 91 | 92 | ffbuild_libs() { 93 | return 0 94 | } 95 | 96 | ffbuild_unlibs() { 97 | return 0 98 | } 99 | -------------------------------------------------------------------------------- /generate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | cd "$(dirname "$0")" 4 | source util/vars.sh 5 | 6 | rm -f Dockerfile 7 | 8 | layername() { 9 | printf "layer-" 10 | basename "$1" | sed 's/.sh$//' 11 | } 12 | 13 | exec_dockerstage() { 14 | SCRIPT="$1" 15 | ( 16 | SELF="$SCRIPT" 17 | source "$SCRIPT" 18 | ffbuild_enabled || exit 0 19 | ffbuild_dockerstage || exit $? 20 | ) 21 | } 22 | 23 | to_df() { 24 | _of="${TODF:-Dockerfile}" 25 | printf "$@" >> "$_of" 26 | echo >> "$_of" 27 | } 28 | 29 | to_df "FROM ${REGISTRY}/${REPO}/base-${TARGET}:latest AS base" 30 | to_df "ENV TARGET=$TARGET VARIANT=$VARIANT REPO=$REPO ADDINS_STR=$ADDINS_STR" 31 | 32 | PREVLAYER="base" 33 | for ID in $(ls -1d scripts.d/??-* | sed -s 's|^.*/\(..\).*|\1|' | sort -u); do 34 | LAYER="layer-$ID" 35 | 36 | for STAGE in scripts.d/$ID-*; do 37 | to_df "FROM $PREVLAYER AS $(layername "$STAGE")" 38 | 39 | if [[ -f "$STAGE" ]]; then 40 | exec_dockerstage "$STAGE" 41 | else 42 | for STAGE in "${STAGE}"/??-*; do 43 | exec_dockerstage "$STAGE" 44 | done 45 | fi 46 | done 47 | 48 | to_df "FROM $PREVLAYER AS $LAYER" 49 | for STAGE in scripts.d/$ID-*; do 50 | if [[ -f "$STAGE" ]]; then 51 | SCRIPT="$STAGE" 52 | else 53 | SCRIPTS=( "$STAGE"/??-* ) 54 | SCRIPT="${SCRIPTS[-1]}" 55 | fi 56 | 57 | ( 58 | SELF="$SCRIPT" 59 | SELFLAYER="$(layername "$STAGE")" 60 | source "$SCRIPT" 61 | ffbuild_enabled || exit 0 62 | ffbuild_dockerlayer || exit $? 63 | TODF="Dockerfile.final" PREVLAYER="__PREVLAYER__" \ 64 | ffbuild_dockerfinal || exit $? 65 | ) 66 | done 67 | 68 | PREVLAYER="$LAYER" 69 | done 70 | 71 | to_df "FROM base" 72 | sed "s/__PREVLAYER__/$PREVLAYER/g" Dockerfile.final | sort -u >> Dockerfile 73 | rm Dockerfile.final 74 | -------------------------------------------------------------------------------- /scripts.d/50-sdl.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/libsdl-org/SDL.git" 4 | SCRIPT_COMMIT="92c71ae385d9770e7ac3db4c9a072151e923012d" 5 | 6 | ffbuild_enabled() { 7 | return 0 8 | } 9 | 10 | ffbuild_dockerbuild() { 11 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" sdl 12 | cd sdl 13 | 14 | mkdir build && cd build 15 | 16 | local mycmake=( 17 | -DSDL_SHARED=OFF 18 | -DSDL_STATIC=ON 19 | -DSDL_STATIC_PIC=ON 20 | -DSDL_TEST=OFF 21 | ) 22 | 23 | if [[ $TARGET == linux* ]]; then 24 | mycmake+=( 25 | -DSDL_X11=ON 26 | -DSDL_X11_SHARED=OFF 27 | -DHAVE_XGENERICEVENT=TRUE 28 | -DSDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM=1 29 | 30 | -DSDL_PULSEAUDIO=ON 31 | -DSDL_PULSEAUDIO_SHARED=OFF 32 | ) 33 | fi 34 | 35 | cmake -GNinja -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" "${mycmake[@]}" .. 36 | 37 | ninja -j$(nproc) 38 | ninja install 39 | 40 | if [[ $TARGET == linux* ]]; then 41 | sed -ri -e 's/\-Wl,\-\-no\-undefined.*//' \ 42 | -e 's/ \-l\/.+?\.a//g' \ 43 | "$FFBUILD_PREFIX"/lib/pkgconfig/sdl2.pc 44 | echo 'Requires: libpulse-simple xxf86vm xscrnsaver xrandr xfixes xi xinerama xcursor' >> "$FFBUILD_PREFIX"/lib/pkgconfig/sdl2.pc 45 | elif [[ $TARGET == win* ]]; then 46 | sed -ri -e 's/\-Wl,\-\-no\-undefined.*//' \ 47 | -e 's/ \-mwindows//g' \ 48 | -e 's/ \-lSDL2main//g' \ 49 | -e 's/ \-Dmain=SDL_main//g' \ 50 | "$FFBUILD_PREFIX"/lib/pkgconfig/sdl2.pc 51 | fi 52 | 53 | sed -ri -e 's/ -lSDL2//g' \ 54 | -e 's/Libs: /Libs: -lSDL2 /'\ 55 | "$FFBUILD_PREFIX"/lib/pkgconfig/sdl2.pc 56 | 57 | echo 'Requires: samplerate' >> "$FFBUILD_PREFIX"/lib/pkgconfig/sdl2.pc 58 | } 59 | 60 | ffbuild_configure() { 61 | echo --enable-sdl2 62 | } 63 | 64 | ffbuild_unconfigure() { 65 | echo --disable-sdl2 66 | } 67 | -------------------------------------------------------------------------------- /scripts.d/45-opencl.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/KhronosGroup/OpenCL-Headers.git" 4 | SCRIPT_COMMIT="b590a6bfe034ea3a418b7b523e3490956bcb367a" 5 | 6 | SCRIPT_REPO2="https://github.com/KhronosGroup/OpenCL-ICD-Loader.git" 7 | SCRIPT_COMMIT2="c5a6e013ad7c8b379fc94e3c849aa3396900a63c" 8 | 9 | ffbuild_enabled() { 10 | return 0 11 | } 12 | 13 | ffbuild_dockerbuild() { 14 | mkdir opencl && cd opencl 15 | 16 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" headers 17 | mkdir -p "$FFBUILD_PREFIX"/include/CL 18 | cp -r headers/CL/* "$FFBUILD_PREFIX"/include/CL/. 19 | 20 | git-mini-clone "$SCRIPT_REPO2" "$SCRIPT_COMMIT2" loader 21 | cd loader 22 | 23 | mkdir build && cd build 24 | 25 | cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" -DOPENCL_ICD_LOADER_HEADERS_DIR="$FFBUILD_PREFIX"/include -DOPENCL_ICD_LOADER_BUILD_SHARED_LIBS=OFF -DOPENCL_ICD_LOADER_DISABLE_OPENCLON12=ON -DOPENCL_ICD_LOADER_PIC=ON -DOPENCL_ICD_LOADER_BUILD_TESTING=OFF -DBUILD_TESTING=OFF .. 26 | make -j$(nproc) 27 | make install 28 | 29 | echo "prefix=$FFBUILD_PREFIX" > OpenCL.pc 30 | echo "exec_prefix=\${prefix}" >> OpenCL.pc 31 | echo "libdir=\${exec_prefix}/lib" >> OpenCL.pc 32 | echo "includedir=\${prefix}/include" >> OpenCL.pc 33 | echo >> OpenCL.pc 34 | echo "Name: OpenCL" >> OpenCL.pc 35 | echo "Description: OpenCL ICD Loader" >> OpenCL.pc 36 | echo "Version: 9999" >> OpenCL.pc 37 | echo "Libs: -L\${libdir} -lOpenCL" >> OpenCL.pc 38 | echo "Cflags: -I\${includedir}" >> OpenCL.pc 39 | 40 | if [[ $TARGET == linux* ]]; then 41 | echo "Libs.private: -ldl" >> OpenCL.pc 42 | elif [[ $TARGET == win* ]]; then 43 | echo "Libs.private: -lole32 -lshlwapi -lcfgmgr32" >> OpenCL.pc 44 | fi 45 | 46 | mkdir -p "$FFBUILD_PREFIX"/lib/pkgconfig 47 | mv OpenCL.pc "$FFBUILD_PREFIX"/lib/pkgconfig/OpenCL.pc 48 | } 49 | 50 | ffbuild_configure() { 51 | echo --enable-opencl 52 | } 53 | 54 | ffbuild_unconfigure() { 55 | echo --disable-opencl 56 | } 57 | -------------------------------------------------------------------------------- /makeimage.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -xe 3 | cd "$(dirname "$0")" 4 | source util/vars.sh 5 | 6 | TMPCFG="$(mktemp --suffix=.toml)" 7 | cat <"$TMPCFG" 8 | [worker.oci] 9 | max-parallelism = 4 10 | EOF 11 | trap "rm -f '$TMPCFG'" EXIT 12 | 13 | docker buildx inspect ffbuilder &>/dev/null || docker buildx create \ 14 | --bootstrap \ 15 | --name ffbuilder \ 16 | --config "$TMPCFG" \ 17 | --driver-opt network=host \ 18 | --driver-opt env.BUILDKIT_STEP_LOG_MAX_SIZE=-1 \ 19 | --driver-opt env.BUILDKIT_STEP_LOG_MAX_SPEED=-1 20 | 21 | if [[ -z "$QUICKBUILD" ]]; then 22 | docker container inspect ffbuildreg &>/dev/null || \ 23 | docker run --rm -d -p 127.0.0.1:0:5000 --name ffbuildreg registry:2 24 | LOCAL_REG_PORT="$(docker container inspect --format='{{range $p, $conf := .NetworkSettings.Ports}}{{(index $conf 0).HostPort}}{{end}}' ffbuildreg)" 25 | LOCAL_ROOT="127.0.0.1:${LOCAL_REG_PORT}/local" 26 | trap "rm -f '$TMPCFG'; docker container stop ffbuildreg" EXIT 27 | 28 | if grep "FROM.*base.*" "images/base-${TARGET}/Dockerfile" >/dev/null 2>&1; then 29 | docker buildx --builder ffbuilder build \ 30 | --cache-from=type=local,src=.cache/"${BASE_IMAGE/:/_}" \ 31 | --cache-to=type=local,mode=max,dest=.cache/"${BASE_IMAGE/:/_}" \ 32 | --push --tag "${LOCAL_ROOT}/base:latest" images/base 33 | fi 34 | 35 | docker buildx --builder ffbuilder build \ 36 | --cache-from=type=local,src=.cache/"${TARGET_IMAGE/:/_}" \ 37 | --cache-to=type=local,mode=max,dest=.cache/"${TARGET_IMAGE/:/_}" \ 38 | --push --tag "${LOCAL_ROOT}/base-${TARGET}:latest" \ 39 | --build-arg GH_REPO="$LOCAL_ROOT" "images/base-${TARGET}" 40 | 41 | export REGISTRY_OVERRIDE="127.0.0.1:${LOCAL_REG_PORT}" GITHUB_REPOSITORY="local" 42 | fi 43 | 44 | ./generate.sh "$TARGET" "$VARIANT" "${ADDINS[@]}" 45 | 46 | docker buildx --builder ffbuilder build \ 47 | --cache-from=type=local,src=.cache/"${IMAGE/:/_}" \ 48 | --cache-to=type=local,mode=max,dest=.cache/"${IMAGE/:/_}" \ 49 | --load --tag "$IMAGE" . 50 | 51 | docker buildx rm -f ffbuilder 52 | -------------------------------------------------------------------------------- /scripts.d/50-x265.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://bitbucket.org/multicoreware/x265_git.git" 4 | SCRIPT_COMMIT="0b75c44c10e605fe9e9ebed58f04a46271131827" 5 | 6 | ffbuild_enabled() { 7 | [[ $VARIANT == lgpl* ]] && return -1 8 | return 0 9 | } 10 | 11 | ffbuild_dockerbuild() { 12 | git clone "$SCRIPT_REPO" x265 13 | cd x265 14 | git checkout "$SCRIPT_COMMIT" 15 | 16 | local common_config=( 17 | -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" 18 | -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" 19 | -DCMAKE_BUILD_TYPE=Release 20 | -DENABLE_SHARED=OFF 21 | -DENABLE_CLI=OFF 22 | -DCMAKE_ASM_NASM_FLAGS=-w-macro-params-legacy 23 | ) 24 | 25 | if [[ $TARGET != *32 ]]; then 26 | mkdir 8bit 10bit 12bit 27 | cmake "${common_config[@]}" -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_HDR10_PLUS=ON -DMAIN12=ON -S source -B 12bit & 28 | cmake "${common_config[@]}" -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_HDR10_PLUS=ON -S source -B 10bit & 29 | cmake "${common_config[@]}" -DEXTRA_LIB="x265_main10.a;x265_main12.a" -DEXTRA_LINK_FLAGS=-L. -DLINKED_10BIT=ON -DLINKED_12BIT=ON -S source -B 8bit & 30 | wait 31 | 32 | cat >Makefile <<"EOF" 33 | all: 12bit/libx265.a 10bit/libx265.a 8bit/libx265.a 34 | 35 | %/libx265.a: 36 | $(MAKE) -C $(subst /libx265.a,,$@) 37 | 38 | .PHONY: all 39 | EOF 40 | 41 | make -j$(nproc) 42 | 43 | cd 8bit 44 | mv ../12bit/libx265.a ../8bit/libx265_main12.a 45 | mv ../10bit/libx265.a ../8bit/libx265_main10.a 46 | mv libx265.a libx265_main.a 47 | 48 | ${FFBUILD_CROSS_PREFIX}ar -M <> "$FFBUILD_PREFIX"/lib/pkgconfig/x265.pc 66 | } 67 | 68 | ffbuild_configure() { 69 | echo --enable-libx265 70 | } 71 | 72 | ffbuild_unconfigure() { 73 | echo --disable-libx265 74 | } 75 | 76 | ffbuild_cflags() { 77 | return 0 78 | } 79 | 80 | ffbuild_ldflags() { 81 | return 0 82 | } 83 | -------------------------------------------------------------------------------- /images/base-linux64/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG GH_REPO=ghcr.io/btbn/ffmpeg-builds 2 | FROM $GH_REPO/base:latest 3 | 4 | RUN --mount=src=ct-ng-config,dst=/.config \ 5 | git clone --filter=blob:none https://github.com/crosstool-ng/crosstool-ng.git /ct-ng && cd /ct-ng && \ 6 | ./bootstrap && \ 7 | ./configure --enable-local && \ 8 | make -j$(nproc) && \ 9 | cp /.config .config && \ 10 | ./ct-ng build && \ 11 | cd / && \ 12 | rm -rf ct-ng 13 | 14 | # Prepare "cross" environment to heavily favour static builds 15 | RUN \ 16 | find /opt/ct-ng -type l \ 17 | -and -name '*.so' \ 18 | -and -not -ipath '*plugin*' \ 19 | -and -not -name 'libdl.*' \ 20 | -and -not -name 'libc.*' \ 21 | -and -not -name 'libm.*' \ 22 | -and -not -name 'libmvec.*' \ 23 | -and -not -name 'librt.*' \ 24 | -and -not -name 'libpthread.*' \ 25 | -delete && \ 26 | find /opt/ct-ng \ 27 | -name 'libdl.a' \ 28 | -or -name 'libc.a' \ 29 | -or -name 'libm.a' \ 30 | -or -name 'libmvec.a' \ 31 | -or -name 'librt.a' \ 32 | -or -name 'libpthread.a' \ 33 | -delete && \ 34 | mkdir /opt/ffbuild 35 | 36 | ADD toolchain.cmake /toolchain.cmake 37 | ADD cross.meson /cross.meson 38 | 39 | ADD gen-implib.sh /usr/bin/gen-implib 40 | RUN git clone --filter=blob:none --depth=1 https://github.com/yugr/Implib.so /opt/implib 41 | 42 | ENV PATH="/opt/ct-ng/bin:${PATH}" \ 43 | FFBUILD_TARGET_FLAGS="--pkg-config=pkg-config --cross-prefix=x86_64-ffbuild-linux-gnu- --arch=x86_64 --target-os=linux" \ 44 | FFBUILD_TOOLCHAIN=x86_64-ffbuild-linux-gnu \ 45 | FFBUILD_CROSS_PREFIX="x86_64-ffbuild-linux-gnu-" \ 46 | FFBUILD_RUST_TARGET="x86_64-unknown-linux-gnu" \ 47 | FFBUILD_PREFIX=/opt/ffbuild \ 48 | FFBUILD_CMAKE_TOOLCHAIN=/toolchain.cmake \ 49 | PKG_CONFIG=pkg-config \ 50 | PKG_CONFIG_LIBDIR=/opt/ffbuild/lib/pkgconfig:/opt/ffbuild/share/pkgconfig \ 51 | CFLAGS="-static-libgcc -static-libstdc++ -I/opt/ffbuild/include -O2 -pipe -fPIC -DPIC -D_FORTIFY_SOURCE=2 -fstack-protector-strong -pthread" \ 52 | CXXFLAGS="-static-libgcc -static-libstdc++ -I/opt/ffbuild/include -O2 -pipe -fPIC -DPIC -D_FORTIFY_SOURCE=2 -fstack-protector-strong -pthread" \ 53 | LDFLAGS="-static-libgcc -static-libstdc++ -L/opt/ffbuild/lib -O2 -pipe -fstack-protector-strong -Wl,-z,relro,-z,now -pthread -lm" \ 54 | STAGE_CFLAGS="-fvisibility=hidden -fno-semantic-interposition" \ 55 | STAGE_CXXFLAGS="-fvisibility=hidden -fno-semantic-interposition" 56 | -------------------------------------------------------------------------------- /scripts.d/50-libjxl/50-libjxl.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_REPO="https://github.com/libjxl/libjxl.git" 4 | SCRIPT_COMMIT="004f66baa16fe13eb2b83be68ee95b60d77820ae" 5 | 6 | ffbuild_enabled() { 7 | [[ $ADDINS_STR == *4.4* ]] && return -1 8 | [[ $ADDINS_STR == *5.0* ]] && return -1 9 | return 0 10 | } 11 | 12 | ffbuild_dockerbuild() { 13 | git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" jxl 14 | cd jxl 15 | git submodule update --init --recursive --depth 1 --recommend-shallow third_party/{highway,skcms} 16 | 17 | mkdir build && cd build 18 | 19 | if [[ $TARGET == linux* ]]; then 20 | # our glibc is too old(<2.25), and their detection fails for some reason 21 | export CXXFLAGS="$CXXFLAGS -DVQSORT_GETRANDOM=0 -DVQSORT_SECURE_SEED=0" 22 | elif [[ $TARGET == win* ]]; then 23 | # Fix AVX2 related crash due to unaligned stack memory 24 | export CXXFLAGS="$CXXFLAGS -Wa,-muse-unaligned-vector-move" 25 | export CFLAGS="$CFLAGS -Wa,-muse-unaligned-vector-move" 26 | fi 27 | 28 | cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ 29 | -DBUILD_SHARED_LIBS=OFF -DJPEGXL_STATIC=OFF -DJPEGXL_ENABLE_TOOLS=OFF -DJPEGXL_ENABLE_VIEWERS=OFF -DJPEGXL_EMSCRIPTEN=OFF -DJPEGXL_ENABLE_DOXYGEN=OFF \ 30 | -DBUILD_TESTING=OFF -DJPEGXL_ENABLE_EXAMPLES=OFF -DJPEGXL_ENABLE_MANPAGES=OFF -DJPEGXL_ENABLE_JNI=OFF -DJPEGXL_ENABLE_PLUGINS=OFF \ 31 | -DJPEGXL_ENABLE_DEVTOOLS=OFF -DJPEGXL_ENABLE_BENCHMARK=OFF -DJPEGXL_BUNDLE_LIBPNG=OFF -DJPEGXL_ENABLE_SJPEG=OFF -DJPEGXL_FORCE_SYSTEM_BROTLI=ON .. 32 | ninja -j$(nproc) 33 | ninja install 34 | 35 | echo "Cflags.private: -DJXL_STATIC_DEFINE=1" >> "${FFBUILD_PREFIX}"/lib/pkgconfig/libjxl.pc 36 | echo "Libs.private: -lstdc++" >> "${FFBUILD_PREFIX}"/lib/pkgconfig/libjxl.pc 37 | 38 | echo "Cflags.private: -DJXL_STATIC_DEFINE=1" >> "${FFBUILD_PREFIX}"/lib/pkgconfig/libjxl_threads.pc 39 | echo "Libs.private: -lstdc++" >> "${FFBUILD_PREFIX}"/lib/pkgconfig/libjxl_threads.pc 40 | 41 | if [[ $TARGET == win* ]]; then 42 | echo "Libs.private: -ladvapi32" >> "${FFBUILD_PREFIX}"/lib/pkgconfig/libjxl.pc 43 | echo "Libs.private: -ladvapi32" >> "${FFBUILD_PREFIX}"/lib/pkgconfig/libjxl_threads.pc 44 | fi 45 | } 46 | 47 | ffbuild_configure() { 48 | echo --enable-libjxl 49 | } 50 | 51 | ffbuild_unconfigure() { 52 | [[ $ADDINS_STR == *4.4* ]] && return 0 53 | [[ $ADDINS_STR == *5.0* ]] && return 0 54 | echo --disable-libjxl 55 | } 56 | -------------------------------------------------------------------------------- /images/base-linuxarm64/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG GH_REPO=ghcr.io/btbn/ffmpeg-builds 2 | FROM $GH_REPO/base:latest 3 | 4 | RUN --mount=src=ct-ng-config,dst=/.config \ 5 | git clone --filter=blob:none https://github.com/crosstool-ng/crosstool-ng.git /ct-ng && cd /ct-ng && \ 6 | ./bootstrap && \ 7 | ./configure --enable-local && \ 8 | make -j$(nproc) && \ 9 | cp /.config .config && \ 10 | ./ct-ng build && \ 11 | cd / && \ 12 | rm -rf ct-ng 13 | 14 | # Prepare cross environment to heavily favour static builds 15 | RUN \ 16 | find /opt/ct-ng -type l \ 17 | -and -name '*.so' \ 18 | -and -not -ipath '*plugin*' \ 19 | -and -not -name 'libdl.*' \ 20 | -and -not -name 'libc.*' \ 21 | -and -not -name 'libm.*' \ 22 | -and -not -name 'libmvec.*' \ 23 | -and -not -name 'librt.*' \ 24 | -and -not -name 'libpthread.*' \ 25 | -delete && \ 26 | find /opt/ct-ng \ 27 | -name 'libdl.a' \ 28 | -or -name 'libc.a' \ 29 | -or -name 'libm.a' \ 30 | -or -name 'libmvec.a' \ 31 | -or -name 'librt.a' \ 32 | -or -name 'libpthread.a' \ 33 | -delete && \ 34 | mkdir /opt/ffbuild 35 | 36 | RUN rustup target add aarch64-unknown-linux-gnu 37 | 38 | ADD toolchain.cmake /toolchain.cmake 39 | ADD cross.meson /cross.meson 40 | 41 | ADD gen-implib.sh /usr/bin/gen-implib 42 | RUN git clone --filter=blob:none --depth=1 https://github.com/yugr/Implib.so /opt/implib 43 | 44 | ENV PATH="/opt/ct-ng/bin:${PATH}" \ 45 | FFBUILD_TARGET_FLAGS="--pkg-config=pkg-config --cross-prefix=aarch64-ffbuild-linux-gnu- --arch=aarch64 --target-os=linux" \ 46 | FFBUILD_TOOLCHAIN=aarch64-ffbuild-linux-gnu \ 47 | FFBUILD_CROSS_PREFIX="aarch64-ffbuild-linux-gnu-" \ 48 | FFBUILD_RUST_TARGET="aarch64-unknown-linux-gnu" \ 49 | FFBUILD_PREFIX=/opt/ffbuild \ 50 | FFBUILD_CMAKE_TOOLCHAIN=/toolchain.cmake \ 51 | PKG_CONFIG=pkg-config \ 52 | PKG_CONFIG_LIBDIR=/opt/ffbuild/lib/pkgconfig:/opt/ffbuild/share/pkgconfig \ 53 | CFLAGS="-static-libgcc -static-libstdc++ -I/opt/ffbuild/include -O2 -pipe -fPIC -DPIC -D_FORTIFY_SOURCE=2 -fstack-protector-strong -pthread" \ 54 | CXXFLAGS="-static-libgcc -static-libstdc++ -I/opt/ffbuild/include -O2 -pipe -fPIC -DPIC -D_FORTIFY_SOURCE=2 -fstack-protector-strong -pthread" \ 55 | LDFLAGS="-static-libgcc -static-libstdc++ -L/opt/ffbuild/lib -O2 -pipe -fstack-protector-strong -Wl,-z,relro,-z,now -pthread -lm" \ 56 | STAGE_CFLAGS="-fvisibility=hidden -fno-semantic-interposition" \ 57 | STAGE_CXXFLAGS="-fvisibility=hidden -fno-semantic-interposition" 58 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FFmpeg Static Auto-Builds 2 | 3 | Static Windows (x86_64) and Linux (x86_64) Builds of ffmpeg master and latest release branch. 4 | 5 | Windows builds are targetting Windows 7 and newer. 6 | 7 | Linux (x86_64) builds are targetting Ubuntu 16.04 (glibc-2.23 + linux-4.4) and anything more recent. 8 | 9 | Linux (arm64) builds are targetting Ubuntu 18.04 (glibc-2.27 + linux-4.15) and anything more recent. 10 | 11 | ## Auto-Builds 12 | 13 | Builds run daily at 12:00 UTC (or GitHubs idea of that time) and are automatically released on success. 14 | 15 | **Auto-Builds run ONLY for win64 and linux(arm)64. There are no win32/x86 auto-builds, though you can produce win32 builds yourself following the instructions below.** 16 | 17 | ### Release Retention Policy 18 | 19 | - The last build of each month is kept for two years. 20 | - The last 14 daily builds are kept. 21 | - The special "latest" build floats and provides consistent URLs always pointing to the latest build. 22 | 23 | ## Package List 24 | 25 | For a list of included dependencies check the scripts.d directory. 26 | Every file corresponds to its respective package. 27 | 28 | ## How to make a build 29 | 30 | ### Prerequisites 31 | 32 | * bash 33 | * docker 34 | 35 | ### Build Image 36 | 37 | * `./makeimage.sh target variant [addins]` 38 | 39 | ### Build FFmpeg 40 | 41 | * `./build.sh target variant [addins]` 42 | 43 | On success, the resulting zip file will be in the `artifacts` subdir. 44 | 45 | ### Targets, Variants and Addins 46 | 47 | Available targets: 48 | * `win64` (x86_64 Windows) 49 | * `win32` (x86 Windows) 50 | * `linux64` (x86_64 Linux, glibc>=2.23, linux>=4.4) 51 | * `linuxarm64` (arm64 (aarch64) Linux, glibc>=2.27, linux>=4.15) 52 | 53 | The linuxarm64 target will not build some dependencies due to lack of arm64 (aarch64) architecture support or cross-compiling restrictions. 54 | 55 | * `davs2` and `xavs2`: aarch64 support is broken. 56 | * `libmfx` and `libva`: Library for Intel QSV, so there is no aarch64 support. 57 | 58 | Available: 59 | * `gpl` Includes all dependencies, even those that require full GPL instead of just LGPL. 60 | * `lgpl` Lacking libraries that are GPL-only. Most prominently libx264 and libx265. 61 | * `nonfree` Includes fdk-aac in addition to all the dependencies of the gpl variant. 62 | * `gpl-shared` Same as gpl, but comes with the libav* family of shared libs instead of pure static executables. 63 | * `lgpl-shared` Same again, but with the lgpl set of dependencies. 64 | * `nonfree-shared` Same again, but with the nonfree set of dependencies. 65 | 66 | All of those can be optionally combined with any combination of addins. 67 | * `4.4` to build from the 4.4 release branch instead of master. 68 | * `5.0` to build from the 5.0 release branch instead of master. 69 | * `debug` to not strip debug symbols from the binaries. This increases the output size by about 250MB. 70 | -------------------------------------------------------------------------------- /util/update_scripts.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eo pipefail 3 | shopt -s globstar 4 | export LC_ALL=C 5 | 6 | cd "$(dirname "$0")"/.. 7 | 8 | for scr in scripts.d/**/*.sh; do 9 | echo "Processing ${scr}" 10 | ( 11 | source "$scr" 12 | 13 | if [[ -n "$SCRIPT_SKIP" ]]; then 14 | exit 0 15 | fi 16 | 17 | for i in "" $(seq 2 9); do 18 | REPO_VAR="SCRIPT_REPO$i" 19 | COMMIT_VAR="SCRIPT_COMMIT$i" 20 | REV_VAR="SCRIPT_REV$i" 21 | HGREV_VAR="SCRIPT_HGREV$i" 22 | BRANCH_VAR="SCRIPT_BRANCH$i" 23 | TAGFILTER_VAR="SCRIPT_TAGFILTER$i" 24 | 25 | CUR_REPO="${!REPO_VAR}" 26 | CUR_COMMIT="${!COMMIT_VAR}" 27 | CUR_REV="${!REV_VAR}" 28 | CUR_HGREV="${!HGREV_VAR}" 29 | CUR_BRANCH="${!BRANCH_VAR}" 30 | CUR_TAGFILTER="${!TAGFILTER_VAR}" 31 | 32 | if [[ -z "${CUR_REPO}" ]]; then 33 | if [[ -z "$i" ]]; then 34 | # Mark scripts without repo source for manual check 35 | echo "xxx_CHECKME_xxx" >> "$scr" 36 | echo "Needs manual check." 37 | fi 38 | break 39 | fi 40 | 41 | if [[ -n "${CUR_REV}" ]]; then # SVN 42 | echo "Checking svn rev for ${CUR_REPO}..." 43 | NEW_REV="$(svn info --password="" "${CUR_REPO}" | grep ^Revision: | cut -d" " -f2 | xargs)" 44 | echo "Got ${NEW_REV} (current: ${CUR_REV})" 45 | 46 | if [[ "${NEW_REV}" != "${CUR_REV}" ]]; then 47 | echo "Updating ${scr}" 48 | sed -i "s/^${REV_VAR}=.*/${REV_VAR}=\"${NEW_REV}\"/" "${scr}" 49 | fi 50 | elif [[ -n "${CUR_HGREV}" ]]; then # HG 51 | hg init tmphgrepo 52 | trap "rm -rf tmphgrepo" EXIT 53 | cd tmphgrepo 54 | NEW_HGREV="$(hg in -f -n -l 1 "${CUR_REPO}" | grep changeset | cut -d: -f3 | xargs)" 55 | cd .. 56 | rm -rf tmphgrepo 57 | 58 | echo "Got ${NEW_HGREV} (current: ${CUR_HGREV})" 59 | 60 | if [[ "${NEW_HGREV}" != "${CUR_HGREV}" ]]; then 61 | echo "Updating ${scr}" 62 | sed -i "s/^${HGREV_VAR}=.*/${HGREV_VAR}=\"${NEW_HGREV}\"/" "${scr}" 63 | fi 64 | elif [[ -n "${CUR_COMMIT}" ]]; then # GIT 65 | if [[ -n "${CUR_TAGFILTER}" ]]; then 66 | NEW_COMMIT="$(git -c 'versionsort.suffix=-' ls-remote --exit-code --tags --refs --sort "v:refname" "${CUR_REPO}" "refs/tags/${CUR_TAGFILTER}" | tail -n1 | cut -d/ -f3- | xargs)" 67 | else 68 | if [[ -z "${CUR_BRANCH}" ]]; then 69 | # Fetch default branch name 70 | CUR_BRANCH="$(git remote show "${CUR_REPO}" | grep "HEAD branch:" | cut -d":" -f2 | xargs)" 71 | echo "Found default branch ${CUR_BRANCH}" 72 | fi 73 | NEW_COMMIT="$(git ls-remote --exit-code --heads --refs "${CUR_REPO}" refs/heads/"${CUR_BRANCH}" | cut -f1)" 74 | fi 75 | 76 | echo "Got ${NEW_COMMIT} (current: ${CUR_COMMIT})" 77 | 78 | if [[ "${NEW_COMMIT}" != "${CUR_COMMIT}" ]]; then 79 | echo "Updating ${scr}" 80 | sed -i "s/^${COMMIT_VAR}=.*/${COMMIT_VAR}=\"${NEW_COMMIT}\"/" "${scr}" 81 | fi 82 | else 83 | # Mark scripts with unknown layout for manual check 84 | echo "xxx_CHECKME_UNKNOWN_xxx" >> "$scr" 85 | echo "Unknown layout. Needs manual check." 86 | break 87 | fi 88 | done 89 | ) 90 | echo 91 | done 92 | -------------------------------------------------------------------------------- /patches/zvbi/0003-win32.patch: -------------------------------------------------------------------------------- 1 | diff -ruN zvbi/src/conv.c zvbi.new/src/conv.c 2 | --- zvbi/src/conv.c 2008-02-26 15:39:23.000000000 +0100 3 | +++ zvbi.new/src/conv.c 2008-09-11 21:05:18.000000000 +0200 4 | @@ -26,7 +26,9 @@ 5 | #endif 6 | 7 | #include 8 | +#ifndef _WIN32 9 | #include 10 | +#endif 11 | 12 | #include "misc.h" 13 | #include "conv.h" 14 | @@ -1234,9 +1236,12 @@ 15 | const char *dst_format; 16 | 17 | dst_format = bind_textdomain_codeset (vbi_intl_domainname, NULL); 18 | - 19 | +#ifdef _WIN32 20 | +#warning this is wrong 21 | +#else 22 | if (NULL == dst_format) 23 | dst_format = nl_langinfo (CODESET); 24 | +#endif 25 | 26 | return dst_format; /* may be NULL */ 27 | } 28 | diff -ruN zvbi/src/export.c zvbi.new/src/export.c 29 | --- zvbi/src/export.c 2008-02-19 01:35:15.000000000 +0100 30 | +++ zvbi.new/src/export.c 2008-09-11 20:38:55.000000000 +0200 31 | @@ -40,6 +40,26 @@ 32 | #include "conv.h" 33 | #include "vbi.h" /* asprintf */ 34 | 35 | +#ifndef EOVERFLOW 36 | + #define EOVERFLOW 75 37 | +#endif 38 | + 39 | +#ifndef S_IRGRP 40 | +#define S_IRGRP 0 41 | +#endif 42 | + 43 | +#ifndef S_IWGRP 44 | +#define S_IWGRP 0 45 | +#endif 46 | + 47 | +#ifndef S_IROTH 48 | +#define S_IROTH 0 49 | +#endif 50 | + 51 | +#ifndef S_IWOTH 52 | +#define S_IWOTH 0 53 | +#endif 54 | + 55 | extern const char _zvbi_intl_domainname[]; 56 | 57 | /** 58 | diff -ruN zvbi/src/packet.c zvbi.new/src/packet.c 59 | --- zvbi/src/packet.c 2008-02-20 18:04:33.000000000 +0100 60 | +++ zvbi.new/src/packet.c 2008-09-11 21:00:35.000000000 +0200 61 | @@ -32,7 +32,9 @@ 62 | #include 63 | #include 64 | #include 65 | +#ifndef _WIN32 66 | #include 67 | +#endif 68 | 69 | #include "misc.h" 70 | #include "hamm.h" 71 | diff -ruN zvbi/src/proxy-msg.c zvbi.new/src/proxy-msg.c 72 | --- zvbi/src/proxy-msg.c 2008-02-19 01:35:21.000000000 +0100 73 | +++ zvbi.new/src/proxy-msg.c 2008-09-11 21:00:07.000000000 +0200 74 | @@ -129,7 +129,9 @@ 75 | #include 76 | #include 77 | #include 78 | +#ifndef _WIN32 79 | #include 80 | +#endif 81 | #include 82 | #include 83 | #include 84 | diff -ruN zvbi/src/proxy-msg.h zvbi.new/src/proxy-msg.h 85 | --- zvbi/src/proxy-msg.h 2008-02-19 01:35:21.000000000 +0100 86 | +++ zvbi.new/src/proxy-msg.h 2008-09-11 20:59:40.000000000 +0200 87 | @@ -68,7 +68,9 @@ 88 | #ifndef PROXY_MSG_H 89 | #define PROXY_MSG_H 90 | 91 | +#ifndef _WIN32 92 | #include 93 | +#endif 94 | 95 | /* Public */ 96 | 97 | diff -ruN zvbi/src/vbi.c zvbi.new/src/vbi.c 98 | --- zvbi/src/vbi.c 2008-03-05 14:33:04.000000000 +0100 99 | +++ zvbi.new/src/vbi.c 2008-09-11 20:57:55.000000000 +0200 100 | @@ -39,7 +39,9 @@ 101 | #include 102 | #include 103 | #include 104 | +#ifndef _WIN32 105 | #include 106 | +#endif 107 | #include 108 | #include 109 | 110 | --- zvbi/src/io.c 2008-02-19 01:35:20.000000000 +0100 111 | +++ zvbi2/src/io.c 2008-09-11 21:18:59.000000000 +0200 112 | @@ -28,8 +28,10 @@ 113 | 114 | #include /* open() */ 115 | #include /* close(), mmap(), munmap(), gettimeofday() */ 116 | +#ifndef _WIN32 117 | #include /* ioctl() */ 118 | #include /* mmap(), munmap() */ 119 | +#endif 120 | #include /* struct timeval */ 121 | #include 122 | #include 123 | @@ -514,7 +516,7 @@ 124 | } 125 | } 126 | 127 | - 128 | +#ifndef _WIN32 129 | /** 130 | * @internal 131 | * 132 | @@ -554,7 +556,7 @@ 133 | return ret; 134 | } 135 | } 136 | - 137 | +#endif 138 | /* Helper functions to log the communication between the library and drivers. 139 | FIXME remove fp arg, call user log function instead (0.3). */ 140 | 141 | @@ -668,7 +670,9 @@ 142 | "EXCL", O_EXCL, 143 | "TRUNC", O_TRUNC, 144 | "APPEND", O_APPEND, 145 | +#ifndef _WIN32 146 | "NONBLOCK", O_NONBLOCK, 147 | +#endif 148 | 0); 149 | fprintf (fp, ", 0%o)", mode); 150 | 151 | @@ -773,6 +777,7 @@ 152 | return err; 153 | } 154 | 155 | +#ifndef _WIN32 156 | /** 157 | * @internal 158 | * Drop-in for mmap(). Logs the request on fp if not NULL. 159 | @@ -822,7 +827,7 @@ 160 | 161 | return r; 162 | } 163 | - 164 | +#endif 165 | /** 166 | * @internal 167 | * Drop-in for munmap(). Logs the request on fp if not NULL. 168 | -------------------------------------------------------------------------------- /patches/aribb24/17.patch: -------------------------------------------------------------------------------- 1 | From 58a34b8fabf4d0e9e1984fb603a97f52fb934a09 Mon Sep 17 00:00:00 2001 2 | From: scimmia9286 3 | Date: Thu, 22 Apr 2021 20:26:45 +0900 4 | Subject: [PATCH] Fixed DRCS parser bug 5 | 6 | --- 7 | src/decoder.c | 3 ++- 8 | src/drcs.c | 12 ++++++++---- 9 | src/drcs.h | 2 +- 10 | src/parser.c | 25 +++++++++++++++++++++---- 11 | 4 files changed, 32 insertions(+), 10 deletions(-) 12 | 13 | diff --git a/src/decoder.c b/src/decoder.c 14 | index 2b77f38..c9d6ac3 100644 15 | --- a/src/decoder.c 16 | +++ b/src/decoder.c 17 | @@ -1139,9 +1139,10 @@ static int decoder_handle_time( arib_decoder_t *decoder ) 18 | return 1; 19 | break; 20 | default: 21 | - if( i_mode == 1 && c >= 0x40 && c <= 0x7F ) 22 | + if( i_mode == 1 && c >= 0x40 && c <= 0x7F ) { 23 | decoder->i_control_time += c & 0x3f; 24 | return 1; 25 | + } 26 | return 0; 27 | } 28 | if( i_mode == 0 ) 29 | diff --git a/src/drcs.c b/src/drcs.c 30 | index 114d846..8ff8d4f 100644 31 | --- a/src/drcs.c 32 | +++ b/src/drcs.c 33 | @@ -406,15 +406,19 @@ static void save_drcs_pattern_data_image( 34 | void save_drcs_pattern( 35 | arib_instance_t *p_instance, 36 | int i_width, int i_height, 37 | - int i_depth, const int8_t* p_patternData ) 38 | + int i_depth, const int8_t* p_patternData, 39 | + int16_t i_CharacterCode ) 40 | { 41 | +// int i_drcsPage = (i_CharacterCode >> 16) & 0xff; 42 | + int i_code = (i_CharacterCode & 0xff) - 0x20; 43 | char* psz_hash = get_drcs_pattern_data_hash( p_instance, 44 | i_width, i_height, i_depth, p_patternData ); 45 | 46 | - strncpy( p_instance->p->drcs_hash_table[p_instance->p->i_drcs_num], psz_hash, 32 ); 47 | - p_instance->p->drcs_hash_table[p_instance->p->i_drcs_num][32] = '\0'; 48 | + strncpy( p_instance->p->drcs_hash_table[i_code-1], psz_hash, 32 ); 49 | + p_instance->p->drcs_hash_table[i_code-1][32] = '\0'; 50 | 51 | - p_instance->p->i_drcs_num++; 52 | + p_instance->p->i_drcs_num = i_code > p_instance->p->i_drcs_num ? 53 | + i_code : p_instance->p->i_drcs_num; 54 | 55 | save_drcs_pattern_data_image( p_instance, psz_hash, 56 | i_width, i_height, i_depth, p_patternData ); 57 | diff --git a/src/drcs.h b/src/drcs.h 58 | index 274ff44..9c1533e 100644 59 | --- a/src/drcs.h 60 | +++ b/src/drcs.h 61 | @@ -77,6 +77,6 @@ typedef struct drcs_data_s 62 | 63 | bool apply_drcs_conversion_table( arib_instance_t * ); 64 | bool load_drcs_conversion_table( arib_instance_t * ); 65 | -void save_drcs_pattern( arib_instance_t *, int, int, int, const int8_t* ); 66 | +void save_drcs_pattern( arib_instance_t *, int, int, int, const int8_t*, int16_t ); 67 | 68 | #endif 69 | diff --git a/src/parser.c b/src/parser.c 70 | index 1403dd6..6db27ae 100644 71 | --- a/src/parser.c 72 | +++ b/src/parser.c 73 | @@ -79,7 +79,6 @@ static void parse_data_unit_DRCS( arib_parser_t *p_parser, bs_t *p_bs, 74 | uint8_t i_data_unit_parameter, 75 | uint32_t i_data_unit_size ) 76 | { 77 | - p_parser->p_instance->p->i_drcs_num = 0; 78 | #ifdef ARIBSUB_GEN_DRCS_DATA 79 | if( p_parser->p_drcs_data != NULL ) 80 | { 81 | @@ -119,7 +118,7 @@ static void parse_data_unit_DRCS( arib_parser_t *p_parser, bs_t *p_bs, 82 | 83 | for( int i = 0; i < i_NumberOfCode; i++ ) 84 | { 85 | - bs_skip( p_bs, 16 ); /* i_character_code */ 86 | + int16_t i_CharacterCode = bs_read( p_bs, 16 ); /* i_character_code */ 87 | p_parser->i_data_unit_size += 2; 88 | uint8_t i_NumberOfFont = bs_read( p_bs, 8 ); 89 | p_parser->i_data_unit_size += 1; 90 | @@ -139,7 +138,11 @@ static void parse_data_unit_DRCS( arib_parser_t *p_parser, bs_t *p_bs, 91 | 92 | for( int j = 0; j < i_NumberOfFont; j++ ) 93 | { 94 | +#ifdef ARIBSUB_GEN_DRCS_DATA 95 | + int8_t i_fontId = bs_read( p_bs, 4 ); /* i_fontID */ 96 | +#else 97 | bs_skip( p_bs, 4 ); /* i_fontID */ 98 | +#endif //ARIBSUB_GEN_DRCS_DATA 99 | uint8_t i_mode = bs_read( p_bs, 4 ); 100 | p_parser->i_data_unit_size += 1; 101 | 102 | @@ -206,18 +209,26 @@ static void parse_data_unit_DRCS( arib_parser_t *p_parser, bs_t *p_bs, 103 | 104 | #ifdef ARIBSUB_GEN_DRCS_DATA 105 | save_drcs_pattern( p_parser->p_instance, i_width, i_height, i_depth + 2, 106 | - p_drcs_pattern_data->p_patternData ); 107 | + p_drcs_pattern_data->p_patternData, i_CharacterCode ); 108 | #else 109 | save_drcs_pattern( p_parser->p_instance, i_width, i_height, i_depth + 2, 110 | - p_patternData ); 111 | + p_patternData, i_CharacterCode); 112 | free( p_patternData ); 113 | #endif //ARIBSUB_GEN_DRCS_DATA 114 | } 115 | else 116 | { 117 | +#ifdef ARIBSUB_GEN_DRCS_DATA 118 | + int8_t i_regionX = bs_read( p_bs, 8 ); /* i_regionX */ 119 | +#else 120 | bs_skip( p_bs, 8 ); /* i_regionX */ 121 | +#endif //ARIBSUB_GEN_DRCS_DATA 122 | p_parser->i_data_unit_size += 1; 123 | +#ifdef ARIBSUB_GEN_DRCS_DATA 124 | + int8_t i_regionY = bs_read( p_bs, 8 ); /* i_regionY */ 125 | +#else 126 | bs_skip( p_bs, 8 ); /* i_regionY */ 127 | +#endif //ARIBSUB_GEN_DRCS_DATA 128 | p_parser->i_data_unit_size += 1; 129 | uint16_t i_geometricData_length = bs_read( p_bs, 16 ); 130 | p_parser->i_data_unit_size += 2; 131 | @@ -245,7 +256,11 @@ static void parse_data_unit_DRCS( arib_parser_t *p_parser, bs_t *p_bs, 132 | 133 | for( int k = 0; k < i_geometricData_length ; k++ ) 134 | { 135 | +#ifdef ARIBSUB_GEN_DRCS_DATA 136 | + int8_t i_geometricData = bs_read( p_bs, 8 ); /* i_geometric_data */ 137 | +#else 138 | bs_skip( p_bs, 8 ); /* i_geometric_data */ 139 | +#endif //ARIBSUB_GEN_DRCS_DATA 140 | p_parser->i_data_unit_size += 1; 141 | 142 | #ifdef ARIBSUB_GEN_DRCS_DATA 143 | @@ -344,6 +359,8 @@ static void parse_caption_management_data( arib_parser_t *p_parser, bs_t *p_bs ) 144 | p_parser->i_data_unit_size = 0; 145 | p_parser->i_subtitle_data_size = 0; 146 | p_parser->psz_subtitle_data = NULL; 147 | + p_parser->p_instance->p->i_drcs_num = 0; 148 | + memset(p_parser->p_instance->p->drcs_hash_table, 0, sizeof(p_parser->p_instance->p->drcs_hash_table)); 149 | if( i_data_unit_loop_length > 0 ) 150 | { 151 | p_parser->psz_subtitle_data = (unsigned char*) calloc( 152 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build FFmpeg 2 | 3 | on: 4 | push: 5 | paths-ignore: 6 | - '**.md' 7 | - 'LICENSE' 8 | workflow_dispatch: 9 | inputs: 10 | doRelease: 11 | description: 'Publish new release' 12 | type: boolean 13 | default: false 14 | required: false 15 | buildOnly: 16 | description: 'Only build ffmpeg' 17 | type: boolean 18 | default: false 19 | required: false 20 | schedule: 21 | - cron: '0 0 1 * *' 22 | 23 | env: 24 | DOCKER_BUILDKIT: 1 25 | 26 | jobs: 27 | build_base: 28 | name: Build base image 29 | if: ${{ github.event.inputs.buildOnly != 'true' }} 30 | runs-on: ubuntu-latest 31 | steps: 32 | - name: Checkout 33 | uses: actions/checkout@v3 34 | - name: Install buildx 35 | uses: docker/setup-buildx-action@v2 36 | with: 37 | config: .github/buildkit.toml 38 | - name: Login to Docker 39 | uses: docker/login-action@v2 40 | with: 41 | registry: ghcr.io 42 | username: ${{ github.actor }} 43 | password: ${{ github.token }} 44 | - name: Image Name 45 | id: imagename 46 | run: echo "::set-output name=name::ghcr.io/${GITHUB_REPOSITORY,,}/base" 47 | - name: Stop Commands 48 | run: T="$(echo -n ${{ github.token }} | sha256sum | head -c 64)" && echo -e "::add-mask::${T}\n::stop-commands::${T}" 49 | - name: Build target base image 50 | uses: docker/build-push-action@v3 51 | with: 52 | context: images/base 53 | pull: true 54 | push: true 55 | tags: ${{ steps.imagename.outputs.name }}:latest 56 | cache-to: type=registry,mode=max,ref=${{ steps.imagename.outputs.name }}:cache 57 | cache-from: type=registry,ref=${{ steps.imagename.outputs.name }}:cache 58 | build_target_bases: 59 | name: Build target base image 60 | if: ${{ github.event.inputs.buildOnly != 'true' }} 61 | needs: build_base 62 | runs-on: ubuntu-latest 63 | strategy: 64 | fail-fast: false 65 | matrix: 66 | target: [win32,win64,linux64,linuxarm64] 67 | steps: 68 | - name: Checkout 69 | uses: actions/checkout@v3 70 | - name: Install buildx 71 | uses: docker/setup-buildx-action@v2 72 | with: 73 | config: .github/buildkit.toml 74 | - name: Login to Docker 75 | uses: docker/login-action@v2 76 | with: 77 | registry: ghcr.io 78 | username: ${{ github.actor }} 79 | password: ${{ github.token }} 80 | - name: Image Name 81 | id: imagename 82 | run: echo "::set-output name=name::ghcr.io/${GITHUB_REPOSITORY,,}/base-${{ matrix.target }}" 83 | - name: Stop Commands 84 | run: T="$(echo -n ${{ github.token }} | sha256sum | head -c 64)" && echo -e "::add-mask::${T}\n::stop-commands::${T}" 85 | - name: Build target base image 86 | uses: docker/build-push-action@v3 87 | with: 88 | context: images/base-${{ matrix.target }} 89 | pull: true 90 | push: true 91 | tags: ${{ steps.imagename.outputs.name }}:latest 92 | cache-to: type=registry,mode=max,ref=${{ steps.imagename.outputs.name }}:cache 93 | cache-from: type=registry,ref=${{ steps.imagename.outputs.name }}:cache 94 | build_targets: 95 | name: Build target-variant image 96 | if: ${{ github.event.inputs.buildOnly != 'true' }} 97 | needs: build_target_bases 98 | runs-on: ubuntu-latest 99 | strategy: 100 | fail-fast: false 101 | matrix: 102 | target: [win32,win64,linux64,linuxarm64] 103 | variant: [gpl,lgpl,gpl 4.4,gpl 5.1,lgpl 4.4,lgpl 5.1,gpl-shared,lgpl-shared,gpl-shared 4.4,gpl-shared 5.1,lgpl-shared 4.4,lgpl-shared 5.1] 104 | steps: 105 | - name: Checkout 106 | uses: actions/checkout@v3 107 | - name: Install buildx 108 | uses: docker/setup-buildx-action@v2 109 | with: 110 | config: .github/buildkit.toml 111 | - name: Login to Docker 112 | uses: docker/login-action@v2 113 | with: 114 | registry: ghcr.io 115 | username: ${{ github.actor }} 116 | password: ${{ github.token }} 117 | - name: Generate Dockerfile 118 | run: ./generate.sh ${{ matrix.target }} ${{ matrix.variant }} 119 | - name: Image Name 120 | id: imagename 121 | run: | 122 | IMG="ghcr.io/${GITHUB_REPOSITORY,,}/${{ matrix.target }}-${{ matrix.variant }}" 123 | echo "::set-output name=name::${IMG/ /-}" 124 | echo "::set-output name=gh_repo::${GITHUB_REPOSITORY,,}" 125 | - name: Stop Commands 126 | run: T="$(echo -n ${{ github.token }} | sha256sum | head -c 64)" && echo -e "::add-mask::${T}\n::stop-commands::${T}" 127 | - name: Build target base image 128 | uses: docker/build-push-action@v3 129 | with: 130 | context: . 131 | pull: true 132 | push: true 133 | tags: ${{ steps.imagename.outputs.name }}:latest 134 | cache-to: type=registry,mode=max,ref=${{ steps.imagename.outputs.name }}:cache 135 | cache-from: type=registry,ref=${{ steps.imagename.outputs.name }}:cache 136 | build-args: | 137 | GH_REPO=ghcr.io/${{ steps.imagename.outputs.gh_repo }} 138 | build_ffmpeg: 139 | name: Build ffmpeg 140 | if: ${{ ( github.event.inputs.buildOnly == 'true' && !cancelled() ) || success() }} 141 | needs: build_targets 142 | runs-on: ubuntu-latest 143 | strategy: 144 | fail-fast: false 145 | matrix: 146 | target: [win32,win64,linux64,linuxarm64] 147 | variant: [gpl,lgpl,gpl 4.4,gpl 5.1,lgpl 4.4,lgpl 5.1,gpl-shared,lgpl-shared,gpl-shared 4.4,gpl-shared 5.1,lgpl-shared 4.4,lgpl-shared 5.1] 148 | steps: 149 | - name: Checkout 150 | uses: actions/checkout@v3 151 | - name: Login to Docker 152 | uses: docker/login-action@v2 153 | with: 154 | registry: ghcr.io 155 | username: ${{ github.actor }} 156 | password: ${{ github.token }} 157 | - name: Build ffmpeg 158 | run: | 159 | T="$(echo -n ${{ github.token }} | sha256sum | head -c 64)" && echo -e "::add-mask::${T}\n::stop-commands::${T}" 160 | ./build.sh ${{ matrix.target }} ${{ matrix.variant }} 161 | - name: Upload artifacts 162 | uses: actions/upload-artifact@v3 163 | with: 164 | name: ffmpeg 165 | path: artifacts/* 166 | publish_release: 167 | name: Publish release 168 | if: ${{ !cancelled() && ( github.event_name == 'schedule' || github.event.inputs.doRelease == 'true' ) && needs.build_ffmpeg.result == 'success' }} 169 | needs: build_ffmpeg 170 | runs-on: ubuntu-latest 171 | steps: 172 | - name: Checkout 173 | uses: actions/checkout@v3 174 | - name: Download artifacts 175 | uses: actions/download-artifact@v3 176 | with: 177 | name: ffmpeg 178 | path: artifacts 179 | - name: Create release 180 | id: create_release 181 | run: | 182 | set -xe 183 | shopt -s nullglob 184 | RELDATE="$(date +'%Y-%m-%d %H:%M')" 185 | NAME="Auto-Build $RELDATE" 186 | TAGNAME="autobuild-$(date +'%Y-%m-%d-%H-%M')" 187 | hub release create $(for a in artifacts/*.{zip,tar.xz}; do echo -a $a; done) -m "$NAME" -t "master" "$TAGNAME" 188 | echo "::set-output name=tag_name::${TAGNAME}" 189 | echo "::set-output name=rel_date::${RELDATE}" 190 | env: 191 | GITHUB_TOKEN: ${{ github.token }} 192 | - name: Update Latest 193 | run: | 194 | set -xe 195 | shopt -s nullglob 196 | mkdir latest_artifacts 197 | ./util/repack_latest.sh latest_artifacts artifacts/*.{zip,tar.xz} 198 | NAME="Latest Auto-Build (${{ steps.create_release.outputs.rel_date }})" 199 | TAGNAME="latest" 200 | hub release delete "$TAGNAME" || true 201 | git push --delete origin "$TAGNAME" || true 202 | sleep 30 203 | hub release create $(for a in latest_artifacts/*; do echo -a $a; done) -m "$NAME" -t "master" "$TAGNAME" 204 | env: 205 | GITHUB_TOKEN: ${{ github.token }} 206 | - name: Update Wiki 207 | run: ./util/update_wiki.sh artifacts ${{ steps.create_release.outputs.tag_name }} 208 | env: 209 | GITHUB_TOKEN: ${{ github.token }} 210 | - name: Prune old releases 211 | run: ./util/prunetags.sh 212 | env: 213 | GITHUB_TOKEN: ${{ github.token }} 214 | -------------------------------------------------------------------------------- /images/base-win64/ct-ng-config: -------------------------------------------------------------------------------- 1 | # 2 | # Automatically generated file; DO NOT EDIT. 3 | # crosstool-NG 1.25.0.55_3defb7b Configuration 4 | # 5 | CT_CONFIGURE_has_static_link=y 6 | CT_CONFIGURE_has_cxx11=y 7 | CT_CONFIGURE_has_wget=y 8 | CT_CONFIGURE_has_curl=y 9 | CT_CONFIGURE_has_meson=y 10 | CT_CONFIGURE_has_ninja=y 11 | CT_CONFIGURE_has_rsync=y 12 | CT_CONFIGURE_has_make_3_81_or_newer=y 13 | CT_CONFIGURE_has_make_4_0_or_newer=y 14 | CT_CONFIGURE_has_libtool_2_4_or_newer=y 15 | CT_CONFIGURE_has_libtoolize_2_4_or_newer=y 16 | CT_CONFIGURE_has_autoconf_2_65_or_newer=y 17 | CT_CONFIGURE_has_autoreconf_2_65_or_newer=y 18 | CT_CONFIGURE_has_automake_1_15_or_newer=y 19 | CT_CONFIGURE_has_gnu_m4_1_4_12_or_newer=y 20 | CT_CONFIGURE_has_python_3_4_or_newer=y 21 | CT_CONFIGURE_has_bison_2_7_or_newer=y 22 | CT_CONFIGURE_has_python=y 23 | CT_CONFIGURE_has_svn=y 24 | CT_CONFIGURE_has_git=y 25 | CT_CONFIGURE_has_md5sum=y 26 | CT_CONFIGURE_has_sha1sum=y 27 | CT_CONFIGURE_has_sha256sum=y 28 | CT_CONFIGURE_has_sha512sum=y 29 | CT_CONFIGURE_has_install_with_strip_program=y 30 | CT_VERSION="1.25.0.55_3defb7b" 31 | CT_VCHECK="" 32 | CT_CONFIG_VERSION_ENV="4" 33 | CT_CONFIG_VERSION_CURRENT="4" 34 | CT_CONFIG_VERSION="4" 35 | CT_MODULES=y 36 | 37 | # 38 | # Paths and misc options 39 | # 40 | 41 | # 42 | # crosstool-NG behavior 43 | # 44 | # CT_OBSOLETE is not set 45 | CT_EXPERIMENTAL=y 46 | CT_ALLOW_BUILD_AS_ROOT=y 47 | CT_ALLOW_BUILD_AS_ROOT_SURE=y 48 | # CT_DEBUG_CT is not set 49 | 50 | # 51 | # Paths 52 | # 53 | CT_LOCAL_TARBALLS_DIR="${HOME}/src" 54 | # CT_SAVE_TARBALLS is not set 55 | # CT_TARBALLS_BUILDROOT_LAYOUT is not set 56 | CT_WORK_DIR="${CT_TOP_DIR}/build" 57 | CT_BUILD_TOP_DIR="${CT_WORK_DIR:-${CT_TOP_DIR}/.build}/${CT_HOST:+HOST-${CT_HOST}/}${CT_TARGET}" 58 | CT_BUILD_DIR="${CT_BUILD_TOP_DIR}/build" 59 | CT_PREFIX_DIR="/opt/ct-ng" 60 | CT_RM_RF_PREFIX_DIR=y 61 | CT_REMOVE_DOCS=y 62 | # CT_INSTALL_LICENSES is not set 63 | # CT_PREFIX_DIR_RO is not set 64 | CT_STRIP_HOST_TOOLCHAIN_EXECUTABLES=y 65 | CT_STRIP_TARGET_TOOLCHAIN_EXECUTABLES=y 66 | 67 | # 68 | # Downloading 69 | # 70 | CT_DOWNLOAD_AGENT_WGET=y 71 | # CT_DOWNLOAD_AGENT_CURL is not set 72 | # CT_DOWNLOAD_AGENT_NONE is not set 73 | # CT_FORBID_DOWNLOAD is not set 74 | # CT_FORCE_DOWNLOAD is not set 75 | CT_CONNECT_TIMEOUT=10 76 | CT_DOWNLOAD_WGET_OPTIONS="--passive-ftp --tries=3 -nc --progress=dot:binary" 77 | # CT_ONLY_DOWNLOAD is not set 78 | # CT_USE_MIRROR is not set 79 | CT_VERIFY_DOWNLOAD_DIGEST=y 80 | CT_VERIFY_DOWNLOAD_DIGEST_SHA512=y 81 | # CT_VERIFY_DOWNLOAD_DIGEST_SHA256 is not set 82 | # CT_VERIFY_DOWNLOAD_DIGEST_SHA1 is not set 83 | # CT_VERIFY_DOWNLOAD_DIGEST_MD5 is not set 84 | CT_VERIFY_DOWNLOAD_DIGEST_ALG="sha512" 85 | # CT_VERIFY_DOWNLOAD_SIGNATURE is not set 86 | 87 | # 88 | # Extracting 89 | # 90 | # CT_FORCE_EXTRACT is not set 91 | CT_OVERRIDE_CONFIG_GUESS_SUB=y 92 | # CT_ONLY_EXTRACT is not set 93 | CT_PATCH_BUNDLED=y 94 | # CT_PATCH_LOCAL is not set 95 | # CT_PATCH_BUNDLED_LOCAL is not set 96 | # CT_PATCH_LOCAL_BUNDLED is not set 97 | # CT_PATCH_NONE is not set 98 | CT_PATCH_ORDER="bundled" 99 | 100 | # 101 | # Build behavior 102 | # 103 | CT_PARALLEL_JOBS=0 104 | CT_LOAD="" 105 | CT_USE_PIPES=y 106 | CT_EXTRA_CFLAGS_FOR_BUILD="" 107 | CT_EXTRA_CXXFLAGS_FOR_BUILD="" 108 | CT_EXTRA_LDFLAGS_FOR_BUILD="" 109 | CT_EXTRA_CFLAGS_FOR_HOST="" 110 | CT_EXTRA_LDFLAGS_FOR_HOST="" 111 | # CT_CONFIG_SHELL_SH is not set 112 | # CT_CONFIG_SHELL_ASH is not set 113 | CT_CONFIG_SHELL_BASH=y 114 | # CT_CONFIG_SHELL_CUSTOM is not set 115 | CT_CONFIG_SHELL="${bash}" 116 | 117 | # 118 | # Logging 119 | # 120 | # CT_LOG_ERROR is not set 121 | # CT_LOG_WARN is not set 122 | # CT_LOG_INFO is not set 123 | CT_LOG_EXTRA=y 124 | # CT_LOG_ALL is not set 125 | # CT_LOG_DEBUG is not set 126 | CT_LOG_LEVEL_MAX="EXTRA" 127 | # CT_LOG_SEE_TOOLS_WARN is not set 128 | # CT_LOG_PROGRESS_BAR is not set 129 | # CT_LOG_TO_FILE is not set 130 | # end of Paths and misc options 131 | 132 | # 133 | # Target options 134 | # 135 | # CT_ARCH_ALPHA is not set 136 | # CT_ARCH_ARC is not set 137 | # CT_ARCH_ARM is not set 138 | # CT_ARCH_AVR is not set 139 | # CT_ARCH_C6X is not set 140 | # CT_ARCH_M68K is not set 141 | # CT_ARCH_MICROBLAZE is not set 142 | # CT_ARCH_MIPS is not set 143 | # CT_ARCH_MOXIE is not set 144 | # CT_ARCH_MSP430 is not set 145 | # CT_ARCH_NIOS2 is not set 146 | # CT_ARCH_POWERPC is not set 147 | # CT_ARCH_PRU is not set 148 | # CT_ARCH_RISCV is not set 149 | # CT_ARCH_S390 is not set 150 | # CT_ARCH_SH is not set 151 | # CT_ARCH_SPARC is not set 152 | CT_ARCH_X86=y 153 | # CT_ARCH_XTENSA is not set 154 | CT_ARCH="x86" 155 | CT_ARCH_CHOICE_KSYM="X86" 156 | CT_ARCH_CPU="" 157 | CT_ARCH_TUNE="" 158 | CT_ARCH_X86_SHOW=y 159 | 160 | # 161 | # Options for x86 162 | # 163 | CT_ARCH_X86_PKG_KSYM="" 164 | CT_ALL_ARCH_CHOICES="ALPHA ARC ARM AVR C6X M68K MICROBLAZE MIPS MOXIE MSP430 NIOS2 POWERPC PRU RISCV S390 SH SPARC X86 XTENSA" 165 | CT_ARCH_SUFFIX="" 166 | # CT_OMIT_TARGET_VENDOR is not set 167 | 168 | # 169 | # Generic target options 170 | # 171 | # CT_MULTILIB is not set 172 | CT_DEMULTILIB=y 173 | CT_ARCH_USE_MMU=y 174 | CT_ARCH_SUPPORTS_32=y 175 | CT_ARCH_SUPPORTS_64=y 176 | CT_ARCH_DEFAULT_32=y 177 | CT_ARCH_BITNESS=64 178 | # CT_ARCH_32 is not set 179 | CT_ARCH_64=y 180 | CT_ARCH_SUPPORTS_WITH_32_64=y 181 | 182 | # 183 | # Target optimisations 184 | # 185 | CT_ARCH_SUPPORTS_WITH_ARCH=y 186 | CT_ARCH_SUPPORTS_WITH_CPU=y 187 | CT_ARCH_SUPPORTS_WITH_TUNE=y 188 | CT_ARCH_ARCH="" 189 | CT_TARGET_CFLAGS="" 190 | CT_TARGET_LDFLAGS="" 191 | # end of Target options 192 | 193 | # 194 | # Toolchain options 195 | # 196 | 197 | # 198 | # General toolchain options 199 | # 200 | CT_FORCE_SYSROOT=y 201 | CT_USE_SYSROOT=y 202 | CT_SYSROOT_NAME="sysroot" 203 | CT_SYSROOT_DIR_PREFIX="" 204 | CT_WANTS_STATIC_LINK=y 205 | CT_WANTS_STATIC_LINK_CXX=y 206 | # CT_STATIC_TOOLCHAIN is not set 207 | CT_SHOW_CT_VERSION=y 208 | CT_TOOLCHAIN_PKGVERSION="" 209 | CT_TOOLCHAIN_BUGURL="" 210 | 211 | # 212 | # Tuple completion and aliasing 213 | # 214 | CT_TARGET_VENDOR="w64" 215 | CT_TARGET_ALIAS_SED_EXPR="" 216 | CT_TARGET_ALIAS="" 217 | 218 | # 219 | # Toolchain type 220 | # 221 | # CT_NATIVE is not set 222 | CT_CROSS=y 223 | # CT_CROSS_NATIVE is not set 224 | # CT_CANADIAN is not set 225 | CT_TOOLCHAIN_TYPE="cross" 226 | 227 | # 228 | # Build system 229 | # 230 | CT_BUILD="" 231 | CT_BUILD_PREFIX="" 232 | CT_BUILD_SUFFIX="" 233 | 234 | # 235 | # Misc options 236 | # 237 | # CT_TOOLCHAIN_ENABLE_NLS is not set 238 | # end of Toolchain options 239 | 240 | # 241 | # Operating System 242 | # 243 | CT_WINDOWS=y 244 | # CT_KERNEL_BARE_METAL is not set 245 | # CT_KERNEL_LINUX is not set 246 | CT_KERNEL_WINDOWS=y 247 | CT_KERNEL="windows" 248 | CT_KERNEL_CHOICE_KSYM="WINDOWS" 249 | CT_KERNEL_WINDOWS_SHOW=y 250 | 251 | # 252 | # Options for windows 253 | # 254 | CT_KERNEL_WINDOWS_PKG_KSYM="" 255 | CT_ALL_KERNEL_CHOICES="BARE_METAL LINUX WINDOWS" 256 | 257 | # 258 | # Common kernel options 259 | # 260 | # end of Operating System 261 | 262 | # 263 | # Binary utilities 264 | # 265 | CT_ARCH_BINFMT_ELF=y 266 | CT_BINUTILS_BINUTILS=y 267 | CT_BINUTILS="binutils" 268 | CT_BINUTILS_CHOICE_KSYM="BINUTILS" 269 | CT_BINUTILS_BINUTILS_SHOW=y 270 | 271 | # 272 | # Options for binutils 273 | # 274 | CT_BINUTILS_BINUTILS_PKG_KSYM="BINUTILS" 275 | CT_BINUTILS_DIR_NAME="binutils" 276 | CT_BINUTILS_USE_GNU=y 277 | # CT_BINUTILS_USE_LINARO is not set 278 | # CT_BINUTILS_USE_ORACLE is not set 279 | CT_BINUTILS_USE="BINUTILS" 280 | CT_BINUTILS_PKG_NAME="binutils" 281 | CT_BINUTILS_SRC_RELEASE=y 282 | # CT_BINUTILS_SRC_DEVEL is not set 283 | # CT_BINUTILS_SRC_CUSTOM is not set 284 | CT_BINUTILS_PATCH_GLOBAL=y 285 | # CT_BINUTILS_PATCH_BUNDLED is not set 286 | # CT_BINUTILS_PATCH_LOCAL is not set 287 | # CT_BINUTILS_PATCH_BUNDLED_LOCAL is not set 288 | # CT_BINUTILS_PATCH_LOCAL_BUNDLED is not set 289 | # CT_BINUTILS_PATCH_NONE is not set 290 | CT_BINUTILS_PATCH_ORDER="global" 291 | CT_BINUTILS_V_2_38=y 292 | # CT_BINUTILS_V_2_37 is not set 293 | # CT_BINUTILS_V_2_36 is not set 294 | # CT_BINUTILS_V_2_35 is not set 295 | # CT_BINUTILS_V_2_34 is not set 296 | # CT_BINUTILS_V_2_33 is not set 297 | # CT_BINUTILS_V_2_32 is not set 298 | # CT_BINUTILS_V_2_31 is not set 299 | # CT_BINUTILS_V_2_30 is not set 300 | # CT_BINUTILS_V_2_29 is not set 301 | # CT_BINUTILS_V_2_28 is not set 302 | # CT_BINUTILS_V_2_27 is not set 303 | # CT_BINUTILS_V_2_26 is not set 304 | CT_BINUTILS_VERSION="2.38" 305 | CT_BINUTILS_MIRRORS="$(CT_Mirrors GNU binutils) $(CT_Mirrors sourceware binutils/releases)" 306 | CT_BINUTILS_ARCHIVE_FILENAME="@{pkg_name}-@{version}" 307 | CT_BINUTILS_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" 308 | CT_BINUTILS_ARCHIVE_FORMATS=".tar.xz .tar.bz2 .tar.gz" 309 | CT_BINUTILS_SIGNATURE_FORMAT="packed/.sig" 310 | CT_BINUTILS_later_than_2_30=y 311 | CT_BINUTILS_2_30_or_later=y 312 | CT_BINUTILS_later_than_2_27=y 313 | CT_BINUTILS_2_27_or_later=y 314 | CT_BINUTILS_later_than_2_26=y 315 | CT_BINUTILS_2_26_or_later=y 316 | 317 | # 318 | # GNU binutils 319 | # 320 | CT_BINUTILS_GOLD_SUPPORTS_ARCH=y 321 | CT_BINUTILS_GOLD_SUPPORT=y 322 | CT_BINUTILS_FORCE_LD_BFD_DEFAULT=y 323 | CT_BINUTILS_LINKER_LD=y 324 | # CT_BINUTILS_LINKER_LD_GOLD is not set 325 | CT_BINUTILS_LINKERS_LIST="ld" 326 | CT_BINUTILS_LINKER_DEFAULT="bfd" 327 | CT_BINUTILS_PLUGINS=y 328 | CT_BINUTILS_RELRO=m 329 | CT_BINUTILS_DETERMINISTIC_ARCHIVES=y 330 | CT_BINUTILS_EXTRA_CONFIG_ARRAY="" 331 | # CT_BINUTILS_FOR_TARGET is not set 332 | CT_ALL_BINUTILS_CHOICES="BINUTILS" 333 | # end of Binary utilities 334 | 335 | # 336 | # C-library 337 | # 338 | CT_LIBC_MINGW_W64=y 339 | CT_LIBC="mingw-w64" 340 | CT_LIBC_CHOICE_KSYM="MINGW_W64" 341 | CT_THREADS="posix" 342 | CT_LIBC_MINGW_W64_SHOW=y 343 | 344 | # 345 | # Options for mingw-w64 346 | # 347 | CT_LIBC_MINGW_W64_PKG_KSYM="MINGW_W64" 348 | CT_MINGW_W64_DIR_NAME="mingw-w64" 349 | CT_MINGW_W64_PKG_NAME="mingw-w64" 350 | CT_MINGW_W64_SRC_RELEASE=y 351 | # CT_MINGW_W64_SRC_DEVEL is not set 352 | # CT_MINGW_W64_SRC_CUSTOM is not set 353 | CT_MINGW_W64_PATCH_GLOBAL=y 354 | # CT_MINGW_W64_PATCH_BUNDLED is not set 355 | # CT_MINGW_W64_PATCH_LOCAL is not set 356 | # CT_MINGW_W64_PATCH_BUNDLED_LOCAL is not set 357 | # CT_MINGW_W64_PATCH_LOCAL_BUNDLED is not set 358 | # CT_MINGW_W64_PATCH_NONE is not set 359 | CT_MINGW_W64_PATCH_ORDER="global" 360 | CT_MINGW_W64_V_V9_0=y 361 | # CT_MINGW_W64_V_V8_0 is not set 362 | # CT_MINGW_W64_V_V7_0 is not set 363 | # CT_MINGW_W64_V_V6_0 is not set 364 | # CT_MINGW_W64_V_V5_0 is not set 365 | # CT_MINGW_W64_V_V4_0 is not set 366 | CT_MINGW_W64_VERSION="v9.0.0" 367 | CT_MINGW_W64_MIRRORS="http://downloads.sourceforge.net/sourceforge/mingw-w64 https://downloads.sourceforge.net/project/mingw-w64/mingw-w64/mingw-w64-release/" 368 | CT_MINGW_W64_ARCHIVE_FILENAME="@{pkg_name}-@{version}" 369 | CT_MINGW_W64_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" 370 | CT_MINGW_W64_ARCHIVE_FORMATS=".tar.bz2 .zip" 371 | CT_MINGW_W64_SIGNATURE_FORMAT="packed/.sig" 372 | CT_MINGW_SECURE_API=y 373 | CT_MINGW_DIRECTX=y 374 | CT_MINGW_DDK=y 375 | CT_MINGW_TOOLS=y 376 | CT_MINGW_TOOL_LIST_ARRAY="gendef genidl genlib genpeimg widl" 377 | CT_ALL_LIBC_CHOICES="AVR_LIBC GLIBC MINGW_W64 MOXIEBOX MUSL NEWLIB NONE UCLIBC_NG" 378 | CT_LIBC_SUPPORT_THREADS_ANY=y 379 | CT_LIBC_SUPPORT_THREADS_NATIVE=y 380 | CT_LIBC_SUPPORT_THREADS_POSIX=y 381 | 382 | # 383 | # Common C library options 384 | # 385 | # CT_THREADS_NATIVE is not set 386 | CT_THREADS_POSIX=y 387 | # end of C-library 388 | 389 | # 390 | # C compiler 391 | # 392 | CT_CC_CORE_NEEDED=y 393 | CT_CC_SUPPORT_CXX=y 394 | CT_CC_SUPPORT_FORTRAN=y 395 | CT_CC_SUPPORT_ADA=y 396 | CT_CC_SUPPORT_D=y 397 | CT_CC_SUPPORT_OBJC=y 398 | CT_CC_SUPPORT_OBJCXX=y 399 | CT_CC_SUPPORT_GOLANG=y 400 | CT_CC_GCC=y 401 | CT_CC="gcc" 402 | CT_CC_CHOICE_KSYM="GCC" 403 | CT_CC_GCC_SHOW=y 404 | 405 | # 406 | # Options for gcc 407 | # 408 | CT_CC_GCC_PKG_KSYM="GCC" 409 | CT_GCC_DIR_NAME="gcc" 410 | CT_GCC_USE_GNU=y 411 | # CT_GCC_USE_LINARO is not set 412 | # CT_GCC_USE_ORACLE is not set 413 | CT_GCC_USE="GCC" 414 | CT_GCC_PKG_NAME="gcc" 415 | CT_GCC_SRC_RELEASE=y 416 | # CT_GCC_SRC_DEVEL is not set 417 | # CT_GCC_SRC_CUSTOM is not set 418 | CT_GCC_PATCH_GLOBAL=y 419 | # CT_GCC_PATCH_BUNDLED is not set 420 | # CT_GCC_PATCH_LOCAL is not set 421 | # CT_GCC_PATCH_BUNDLED_LOCAL is not set 422 | # CT_GCC_PATCH_LOCAL_BUNDLED is not set 423 | # CT_GCC_PATCH_NONE is not set 424 | CT_GCC_PATCH_ORDER="global" 425 | CT_GCC_V_12=y 426 | # CT_GCC_V_11 is not set 427 | # CT_GCC_V_10 is not set 428 | # CT_GCC_V_9 is not set 429 | # CT_GCC_V_8 is not set 430 | # CT_GCC_V_7 is not set 431 | # CT_GCC_V_6 is not set 432 | # CT_GCC_V_5 is not set 433 | # CT_GCC_V_4_9 is not set 434 | CT_GCC_VERSION="12.1.0" 435 | CT_GCC_MIRRORS="$(CT_Mirrors GNU gcc/gcc-${CT_GCC_VERSION}) $(CT_Mirrors sourceware gcc/releases/gcc-${CT_GCC_VERSION})" 436 | CT_GCC_ARCHIVE_FILENAME="@{pkg_name}-@{version}" 437 | CT_GCC_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" 438 | CT_GCC_ARCHIVE_FORMATS=".tar.xz .tar.gz" 439 | CT_GCC_SIGNATURE_FORMAT="" 440 | CT_GCC_later_than_12=y 441 | CT_GCC_12_or_later=y 442 | CT_GCC_later_than_11=y 443 | CT_GCC_11_or_later=y 444 | CT_GCC_later_than_10=y 445 | CT_GCC_10_or_later=y 446 | CT_GCC_later_than_9=y 447 | CT_GCC_9_or_later=y 448 | CT_GCC_later_than_8=y 449 | CT_GCC_8_or_later=y 450 | CT_GCC_later_than_7=y 451 | CT_GCC_7_or_later=y 452 | CT_GCC_later_than_6=y 453 | CT_GCC_6_or_later=y 454 | CT_GCC_later_than_5=y 455 | CT_GCC_5_or_later=y 456 | CT_GCC_later_than_4_9=y 457 | CT_GCC_4_9_or_later=y 458 | CT_CC_GCC_ENABLE_PLUGINS=y 459 | CT_CC_GCC_HAS_LIBMPX=y 460 | CT_CC_GCC_ENABLE_CXX_FLAGS="" 461 | CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY="" 462 | CT_CC_GCC_EXTRA_CONFIG_ARRAY="" 463 | CT_CC_GCC_STATIC_LIBSTDCXX=y 464 | CT_CC_GCC_SYSTEM_ZLIB=y 465 | CT_CC_GCC_CONFIG_TLS=m 466 | 467 | # 468 | # Optimisation features 469 | # 470 | CT_CC_GCC_USE_GRAPHITE=y 471 | CT_CC_GCC_USE_LTO=y 472 | CT_CC_GCC_LTO_ZSTD=m 473 | 474 | # 475 | # Settings for libraries running on target 476 | # 477 | # CT_CC_GCC_ENABLE_TARGET_OPTSPACE is not set 478 | # CT_CC_GCC_LIBMUDFLAP is not set 479 | CT_CC_GCC_LIBGOMP=y 480 | CT_CC_GCC_LIBSSP=m 481 | # CT_CC_GCC_LIBQUADMATH is not set 482 | 483 | # 484 | # Misc. obscure options. 485 | # 486 | CT_CC_CXA_ATEXIT=y 487 | CT_CC_GCC_TM_CLONE_REGISTRY=m 488 | # CT_CC_GCC_DISABLE_PCH is not set 489 | CT_CC_GCC_SJLJ_EXCEPTIONS=m 490 | CT_CC_GCC_LDBL_128=m 491 | # CT_CC_GCC_BUILD_ID is not set 492 | CT_CC_GCC_LNK_HASH_STYLE_DEFAULT=y 493 | # CT_CC_GCC_LNK_HASH_STYLE_SYSV is not set 494 | # CT_CC_GCC_LNK_HASH_STYLE_GNU is not set 495 | # CT_CC_GCC_LNK_HASH_STYLE_BOTH is not set 496 | CT_CC_GCC_LNK_HASH_STYLE="" 497 | CT_CC_GCC_DEC_FLOATS_AUTO=y 498 | # CT_CC_GCC_DEC_FLOATS_BID is not set 499 | # CT_CC_GCC_DEC_FLOATS_DPD is not set 500 | # CT_CC_GCC_DEC_FLOATS_NO is not set 501 | CT_CC_GCC_DEC_FLOATS="" 502 | CT_ALL_CC_CHOICES="GCC" 503 | 504 | # 505 | # Additional supported languages: 506 | # 507 | CT_CC_LANG_CXX=y 508 | # CT_CC_LANG_FORTRAN is not set 509 | # CT_CC_LANG_ADA is not set 510 | # CT_CC_LANG_D is not set 511 | # CT_CC_LANG_OBJC is not set 512 | # CT_CC_LANG_OBJCXX is not set 513 | # CT_CC_LANG_GOLANG is not set 514 | CT_CC_LANG_OTHERS="" 515 | # end of C compiler 516 | 517 | # 518 | # Debug facilities 519 | # 520 | # CT_DEBUG_DUMA is not set 521 | # CT_DEBUG_GDB is not set 522 | # CT_DEBUG_LTRACE is not set 523 | # CT_DEBUG_STRACE is not set 524 | CT_ALL_DEBUG_CHOICES="DUMA GDB LTRACE STRACE" 525 | # end of Debug facilities 526 | 527 | # 528 | # Companion libraries 529 | # 530 | # CT_COMPLIBS_CHECK is not set 531 | # CT_COMP_LIBS_CLOOG is not set 532 | # CT_COMP_LIBS_EXPAT is not set 533 | CT_COMP_LIBS_GETTEXT=y 534 | CT_COMP_LIBS_GETTEXT_PKG_KSYM="GETTEXT" 535 | CT_GETTEXT_DIR_NAME="gettext" 536 | CT_GETTEXT_PKG_NAME="gettext" 537 | CT_GETTEXT_SRC_RELEASE=y 538 | # CT_GETTEXT_SRC_DEVEL is not set 539 | # CT_GETTEXT_SRC_CUSTOM is not set 540 | CT_GETTEXT_PATCH_GLOBAL=y 541 | # CT_GETTEXT_PATCH_BUNDLED is not set 542 | # CT_GETTEXT_PATCH_LOCAL is not set 543 | # CT_GETTEXT_PATCH_BUNDLED_LOCAL is not set 544 | # CT_GETTEXT_PATCH_LOCAL_BUNDLED is not set 545 | # CT_GETTEXT_PATCH_NONE is not set 546 | CT_GETTEXT_PATCH_ORDER="global" 547 | CT_GETTEXT_V_0_21=y 548 | # CT_GETTEXT_V_0_20_1 is not set 549 | # CT_GETTEXT_V_0_19_8_1 is not set 550 | CT_GETTEXT_VERSION="0.21" 551 | CT_GETTEXT_MIRRORS="$(CT_Mirrors GNU gettext)" 552 | CT_GETTEXT_ARCHIVE_FILENAME="@{pkg_name}-@{version}" 553 | CT_GETTEXT_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" 554 | CT_GETTEXT_ARCHIVE_FORMATS=".tar.xz .tar.gz" 555 | CT_GETTEXT_SIGNATURE_FORMAT="packed/.sig" 556 | CT_GETTEXT_0_21_or_later=y 557 | CT_GETTEXT_0_21_or_older=y 558 | CT_GETTEXT_INCOMPATIBLE_WITH_UCLIBC_NG=y 559 | 560 | # 561 | # This version of gettext is not compatible with uClibc-NG. Select 562 | # 563 | 564 | # 565 | # a different version if uClibc-NG is used on the target or (in a 566 | # 567 | 568 | # 569 | # Canadian cross build) on the host. 570 | # 571 | CT_COMP_LIBS_GMP=y 572 | CT_COMP_LIBS_GMP_PKG_KSYM="GMP" 573 | CT_GMP_DIR_NAME="gmp" 574 | CT_GMP_PKG_NAME="gmp" 575 | CT_GMP_SRC_RELEASE=y 576 | # CT_GMP_SRC_DEVEL is not set 577 | # CT_GMP_SRC_CUSTOM is not set 578 | CT_GMP_PATCH_GLOBAL=y 579 | # CT_GMP_PATCH_BUNDLED is not set 580 | # CT_GMP_PATCH_LOCAL is not set 581 | # CT_GMP_PATCH_BUNDLED_LOCAL is not set 582 | # CT_GMP_PATCH_LOCAL_BUNDLED is not set 583 | # CT_GMP_PATCH_NONE is not set 584 | CT_GMP_PATCH_ORDER="global" 585 | CT_GMP_V_6_2=y 586 | # CT_GMP_V_6_1 is not set 587 | CT_GMP_VERSION="6.2.1" 588 | CT_GMP_MIRRORS="https://gmplib.org/download/gmp https://gmplib.org/download/gmp/archive $(CT_Mirrors GNU gmp)" 589 | CT_GMP_ARCHIVE_FILENAME="@{pkg_name}-@{version}" 590 | CT_GMP_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" 591 | CT_GMP_ARCHIVE_FORMATS=".tar.xz .tar.lz .tar.bz2" 592 | CT_GMP_SIGNATURE_FORMAT="packed/.sig" 593 | CT_COMP_LIBS_ISL=y 594 | CT_COMP_LIBS_ISL_PKG_KSYM="ISL" 595 | CT_ISL_DIR_NAME="isl" 596 | CT_ISL_PKG_NAME="isl" 597 | CT_ISL_SRC_RELEASE=y 598 | # CT_ISL_SRC_DEVEL is not set 599 | # CT_ISL_SRC_CUSTOM is not set 600 | CT_ISL_PATCH_GLOBAL=y 601 | # CT_ISL_PATCH_BUNDLED is not set 602 | # CT_ISL_PATCH_LOCAL is not set 603 | # CT_ISL_PATCH_BUNDLED_LOCAL is not set 604 | # CT_ISL_PATCH_LOCAL_BUNDLED is not set 605 | # CT_ISL_PATCH_NONE is not set 606 | CT_ISL_PATCH_ORDER="global" 607 | CT_ISL_V_0_24=y 608 | # CT_ISL_V_0_23 is not set 609 | # CT_ISL_V_0_22 is not set 610 | # CT_ISL_V_0_21 is not set 611 | # CT_ISL_V_0_20 is not set 612 | # CT_ISL_V_0_19 is not set 613 | # CT_ISL_V_0_18 is not set 614 | # CT_ISL_V_0_17 is not set 615 | # CT_ISL_V_0_16 is not set 616 | # CT_ISL_V_0_15 is not set 617 | CT_ISL_VERSION="0.24" 618 | CT_ISL_MIRRORS="https://libisl.sourceforge.io" 619 | CT_ISL_ARCHIVE_FILENAME="@{pkg_name}-@{version}" 620 | CT_ISL_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" 621 | CT_ISL_ARCHIVE_FORMATS=".tar.xz .tar.bz2 .tar.gz" 622 | CT_ISL_SIGNATURE_FORMAT="" 623 | CT_ISL_later_than_0_18=y 624 | CT_ISL_0_18_or_later=y 625 | CT_ISL_later_than_0_15=y 626 | CT_ISL_0_15_or_later=y 627 | # CT_COMP_LIBS_LIBELF is not set 628 | # CT_COMP_LIBS_LIBICONV is not set 629 | CT_COMP_LIBS_MPC=y 630 | CT_COMP_LIBS_MPC_PKG_KSYM="MPC" 631 | CT_MPC_DIR_NAME="mpc" 632 | CT_MPC_PKG_NAME="mpc" 633 | CT_MPC_SRC_RELEASE=y 634 | # CT_MPC_SRC_DEVEL is not set 635 | # CT_MPC_SRC_CUSTOM is not set 636 | CT_MPC_PATCH_GLOBAL=y 637 | # CT_MPC_PATCH_BUNDLED is not set 638 | # CT_MPC_PATCH_LOCAL is not set 639 | # CT_MPC_PATCH_BUNDLED_LOCAL is not set 640 | # CT_MPC_PATCH_LOCAL_BUNDLED is not set 641 | # CT_MPC_PATCH_NONE is not set 642 | CT_MPC_PATCH_ORDER="global" 643 | CT_MPC_V_1_2=y 644 | # CT_MPC_V_1_1 is not set 645 | # CT_MPC_V_1_0 is not set 646 | CT_MPC_VERSION="1.2.1" 647 | CT_MPC_MIRRORS="http://www.multiprecision.org/downloads $(CT_Mirrors GNU mpc)" 648 | CT_MPC_ARCHIVE_FILENAME="@{pkg_name}-@{version}" 649 | CT_MPC_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" 650 | CT_MPC_ARCHIVE_FORMATS=".tar.gz" 651 | CT_MPC_SIGNATURE_FORMAT="packed/.sig" 652 | CT_MPC_later_than_1_1_0=y 653 | CT_MPC_1_1_0_or_later=y 654 | CT_COMP_LIBS_MPFR=y 655 | CT_COMP_LIBS_MPFR_PKG_KSYM="MPFR" 656 | CT_MPFR_DIR_NAME="mpfr" 657 | CT_MPFR_PKG_NAME="mpfr" 658 | CT_MPFR_SRC_RELEASE=y 659 | # CT_MPFR_SRC_DEVEL is not set 660 | # CT_MPFR_SRC_CUSTOM is not set 661 | CT_MPFR_PATCH_GLOBAL=y 662 | # CT_MPFR_PATCH_BUNDLED is not set 663 | # CT_MPFR_PATCH_LOCAL is not set 664 | # CT_MPFR_PATCH_BUNDLED_LOCAL is not set 665 | # CT_MPFR_PATCH_LOCAL_BUNDLED is not set 666 | # CT_MPFR_PATCH_NONE is not set 667 | CT_MPFR_PATCH_ORDER="global" 668 | CT_MPFR_V_4_1=y 669 | # CT_MPFR_V_4_0 is not set 670 | # CT_MPFR_V_3_1 is not set 671 | CT_MPFR_VERSION="4.1.0" 672 | CT_MPFR_MIRRORS="http://www.mpfr.org/mpfr-${CT_MPFR_VERSION} $(CT_Mirrors GNU mpfr)" 673 | CT_MPFR_ARCHIVE_FILENAME="@{pkg_name}-@{version}" 674 | CT_MPFR_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" 675 | CT_MPFR_ARCHIVE_FORMATS=".tar.xz .tar.bz2 .tar.gz .zip" 676 | CT_MPFR_SIGNATURE_FORMAT="packed/.asc" 677 | CT_MPFR_later_than_4_0_0=y 678 | CT_MPFR_4_0_0_or_later=y 679 | # CT_COMP_LIBS_NCURSES is not set 680 | CT_COMP_LIBS_ZLIB=y 681 | CT_COMP_LIBS_ZLIB_PKG_KSYM="ZLIB" 682 | CT_ZLIB_DIR_NAME="zlib" 683 | CT_ZLIB_PKG_NAME="zlib" 684 | CT_ZLIB_SRC_RELEASE=y 685 | # CT_ZLIB_SRC_DEVEL is not set 686 | # CT_ZLIB_SRC_CUSTOM is not set 687 | CT_ZLIB_PATCH_GLOBAL=y 688 | # CT_ZLIB_PATCH_BUNDLED is not set 689 | # CT_ZLIB_PATCH_LOCAL is not set 690 | # CT_ZLIB_PATCH_BUNDLED_LOCAL is not set 691 | # CT_ZLIB_PATCH_LOCAL_BUNDLED is not set 692 | # CT_ZLIB_PATCH_NONE is not set 693 | CT_ZLIB_PATCH_ORDER="global" 694 | CT_ZLIB_V_1_2_12=y 695 | CT_ZLIB_VERSION="1.2.12" 696 | CT_ZLIB_MIRRORS="http://downloads.sourceforge.net/project/libpng/zlib/${CT_ZLIB_VERSION} https://www.zlib.net/" 697 | CT_ZLIB_ARCHIVE_FILENAME="@{pkg_name}-@{version}" 698 | CT_ZLIB_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" 699 | CT_ZLIB_ARCHIVE_FORMATS=".tar.xz .tar.gz" 700 | CT_ZLIB_SIGNATURE_FORMAT="packed/.asc" 701 | CT_ALL_COMP_LIBS_CHOICES="CLOOG EXPAT GETTEXT GMP GNUPRUMCU ISL LIBELF LIBICONV MPC MPFR NCURSES NEWLIB_NANO PICOLIBC ZLIB" 702 | # CT_LIBICONV_NEEDED is not set 703 | # CT_GETTEXT_NEEDED is not set 704 | CT_GMP_NEEDED=y 705 | CT_MPFR_NEEDED=y 706 | CT_ISL_NEEDED=y 707 | CT_MPC_NEEDED=y 708 | CT_ZLIB_NEEDED=y 709 | CT_GMP=y 710 | CT_MPFR=y 711 | CT_ISL=y 712 | CT_MPC=y 713 | CT_ZLIB=y 714 | # end of Companion libraries 715 | 716 | # 717 | # Companion tools 718 | # 719 | # CT_COMP_TOOLS_FOR_HOST is not set 720 | # CT_COMP_TOOLS_AUTOCONF is not set 721 | # CT_COMP_TOOLS_AUTOMAKE is not set 722 | # CT_COMP_TOOLS_BISON is not set 723 | # CT_COMP_TOOLS_DTC is not set 724 | # CT_COMP_TOOLS_LIBTOOL is not set 725 | # CT_COMP_TOOLS_M4 is not set 726 | # CT_COMP_TOOLS_MAKE is not set 727 | CT_ALL_COMP_TOOLS_CHOICES="AUTOCONF AUTOMAKE BISON DTC LIBTOOL M4 MAKE" 728 | # end of Companion tools 729 | 730 | # 731 | # Test suite 732 | # 733 | # CT_TEST_SUITE_GCC is not set 734 | # end of Test suite 735 | --------------------------------------------------------------------------------