From 2662564a68269d94c97fe58826bc6a43eacbbadd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Vasconcellos?= Date: Thu, 4 Jan 2024 19:19:20 -0300 Subject: [PATCH 1/2] Add gcompat - Update ffmpeg, libheif, libpdfium, protoc and some dependencies --- Dockerfile | 18 +++++++++-- patches/50-onevpl/fix-pkgconfig.patch | 46 --------------------------- stages/00-apple/01-xar.sh | 2 +- stages/00-apple/04-cctools.sh | 2 +- stages/10-sse2neon.sh | 5 +-- stages/25-lcms.sh | 13 +------- stages/45-de265.sh | 2 +- stages/45-opencl/25-opencl-headers.sh | 2 +- stages/45-opencl/45-opencl.sh | 2 +- stages/50-onevpl.sh | 6 +--- stages/50-svt-av1.sh | 2 +- stages/50-vulkan/45-vulkan.sh | 2 +- stages/50-vulkan/50-shaderc.sh | 10 +++--- stages/50-x265.sh | 2 +- stages/99-ffmpeg.sh | 40 +++++++++++------------ stages/99-gcompat.sh | 39 +++++++++++++++++++++++ stages/99-heif.sh | 2 +- stages/99-pdfium.sh | 2 +- stages/99-protoc.sh | 2 +- 19 files changed, 94 insertions(+), 105 deletions(-) delete mode 100644 patches/50-onevpl/fix-pkgconfig.patch create mode 100644 stages/99-gcompat.sh diff --git a/Dockerfile b/Dockerfile index 5ec85b7..7b27597 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ ARG ZIG_VERSION="0.11.0" ARG MESON_VERSION="1.3.0" ARG CMAKE_VERSION="3.27.0" ARG PATCHELF_VERSION="0.18.0" -ARG MACOS_SDK_VERSION="14.0" +ARG MACOS_SDK_VERSION="14.2" #-- @@ -330,7 +330,6 @@ FROM layer-45 AS layer-50-onevpl RUN --mount=type=cache,target=/root/.cache ` --mount=type=bind,source=stages/50-onevpl.sh,target=/srv/stage.sh ` - --mount=type=bind,source=patches/50-onevpl,target="${PREFIX}/patches" ` /srv/build.sh FROM layer-45 AS layer-50-opus @@ -415,6 +414,16 @@ COPY --from=layer-50-zimg "${PREFIX}/." "$PREFIX" #-- +FROM layer-00 AS layer-99-gcompat + +ADD https://git.adelielinux.org/adelie/gcompat/-/raw/1.1.0/LICENSE '/srv/gcompat/LICENSE.gcompat' +ADD https://github.com/void-linux/musl-obstack/raw/v1.2.3/COPYING '/srv/gcompat/COPYING.obstack' +ADD https://github.com/kaniini/libucontext/raw/v1.2/LICENSE '/srv/gcompat/LICENSE.ucontext' + +RUN --mount=type=cache,target=/root/.cache ` + --mount=type=bind,source=stages/99-gcompat.sh,target=/srv/stage.sh ` + /srv/build.sh + FROM layer-00 AS layer-99-protoc ADD https://raw.githubusercontent.com/protocolbuffers/protobuf/v25.0/LICENSE '/srv/protoc/LICENSE' @@ -457,6 +466,9 @@ RUN --mount=type=cache,target=/root/.cache ` FROM layer-00 AS layer-99 +COPY --from=layer-99-gcompat "${OUT}/." "$OUT" +COPY --from=layer-99-gcompat "${PREFIX}/licenses/." "${OUT}/licenses" + COPY --from=layer-99-heif "${OUT}/." "$OUT" COPY --from=layer-99-heif "${PREFIX}/srv/." "${OUT}/srv" COPY --from=layer-99-heif "${PREFIX}/licenses/." "${OUT}/licenses" @@ -493,7 +505,7 @@ RUN find "$OUT/lib" -name '*.lib' -exec ` # https://github.com/NixOS/patchelf/issues/507 RUN --mount=type=cache,target=/root/.cache ` echo 'strip -S "$@" && chmod +x "$@"' >/srv/stage.sh ` - && find "$OUT" -type f \( -name '*.so' -o -name '*.so.*' -o -name '*.dll' -o -name '*.dylib' \) -exec /srv/build.sh {} + + && find "$OUT" -type f \( -name '*.so' -o -name '*.so.*' -o -name '*.dll' -o -name '*.dylib' \) -not -wholename "${OUT}/gcompat/*" -exec /srv/build.sh {} + # Ensure all .so files have the correct rpaths (Linux target only) RUN find "$OUT" -type f \( -name '*.so' -o -name '*.so.*' \) -exec patchelf --set-rpath '$ORIGIN' {} \; diff --git a/patches/50-onevpl/fix-pkgconfig.patch b/patches/50-onevpl/fix-pkgconfig.patch deleted file mode 100644 index d8f1d1b..0000000 --- a/patches/50-onevpl/fix-pkgconfig.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff --git a/dispatcher/pkgconfig/vpl.pc.in b/dispatcher/pkgconfig/vpl.pc.in -index ab468a9..2eb6418 100644 ---- a/dispatcher/pkgconfig/vpl.pc.in -+++ b/dispatcher/pkgconfig/vpl.pc.in -@@ -1,6 +1,7 @@ --prefix=@pc_rel_prefix@ --libdir=@pc_rel_libdir@ --includedir=@pc_rel_incdir@ -+prefix=@CMAKE_INSTALL_PREFIX@ -+exec_prefix=${prefix} -+libdir=${exec_prefix}/lib -+includedir=${prefix}/include - - # oneAPI Video Processing Library (oneVPL) - Name: oneVPL -diff --git a/env/CMakeLists.txt b/env/CMakeLists.txt -index 14e96ba..2961a2b 100644 ---- a/env/CMakeLists.txt -+++ b/env/CMakeLists.txt -@@ -34,16 +34,16 @@ if(WIN32) - PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/${ENV_SCRIPT_NAME}" - DESTINATION "${VPL_INSTALL_ENVDIR}" - COMPONENT dev) --else() -- file(TO_CMAKE_PATH "${env_rel_prefix}" env_rel_prefix) -- file(TO_CMAKE_PATH "${CMAKE_INSTALL_INCLUDEDIR}" _install_includedir) -- file(TO_CMAKE_PATH "${CMAKE_INSTALL_LIBDIR}" _install_libdir) -- file(TO_CMAKE_PATH "${CMAKE_INSTALL_BINDIR}" _install_bindir) -- file(TO_CMAKE_PATH "${VPL_INSTALL_PKGCONFIGDIR}" _install_pkgconfigdir) -- set(ENV_SCRIPT_NAME "vars.sh") -- configure_file("sh/vars.sh.in" "${ENV_SCRIPT_NAME}" @ONLY) -- install( -+endif() -+ -+file(TO_CMAKE_PATH "${env_rel_prefix}" env_rel_prefix) -+file(TO_CMAKE_PATH "${CMAKE_INSTALL_INCLUDEDIR}" _install_includedir) -+file(TO_CMAKE_PATH "${CMAKE_INSTALL_LIBDIR}" _install_libdir) -+file(TO_CMAKE_PATH "${CMAKE_INSTALL_BINDIR}" _install_bindir) -+file(TO_CMAKE_PATH "${VPL_INSTALL_PKGCONFIGDIR}" _install_pkgconfigdir) -+set(ENV_SCRIPT_NAME "vars.sh") -+configure_file("sh/vars.sh.in" "${ENV_SCRIPT_NAME}" @ONLY) -+install( - PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/${ENV_SCRIPT_NAME}" - DESTINATION "${VPL_INSTALL_ENVDIR}" - COMPONENT dev) --endif() diff --git a/stages/00-apple/01-xar.sh b/stages/00-apple/01-xar.sh index a081ac1..d067aa8 100755 --- a/stages/00-apple/01-xar.sh +++ b/stages/00-apple/01-xar.sh @@ -23,7 +23,7 @@ echo "Download xar ..." mkdir -p "xar/build" -curl_tar 'https://github.com/tpoechtrager/xar/archive/7eeb4be.tar.gz' 'xar' 1 +curl_tar 'https://github.com/tpoechtrager/xar/archive/5fa4675.tar.gz' 'xar' 1 cd xar/xar diff --git a/stages/00-apple/04-cctools.sh b/stages/00-apple/04-cctools.sh index abfde2b..563a516 100755 --- a/stages/00-apple/04-cctools.sh +++ b/stages/00-apple/04-cctools.sh @@ -30,7 +30,7 @@ echo "Download cctools ..." mkdir -p "cctools" -curl_tar 'https://github.com/tpoechtrager/cctools-port/archive/59f5fb8.tar.gz' 'cctools' 1 +curl_tar 'https://github.com/tpoechtrager/cctools-port/archive/a98286d.tar.gz' 'cctools' 1 cd cctools/cctools diff --git a/stages/10-sse2neon.sh b/stages/10-sse2neon.sh index 16486ec..48e814e 100644 --- a/stages/10-sse2neon.sh +++ b/stages/10-sse2neon.sh @@ -12,10 +12,7 @@ echo "Download sse2neon..." mkdir -p sse2neon -curl_tar 'https://github.com/DLTcollab/sse2neon/archive/refs/tags/v1.6.0.tar.gz' 'sse2neon' 1 - -curl 'https://raw.githubusercontent.com/HandBrake/HandBrake/172cd5d/contrib/sse2neon/A01-types-fix.patch' \ - | patch -F5 -lp1 -d "sse2neon" -t +curl_tar 'https://github.com/DLTcollab/sse2neon/archive/refs/tags/v1.7.0.tar.gz' 'sse2neon' 1 # Remove unused components rm -r sse2neon/{.ci,.github,tests} diff --git a/stages/25-lcms.sh b/stages/25-lcms.sh index ad4f37a..502b18d 100755 --- a/stages/25-lcms.sh +++ b/stages/25-lcms.sh @@ -3,7 +3,7 @@ echo "Download lcms..." mkdir -p lcms -curl_tar 'https://github.com/mm2/Little-CMS/releases/download/lcms2.15/lcms2-2.15.tar.gz' lcms 1 +curl_tar 'https://github.com/mm2/Little-CMS/releases/download/lcms2.16/lcms2-2.16.tar.gz' lcms 1 case "$TARGET" in aarch64*) @@ -12,17 +12,6 @@ case "$TARGET" in ;; esac -# Some required patches for fixing meson and windows cross-compile issues -for patch in \ - 'https://github.com/mm2/Little-CMS/commit/4e55c55.patch' \ - 'https://github.com/mm2/Little-CMS/commit/8ddc268.patch' \ - 'https://github.com/mm2/Little-CMS/commit/8769c0e.patch' \ - 'https://github.com/mm2/Little-CMS/commit/7984408.patch' \ - 'https://github.com/mm2/Little-CMS/commit/b35e271.patch'; do - curl "$patch" | patch -F5 -lp1 -d lcms -t -done - -sed -i "/subdir('utils')/d" lcms/meson.build sed -i "/subdir('testbed')/d" lcms/meson.build sed -i "/subdir('testbed')/d" lcms/plugins/threaded/meson.build sed -i "/subdir('testbed')/d" lcms/plugins/fast_float/meson.build diff --git a/stages/45-de265.sh b/stages/45-de265.sh index 71a877b..3f0afd5 100755 --- a/stages/45-de265.sh +++ b/stages/45-de265.sh @@ -3,7 +3,7 @@ echo "Download de265..." mkdir -p de265 -curl_tar 'https://github.com/strukturag/libde265/archive/refs/tags/v1.0.14.tar.gz' de265 1 +curl_tar 'https://github.com/strukturag/libde265/archive/refs/tags/v1.0.15.tar.gz' de265 1 case "$TARGET" in aarch64*) diff --git a/stages/45-opencl/25-opencl-headers.sh b/stages/45-opencl/25-opencl-headers.sh index 347cc9f..9909477 100644 --- a/stages/45-opencl/25-opencl-headers.sh +++ b/stages/45-opencl/25-opencl-headers.sh @@ -4,7 +4,7 @@ echo "Download opencl headers..." mkdir -p opencl-headers -curl_tar 'https://github.com/KhronosGroup/OpenCL-Headers/archive/refs/tags/v2023.04.17.tar.gz' opencl-headers 1 +curl_tar 'https://github.com/KhronosGroup/OpenCL-Headers/archive/refs/tags/v2023.12.14.tar.gz' opencl-headers 1 # Remove some superfluous files rm -rf opencl-headers/{.github,tests} diff --git a/stages/45-opencl/45-opencl.sh b/stages/45-opencl/45-opencl.sh index 6ec96f9..691bd99 100755 --- a/stages/45-opencl/45-opencl.sh +++ b/stages/45-opencl/45-opencl.sh @@ -4,7 +4,7 @@ echo "Download opencl..." mkdir -p opencl -curl_tar 'https://github.com/KhronosGroup/OpenCL-ICD-Loader/archive/refs/tags/v2023.04.17.tar.gz' opencl 1 +curl_tar 'https://github.com/KhronosGroup/OpenCL-ICD-Loader/archive/refs/tags/v2023.12.14.tar.gz' opencl 1 # Remove some superfluous files rm -rf opencl/{.github,test} diff --git a/stages/50-onevpl.sh b/stages/50-onevpl.sh index 7cf1416..6c41dc3 100755 --- a/stages/50-onevpl.sh +++ b/stages/50-onevpl.sh @@ -10,11 +10,7 @@ esac echo "Download oneVPL..." mkdir -p oneVPL -curl_tar 'https://github.com/oneapi-src/oneVPL/archive/refs/tags/v2023.3.1.tar.gz' oneVPL 1 - -for patch in "$PREFIX"/patches/*; do - patch -F5 -lp1 -d oneVPL -t < "$patch" -done +curl_tar 'https://github.com/intel/libvpl/archive/refs/tags/v2.10.1.tar.gz' oneVPL 1 sed -i '/add_subdirectory(examples)/d' oneVPL/CMakeLists.txt diff --git a/stages/50-svt-av1.sh b/stages/50-svt-av1.sh index d0b5c3d..7e72e6a 100644 --- a/stages/50-svt-av1.sh +++ b/stages/50-svt-av1.sh @@ -3,7 +3,7 @@ echo "Download svt-av1..." mkdir -p svt-av1 -curl_tar 'https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.7.0/SVT-AV1-v1.7.0.tar.gz' svt-av1 1 +curl_tar 'https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.8.0/SVT-AV1-v1.8.0.tar.gz' svt-av1 1 case "$TARGET" in x86_64*) diff --git a/stages/50-vulkan/45-vulkan.sh b/stages/50-vulkan/45-vulkan.sh index b52d029..c96250c 100755 --- a/stages/50-vulkan/45-vulkan.sh +++ b/stages/50-vulkan/45-vulkan.sh @@ -10,7 +10,7 @@ esac echo "Download vulkan..." mkdir -p vulkan-headers -curl_tar 'https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/v1.3.268.tar.gz' vulkan-headers 1 +curl_tar 'https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/v1.3.274.tar.gz' vulkan-headers 1 VERSION="$( sed -nr \ diff --git a/stages/50-vulkan/50-shaderc.sh b/stages/50-vulkan/50-shaderc.sh index 26a899c..d859a59 100755 --- a/stages/50-vulkan/50-shaderc.sh +++ b/stages/50-vulkan/50-shaderc.sh @@ -12,16 +12,18 @@ mkdir -p shaderc/third_party/{glslang,spirv-headers,spirv-tools} # All the version for the main package and third-party deps must match what is here: # https://github.com/google/shaderc/blob/known-good/known_good.json -curl_tar 'https://github.com/google/shaderc/archive/refs/tags/v2023.7.tar.gz' shaderc 1 +curl_tar 'https://github.com/google/shaderc/archive/refs/tags/v2023.8.tar.gz' shaderc 1 + +sed -ie 's|#!/usr/bin/env python|#!/usr/bin/env python3|' shaderc/utils/update_build_version.py # Thrid party deps -curl_tar 'https://github.com/KhronosGroup/glslang/archive/48f9ed8.tar.gz' shaderc/third_party/glslang 1 +curl_tar 'https://github.com/KhronosGroup/glslang/archive/a91631b.tar.gz' shaderc/third_party/glslang 1 cp -a shaderc/third_party/glslang/LICENSE.txt shaderc/LICENSE.glslang -curl_tar 'https://github.com/KhronosGroup/SPIRV-Headers/archive/4183b26.tar.gz' shaderc/third_party/spirv-headers 1 +curl_tar 'https://github.com/KhronosGroup/SPIRV-Headers/archive/1c6bb27.tar.gz' shaderc/third_party/spirv-headers 1 cp -a shaderc/third_party/spirv-headers/LICENSE shaderc/LICENSE.spirv-headers -curl_tar 'https://github.com/KhronosGroup/SPIRV-Tools/archive/360d469.tar.gz' shaderc/third_party/spirv-tools 1 +curl_tar 'https://github.com/KhronosGroup/SPIRV-Tools/archive/f0cc85e.tar.gz' shaderc/third_party/spirv-tools 1 cp -a shaderc/third_party/spirv-tools/LICENSE shaderc/LICENSE.spirv-tools sed -i '/add_subdirectory(test)/d' shaderc/third_party/spirv-tools/CMakeLists.txt diff --git a/stages/50-x265.sh b/stages/50-x265.sh index b5b41c0..12dbf19 100644 --- a/stages/50-x265.sh +++ b/stages/50-x265.sh @@ -4,7 +4,7 @@ echo "Download x265..." mkdir -p x265 # Need to use master, because the latest release doesn't support optmized aarch64 and it is from 2021 -curl_tar 'https://bitbucket.org/multicoreware/x265_git/get/8ee01d4.tar.bz2' x265 1 +curl_tar 'https://bitbucket.org/multicoreware/x265_git/get/ce8642f.tar.bz2' x265 1 # Remove some superfluous files rm -rf x265/{doc,build} diff --git a/stages/99-ffmpeg.sh b/stages/99-ffmpeg.sh index bd50031..9d04a59 100755 --- a/stages/99-ffmpeg.sh +++ b/stages/99-ffmpeg.sh @@ -3,29 +3,29 @@ echo "Download ffmpeg..." mkdir -p ffmpeg -curl_tar 'https://github.com/FFmpeg/FFmpeg/archive/refs/tags/n6.1.tar.gz' ffmpeg 1 +curl_tar 'https://github.com/FFmpeg/FFmpeg/archive/refs/tags/n6.1.1.tar.gz' ffmpeg 1 # Handbreak patches for patch in \ - 'https://github.com/HandBrake/HandBrake/raw/9c9cf41/contrib/ffmpeg/A01-mov-read-name-track-tag-written-by-movenc.patch' \ - 'https://github.com/HandBrake/HandBrake/raw/9c9cf41/contrib/ffmpeg/A02-movenc-write-3gpp-track-titl-tag.patch' \ - 'https://github.com/HandBrake/HandBrake/raw/9c9cf41/contrib/ffmpeg/A03-mov-read-3gpp-udta-tags.patch' \ - 'https://github.com/HandBrake/HandBrake/raw/9c9cf41/contrib/ffmpeg/A04-movenc-write-3gpp-track-names-tags-for-all-available.patch' \ - 'https://github.com/HandBrake/HandBrake/raw/9c9cf41/contrib/ffmpeg/A05-dvdsubdec-fix-processing-of-partial-packets.patch' \ - 'https://github.com/HandBrake/HandBrake/raw/9c9cf41/contrib/ffmpeg/A06-dvdsubdec-return-number-of-bytes-used.patch' \ - 'https://github.com/HandBrake/HandBrake/raw/9c9cf41/contrib/ffmpeg/A07-dvdsubdec-use-pts-of-initial-packet.patch' \ - 'https://github.com/HandBrake/HandBrake/raw/9c9cf41/contrib/ffmpeg/A08-ccaption_dec-fix-pts-in-real_time-mode.patch' \ - 'https://github.com/HandBrake/HandBrake/raw/9c9cf41/contrib/ffmpeg/A09-matroskaenc-aac-extradata-updated.patch' \ - 'https://github.com/HandBrake/HandBrake/raw/9c9cf41/contrib/ffmpeg/A10-amfenc-Add-support-for-pict_type-field.patch' \ - 'https://github.com/HandBrake/HandBrake/raw/9c9cf41/contrib/ffmpeg/A11-amfenc-Fixes-the-color-information-in-the-ou.patch' \ - 'https://github.com/HandBrake/HandBrake/raw/9c9cf41/contrib/ffmpeg/A12-amfenc-HDR-metadata.patch' \ - 'https://github.com/HandBrake/HandBrake/raw/9c9cf41/contrib/ffmpeg/A13-libavcodec-amfenc-Fix-issue-with-missing-headers-in-.patch' \ - 'https://github.com/HandBrake/HandBrake/raw/9c9cf41/contrib/ffmpeg/A14-avcodec-add-ambient-viewing-environment-packet-side-.patch' \ - 'https://github.com/HandBrake/HandBrake/raw/9c9cf41/contrib/ffmpeg/A15-avformat-mov-add-support-for-amve-ambient-viewing-en.patch' \ - 'https://github.com/HandBrake/HandBrake/raw/9c9cf41/contrib/ffmpeg/A16-videotoolbox-dec-h264-10bit.patch' \ - 'https://github.com/HandBrake/HandBrake/raw/9c9cf41/contrib/ffmpeg/A17-libswscale-fix-yuv420p-to-p01xle-color-conversion-bu.patch' \ - 'https://github.com/HandBrake/HandBrake/raw/9c9cf41/contrib/ffmpeg/A18-qsv-fix-decode-10bit-hdr.patch' \ - 'https://github.com/HandBrake/HandBrake/raw/9c9cf41/contrib/ffmpeg/A19-ffbuild-common-use-gzip-n-flag-for-cuda.patch'; do + 'https://github.com/HandBrake/HandBrake/raw/ce96bc5/contrib/ffmpeg/A01-mov-read-name-track-tag-written-by-movenc.patch' \ + 'https://github.com/HandBrake/HandBrake/raw/ce96bc5/contrib/ffmpeg/A02-movenc-write-3gpp-track-titl-tag.patch' \ + 'https://github.com/HandBrake/HandBrake/raw/ce96bc5/contrib/ffmpeg/A03-mov-read-3gpp-udta-tags.patch' \ + 'https://github.com/HandBrake/HandBrake/raw/ce96bc5/contrib/ffmpeg/A04-movenc-write-3gpp-track-names-tags-for-all-available.patch' \ + 'https://github.com/HandBrake/HandBrake/raw/ce96bc5/contrib/ffmpeg/A05-dvdsubdec-fix-processing-of-partial-packets.patch' \ + 'https://github.com/HandBrake/HandBrake/raw/ce96bc5/contrib/ffmpeg/A06-dvdsubdec-return-number-of-bytes-used.patch' \ + 'https://github.com/HandBrake/HandBrake/raw/ce96bc5/contrib/ffmpeg/A07-dvdsubdec-use-pts-of-initial-packet.patch' \ + 'https://github.com/HandBrake/HandBrake/raw/ce96bc5/contrib/ffmpeg/A08-ccaption_dec-fix-pts-in-real_time-mode.patch' \ + 'https://github.com/HandBrake/HandBrake/raw/ce96bc5/contrib/ffmpeg/A09-matroskaenc-aac-extradata-updated.patch' \ + 'https://github.com/HandBrake/HandBrake/raw/ce96bc5/contrib/ffmpeg/A10-amfenc-Add-support-for-pict_type-field.patch' \ + 'https://github.com/HandBrake/HandBrake/raw/ce96bc5/contrib/ffmpeg/A11-amfenc-Fixes-the-color-information-in-the-ou.patch' \ + 'https://github.com/HandBrake/HandBrake/raw/ce96bc5/contrib/ffmpeg/A12-amfenc-HDR-metadata.patch' \ + 'https://github.com/HandBrake/HandBrake/raw/ce96bc5/contrib/ffmpeg/A13-libavcodec-amfenc-Fix-issue-with-missing-headers-in-.patch' \ + 'https://github.com/HandBrake/HandBrake/raw/ce96bc5/contrib/ffmpeg/A14-avcodec-add-ambient-viewing-environment-packet-side-.patch' \ + 'https://github.com/HandBrake/HandBrake/raw/ce96bc5/contrib/ffmpeg/A15-avformat-mov-add-support-for-amve-ambient-viewing-en.patch' \ + 'https://github.com/HandBrake/HandBrake/raw/ce96bc5/contrib/ffmpeg/A16-videotoolbox-dec-h264.patch' \ + 'https://github.com/HandBrake/HandBrake/raw/ce96bc5/contrib/ffmpeg/A17-libswscale-fix-yuv420p-to-p01xle-color-conversion-bu.patch' \ + 'https://github.com/HandBrake/HandBrake/raw/ce96bc5/contrib/ffmpeg/A18-qsv-fix-decode-10bit-hdr.patch' \ + 'https://github.com/HandBrake/HandBrake/raw/ce96bc5/contrib/ffmpeg/A19-ffbuild-common-use-gzip-n-flag-for-cuda.patch'; do curl "$patch" | patch -F5 -lp1 -d ffmpeg -t done diff --git a/stages/99-gcompat.sh b/stages/99-gcompat.sh new file mode 100644 index 0000000..a854cdd --- /dev/null +++ b/stages/99-gcompat.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env -S bash -euo pipefail + +case "$TARGET" in + *linux-gnu) + ;; + *) + export UNSUPPORTED=1 + exit 1 + ;; +esac + +echo "Download gcompat..." +mkdir -p gcompat + +cd gcompat +curl -JO 'https://gitlab.alpinelinux.org/api/v4/projects/5/packages/generic/v2.14.0/x86_64/apk.static' + +chmod +x apk.static + +./apk.static \ + --arch "${TARGET%%-*}" \ + -X 'http://dl-cdn.alpinelinux.org/alpine/edge/main/' \ + -U --allow-untrusted --root "$(pwd)" --initdb \ + add gcompat + +# Remove unused components +find . -type d -name 'apk' -exec rm -r {} + +find . -name '*.so*' -not -wholename './lib/*' -exec mv -n -t lib {} + || true +rm -r lib64 usr/lib apk.static +find . -empty -type d -delete + +# Adjust rpath to use $ORIGIN +find lib -type f -name '*.so*' -exec patchelf --set-rpath "\$ORIGIN" {} \; + +# Copy gcompat and it's dependencies to the output directory, resolving symlinks +mkdir -p "${OUT}/gcompat" +for lib in libgcompat.so.0 libobstack.so.1 libucontext.so.1 libucontext_posix.so.1; do + cp -L "lib/${lib}" "${OUT}/gcompat/" +done diff --git a/stages/99-heif.sh b/stages/99-heif.sh index 672d1fe..469c3c6 100755 --- a/stages/99-heif.sh +++ b/stages/99-heif.sh @@ -3,7 +3,7 @@ echo "Download heif..." mkdir -p heif -curl_tar 'https://github.com/strukturag/libheif/releases/download/v1.17.5/libheif-1.17.5.tar.gz' heif 1 +curl_tar 'https://github.com/strukturag/libheif/releases/download/v1.17.6/libheif-1.17.6.tar.gz' heif 1 case "$TARGET" in *windows*) diff --git a/stages/99-pdfium.sh b/stages/99-pdfium.sh index 872e401..b4f54a4 100644 --- a/stages/99-pdfium.sh +++ b/stages/99-pdfium.sh @@ -3,7 +3,7 @@ echo "Download pdfium..." mkdir -p pdfium -_tag='chromium/6150' +_tag='chromium/6219' case "$TARGET" in x86_64-windows*) _name='win-x64' diff --git a/stages/99-protoc.sh b/stages/99-protoc.sh index 62a55c9..c01832a 100644 --- a/stages/99-protoc.sh +++ b/stages/99-protoc.sh @@ -3,7 +3,7 @@ echo "Download pdfium..." mkdir -p pdfium -_tag='25.0' +_tag='25.1' case "$TARGET" in x86_64-windows*) _suffix='win64' From 5972eadd6cff8eed1873819e50bdfe2292494a63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Vasconcellos?= Date: Fri, 5 Jan 2024 19:37:57 -0300 Subject: [PATCH 2/2] Remove old patch for svt-av1 --- stages/50-svt-av1.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/stages/50-svt-av1.sh b/stages/50-svt-av1.sh index 7e72e6a..8b44457 100644 --- a/stages/50-svt-av1.sh +++ b/stages/50-svt-av1.sh @@ -11,8 +11,6 @@ case "$TARGET" in ;; aarch64*) ENABLE_NASM=Off - # Patch to enable NEON in aarch64 - curl 'https://gitlab.com/AOMediaCodec/SVT-AV1/-/merge_requests/2135.patch' | patch -F5 -lp1 -d svt-av1 -t ;; esac