Skip to content

Commit f7f5ba8

Browse files
committed
updated libs, added Vulkan and OpenCL support
1 parent 4e71acc commit f7f5ba8

File tree

1 file changed

+49
-25
lines changed

1 file changed

+49
-25
lines changed

build-ffmpeg

Lines changed: 49 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -366,12 +366,8 @@ fi
366366
## build tools
367367
##
368368

369-
if build "giflib" "5.2.1"; then
369+
if build "giflib" "5.2.2"; then
370370
download "https://netcologne.dl.sourceforge.net/project/giflib/giflib-$CURRENT_PACKAGE_VERSION.tar.gz"
371-
if [[ "$OSTYPE" == "darwin"* ]]; then
372-
download "https://sourceforge.net/p/giflib/bugs/_discuss/thread/4e811ad29b/c323/attachment/Makefile.patch"
373-
execute patch -p0 --forward "${PACKAGES}/giflib-$CURRENT_PACKAGE_VERSION/Makefile" "${PACKAGES}/Makefile.patch" || true
374-
fi
375371
cd "${PACKAGES}"/giflib-$CURRENT_PACKAGE_VERSION || exit
376372
#multicore build disabled for this library
377373
execute make
@@ -457,7 +453,7 @@ if $NONFREE_AND_GPL; then
457453
build_done "gettext" $CURRENT_PACKAGE_VERSION
458454
fi
459455

460-
if build "openssl" "3.5.0"; then
456+
if build "openssl" "3.5.2"; then
461457
download "https://github.com/openssl/openssl/archive/refs/tags/openssl-$CURRENT_PACKAGE_VERSION.tar.gz" "openssl-$CURRENT_PACKAGE_VERSION.tar.gz"
462458
execute ./Configure --prefix="${WORKSPACE}" --openssldir="${WORKSPACE}" --libdir="lib" --with-zlib-include="${WORKSPACE}"/include/ --with-zlib-lib="${WORKSPACE}"/lib no-shared zlib
463459
execute make -j $MJOBS
@@ -483,7 +479,7 @@ else
483479
fi
484480

485481
if [[ ! $ARCH == 'arm64' ]]; then
486-
if build "gnutls" "3.8.5"; then
482+
if build "gnutls" "3.8.10"; then
487483
download "https://www.gnupg.org/ftp/gcrypt/gnutls/v3.8/gnutls-$CURRENT_PACKAGE_VERSION.tar.xz"
488484
execute ./configure --prefix="${WORKSPACE}" --disable-shared --enable-static --disable-doc --disable-tools --disable-cxx --disable-tests --disable-gtk-doc-html --disable-libdane --disable-nls --enable-local-libopts --disable-guile --with-included-libtasn1 --with-included-unistring --without-p11-kit CPPFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
489485
execute make -j $MJOBS
@@ -569,7 +565,7 @@ if command_exists "python3"; then
569565
fi
570566
fi
571567

572-
if build "svtav1" "3.0.2"; then
568+
if build "svtav1" "3.1.2"; then
573569
# Last known working commit which passed CI Tests from HEAD branch
574570
download "https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v$CURRENT_PACKAGE_VERSION/SVT-AV1-v$CURRENT_PACKAGE_VERSION.tar.gz" "svtav1-$CURRENT_PACKAGE_VERSION.tar.gz"
575571
cd "${PACKAGES}"/svtav1-$CURRENT_PACKAGE_VERSION//Build/linux || exit
@@ -584,7 +580,7 @@ CONFIGURE_OPTIONS+=("--enable-libsvtav1")
584580

585581
if command_exists "cargo"; then
586582
if [[ ! "$SKIPRAV1E" == "yes" ]]; then
587-
if build "rav1e" "0.8.0"; then
583+
if build "rav1e" "0.8.1"; then
588584
echo "if you get the message 'cannot be built because it requires rustc x.xx or newer, try to run 'rustup update'"
589585
execute cargo install cargo-c
590586
download "https://github.com/xiph/rav1e/archive/refs/tags/v$CURRENT_PACKAGE_VERSION.tar.gz"
@@ -717,8 +713,8 @@ if $NONFREE_AND_GPL; then
717713
CONFIGURE_OPTIONS+=("--enable-libvidstab")
718714
fi
719715

720-
if build "av1" "10aece4157eb79315da205f39e19bf6ab3ee30d0"; then
721-
# 10aece4157eb79315da205f39e19bf6ab3ee30d0 == v3.12.1
716+
if build "av1" "d9c115ce0951324dee243041ef810e27202de20f"; then
717+
# d9c115ce0951324dee243041ef810e27202de20f == v3.13.0
722718
download "https://aomedia.googlesource.com/aom/+archive/$CURRENT_PACKAGE_VERSION.tar.gz" "av1.tar.gz" "av1"
723719
make_dir "$PACKAGES"/aom_build
724720
cd "$PACKAGES"/aom_build || exit
@@ -734,7 +730,7 @@ if build "av1" "10aece4157eb79315da205f39e19bf6ab3ee30d0"; then
734730
fi
735731
CONFIGURE_OPTIONS+=("--enable-libaom")
736732

737-
if build "zimg" "3.0.5"; then
733+
if build "zimg" "3.0.6"; then
738734
download "https://github.com/sekrit-twc/zimg/archive/refs/tags/release-$CURRENT_PACKAGE_VERSION.tar.gz" "zimg-$CURRENT_PACKAGE_VERSION.tar.gz" "zimg"
739735
cd zimg-release-$CURRENT_PACKAGE_VERSION || exit
740736
execute "${WORKSPACE}/bin/libtoolize" -i -f -q
@@ -798,14 +794,14 @@ if ! $DISABLE_LV2 ; then
798794
fi
799795
if build "sratom" "0.6.16"; then
800796
download "https://gitlab.com/lv2/sratom/-/archive/v$CURRENT_PACKAGE_VERSION/sratom-v$CURRENT_PACKAGE_VERSION.tar.gz" "sratom-v$CURRENT_PACKAGE_VERSION.tar.gz"
801-
execute meson build --prefix="${WORKSPACE}" --buildtype=release --default-library=static --libdir="${WORKSPACE}"/lib
797+
execute meson build --prefix="${WORKSPACE}" -Ddocs=disabled --buildtype=release --default-library=static --libdir="${WORKSPACE}"/lib
802798
execute ninja -C build
803799
execute ninja -C build install
804800
build_done "sratom" $CURRENT_PACKAGE_VERSION
805801
fi
806802
if build "lilv" "0.24.16"; then
807803
download "https://gitlab.com/lv2/lilv/-/archive/v$CURRENT_PACKAGE_VERSION/lilv-v$CURRENT_PACKAGE_VERSION.tar.gz" "lilv-v$CURRENT_PACKAGE_VERSION.tar.gz"
808-
execute meson build --prefix="${WORKSPACE}" --buildtype=release --default-library=static --libdir="${WORKSPACE}"/lib -Dcpp_std=c++11
804+
execute meson build --prefix="${WORKSPACE}" -Ddocs=disabled --buildtype=release --default-library=static --libdir="${WORKSPACE}"/lib -Dcpp_std=c++11
809805
execute ninja -C build
810806
execute ninja -C build install
811807
build_done "lilv" $CURRENT_PACKAGE_VERSION
@@ -848,7 +844,7 @@ if build "opus" "1.5.2"; then
848844
fi
849845
CONFIGURE_OPTIONS+=("--enable-libopus")
850846

851-
if build "libogg" "1.3.5"; then
847+
if build "libogg" "1.3.6"; then
852848
download "https://ftp.osuosl.org/pub/xiph/releases/ogg/libogg-$CURRENT_PACKAGE_VERSION.tar.xz"
853849
execute ./configure --prefix="${WORKSPACE}" --disable-shared --enable-static
854850
execute make -j $MJOBS
@@ -903,7 +899,7 @@ if build "libtiff" "4.7.0"; then
903899
execute make install
904900
build_done "libtiff" $CURRENT_PACKAGE_VERSION
905901
fi
906-
if build "libpng" "1.6.48"; then
902+
if build "libpng" "1.6.50"; then
907903
download "https://sourceforge.net/projects/libpng/files/libpng16/$CURRENT_PACKAGE_VERSION/libpng-$CURRENT_PACKAGE_VERSION.tar.gz" "libpng-$CURRENT_PACKAGE_VERSION.tar.gz"
908904
export LDFLAGS="${LDFLAGS}"
909905
export CPPFLAGS="${CFLAGS}"
@@ -930,7 +926,7 @@ if build "libjxl" "0.11.1"; then
930926
fi
931927
CONFIGURE_OPTIONS+=("--enable-libjxl")
932928

933-
if build "libwebp" "1.5.0"; then
929+
if build "libwebp" "1.6.0"; then
934930
# libwebp can fail to compile on Ubuntu if these flags were left set to CFLAGS
935931
CPPFLAGS=
936932
download "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-$CURRENT_PACKAGE_VERSION.tar.gz" "libwebp-$CURRENT_PACKAGE_VERSION.tar.gz"
@@ -948,7 +944,7 @@ CONFIGURE_OPTIONS+=("--enable-libwebp")
948944
## other library
949945
##
950946

951-
if build "libsdl" "2.32.8"; then
947+
if build "libsdl" "2.32.10"; then
952948
download "https://github.com/libsdl-org/SDL/releases/download/release-$CURRENT_PACKAGE_VERSION/SDL2-$CURRENT_PACKAGE_VERSION.tar.gz"
953949
execute ./configure --prefix="${WORKSPACE}" --disable-shared --enable-static
954950
execute make -j $MJOBS
@@ -1029,6 +1025,27 @@ fi
10291025
## HWaccel library
10301026
##
10311027

1028+
if build "vulkan-headers" "1.4.326"; then
1029+
download "https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/v$CURRENT_PACKAGE_VERSION.tar.gz" "Vulkan-Headers-$CURRENT_PACKAGE_VERSION.tar.gz"
1030+
execute cmake -DCMAKE_INSTALL_PREFIX="${WORKSPACE}" -B build/
1031+
execute cmake --install build --prefix "${WORKSPACE}"
1032+
build_done "vulkan-headers" $CURRENT_PACKAGE_VERSION
1033+
fi
1034+
CONFIGURE_OPTIONS+=("--enable-vulkan")
1035+
1036+
# vulkan filters and some encoders/decorders are implemented using shaders, for those we need a shader compiler
1037+
if command_exists "python3"; then
1038+
if build "glslang" "15.4.0"; then
1039+
download "https://github.com/KhronosGroup/glslang/archive/refs/tags/$CURRENT_PACKAGE_VERSION.tar.gz" "glslang-$CURRENT_PACKAGE_VERSION.tar.gz"
1040+
execute ./update_glslang_sources.py
1041+
execute cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_SHARED=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX="${WORKSPACE}" .
1042+
execute make -j $MJOBS
1043+
execute make install
1044+
build_done "glslang" $CURRENT_PACKAGE_VERSION
1045+
fi
1046+
CONFIGURE_OPTIONS+=("--enable-libglslang")
1047+
fi
1048+
10321049
if [[ "$OSTYPE" == "linux-gnu" ]]; then
10331050
if command_exists "nvcc"; then
10341051
if build "nv-codec" "11.1.5.3"; then
@@ -1075,6 +1092,20 @@ if [[ "$OSTYPE" == "linux-gnu" ]]; then
10751092
build_done "amf" $CURRENT_PACKAGE_VERSION
10761093
fi
10771094
CONFIGURE_OPTIONS+=("--enable-amf")
1095+
1096+
if build "opencl-headers" "2025.07.22"; then
1097+
download "https://github.com/KhronosGroup/OpenCL-Headers/archive/refs/tags/v$CURRENT_PACKAGE_VERSION.tar.gz" "OpenCL-Headers-$CURRENT_PACKAGE_VERSION.tar.gz"
1098+
execute cmake -DCMAKE_INSTALL_PREFIX="${WORKSPACE}" -B build/
1099+
execute cmake --build build --target install
1100+
build_done "opencl-headers" $CURRENT_PACKAGE_VERSION
1101+
fi
1102+
if build "opencl-icd-loader" "2025.07.22"; then
1103+
download "https://github.com/KhronosGroup/OpenCL-ICD-Loader/archive/refs/tags/v$CURRENT_PACKAGE_VERSION.tar.gz" "OpenCL-ICD-Loader-$CURRENT_PACKAGE_VERSION.tar.gz"
1104+
execute cmake -DCMAKE_PREFIX_PATH="${WORKSPACE}" -DCMAKE_INSTALL_PREFIX="${WORKSPACE}" -DENABLE_SHARED=OFF -DBUILD_SHARED_LIBS=OFF -B build/
1105+
execute cmake --build build --target install
1106+
build_done "opencl-icd-loader" $CURRENT_PACKAGE_VERSION
1107+
fi
1108+
CONFIGURE_OPTIONS+=("--enable-opencl")
10781109
fi
10791110

10801111
##
@@ -1096,13 +1127,6 @@ build "ffmpeg" "$FFMPEG_VERSION"
10961127
download "https://github.com/FFmpeg/FFmpeg/archive/refs/tags/n$FFMPEG_VERSION.tar.gz" "FFmpeg-release-$FFMPEG_VERSION.tar.gz"
10971128
# shellcheck disable=SC2086
10981129

1099-
# this is a temporary fix to allow building ffmpeg 7.1.x with svtav1 >= 3.0.0
1100-
# (API change in svtav1 3.0: one unused parameter removed)
1101-
# the patch already in ffmpeg master branch was not backported to 7.1.x
1102-
sed 's/svt_av1_enc_init_handle(\&svt_enc->svt_handle, svt_enc, \&svt_enc->enc_params);/svt_av1_enc_init_handle(\&svt_enc->svt_handle, \&svt_enc->enc_params);/g' libavcodec/libsvtav1.c >libavcodec/libsvtav1.c.patched
1103-
execute rm libavcodec/libsvtav1.c
1104-
execute mv libavcodec/libsvtav1.c.patched libavcodec/libsvtav1.c
1105-
11061130
execute ./configure "${CONFIGURE_OPTIONS[@]}" \
11071131
--disable-debug \
11081132
--disable-shared \

0 commit comments

Comments
 (0)