diff --git a/ports/qtwebengine/clang-cl.patch b/ports/qtwebengine/clang-cl.patch new file mode 100644 index 00000000000000..03c87b84df77a0 --- /dev/null +++ b/ports/qtwebengine/clang-cl.patch @@ -0,0 +1,24 @@ +diff --git a/src/3rdparty/gn/build/build_win.ninja.template b/src/3rdparty/gn/build/build_win.ninja.template +index 7d2704c..b14186b 100644 +--- a/src/3rdparty/gn/build/build_win.ninja.template ++++ b/src/3rdparty/gn/build/build_win.ninja.template +@@ -8,5 +8,5 @@ rule alink_thin + description = LIB $out + + rule link +- command = $ld /nologo $in /link $ldflags /PDB:$out.pdb /OUT:$out $solibs $libs ++ command = $ld /nologo $in $ldflags /PDB:$out.pdb /OUT:$out $solibs $libs + description = LINK $out +diff --git a/src/gn/CMakeLists.txt b/src/gn/CMakeLists.txt +index 0fe3e4e..1e2556f 100644 +--- a/src/gn/CMakeLists.txt ++++ b/src/gn/CMakeLists.txt +@@ -31,7 +31,7 @@ find_package(Ninja 1.7.2 REQUIRED) + + if(WIN32) + set(GN_EXECUTABLE gn.exe) +- if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT MINGW) ++ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT MINGW OR MSVC) + # Use lld-link instead of clang-cl. + set(GN_LINKER ${CMAKE_LINKER}) + endif() diff --git a/ports/qtwebengine/msvc-template.patch b/ports/qtwebengine/msvc-template.patch new file mode 100644 index 00000000000000..d0a61806e2b2a5 --- /dev/null +++ b/ports/qtwebengine/msvc-template.patch @@ -0,0 +1,124 @@ +diff --git a/src/3rdparty/chromium/third_party/webrtc/rtc_base/checks.h b/src/3rdparty/chromium/third_party/webrtc/rtc_base/checks.h +index 459c6a5..687a364 100644 +--- a/src/3rdparty/chromium/third_party/webrtc/rtc_base/checks.h ++++ b/src/3rdparty/chromium/third_party/webrtc/rtc_base/checks.h +@@ -224,60 +224,13 @@ ToStringVal MakeVal(const T& x) { + template + class LogStreamer; + +-// Base case: Before the first << argument. +-template <> +-class LogStreamer<> final { +- public: +- template ())), +- absl::enable_if_t::value || +- std::is_enum::value>* = nullptr> +- RTC_FORCE_INLINE LogStreamer operator<<(U arg) const { +- return LogStreamer(MakeVal(arg), this); +- } +- +- template ())), +- absl::enable_if_t::value && +- !std::is_enum::value>* = nullptr> +- RTC_FORCE_INLINE LogStreamer operator<<(const U& arg) const { +- return LogStreamer(MakeVal(arg), this); +- } +- +-#if RTC_CHECK_MSG_ENABLED +- template +- RTC_NORETURN RTC_FORCE_INLINE static void Call(const char* file, +- const int line, +- const char* message, +- const Us&... args) { +- static constexpr CheckArgType t[] = {Us::Type()..., CheckArgType::kEnd}; +- FatalLog(file, line, message, t, args.GetVal()...); +- } +- +- template +- RTC_NORETURN RTC_FORCE_INLINE static void CallCheckOp(const char* file, +- const int line, +- const char* message, +- const Us&... args) { +- static constexpr CheckArgType t[] = {CheckArgType::kCheckOp, Us::Type()..., +- CheckArgType::kEnd}; +- FatalLog(file, line, message, t, args.GetVal()...); +- } +-#else +- template +- RTC_NORETURN RTC_FORCE_INLINE static void Call(const char* file, +- const int line) { +- FatalLog(file, line); +- } +-#endif +-}; + + // Inductive case: We've already seen at least one << argument. The most recent + // one had type `T`, and the earlier ones had types `Ts`. + template + class LogStreamer final { + public: +- RTC_FORCE_INLINE LogStreamer(T arg, const LogStreamer* prior) ++ RTC_FORCE_INLINE LogStreamer(T arg, const LogStreamer * const prior) + : arg_(arg), prior_(prior) {} + + template final { + const LogStreamer* prior_; + }; + ++ ++// Base case: Before the first << argument. ++template <> ++class LogStreamer<> final { ++ public: ++ template >::value || ++ std::is_enum::value>* = nullptr> ++ RTC_FORCE_INLINE auto operator<<(U arg) const { ++ return LogStreamer(MakeVal(arg), this); ++ } ++ ++ template >::value && ++ !std::is_enum::value>* = nullptr> ++ RTC_FORCE_INLINE auto operator<<(const U& arg) const { ++ return LogStreamer(MakeVal(arg), this); ++ } ++ ++ //RTC_FORCE_INLINE auto operator<<(const std::string& arg) const { ++ // return LogStreamer>(MakeVal(arg), this); ++ // ++ ++#if RTC_CHECK_MSG_ENABLED ++ template ++ RTC_NORETURN RTC_FORCE_INLINE static void Call(const char* file, ++ const int line, ++ const char* message, ++ const Us&... args) { ++ static constexpr CheckArgType t[] = {Us::Type()..., CheckArgType::kEnd}; ++ FatalLog(file, line, message, t, args.GetVal()...); ++ } ++ ++ template ++ RTC_NORETURN RTC_FORCE_INLINE static void CallCheckOp(const char* file, ++ const int line, ++ const char* message, ++ const Us&... args) { ++ static constexpr CheckArgType t[] = {CheckArgType::kCheckOp, Us::Type()..., ++ CheckArgType::kEnd}; ++ FatalLog(file, line, message, t, args.GetVal()...); ++ } ++#else ++ template ++ RTC_NORETURN RTC_FORCE_INLINE static void Call(const char* file, ++ const int line) { ++ FatalLog(file, line); ++ } ++#endif ++}; ++ + template + class FatalLogCall final { + public: diff --git a/ports/qtwebengine/portfile.cmake b/ports/qtwebengine/portfile.cmake index e927ab4850e3fe..66d20d188be793 100644 --- a/ports/qtwebengine/portfile.cmake +++ b/ports/qtwebengine/portfile.cmake @@ -1,7 +1,10 @@ set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase") include("${SCRIPT_PATH}/qt_install_submodule.cmake") -set(${PORT}_PATCHES "") +set(${PORT}_PATCHES + "clang-cl.patch" + "msvc-template.patch" +) set(TOOL_NAMES gn QtWebEngineProcess qwebengine_convert_dict) @@ -29,7 +32,7 @@ set(deactivated_features webengine_webrtc_pipewire) foreach(_feat IN LISTS deactivated_features) list(APPEND FEATURE_OPTIONS "-DFEATURE_${_feat}=OFF") endforeach() -set(enabled_features webengine_webrtc webengine_v8_snapshot_support) +set(enabled_features webengine_webrtc) foreach(_feat IN LISTS enabled_features) list(APPEND FEATURE_OPTIONS "-DFEATURE_${_feat}=ON") endforeach() diff --git a/ports/qtwebengine/vcpkg.json b/ports/qtwebengine/vcpkg.json index 942f49da7fc41e..2b2969d41df811 100644 --- a/ports/qtwebengine/vcpkg.json +++ b/ports/qtwebengine/vcpkg.json @@ -2,7 +2,7 @@ "$comment": "x86-windows is not within the upstream support matrix of Qt6", "name": "qtwebengine", "version": "6.6.1", - "port-version": 1, + "port-version": 2, "description": "Qt WebEngine", "homepage": "https://www.qt.io/", "license": null, @@ -152,7 +152,10 @@ "dependencies": [ { "name": "qtwebchannel", - "default-features": false + "default-features": false, + "features": [ + "qml" + ] } ] } diff --git a/versions/baseline.json b/versions/baseline.json index d3492c49e8f1a6..6f16b99254a7bb 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -7266,7 +7266,7 @@ }, "qtwebengine": { "baseline": "6.6.1", - "port-version": 1 + "port-version": 2 }, "qtwebsockets": { "baseline": "6.6.1", diff --git a/versions/q-/qtwebengine.json b/versions/q-/qtwebengine.json index e466151563f28d..22f85a14e59c9e 100644 --- a/versions/q-/qtwebengine.json +++ b/versions/q-/qtwebengine.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "0da0e5d03340ccc05f77e90cb898e62237746107", + "version": "6.6.1", + "port-version": 2 + }, { "git-tree": "f84af713f1090d7294c2707dc722373c06857114", "version": "6.6.1",