From 0a2d138f997f61bc13c6c447b911a62c2231bc26 Mon Sep 17 00:00:00 2001 From: EnumDev Date: Mon, 15 Dec 2025 14:56:20 +0200 Subject: [PATCH] Fix svt_av1 undefined symbol --- pkg.info | 2 +- source-files/svt-av1-fix.patch | 22 ++++++++++++++++++++++ source.sh | 10 +++++++++- 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 source-files/svt-av1-fix.patch diff --git a/pkg.info b/pkg.info index 74b9a95..782a185 100644 --- a/pkg.info +++ b/pkg.info @@ -1,7 +1,7 @@ name: libheif description: HEIF and AVIF file format decoder and encoder version: 1.20.2 -revision: 1 +revision: 2 url: https://github.com/strukturag/libheif license: LGPL3-or-later architecture: any diff --git a/source-files/svt-av1-fix.patch b/source-files/svt-av1-fix.patch new file mode 100644 index 0000000..fc8bbc2 --- /dev/null +++ b/source-files/svt-av1-fix.patch @@ -0,0 +1,22 @@ +From 6c3fb973c5d9f954899839f6f4aaa6a173cab098 Mon Sep 17 00:00:00 2001 +From: Joachim Bauch +Date: Mon, 28 Jul 2025 09:21:22 +0200 +Subject: [PATCH] Fix undefined symbol "Error::Ok" in svtenc plugin. + +--- + libheif/plugins/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libheif/plugins/CMakeLists.txt b/libheif/plugins/CMakeLists.txt +index f7379c09da..643f413a1c 100644 +--- a/libheif/plugins/CMakeLists.txt ++++ b/libheif/plugins/CMakeLists.txt +@@ -66,7 +66,7 @@ set(AOM_ENCODER_extra_plugin_sources ../error.cc ../common_utils.cc ../common_ut + plugin_compilation(aomenc AOM AOM_ENCODER_FOUND AOM_ENCODER AOM_ENCODER) + + set(SvtEnc_sources encoder_svt.cc encoder_svt.h) +-set(SvtEnc_extra_plugin_sources ../common_utils.cc ../common_utils.h) ++set(SvtEnc_extra_plugin_sources ../error.cc ../common_utils.cc ../common_utils.h) + plugin_compilation(svtenc SvtEnc SvtEnc_FOUND SvtEnc SvtEnc) + + set(RAV1E_sources encoder_rav1e.cc encoder_rav1e.h) diff --git a/source.sh b/source.sh index 06b1299..ba9cc1a 100644 --- a/source.sh +++ b/source.sh @@ -2,6 +2,13 @@ # BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE # BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT +# The prepare function is executed in the root of the temp directory +# This function is used for putting downloaded files to the correct location or applying patches +prepare() { + cd "$BPM_SOURCE" + patch -Np1 -i "$BPM_WORKDIR"/svt-av1-fix.patch +} + # The build function is executed in the source directory # This function is used to compile the source code build() { @@ -13,7 +20,8 @@ build() { -DWITH_FFMPEG_DECODER_PLUGIN=ON \ -DWITH_SvtEnc=ON \ -DWITH_OpenJPEG_DECODER=ON \ - -DWITH_GDK_PIXBUF=OFF + -DWITH_GDK_PIXBUF=OFF \ + -DWITH_EXAMPLE_HEIF_THUMB=OFF cmake --build build }