diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/qt5-webengine | |
Diffstat (limited to 'vcpkg/ports/qt5-webengine')
| -rw-r--r-- | vcpkg/ports/qt5-webengine/0001-Fix-jumbo-build-error-due-to-ResolveColor-redefiniti.patch | 24 | ||||
| -rw-r--r-- | vcpkg/ports/qt5-webengine/build_1.patch | 12 | ||||
| -rw-r--r-- | vcpkg/ports/qt5-webengine/common.pri.patch | 21 | ||||
| -rw-r--r-- | vcpkg/ports/qt5-webengine/fix-spellcheck-buildflags.patch | 12 | ||||
| -rw-r--r-- | vcpkg/ports/qt5-webengine/gl.patch | 13 | ||||
| -rw-r--r-- | vcpkg/ports/qt5-webengine/portfile.cmake | 82 | ||||
| -rw-r--r-- | vcpkg/ports/qt5-webengine/vcpkg.json | 48 | ||||
| -rw-r--r-- | vcpkg/ports/qt5-webengine/workaround-protobuf-issue.patch | 17 |
8 files changed, 229 insertions, 0 deletions
diff --git a/vcpkg/ports/qt5-webengine/0001-Fix-jumbo-build-error-due-to-ResolveColor-redefiniti.patch b/vcpkg/ports/qt5-webengine/0001-Fix-jumbo-build-error-due-to-ResolveColor-redefiniti.patch new file mode 100644 index 0000000..34869c4 --- /dev/null +++ b/vcpkg/ports/qt5-webengine/0001-Fix-jumbo-build-error-due-to-ResolveColor-redefiniti.patch @@ -0,0 +1,24 @@ +diff --git a/src/3rdparty/chromium/third_party/blink/renderer/core/layout/svg/layout_svg_resource_paint_server.cc b/src/3rdparty/chromium/third_party/blink/renderer/core/layout/svg/layout_svg_resource_paint_server.cc +index 99ba54e790c..abf8467912d 100644 +--- a/src/3rdparty/chromium/third_party/blink/renderer/core/layout/svg/layout_svg_resource_paint_server.cc ++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/layout/svg/layout_svg_resource_paint_server.cc +@@ -94,7 +94,7 @@ void SVGPaintServer::PrependTransform(const AffineTransform& transform) { + transform_ = transform * transform_; + } + +-static base::Optional<Color> ResolveColor(const ComputedStyle& style, ++static base::Optional<Color> ResolveColorSvgPaintServer(const ComputedStyle& style, + const SVGPaint& paint, + const SVGPaint& visited_paint) { + if (!paint.HasColor()) +@@ -122,7 +122,7 @@ static SVGPaintDescription RequestPaint(const LayoutObject& object, + const SVGPaint& visited_paint = apply_to_fill + ? svg_style.InternalVisitedFillPaint() + : svg_style.InternalVisitedStrokePaint(); +- base::Optional<Color> color = ResolveColor(style, paint, visited_paint); ++ base::Optional<Color> color = ResolveColorSvgPaintServer(style, paint, visited_paint); + + if (paint.HasUrl()) { + LayoutSVGResourcePaintServer* uri_resource = nullptr; +-- +2.39.3 diff --git a/vcpkg/ports/qt5-webengine/build_1.patch b/vcpkg/ports/qt5-webengine/build_1.patch new file mode 100644 index 0000000..4bef9eb --- /dev/null +++ b/vcpkg/ports/qt5-webengine/build_1.patch @@ -0,0 +1,12 @@ +diff --git a/src/3rdparty/chromium/third_party/angle/BUILD.gn b/src/3rdparty/chromium/third_party/angle/BUILD.gn +index fb57176..fa84cc5 100644 +--- a/src/3rdparty/chromium/third_party/angle/BUILD.gn ++++ b/src/3rdparty/chromium/third_party/angle/BUILD.gn +@@ -131,7 +131,6 @@ config("extra_warnings") { + # Enable more default warnings on Windows. + if (is_win) { + cflags += [ +- "/we4244", # Conversion: possible loss of data. + "/we4312", # Conversion: greater size. + "/we4456", # Variable shadowing. + "/we4458", # declaration hides class member. diff --git a/vcpkg/ports/qt5-webengine/common.pri.patch b/vcpkg/ports/qt5-webengine/common.pri.patch new file mode 100644 index 0000000..74327ac --- /dev/null +++ b/vcpkg/ports/qt5-webengine/common.pri.patch @@ -0,0 +1,21 @@ +diff --git a/src/buildtools/config/common.pri b/src/buildtools/config/common.pri +index cf990c7..5af9edf 100644 +--- a/src/buildtools/config/common.pri ++++ b/src/buildtools/config/common.pri +@@ -26,6 +26,7 @@ gn_args += \ + skia_use_dawn=false \ + toolkit_views=false \ + treat_warnings_as_errors=false \ ++ fatal_linker_warnings=false \ + use_allocator_shim=false \ + use_allocator=\"none\" \ + use_custom_libcxx=false \ +@@ -56,7 +57,7 @@ greaterThan(QMAKE_JUMBO_MERGE_LIMIT,0) { + } + + precompile_header { +- gn_args += enable_precompiled_headers=true ++ gn_args += enable_precompiled_headers=false + } else { + gn_args += enable_precompiled_headers=false + } diff --git a/vcpkg/ports/qt5-webengine/fix-spellcheck-buildflags.patch b/vcpkg/ports/qt5-webengine/fix-spellcheck-buildflags.patch new file mode 100644 index 0000000..1d0a187 --- /dev/null +++ b/vcpkg/ports/qt5-webengine/fix-spellcheck-buildflags.patch @@ -0,0 +1,12 @@ +diff --git a/src/3rdparty/chromium/content/browser/BUILD.gn b/src/3rdparty/chromium/content/browser/BUILD.gn +index 1466f33d4..3fc848a56 100644 +--- a/src/3rdparty/chromium/content/browser/BUILD.gn ++++ b/src/3rdparty/chromium/content/browser/BUILD.gn +@@ -40,6 +40,7 @@ jumbo_static_library("devtools_protocol") { + "//content/browser/devtools:protocol_sources", + "//content/common:buildflags", + "//third_party/inspector_protocol:crdtp", ++ "//components/spellcheck:buildflags", + ] + + sources = [ diff --git a/vcpkg/ports/qt5-webengine/gl.patch b/vcpkg/ports/qt5-webengine/gl.patch new file mode 100644 index 0000000..a48ddf6 --- /dev/null +++ b/vcpkg/ports/qt5-webengine/gl.patch @@ -0,0 +1,13 @@ +diff --git a/src/3rdparty/chromium/ui/gl/gl_bindings_autogen_gl.h b/src/3rdparty/chromium/ui/gl/gl_bindings_autogen_gl.h +index d54583e8b..1921185f8 100644 +--- a/src/3rdparty/chromium/ui/gl/gl_bindings_autogen_gl.h ++++ b/src/3rdparty/chromium/ui/gl/gl_bindings_autogen_gl.h +@@ -16,7 +16,7 @@ + namespace gl { + + class GLContext; +- ++typedef void *GLeglImageOES; + typedef void(GL_BINDING_CALL* glActiveShaderProgramProc)(GLuint pipeline, + GLuint program); + typedef void(GL_BINDING_CALL* glActiveTextureProc)(GLenum texture); diff --git a/vcpkg/ports/qt5-webengine/portfile.cmake b/vcpkg/ports/qt5-webengine/portfile.cmake new file mode 100644 index 0000000..818ad82 --- /dev/null +++ b/vcpkg/ports/qt5-webengine/portfile.cmake @@ -0,0 +1,82 @@ +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) +string(LENGTH "${CURRENT_BUILDTREES_DIR}" buildtrees_path_length) +if(buildtrees_path_length GREATER 35 AND CMAKE_HOST_WIN32) + vcpkg_buildpath_length_warning(35) + message(WARNING "The ${PORT} source was will be extracted to ${CURRENT_BUILDTREES_DIR} , which has more then 35 characters in length.") + message(FATAL_ERROR "terminating due to ${CURRENT_BUILDTREES_DIR} being too long.") +endif() +#set(VCPKG_BUILD_TYPE release) #You probably want to set this to reduce build type and space requirements +message(STATUS "${PORT} requires a lot of free disk space (>100GB), ram (>8 GB) and time (>2h per configuration) to be successfully build.\n\ +-- As such ${PORT} is currently experimental.\n\ +-- If ${PORT} fails post build validation please try manually reducing VCPKG_MAX_CONCURRENCY and open up an issue if it still cannot build. \n\ +-- If it fails due to post validation the successfully installed files can be found in ${CURRENT_PACKAGES_DIR} \n\ +-- and just need to be copied into ${CURRENT_INSTALLED_DIR}") +if(NOT VCPKG_TARGET_IS_WINDOWS) + message(STATUS "If ${PORT} directly fails ${PORT} might require additional prerequisites on Linux and OSX. Please check the configure logs.\n") +endif() +include("${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake") + +vcpkg_find_acquire_program(FLEX) +vcpkg_find_acquire_program(BISON) +vcpkg_find_acquire_program(GPERF) +vcpkg_find_acquire_program(PYTHON3) +vcpkg_find_acquire_program(NINJA) +set(NODEJS "${CURRENT_HOST_INSTALLED_DIR}/tools/node/node${VCPKG_HOST_EXECUTABLE_SUFFIX}") +get_filename_component(FLEX_DIR "${FLEX}" DIRECTORY ) +get_filename_component(BISON_DIR "${BISON}" DIRECTORY ) +get_filename_component(PYTHON2_DIR "${PYTHON3}" DIRECTORY ) +get_filename_component(GPERF_DIR "${GPERF}" DIRECTORY ) +get_filename_component(NINJA_DIR "${NINJA}" DIRECTORY ) +get_filename_component(NODEJS_DIR "${NODEJS}" DIRECTORY ) + +if(CMAKE_HOST_WIN32) # WIN32 HOST probably has win_flex and win_bison! + if(NOT EXISTS "${FLEX_DIR}/flex${VCPKG_HOST_EXECUTABLE_SUFFIX}") + file(CREATE_LINK "${FLEX}" "${FLEX_DIR}/flex${VCPKG_HOST_EXECUTABLE_SUFFIX}") + endif() + if(NOT EXISTS "${BISON_DIR}/BISON${VCPKG_HOST_EXECUTABLE_SUFFIX}") + file(CREATE_LINK "${BISON}" "${BISON_DIR}/bison${VCPKG_HOST_EXECUTABLE_SUFFIX}") + endif() +endif() + +vcpkg_add_to_path(PREPEND "${FLEX_DIR}") +vcpkg_add_to_path(PREPEND "${BISON_DIR}") +vcpkg_add_to_path(PREPEND "${PYTHON3_DIR}") +vcpkg_add_to_path(PREPEND "${GPERF_DIR}") +vcpkg_add_to_path(PREPEND "${NINJA_DIR}") +vcpkg_add_to_path(PREPEND "${NODEJS_DIR}") + +vcpkg_execute_in_download_mode( + COMMAND "${NINJA}" --version + OUTPUT_VARIABLE ninja_version + OUTPUT_STRIP_TRAILING_WHITESPACE + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}" +) +if(ninja_version VERSION_GREATER_EQUAL "1.12.1") + message(WARNING + "Found ninja version ${ninja_version} which may fail to build ${PORT}." + "You can supply a different filepath using per-port customization of CMake variable NINJA." + ) +endif() + +set(PATCHES + common.pri.patch + gl.patch + build_1.patch + workaround-protobuf-issue.patch + 0001-Fix-jumbo-build-error-due-to-ResolveColor-redefiniti.patch + fix-spellcheck-buildflags.patch +) + +set(OPTIONS "-webengine-python-version" "python3") +if("proprietary-codecs" IN_LIST FEATURES) + list(APPEND OPTIONS "-webengine-proprietary-codecs") +endif() +if(NOT VCPKG_TARGET_IS_WINDOWS) + list(APPEND OPTIONS "-system-webengine-webp" "-system-webengine-icu") + vcpkg_host_path_list(PREPEND ENV{PKG_CONFIG_PATH} "${CURRENT_INSTALLED_DIR}/lib/pkgconfig") + vcpkg_host_path_list(PREPEND ENV{INCLUDE} "${CURRENT_INSTALLED_DIR}/include") + vcpkg_host_path_list(PREPEND ENV{C_INCLUDE_PATH} "${CURRENT_INSTALLED_DIR}/include") + vcpkg_host_path_list(PREPEND ENV{CPLUS_INCLUDE_PATH} "${CURRENT_INSTALLED_DIR}/include") +endif() + +qt_submodule_installation(PATCHES ${PATCHES} BUILD_OPTIONS ${OPTIONS}) diff --git a/vcpkg/ports/qt5-webengine/vcpkg.json b/vcpkg/ports/qt5-webengine/vcpkg.json new file mode 100644 index 0000000..7b5bd5d --- /dev/null +++ b/vcpkg/ports/qt5-webengine/vcpkg.json @@ -0,0 +1,48 @@ +{ + "name": "qt5-webengine", + "version": "5.15.18", + "description": "Qt WebEngine provides functionality for rendering regions of dynamic web content.", + "license": null, + "supports": "!static", + "dependencies": [ + { + "name": "atl", + "platform": "windows" + }, + { + "name": "dbus", + "platform": "!windows" + }, + { + "name": "ffmpeg", + "default-features": false, + "platform": "!windows" + }, + { + "name": "icu", + "platform": "!windows" + }, + { + "name": "qt5-base", + "default-features": false, + "features": [ + "openssl" + ] + }, + "qt5-declarative", + "qt5-location", + "qt5-quickcontrols", + "qt5-quickcontrols2", + "qt5-tools", + "qt5-webchannel", + { + "name": "vcpkg-tool-nodejs", + "host": true + } + ], + "features": { + "proprietary-codecs": { + "description": "Enable proprietary-codecs in qtwebengine" + } + } +} diff --git a/vcpkg/ports/qt5-webengine/workaround-protobuf-issue.patch b/vcpkg/ports/qt5-webengine/workaround-protobuf-issue.patch new file mode 100644 index 0000000..d23c26e --- /dev/null +++ b/vcpkg/ports/qt5-webengine/workaround-protobuf-issue.patch @@ -0,0 +1,17 @@ +diff --git a/src/core/core_chromium.pri b/src/core/core_chromium.pri +index a846f2fbc..102ec9ace 100644 +--- a/src/core/core_chromium.pri ++++ b/src/core/core_chromium.pri +@@ -32,6 +32,12 @@ isUniversal() { + # whenever we are cross compiling. + qtConfig(webengine-embedded-build): DEFINES += QTWEBENGINE_EMBEDDED_SWITCHES + ++# Prepend Chromium's protobuf and abseil-cpp include directories to the include paths ++# to ensure we use chromiums own copies instead of vcpkg provided libraries. ++# See https://github.com/microsoft/vcpkg/issues/12150 ++CHROMIUM_SRC_DIR = $$QTWEBENGINE_ROOT/$$getChromiumSrcDir() ++INCLUDEPATH = $$CHROMIUM_SRC_DIR/third_party/protobuf/src $$CHROMIUM_SRC_DIR/third_party/abseil-cpp $$INCLUDEPATH ++ + INCLUDEPATH += $$PWD $$PWD/api + + clang_cl { |