Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

Merge pull request #282071 from wegank/qt6-qtwebengine-fix

qt6.qtwebengine: fix build on darwin

authored by Weijia Wang and committed by GitHub 11e5b67d b19afc89

+22 -9
+1 -1
pkgs/development/libraries/qt-6/default.nix
··· 164 164 qtwayland = callPackage ./modules/qtwayland.nix { }; 165 165 qtwebchannel = callPackage ./modules/qtwebchannel.nix { }; 166 166 qtwebengine = callPackage ./modules/qtwebengine.nix { 167 - inherit (darwin) bootstrap_cmds cctools xnu; 167 + inherit (darwin) autoSignDarwinBinariesHook bootstrap_cmds cctools xnu; 168 168 inherit (darwin.apple_sdk_11_0) libpm libunwind; 169 169 inherit (darwin.apple_sdk_11_0.libs) sandbox; 170 170 inherit (darwin.apple_sdk_11_0.frameworks)
+10 -4
pkgs/development/libraries/qt-6/modules/qtwebengine.nix
··· 60 60 , mesa 61 61 , enableProprietaryCodecs ? true 62 62 # darwin 63 + , autoSignDarwinBinariesHook 63 64 , bootstrap_cmds 64 65 , cctools 65 66 , xcbuild ··· 105 106 gn 106 107 nodejs 107 108 ] ++ lib.optionals stdenv.isDarwin [ 109 + autoSignDarwinBinariesHook 108 110 bootstrap_cmds 109 111 cctools 110 112 xcbuild ··· 185 187 "-DQT_FEATURE_pdf_xfa_gif=ON" 186 188 "-DQT_FEATURE_pdf_xfa_png=ON" 187 189 "-DQT_FEATURE_pdf_xfa_tiff=ON" 188 - "-DQT_FEATURE_webengine_system_icu=ON" 189 190 "-DQT_FEATURE_webengine_system_libevent=ON" 190 - "-DQT_FEATURE_webengine_system_libxml=ON" 191 191 "-DQT_FEATURE_webengine_system_ffmpeg=ON" 192 192 # android only. https://bugreports.qt.io/browse/QTBUG-100293 193 193 # "-DQT_FEATURE_webengine_native_spellchecker=ON" 194 194 "-DQT_FEATURE_webengine_sanitizer=ON" 195 195 "-DQT_FEATURE_webengine_kerberos=ON" 196 196 ] ++ lib.optionals stdenv.isLinux [ 197 + "-DQT_FEATURE_webengine_system_libxml=ON" 197 198 "-DQT_FEATURE_webengine_webrtc_pipewire=ON" 199 + 200 + # Appears not to work on some platforms 201 + # https://github.com/Homebrew/homebrew-core/issues/104008 202 + "-DQT_FEATURE_webengine_system_icu=ON" 198 203 ] ++ lib.optionals enableProprietaryCodecs [ 199 204 "-DQT_FEATURE_webengine_proprietary_codecs=ON" 200 205 ] ++ lib.optionals stdenv.isDarwin [ ··· 222 227 223 228 # Text rendering 224 229 harfbuzz 225 - icu 226 230 227 231 openssl 228 232 glib 229 - libxml2 230 233 libxslt 231 234 lcms2 232 235 ··· 240 243 nss 241 244 protobuf 242 245 jsoncpp 246 + 247 + icu 248 + libxml2 243 249 244 250 # Audio formats 245 251 alsa-lib
+11 -4
pkgs/development/libraries/qt-6/patches/qtwebengine-libxml-2.12.patch
··· 1 1 --- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h 2 2 +++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h 3 - @@ -77,7 +77,7 @@ class XSLTProcessor final : public ScriptWrappable { 3 + @@ -77,7 +77,12 @@ class XSLTProcessor final : public ScriptWrappable { 4 4 5 5 void reset(); 6 6 7 - - static void ParseErrorFunc(void* user_data, xmlError*); 7 + +#if LIBXML_VERSION >= 21200 8 8 + static void ParseErrorFunc(void* user_data, const xmlError*); 9 + +#else 10 + static void ParseErrorFunc(void* user_data, xmlError*); 11 + +#endif 12 + + 9 13 static void GenericErrorFunc(void* user_data, const char* msg, ...); 10 14 11 15 // Only for libXSLT callbacks 12 16 --- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc 13 17 +++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc 14 - @@ -66,7 +66,7 @@ void XSLTProcessor::GenericErrorFunc(void*, const char*, ...) { 18 + @@ -66,7 +66,11 @@ void XSLTProcessor::GenericErrorFunc(void*, const char*, ...) { 15 19 // It would be nice to do something with this error message. 16 20 } 17 21 18 - -void XSLTProcessor::ParseErrorFunc(void* user_data, xmlError* error) { 22 + +#if LIBXML_VERSION >= 21200 19 23 +void XSLTProcessor::ParseErrorFunc(void* user_data, const xmlError* error) { 24 + +#else 25 + void XSLTProcessor::ParseErrorFunc(void* user_data, xmlError* error) { 26 + +#endif 20 27 FrameConsole* console = static_cast<FrameConsole*>(user_data); 21 28 if (!console) 22 29 return;