diff --git a/backport-Build-fails-with-libxml2-API-change.patch b/backport-Build-fails-with-libxml2-API-change.patch new file mode 100644 index 0000000000000000000000000000000000000000..ce2d4a0720f6d5d0ffc1973f1eb4c4f12783308c --- /dev/null +++ b/backport-Build-fails-with-libxml2-API-change.patch @@ -0,0 +1,59 @@ +From 1bad176b2496579d760852c80cff3ad9fb7c3a4b Mon Sep 17 00:00:00 2001 +From: Adrian Perez de Castro +Date: Mon, 20 Nov 2023 07:42:30 -0800 +Subject: [PATCH] Build fails with libxml2 version 2.12.0 due to API change + https://bugs.webkit.org/show_bug.cgi?id=265128 + +Reviewed by Philippe Normand. + +Starting with libxml2 2.12.0, the API has changed the const-ness of the +xmlError pointers, which results in a build error due to a mismatched +type in the parsing error callback. This papers over the difference by +using preprocessor conditionals. + +* Source/WebCore/xml/XSLTProcessor.h: Use const when building against + libxml2 2.12.0 or newer. +* Source/WebCore/xml/XSLTProcessorLibxslt.cpp: +(WebCore::XSLTProcessor::parseErrorFunc): Ditto. + +Canonical link: https://commits.webkit.org/270977@main + +Conflit: NA +Reference: https://github.com/WebKit/WebKit/commit/1bad176b2496579d760852c80cff3ad9fb7c3a4b +--- + Source/WebCore/xml/XSLTProcessor.h | 4 ++++ + Source/WebCore/xml/XSLTProcessorLibxslt.cpp | 4 ++++ + 2 files changed, 8 insertions(+) + +diff --git a/Source/WebCore/xml/XSLTProcessor.h b/Source/WebCore/xml/XSLTProcessor.h +index 21bb45b5cbe1..5cf20557918f 100644 +--- a/Source/WebCore/xml/XSLTProcessor.h ++++ b/Source/WebCore/xml/XSLTProcessor.h +@@ -61,7 +61,11 @@ class XSLTProcessor : public RefCounted { + + void reset(); + ++#if LIBXML_VERSION >= 21200 ++ static void parseErrorFunc(void* userData, const xmlError*); ++#else + static void parseErrorFunc(void* userData, xmlError*); ++#endif + static void genericErrorFunc(void* userData, const char* msg, ...); + + // Only for libXSLT callbacks +diff --git a/Source/WebCore/xml/XSLTProcessorLibxslt.cpp b/Source/WebCore/xml/XSLTProcessorLibxslt.cpp +index a65691087e3c..9f6b363dfc6c 100644 +--- a/Source/WebCore/xml/XSLTProcessorLibxslt.cpp ++++ b/Source/WebCore/xml/XSLTProcessorLibxslt.cpp +@@ -59,7 +59,11 @@ void XSLTProcessor::genericErrorFunc(void*, const char*, ...) + // It would be nice to do something with this error message. + } + ++#if LIBXML_VERSION >= 21200 ++void XSLTProcessor::parseErrorFunc(void* userData, const xmlError* error) ++#else + void XSLTProcessor::parseErrorFunc(void* userData, xmlError* error) ++#endif + { + PageConsoleClient* console = static_cast(userData); + if (!console) diff --git a/webkit2gtk3.spec b/webkit2gtk3.spec index a8873ad9cce2bbe94ff9996f78347c72286ac016..1f3d31d9710a1c2ed8257635b84094faae95ea9c 100644 --- a/webkit2gtk3.spec +++ b/webkit2gtk3.spec @@ -14,7 +14,7 @@ Name: webkit2gtk3 Version: 2.38.2 -Release: 8 +Release: 9 Summary: GTK web content engine library License: LGPLv2 URL: https://www.webkitgtk.org/ @@ -33,6 +33,7 @@ Patch6001: backport-CVE-2023-32373.patch Patch6002: backport-CVE-2023-32409.patch Patch6003: backport-Fix-build-with-Ruby-3.2.patch Patch6004: backport-CVE-2023-39928.patch +Patch6005: backport-Build-fails-with-libxml2-API-change.patch #Dependency BuildRequires: bison @@ -291,6 +292,9 @@ popd %endif %changelog +* Mon Jul 22 2024 xinghe - 2.38.2-9 +- fix build fails with libxml2 API change + * Wed Oct 11 2023 zhouwenpei - 2.38.2-8 - fix check_install error diff --git a/webkit2gtk4_1.spec b/webkit2gtk4_1.spec index 48993c85aa121dc71df67e9902bf499a4908a339..5714180170742d7e3658badd261645e6e94272bb 100644 --- a/webkit2gtk4_1.spec +++ b/webkit2gtk4_1.spec @@ -14,7 +14,7 @@ Name: webkit2gtk4.1 Version: 2.38.2 -Release: 8 +Release: 9 Summary: GTK web content engine library License: LGPLv2 URL: https://www.webkitgtk.org/ @@ -33,6 +33,7 @@ Patch6001: backport-CVE-2023-32373.patch Patch6002: backport-CVE-2023-32409.patch Patch6003: backport-Fix-build-with-Ruby-3.2.patch Patch6004: backport-CVE-2023-39928.patch +Patch6005: backport-Build-fails-with-libxml2-API-change.patch #Dependency BuildRequires: bison @@ -260,6 +261,9 @@ popd %endif %changelog +* Mon Jul 22 2024 xinghe - 2.38.2-9 +- fix build fails with libxml2 API change + * Wed Oct 11 2023 zhouwenpei - 2.38.2-8 - fix check_install error diff --git a/webkit2gtk5_0.spec b/webkit2gtk5_0.spec index f4f6a71a260c85a3be5655ed6366fea09be8f416..c83fac012662995d120813e3f7cb5be0bca21486 100644 --- a/webkit2gtk5_0.spec +++ b/webkit2gtk5_0.spec @@ -14,7 +14,7 @@ Name: webkit2gtk5.0 Version: 2.38.2 -Release: 8 +Release: 9 Summary: GTK web content engine library License: LGPLv2 URL: https://www.webkitgtk.org/ @@ -33,6 +33,7 @@ Patch6001: backport-CVE-2023-32373.patch Patch6002: backport-CVE-2023-32409.patch Patch6003: backport-Fix-build-with-Ruby-3.2.patch Patch6004: backport-CVE-2023-39928.patch +Patch6005: backport-Build-fails-with-libxml2-API-change.patch #Dependency BuildRequires: bison @@ -260,6 +261,9 @@ popd %endif %changelog +* Mon Jul 22 2024 xinghe - 2.38.2-9 +- fix build fails with libxml2 API change + * Wed Oct 11 2023 zhouwenpei - 2.38.2-8 - fix check_install error