[litehtml] new port version 0.6 (#29673)

* [litehtml] add port in version 0.6

* [litehtml] update versions

* [litehtml] is not semver

* [litehtml] update versions

* [qttools] remove vendored litehtml

* [qtttools] remove unused fix_static_build.patch

* [qttools] fix manifest formatting

* [qttools] add version baseline

* [litehtml] fix find gumbo

* [litehtml] update version baseline.

* [litehtml] fix gumboConfig.cmake

* [litehtml] update version baseline
This commit is contained in:
Sean Farrell 2023-02-21 16:58:00 +01:00 committed by GitHub
parent b2c94c4231
commit 2f0f813af3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 123 additions and 30 deletions

View File

@ -0,0 +1,27 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO litehtml/litehtml
REF v0.6
SHA512 b774ed96e53780865e789875f571f96ebce1cd2ff0c05a06ae68a67aec44375cc282c07f77fc87131d422aceddba32bbf3e8e498c870883d8e042adb30834c39
)
if (VCPKG_TARGET_IS_WINDOWS)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
endif()
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DBUILD_TESTING=OFF
-DLITEHTML_UTF8=ON
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME gumbo CONFIG_PATH lib/cmake/gumbo DO_NOT_DELETE_PARENT_CONFIG_PATH)
vcpkg_cmake_config_fixup(PACKAGE_NAME litehtml CONFIG_PATH lib/cmake/litehtml)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

17
ports/litehtml/vcpkg.json Normal file
View File

@ -0,0 +1,17 @@
{
"name": "litehtml",
"version": "0.6.0",
"description": "litehtml is the lightweight HTML rendering engine with CSS2/CSS3 support. ",
"homepage": "https://github.com/litehtml/litehtml",
"license": "BSD-3-Clause",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}

View File

@ -0,0 +1,56 @@
--- a/src/assistant/qlitehtml/src/CMakeLists.txt
+++ b/src/assistant/qlitehtml/src/CMakeLists.txt
@@ -15,45 +15,11 @@
set(QLITEHTML_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
set(QLITEHTML_VERSION_COMPAT ${QLITEHTML_VERSION} CACHE STRING "qlitehtml compat version number.")
-find_package(litehtml QUIET)
-if(NOT TARGET litehtml AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/litehtml/CMakeLists.txt)
- set(ORIG_FPIC ${CMAKE_POSITION_INDEPENDENT_CODE})
- set(ORIG_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
- if (WIN32)
- set(LITEHTML_UTF8 ON CACHE BOOL "")
- endif()
- set(CMAKE_POSITION_INDEPENDENT_CODE ON)
- set(BUILD_SHARED_LIBS OFF)
-
- add_subdirectory(3rdparty/litehtml EXCLUDE_FROM_ALL)
-
- # suppress compiler warnings from litehtml
- set_target_properties(
- litehtml
- PROPERTIES
- QT_COMPILE_OPTIONS_DISABLE_WARNINGS ON
- )
- set_target_properties(
- gumbo
- PROPERTIES
- QT_COMPILE_OPTIONS_DISABLE_WARNINGS ON
- )
-
- set(CMAKE_POSITION_INDEPENDENT_CODE "${ORIG_FPIC}")
- set(BUILD_SHARED_LIBS ${ORIG_BUILD_SHARED_LIBS})
- # force optimized litehtml even in debug
- if (CMAKE_BUILD_TYPE STREQUAL "Debug")
- # except for windows
- if (NOT WIN32)
- target_compile_options(gumbo PRIVATE -O2)
- target_compile_options(litehtml PRIVATE -O2)
- endif()
- endif()
-endif()
+find_package(litehtml CONFIG REQUIRED)
# TODO error if litehtml was not found?
-if(TARGET litehtml)
+
set(PUBLIC_HEADERS
container_qpainter.h
container_qpainter_p.h
@@ -155,5 +121,3 @@
${_DEVEL_COMPONENT}
OPTIONAL)
endif()
-
-endif()

View File

@ -1,27 +0,0 @@
diff --git a/src/designer/src/components/lib/CMakeLists.txt b/src/designer/src/components/lib/CMakeLists.txt
index 53358741f..ce070bd6a 100644
--- a/src/designer/src/components/lib/CMakeLists.txt
+++ b/src/designer/src/components/lib/CMakeLists.txt
@@ -878,7 +878,7 @@ qt_internal_add_resource(DesignerComponents "widgetbox"
## Scopes:
#####################################################################
-qt_internal_extend_target(DesignerComponents CONDITION static
+qt_internal_extend_target(DesignerComponents CONDITION NOT BUILD_SHARED_LIBS
DEFINES
QT_DESIGNER_STATIC
)
diff --git a/src/designer/src/designer/CMakeLists.txt b/src/designer/src/designer/CMakeLists.txt
index f786f1dd6..8c635ff14 100644
--- a/src/designer/src/designer/CMakeLists.txt
+++ b/src/designer/src/designer/CMakeLists.txt
@@ -103,8 +103,8 @@ qt_internal_extend_target(designer CONDITION TARGET Qt::PrintSupport
PUBLIC_LIBRARIES
Qt::PrintSupport
)
-qt_internal_extend_target(designer CONDITION QT_CONFIG___contains___static
+qt_internal_extend_target(designer CONDITION NOT BUILD_SHARED_LIBS
DEFINES
QT_DESIGNER_STATIC
)

View File

@ -1,7 +1,8 @@
set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase")
include("${SCRIPT_PATH}/qt_install_submodule.cmake")
set(${PORT}_PATCHES)
set(${PORT}_PATCHES
devendor-litehtml.patch)
#TODO check features and setup: (means force features!)

View File

@ -1,11 +1,12 @@
{
"name": "qttools",
"version": "6.4.2",
"port-version": 1,
"port-version": 2,
"description": "Qt Tools",
"homepage": "https://www.qt.io/",
"license": null,
"dependencies": [
"litehtml",
{
"name": "qtbase",
"default-features": false

View File

@ -4732,6 +4732,10 @@
"baseline": "2.0.0",
"port-version": 0
},
"litehtml": {
"baseline": "0.6.0",
"port-version": 0
},
"live555": {
"baseline": "2023-01-19",
"port-version": 0
@ -6606,7 +6610,7 @@
},
"qttools": {
"baseline": "6.4.2",
"port-version": 1
"port-version": 2
},
"qttranslations": {
"baseline": "6.4.2",

View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "64b99f7658dac91ee9c3ed9749b0fd3718f3a4a9",
"version": "0.6.0",
"port-version": 0
}
]
}

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "d2a6fdf1740e0d3f494a03b12ad0110fcd32b8d0",
"version": "6.4.2",
"port-version": 2
},
{
"git-tree": "0dc19ef06a3e54a475cedeacd80987aea5ac4477",
"version": "6.4.2",