From 61c4f91c19e43a8cac382bc8af841e4ec4c01a0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Kundr=C3=A1t?= Date: Tue, 16 Jan 2024 21:30:54 +0100 Subject: [PATCH 1/2] qt5.qtwebkit: fix build with GCC 13 Apply a patch from Fedora and Arch which solves a build failure on GCC 13. Url: https://src.fedoraproject.org/rpms/qt5-qtwebkit/raw/rawhide/f/qtwebkit-cstdint.patch --- pkgs/development/libraries/qt-5/5.15/default.nix | 1 + .../libraries/qt-5/5.15/qtwebkit-cstdint.patch | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 pkgs/development/libraries/qt-5/5.15/qtwebkit-cstdint.patch diff --git a/pkgs/development/libraries/qt-5/5.15/default.nix b/pkgs/development/libraries/qt-5/5.15/default.nix index b0e92290fe5b..ec3e3c634fb2 100644 --- a/pkgs/development/libraries/qt-5/5.15/default.nix +++ b/pkgs/development/libraries/qt-5/5.15/default.nix @@ -213,6 +213,7 @@ let }) ./qtwebkit.patch ./qtwebkit-icu68.patch + ./qtwebkit-cstdint.patch ] ++ lib.optionals stdenv.isDarwin [ ./qtwebkit-darwin-no-readline.patch ./qtwebkit-darwin-no-qos-classes.patch diff --git a/pkgs/development/libraries/qt-5/5.15/qtwebkit-cstdint.patch b/pkgs/development/libraries/qt-5/5.15/qtwebkit-cstdint.patch new file mode 100644 index 000000000000..6ef551575e12 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.15/qtwebkit-cstdint.patch @@ -0,0 +1,11 @@ +diff -up qtwebkit-5.212.0-alpha4/Source/ThirdParty/ANGLE/src/common/mathutil.h.me qtwebkit-5.212.0-alpha4/Source/ThirdParty/ANGLE/src/common/mathutil.h +--- qtwebkit-5.212.0-alpha4/Source/ThirdParty/ANGLE/src/common/mathutil.h.me 2023-02-20 15:40:04.045911245 +0100 ++++ qtwebkit-5.212.0-alpha4/Source/ThirdParty/ANGLE/src/common/mathutil.h 2023-02-20 15:40:39.038549787 +0100 +@@ -16,6 +16,7 @@ + #include + #include + #include ++#include + + namespace gl + { From 2ad2987a9558ab913c42211fbd0fd78b612233f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Kundr=C3=A1t?= Date: Tue, 16 Jan 2024 23:08:51 +0100 Subject: [PATCH 2/2] qt5.qtwebkit: apply libxml2 patch from upstream webkit Without this patch, the build fails with the current libxml2: /build/source/Source/WebCore/xml/XSLStyleSheetLibxslt.cpp: In member function 'bool WebCore::XSLStyleSheet::parseString(const WTF::String&)': /build/source/Source/WebCore/xml/XSLStyleSheetLibxslt.cpp:148:129: error: invalid conversion from 'void (*)(void*, xmlError*)' {aka 'void (*)(void*, _xmlError*)'} to 'xmlStructuredErrorFunc' {aka 'void (*)(void*, const _xmlError*)'} [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-fpermissive-fpermissive8;;] 148 | XMLDocumentParserScope scope(cachedResourceLoader(), XSLTProcessor::genericErrorFunc, XSLTProcessor::parseErrorFunc, console); | ^ | | | void (*)(void*, xmlError*) {aka void (*)(void*, _xmlError*)} In file included from /build/source/Source/WebCore/xml/XSLStyleSheetLibxslt.cpp:33: /build/source/Source/WebCore/xml/parser/XMLDocumentParserScope.h:48:99: note: initializing argument 3 of 'WebCore::XMLDocumentParserScope::XMLDocumentParserScope(WebCore::CachedResourceLoader*, xmlGenericErrorFunc, xmlStructuredErrorFunc, void*)' 48 | XMLDocumentParserScope(CachedResourceLoader*, xmlGenericErrorFunc, xmlStructuredErrorFunc structuredErrorFunc = 0, void* errorContext = nullptr); | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ /build/source/Source/WebCore/xml/XSLTProcessorLibxslt.cpp: In function 'xmlDoc* WebCore::docLoaderFunc(const xmlChar*, xmlDictPtr, int, void*, xsltLoadType)': /build/source/Source/WebCore/xml/XSLTProcessorLibxslt.cpp:147:34: error: invalid conversion from 'void (*)(void*, xmlError*)' {aka 'void (*)(void*, _xmlError*)'} to 'xmlStructuredErrorFunc' {aka 'void (*)(void*, const _xmlError*)'} [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-fpermissive-fpermissive8;;] 147 | xmlSetStructuredErrorFunc(console, XSLTProcessor::parseErrorFunc); | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | void (*)(void*, xmlError*) {aka void (*)(void*, _xmlError*)} Bug: https://github.com/WebKit/WebKit/commit/1bad176b2496579d760852c80cff3ad9fb7c3a4b --- pkgs/development/libraries/qt-5/5.15/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/libraries/qt-5/5.15/default.nix b/pkgs/development/libraries/qt-5/5.15/default.nix index ec3e3c634fb2..6334217f7458 100644 --- a/pkgs/development/libraries/qt-5/5.15/default.nix +++ b/pkgs/development/libraries/qt-5/5.15/default.nix @@ -211,6 +211,11 @@ let url = "https://github.com/qtwebkit/qtwebkit/commit/5c272a21e621a66862821d3ae680f27edcc64c19.patch"; sha256 = "9hjqLyABz372QDgoq7nXXXQ/3OXBGcYN1/92ekcC3WE="; }) + (fetchpatch { + name = "qtwebkit-libxml2-api-change.patch"; + url = "https://github.com/WebKit/WebKit/commit/1bad176b2496579d760852c80cff3ad9fb7c3a4b.patch"; + sha256 = "WZEj+UuKhgJBM7auhND3uddk1wWdTY728jtiWVe7CSI="; + }) ./qtwebkit.patch ./qtwebkit-icu68.patch ./qtwebkit-cstdint.patch