Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- cc-multilingual-main/cc_net/vcpkg/ports/argparse/portfile.cmake +24 -0
- cc-multilingual-main/cc_net/vcpkg/ports/argparse/vcpkg.json +17 -0
- cc-multilingual-main/cc_net/vcpkg/ports/boost-timer/portfile.cmake +14 -0
- cc-multilingual-main/cc_net/vcpkg/ports/boost-timer/vcpkg.json +40 -0
- cc-multilingual-main/cc_net/vcpkg/ports/glbinding/0001_force-system-install.patch +36 -0
- cc-multilingual-main/cc_net/vcpkg/ports/glbinding/0002_fix-uwpmacro.patch +33 -0
- cc-multilingual-main/cc_net/vcpkg/ports/glbinding/0003_fix-cmake-configs-paths.patch +62 -0
- cc-multilingual-main/cc_net/vcpkg/ports/glbinding/0004_fix-config-expected-paths.patch +35 -0
- cc-multilingual-main/cc_net/vcpkg/ports/glbinding/portfile.cmake +59 -0
- cc-multilingual-main/cc_net/vcpkg/ports/kf5syntaxhighlighting/portfile.cmake +41 -0
- cc-multilingual-main/cc_net/vcpkg/ports/kf5syntaxhighlighting/vcpkg.json +20 -0
- cc-multilingual-main/cc_net/vcpkg/ports/libqcow/CMakeLists.txt +83 -0
- cc-multilingual-main/cc_net/vcpkg/ports/libqcow/Config.cmake.in +4 -0
- cc-multilingual-main/cc_net/vcpkg/ports/libqcow/macos_fixes.patch +38 -0
- cc-multilingual-main/cc_net/vcpkg/ports/libqcow/vcpkg.json +22 -0
- cc-multilingual-main/cc_net/vcpkg/ports/oatpp-mbedtls/find-mbedtls.patch +135 -0
- cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/cmake/configure_qt.cmake +210 -0
- cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/cmake/find_qt_mkspec.cmake +103 -0
- cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/cmake/install_qt.cmake +123 -0
- cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/cmake/qt_build_submodule.cmake +131 -0
- cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/cmake/qt_download_submodule.cmake +42 -0
- cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/cmake/qt_fix_cmake.cmake +21 -0
- cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/cmake/qt_fix_makefile_install.cmake +33 -0
- cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/cmake/qt_fix_prl.cmake +15 -0
- cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/cmake/qt_install_copyright.cmake +18 -0
- cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/cmake/qt_port_functions.cmake +14 -0
- cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/cmake/qt_port_hashes.cmake +72 -0
- cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/cmake/qt_submodule_installation.cmake +15 -0
- cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/0001-CVE-2023-51714-qtbase-5.15.diff +38 -0
- cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/0002-CVE-2023-51714-qtbase-5.15.diff +59 -0
- cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/CVE-2023-32762-qtbase-5.15.diff +13 -0
- cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/CVE-2023-32763-qtbase-5.15.diff +45 -0
- cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/CVE-2023-33285-qtbase-5.15.diff +68 -0
- cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/CVE-2023-34410-qtbase-5.15.diff +52 -0
- cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/CVE-2023-37369-qtbase-5.15.diff +203 -0
- cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/CVE-2023-38197-qtbase-5.15.diff +219 -0
- cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/CVE-2023-43114-5.15.patch +120 -0
- cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/CVE-2024-25580-qtbase-5.15.diff +197 -0
- cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/Qt5BasicConfig.patch +194 -0
- cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/Qt5GuiConfigExtras.patch +13 -0
- cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/Qt5PluginTarget.patch +74 -0
- cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/XKB_KEY_dead_lowline.patch +18 -0
- cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/cocoa.patch +12 -0
- cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/create_cmake.patch +41 -0
- cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/egl.patch +16 -0
- cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/fix_angle.patch +35 -0
- cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/gui_configure.patch +29 -0
- cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/mingw9.patch +21 -0
- cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/mysql-configure.patch +11 -0
- cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/mysql_plugin_include.patch +11 -0
cc-multilingual-main/cc_net/vcpkg/ports/argparse/portfile.cmake
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# header-only library
|
2 |
+
|
3 |
+
vcpkg_from_github(
|
4 |
+
OUT_SOURCE_PATH SOURCE_PATH
|
5 |
+
REPO p-ranav/argparse
|
6 |
+
REF "v${VERSION}"
|
7 |
+
SHA512 a7ed879eb3f71868cd84e513c0db63c4fecff1c9f0b34d6cfbe85d2439e83b80e97f713b497259c9775c9c7c1f639a08b73080045c51756de15e3d8c18b97116
|
8 |
+
HEAD_REF master
|
9 |
+
)
|
10 |
+
|
11 |
+
vcpkg_cmake_configure(
|
12 |
+
SOURCE_PATH "${SOURCE_PATH}"
|
13 |
+
OPTIONS
|
14 |
+
-DARGPARSE_BUILD_TESTS=OFF
|
15 |
+
)
|
16 |
+
|
17 |
+
vcpkg_cmake_install()
|
18 |
+
|
19 |
+
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})
|
20 |
+
|
21 |
+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug" "${CURRENT_PACKAGES_DIR}/lib")
|
22 |
+
|
23 |
+
# Handle copyright
|
24 |
+
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
|
cc-multilingual-main/cc_net/vcpkg/ports/argparse/vcpkg.json
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "argparse",
|
3 |
+
"version": "3.0",
|
4 |
+
"description": "Argument parser for modern C++",
|
5 |
+
"homepage": "https://github.com/p-ranav/argparse",
|
6 |
+
"license": "MIT",
|
7 |
+
"dependencies": [
|
8 |
+
{
|
9 |
+
"name": "vcpkg-cmake",
|
10 |
+
"host": true
|
11 |
+
},
|
12 |
+
{
|
13 |
+
"name": "vcpkg-cmake-config",
|
14 |
+
"host": true
|
15 |
+
}
|
16 |
+
]
|
17 |
+
}
|
cc-multilingual-main/cc_net/vcpkg/ports/boost-timer/portfile.cmake
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Automatically generated by scripts/boost/generate-ports.ps1
|
2 |
+
|
3 |
+
vcpkg_from_github(
|
4 |
+
OUT_SOURCE_PATH SOURCE_PATH
|
5 |
+
REPO boostorg/timer
|
6 |
+
REF boost-${VERSION}
|
7 |
+
SHA512 fd4c563794d67597f6cf71f4306e76b4205c5994183f95c451abbb7a41d2821898b7f98317d7d213490165d700b8264abc0d016f7e67118cfdc0ae06b61f93fe
|
8 |
+
HEAD_REF master
|
9 |
+
)
|
10 |
+
|
11 |
+
include(${CURRENT_HOST_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake)
|
12 |
+
boost_modular_build(SOURCE_PATH ${SOURCE_PATH})
|
13 |
+
include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake)
|
14 |
+
boost_modular_headers(SOURCE_PATH ${SOURCE_PATH})
|
cc-multilingual-main/cc_net/vcpkg/ports/boost-timer/vcpkg.json
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"$comment": "Automatically generated by scripts/boost/generate-ports.ps1",
|
3 |
+
"name": "boost-timer",
|
4 |
+
"version": "1.84.0",
|
5 |
+
"description": "Boost timer module",
|
6 |
+
"homepage": "https://github.com/boostorg/timer",
|
7 |
+
"license": "BSL-1.0",
|
8 |
+
"dependencies": [
|
9 |
+
{
|
10 |
+
"name": "boost-build",
|
11 |
+
"host": true,
|
12 |
+
"version>=": "1.84.0"
|
13 |
+
},
|
14 |
+
{
|
15 |
+
"name": "boost-config",
|
16 |
+
"version>=": "1.84.0"
|
17 |
+
},
|
18 |
+
{
|
19 |
+
"name": "boost-io",
|
20 |
+
"version>=": "1.84.0"
|
21 |
+
},
|
22 |
+
{
|
23 |
+
"name": "boost-modular-build-helper",
|
24 |
+
"host": true,
|
25 |
+
"version>=": "1.84.0"
|
26 |
+
},
|
27 |
+
{
|
28 |
+
"name": "boost-predef",
|
29 |
+
"version>=": "1.84.0"
|
30 |
+
},
|
31 |
+
{
|
32 |
+
"name": "boost-vcpkg-helpers",
|
33 |
+
"version>=": "1.84.0"
|
34 |
+
},
|
35 |
+
{
|
36 |
+
"name": "vcpkg-cmake",
|
37 |
+
"host": true
|
38 |
+
}
|
39 |
+
]
|
40 |
+
}
|
cc-multilingual-main/cc_net/vcpkg/ports/glbinding/0001_force-system-install.patch
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2 |
+
index 011577a..e52d19d 100644
|
3 |
+
--- a/CMakeLists.txt
|
4 |
+
+++ b/CMakeLists.txt
|
5 |
+
@@ -42,11 +42,13 @@ include(cmake/GenerateTemplateExportHeader.cmake)
|
6 |
+
#
|
7 |
+
|
8 |
+
# Get git revision
|
9 |
+
+if(NOT DEFINED GIT_REV)
|
10 |
+
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
|
11 |
+
string(SUBSTRING "${GIT_SHA1}" 0 12 GIT_REV)
|
12 |
+
if(NOT GIT_SHA1)
|
13 |
+
set(GIT_REV "0")
|
14 |
+
endif()
|
15 |
+
+endif()
|
16 |
+
|
17 |
+
# Meta information about the project
|
18 |
+
set(META_PROJECT_NAME "glbinding")
|
19 |
+
@@ -135,7 +137,7 @@ if("${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr" OR "${CMAKE_INSTALL_PREFIX}" STREQU
|
20 |
+
endif()
|
21 |
+
|
22 |
+
# Installation paths
|
23 |
+
-if(UNIX AND SYSTEM_DIR_INSTALL)
|
24 |
+
+if(1)
|
25 |
+
# Install into the system (/usr/bin or /usr/local/bin)
|
26 |
+
set(INSTALL_ROOT "share/${project}") # /usr/[local]/share/<project>
|
27 |
+
set(INSTALL_CMAKE "share/${project}/cmake") # /usr/[local]/share/<project>/cmake
|
28 |
+
@@ -148,7 +150,7 @@ if(UNIX AND SYSTEM_DIR_INSTALL)
|
29 |
+
set(INSTALL_DOC "share/doc/${project}") # /usr/[local]/share/doc/<project>
|
30 |
+
set(INSTALL_SHORTCUTS "share/applications") # /usr/[local]/share/applications
|
31 |
+
set(INSTALL_ICONS "share/pixmaps") # /usr/[local]/share/pixmaps
|
32 |
+
- set(INSTALL_INIT "/etc/init") # /etc/init (upstart init scripts)
|
33 |
+
+ set(INSTALL_INIT "etc/init") # /etc/init (upstart init scripts)
|
34 |
+
else()
|
35 |
+
# Install into local directory
|
36 |
+
set(INSTALL_ROOT ".") # ./
|
cc-multilingual-main/cc_net/vcpkg/ports/glbinding/0002_fix-uwpmacro.patch
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/source/glbinding/CMakeLists.txt b/source/glbinding/CMakeLists.txt
|
2 |
+
index 97654c8..bca68d1 100644
|
3 |
+
--- a/source/glbinding/CMakeLists.txt
|
4 |
+
+++ b/source/glbinding/CMakeLists.txt
|
5 |
+
@@ -261,6 +261,11 @@ target_link_libraries(${target}
|
6 |
+
# Compile definitions
|
7 |
+
#
|
8 |
+
|
9 |
+
+
|
10 |
+
+if (CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
11 |
+
+ target_compile_definitions(${target} PRIVATE SYSTEM_WINDOWS WINDOWS_STORE)
|
12 |
+
+endif()
|
13 |
+
+
|
14 |
+
target_compile_definitions(${target}
|
15 |
+
PRIVATE
|
16 |
+
# since we use stl and stl is intended to use exceptions, exceptions should not be disabled
|
17 |
+
diff --git a/source/glbinding/source/getProcAddress.cpp b/source/glbinding/source/getProcAddress.cpp
|
18 |
+
index c1cfc5c..7e5f8bc 100644
|
19 |
+
--- a/source/glbinding/source/getProcAddress.cpp
|
20 |
+
+++ b/source/glbinding/source/getProcAddress.cpp
|
21 |
+
@@ -18,7 +18,11 @@ namespace glbinding {
|
22 |
+
|
23 |
+
ProcAddress getProcAddress(const char * name)
|
24 |
+
{
|
25 |
+
- static auto module = LoadLibrary(_T("OPENGL32.DLL"));
|
26 |
+
+#ifdef WINDOWS_STORE
|
27 |
+
+ static auto module = ::LoadPackagedLibrary(_T("OPENGL32.DLL"), 0);
|
28 |
+
+#else
|
29 |
+
+ static auto module = ::LoadLibrary(_T("OPENGL32.DLL"));
|
30 |
+
+#endif
|
31 |
+
|
32 |
+
// Prevent static linking of opengl32
|
33 |
+
static auto wglGetProcAddress_ = reinterpret_cast<void * (__stdcall *)(const char *)>(::GetProcAddress(module, "wglGetProcAddress"));
|
cc-multilingual-main/cc_net/vcpkg/ports/glbinding/0003_fix-cmake-configs-paths.patch
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/3rdparty/KHR/CMakeLists.txt b/3rdparty/KHR/CMakeLists.txt
|
2 |
+
index 25fac3a..429544f 100644
|
3 |
+
--- a/3rdparty/KHR/CMakeLists.txt
|
4 |
+
+++ b/3rdparty/KHR/CMakeLists.txt
|
5 |
+
@@ -43,7 +43,7 @@ add_library(${target} INTERFACE)
|
6 |
+
add_library(externals::${target} ALIAS ${target})
|
7 |
+
|
8 |
+
# Export library for downstream projects
|
9 |
+
-export(TARGETS ${target} NAMESPACE ${META_PROJECT_NAME}:: FILE ${PROJECT_BINARY_DIR}/cmake/${target}/${target}-export.cmake)
|
10 |
+
+export(TARGETS ${target} NAMESPACE ${META_PROJECT_NAME}:: FILE ${PROJECT_BINARY_DIR}/${target}-export.cmake)
|
11 |
+
|
12 |
+
|
13 |
+
#
|
14 |
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
15 |
+
index 700b48b..8aaab8d 100644
|
16 |
+
--- a/CMakeLists.txt
|
17 |
+
+++ b/CMakeLists.txt
|
18 |
+
@@ -141,15 +141,15 @@ endif()
|
19 |
+
if(1)
|
20 |
+
# Install into the system (/usr/bin or /usr/local/bin)
|
21 |
+
set(INSTALL_ROOT "share/${project}") # /usr/[local]/share/<project>
|
22 |
+
- set(INSTALL_CMAKE "share/${project}/cmake") # /usr/[local]/share/<project>/cmake
|
23 |
+
+ set(INSTALL_CMAKE "share/${project}") # /usr/[local]/share/<project>/cmake
|
24 |
+
set(INSTALL_EXAMPLES "share/${project}") # /usr/[local]/share/<project>
|
25 |
+
set(INSTALL_DATA "share/${project}") # /usr/[local]/share/<project>
|
26 |
+
set(INSTALL_BIN "bin") # /usr/[local]/bin
|
27 |
+
set(INSTALL_SHARED "lib") # /usr/[local]/lib
|
28 |
+
set(INSTALL_LIB "lib") # /usr/[local]/lib
|
29 |
+
set(INSTALL_INCLUDE "include") # /usr/[local]/include
|
30 |
+
- set(INSTALL_DOC "share/doc/${project}") # /usr/[local]/share/doc/<project>
|
31 |
+
- set(INSTALL_SHORTCUTS "share/applications") # /usr/[local]/share/applications
|
32 |
+
+ set(INSTALL_DOC "share/${project}/doc") # /usr/[local]/share/doc/<project>
|
33 |
+
+ set(INSTALL_SHORTCUTS "share/${project}/applications") # /usr/[local]/share/applications
|
34 |
+
set(INSTALL_ICONS "share/pixmaps") # /usr/[local]/share/pixmaps
|
35 |
+
set(INSTALL_INIT "etc/init") # /etc/init (upstart init scripts)
|
36 |
+
else()
|
37 |
+
diff --git a/source/glbinding-aux/CMakeLists.txt b/source/glbinding-aux/CMakeLists.txt
|
38 |
+
index 61cc166..cb0758a 100644
|
39 |
+
--- a/source/glbinding-aux/CMakeLists.txt
|
40 |
+
+++ b/source/glbinding-aux/CMakeLists.txt
|
41 |
+
@@ -137,7 +137,7 @@ add_library(${target}
|
42 |
+
add_library(${META_PROJECT_NAME}::${target} ALIAS ${target})
|
43 |
+
|
44 |
+
# Export library for downstream projects
|
45 |
+
-export(TARGETS ${target} NAMESPACE ${META_PROJECT_NAME}:: FILE ${PROJECT_BINARY_DIR}/cmake/${target}/${target}-export.cmake)
|
46 |
+
+export(TARGETS ${target} NAMESPACE ${META_PROJECT_NAME}:: FILE ${PROJECT_BINARY_DIR}/${target}-export.cmake)
|
47 |
+
|
48 |
+
# Create API export header
|
49 |
+
generate_export_header(${target}
|
50 |
+
diff --git a/source/glbinding/CMakeLists.txt b/source/glbinding/CMakeLists.txt
|
51 |
+
index bca68d1..f014494 100644
|
52 |
+
--- a/source/glbinding/CMakeLists.txt
|
53 |
+
+++ b/source/glbinding/CMakeLists.txt
|
54 |
+
@@ -172,7 +172,7 @@ add_library(${target}
|
55 |
+
add_library(${META_PROJECT_NAME}::${target} ALIAS ${target})
|
56 |
+
|
57 |
+
# Export library for downstream projects
|
58 |
+
-export(TARGETS ${target} NAMESPACE ${META_PROJECT_NAME}:: FILE ${PROJECT_BINARY_DIR}/cmake/${target}/${target}-export.cmake)
|
59 |
+
+export(TARGETS ${target} NAMESPACE ${META_PROJECT_NAME}:: FILE ${PROJECT_BINARY_DIR}/${target}-export.cmake)
|
60 |
+
|
61 |
+
# Create API export header
|
62 |
+
generate_export_header(${target}
|
cc-multilingual-main/cc_net/vcpkg/ports/glbinding/0004_fix-config-expected-paths.patch
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/glbinding-config.cmake b/glbinding-config.cmake
|
2 |
+
index 03fc505..01b6cc8 100644
|
3 |
+
--- a/glbinding-config.cmake
|
4 |
+
+++ b/glbinding-config.cmake
|
5 |
+
@@ -1,7 +1,7 @@
|
6 |
+
|
7 |
+
# This config script tries to locate the project either in its source tree
|
8 |
+
# or from an install location.
|
9 |
+
-#
|
10 |
+
+#
|
11 |
+
# Please adjust the list of submodules to search for.
|
12 |
+
|
13 |
+
|
14 |
+
@@ -35,20 +35,11 @@ endmacro()
|
15 |
+
|
16 |
+
# Try install location
|
17 |
+
set(MODULE_FOUND FALSE)
|
18 |
+
-find_modules("cmake")
|
19 |
+
+find_modules(".")
|
20 |
+
|
21 |
+
if(MODULE_FOUND)
|
22 |
+
return()
|
23 |
+
endif()
|
24 |
+
|
25 |
+
-# Try common build locations
|
26 |
+
-if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
|
27 |
+
- find_modules("build-debug/cmake")
|
28 |
+
- find_modules("build/cmake")
|
29 |
+
-else()
|
30 |
+
- find_modules("build/cmake")
|
31 |
+
- find_modules("build-debug/cmake")
|
32 |
+
-endif()
|
33 |
+
-
|
34 |
+
# Signal success/failure to CMake
|
35 |
+
set(glbinding_FOUND ${MODULE_FOUND})
|
cc-multilingual-main/cc_net/vcpkg/ports/glbinding/portfile.cmake
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
vcpkg_from_github(
|
2 |
+
OUT_SOURCE_PATH SOURCE_PATH
|
3 |
+
REPO cginternals/glbinding
|
4 |
+
REF v3.1.0
|
5 |
+
SHA512 d7294c9a0dc47a7c107b134e5dfa78c5812fc6bf739b9fd778fa7ce946d5ea971839a65c3985e0915fd75311e4a85fb221d33a71856c460199eab0e7622f7151
|
6 |
+
HEAD_REF master
|
7 |
+
PATCHES
|
8 |
+
0001_force-system-install.patch
|
9 |
+
0002_fix-uwpmacro.patch
|
10 |
+
0003_fix-cmake-configs-paths.patch
|
11 |
+
0004_fix-config-expected-paths.patch
|
12 |
+
)
|
13 |
+
|
14 |
+
vcpkg_cmake_configure(
|
15 |
+
SOURCE_PATH "${SOURCE_PATH}"
|
16 |
+
OPTIONS
|
17 |
+
-DOPTION_BUILD_TESTS=OFF
|
18 |
+
-DOPTION_BUILD_TOOLS=OFF
|
19 |
+
-DOPTION_BUILD_EXAMPLES=OFF
|
20 |
+
-DGIT_REV=0
|
21 |
+
-DCMAKE_DISABLE_FIND_PACKAGE_cpplocate=ON
|
22 |
+
-DOPTION_BUILD_EXAMPLES=OFF
|
23 |
+
MAYBE_UNUSED_VARIABLES
|
24 |
+
CMAKE_DISABLE_FIND_PACKAGE_cpplocate
|
25 |
+
)
|
26 |
+
|
27 |
+
vcpkg_cmake_install()
|
28 |
+
vcpkg_cmake_config_fixup()
|
29 |
+
vcpkg_copy_pdbs()
|
30 |
+
|
31 |
+
## _IMPORT_PREFIX needs to go up one extra level in the directory tree.
|
32 |
+
file(GLOB_RECURSE TARGET_CMAKES "${CURRENT_PACKAGES_DIR}/*-export.cmake")
|
33 |
+
foreach(TARGET_CMAKE IN LISTS TARGET_CMAKES)
|
34 |
+
file(READ ${TARGET_CMAKE} _contents)
|
35 |
+
string(REPLACE
|
36 |
+
[[
|
37 |
+
get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
38 |
+
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
39 |
+
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
40 |
+
]]
|
41 |
+
[[
|
42 |
+
get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
43 |
+
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
44 |
+
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
45 |
+
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
46 |
+
]]
|
47 |
+
_contents "${_contents}")
|
48 |
+
file(WRITE ${TARGET_CMAKE} "${_contents}")
|
49 |
+
endforeach()
|
50 |
+
|
51 |
+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
52 |
+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
53 |
+
|
54 |
+
# Remove files already published by egl-registry
|
55 |
+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/KHR")
|
56 |
+
|
57 |
+
# Handle copyright
|
58 |
+
file(RENAME "${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright")
|
59 |
+
configure_file("${CMAKE_CURRENT_LIST_DIR}/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" @ONLY)
|
cc-multilingual-main/cc_net/vcpkg/ports/kf5syntaxhighlighting/portfile.cmake
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
vcpkg_from_github(
|
2 |
+
OUT_SOURCE_PATH SOURCE_PATH
|
3 |
+
REPO KDE/syntax-highlighting
|
4 |
+
REF v5.98.0
|
5 |
+
SHA512 05dd4d33c54b092629669a24d378002b24b140b767ed52e7f6d90aea5f5b6a30ce04ea1c87d534bd9ed239ae7bb334b65ce13a2b9af5ebef5272467fd44828bd
|
6 |
+
HEAD_REF master
|
7 |
+
)
|
8 |
+
|
9 |
+
vcpkg_find_acquire_program(PERL)
|
10 |
+
get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY)
|
11 |
+
vcpkg_add_to_path("${PERL_EXE_PATH}")
|
12 |
+
|
13 |
+
# Prevent KDEClangFormat from writing to source effectively blocking parallel configure
|
14 |
+
file(WRITE "${SOURCE_PATH}/.clang-format" "DisableFormat: true\nSortIncludes: false\n")
|
15 |
+
|
16 |
+
vcpkg_cmake_configure(
|
17 |
+
SOURCE_PATH "${SOURCE_PATH}"
|
18 |
+
OPTIONS
|
19 |
+
-DBUILD_TESTING=OFF
|
20 |
+
-DKDE_INSTALL_QMLDIR=qml
|
21 |
+
)
|
22 |
+
|
23 |
+
vcpkg_cmake_install(ADD_BIN_TO_PATH)
|
24 |
+
vcpkg_cmake_config_fixup(PACKAGE_NAME KF5SyntaxHighlighting CONFIG_PATH lib/cmake/KF5SyntaxHighlighting)
|
25 |
+
vcpkg_copy_pdbs()
|
26 |
+
|
27 |
+
vcpkg_copy_tools(
|
28 |
+
TOOL_NAMES kate-syntax-highlighter
|
29 |
+
AUTO_CLEAN
|
30 |
+
)
|
31 |
+
|
32 |
+
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
33 |
+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
34 |
+
endif()
|
35 |
+
|
36 |
+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
37 |
+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
38 |
+
|
39 |
+
file(GLOB LICENSE_FILES "${SOURCE_PATH}/LICENSES/*")
|
40 |
+
vcpkg_install_copyright(FILE_LIST ${LICENSE_FILES})
|
41 |
+
|
cc-multilingual-main/cc_net/vcpkg/ports/kf5syntaxhighlighting/vcpkg.json
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "kf5syntaxhighlighting",
|
3 |
+
"version": "5.98.0",
|
4 |
+
"description": "Syntax highlighting engine for Kate syntax definitions",
|
5 |
+
"homepage": "https://github.com/KDE/syntax-highlighting",
|
6 |
+
"dependencies": [
|
7 |
+
"ecm",
|
8 |
+
"qt5-base",
|
9 |
+
"qt5-tools",
|
10 |
+
"qt5-xmlpatterns",
|
11 |
+
{
|
12 |
+
"name": "vcpkg-cmake",
|
13 |
+
"host": true
|
14 |
+
},
|
15 |
+
{
|
16 |
+
"name": "vcpkg-cmake-config",
|
17 |
+
"host": true
|
18 |
+
}
|
19 |
+
]
|
20 |
+
}
|
cc-multilingual-main/cc_net/vcpkg/ports/libqcow/CMakeLists.txt
ADDED
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
cmake_minimum_required(VERSION 3.12)
|
2 |
+
|
3 |
+
project(libqcow C)
|
4 |
+
|
5 |
+
find_package(OpenSSL)
|
6 |
+
find_package(ZLIB REQUIRED)
|
7 |
+
|
8 |
+
if(MSVC)
|
9 |
+
add_compile_definitions(_CRT_SECURE_NO_DEPRECATE)
|
10 |
+
add_compile_definitions(_CRT_NONSTDC_NO_DEPRECATE)
|
11 |
+
endif()
|
12 |
+
|
13 |
+
add_compile_definitions(HAVE_LOCAL_LIBCAES)
|
14 |
+
add_compile_definitions(HAVE_LOCAL_LIBCERROR)
|
15 |
+
add_compile_definitions(HAVE_LOCAL_LIBCTHREADS)
|
16 |
+
add_compile_definitions(HAVE_LOCAL_LIBCDATA)
|
17 |
+
add_compile_definitions(HAVE_LOCAL_LIBCLOCALE)
|
18 |
+
add_compile_definitions(HAVE_LOCAL_LIBCNOTIFY)
|
19 |
+
add_compile_definitions(HAVE_LOCAL_LIBCSPLIT)
|
20 |
+
add_compile_definitions(HAVE_LOCAL_LIBCFILE)
|
21 |
+
add_compile_definitions(HAVE_LOCAL_LIBCPATH)
|
22 |
+
add_compile_definitions(HAVE_LOCAL_LIBUNA)
|
23 |
+
add_compile_definitions(HAVE_LOCAL_LIBBFIO)
|
24 |
+
add_compile_definitions(HAVE_LOCAL_LIBFCACHE)
|
25 |
+
add_compile_definitions(HAVE_LOCAL_LIBFDATA)
|
26 |
+
add_compile_definitions(ZLIB_DLL)
|
27 |
+
|
28 |
+
if(UNIX)
|
29 |
+
configure_file(common/config.h.in common/config.h)
|
30 |
+
add_compile_definitions(HAVE_CONFIG_H)
|
31 |
+
add_compile_definitions(LOCALEDIR="/usr/share/locale")
|
32 |
+
endif()
|
33 |
+
|
34 |
+
if(MSVC)
|
35 |
+
add_compile_definitions(LIBQCOW_DLL_EXPORT)
|
36 |
+
set(LIB_RC libqcow/libqcow.rc)
|
37 |
+
endif()
|
38 |
+
|
39 |
+
|
40 |
+
include(GNUInstallDirs)
|
41 |
+
include(CMakePackageConfigHelpers)
|
42 |
+
|
43 |
+
# Add CMake find_package() integration
|
44 |
+
set(PROJECT_TARGET_NAME "${PROJECT_NAME}")
|
45 |
+
set(CONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
|
46 |
+
set(PROJECT_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/generated/${PROJECT_TARGET_NAME}Config.cmake")
|
47 |
+
set(TARGETS_EXPORT_NAME "${PROJECT_TARGET_NAME}Targets")
|
48 |
+
set(NAMESPACE "libqcow::")
|
49 |
+
|
50 |
+
# Source files
|
51 |
+
file(GLOB LIB_SRC lib*/*.c)
|
52 |
+
|
53 |
+
# Headers
|
54 |
+
file(GLOB LIB_INST_HEADERS include/libqcow/*.h)
|
55 |
+
|
56 |
+
add_library(${PROJECT_NAME} ${LIB_SRC} ${LIB_RC})
|
57 |
+
|
58 |
+
target_include_directories(${PROJECT_NAME} PRIVATE ./include ./common)
|
59 |
+
target_include_directories(${PROJECT_NAME} PRIVATE ./libbfio ./libcaes ./libcdata ./libcerror ./libcfile ./libclocale)
|
60 |
+
target_include_directories(${PROJECT_NAME} PRIVATE ./libcnotify ./libcpath ./libcsplit ./libcthreads)
|
61 |
+
target_include_directories(${PROJECT_NAME} PRIVATE ./libfcache ./libfdata ./libuna)
|
62 |
+
|
63 |
+
target_link_libraries(${PROJECT_NAME} PRIVATE ZLIB::ZLIB OpenSSL::Crypto)
|
64 |
+
|
65 |
+
install(TARGETS ${PROJECT_NAME}
|
66 |
+
EXPORT ${TARGETS_EXPORT_NAME}
|
67 |
+
RUNTIME DESTINATION bin
|
68 |
+
LIBRARY DESTINATION lib
|
69 |
+
ARCHIVE DESTINATION lib
|
70 |
+
INCLUDES DESTINATION include)
|
71 |
+
|
72 |
+
install(FILES ${LIB_INST_HEADERS} DESTINATION include/libqcow)
|
73 |
+
install(FILES include/libqcow.h DESTINATION include)
|
74 |
+
|
75 |
+
|
76 |
+
# Generate and install libqcowConfig.cmake
|
77 |
+
configure_package_config_file("Config.cmake.in" "${PROJECT_CONFIG}" INSTALL_DESTINATION "${CONFIG_INSTALL_DIR}")
|
78 |
+
install(FILES "${PROJECT_CONFIG}" DESTINATION "${CONFIG_INSTALL_DIR}")
|
79 |
+
|
80 |
+
# Generate and install libqcowTargets*.cmake
|
81 |
+
install(EXPORT ${TARGETS_EXPORT_NAME}
|
82 |
+
NAMESPACE ${NAMESPACE}
|
83 |
+
DESTINATION "${CONFIG_INSTALL_DIR}")
|
cc-multilingual-main/cc_net/vcpkg/ports/libqcow/Config.cmake.in
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@PACKAGE_INIT@
|
2 |
+
|
3 |
+
include("${CMAKE_CURRENT_LIST_DIR}/@[email protected]")
|
4 |
+
check_required_components("@PROJECT_NAME@")
|
cc-multilingual-main/cc_net/vcpkg/ports/libqcow/macos_fixes.patch
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/libcfile/libcfile_file.c b/libcfile/libcfile_file.c
|
2 |
+
index a618083..5299c77 100644
|
3 |
+
--- a/libcfile/libcfile_file.c
|
4 |
+
+++ b/libcfile/libcfile_file.c
|
5 |
+
@@ -56,7 +56,7 @@
|
6 |
+
#elif defined( HAVE_CYGWIN_FS_H )
|
7 |
+
#include <cygwin/fs.h>
|
8 |
+
|
9 |
+
-#elif defined( HAVE_LINUX_FS_H )
|
10 |
+
+#elif defined( __linux__ ) && defined( HAVE_LINUX_FS_H )
|
11 |
+
/* Required for Linux platforms that use a sizeof( u64 )
|
12 |
+
* in linux/fs.h but have no typedef of it
|
13 |
+
*/
|
14 |
+
@@ -4128,6 +4128,11 @@ ssize_t libcfile_internal_file_io_control_read_with_error_code(
|
15 |
+
#error Missing file IO control with data function
|
16 |
+
#endif
|
17 |
+
|
18 |
+
+// Force disable on Darwin, it can be erroneously defined
|
19 |
+
+#if defined ( __APPLE__ )
|
20 |
+
+#undef HAVE_POSIX_FADVISE
|
21 |
+
+#endif
|
22 |
+
+
|
23 |
+
/* Read data from a device file using IO control
|
24 |
+
* Returns the number of bytes read if successful or -1 on error
|
25 |
+
*/
|
26 |
+
diff --git a/libqcow/libqcow_i18n.c b/libqcow/libqcow_i18n.c
|
27 |
+
index 96d1a31..621e748 100644
|
28 |
+
--- a/libqcow/libqcow_i18n.c
|
29 |
+
+++ b/libqcow/libqcow_i18n.c
|
30 |
+
@@ -40,7 +40,7 @@ int libqcow_i18n_initialize(
|
31 |
+
|
32 |
+
if( libqcow_i18n_initialized == 0 )
|
33 |
+
{
|
34 |
+
-#if defined( HAVE_BINDTEXTDOMAIN )
|
35 |
+
+#if !defined( __APPLE__ ) && defined( HAVE_BINDTEXTDOMAIN )
|
36 |
+
if( bindtextdomain(
|
37 |
+
"libqcow",
|
38 |
+
LOCALEDIR ) == NULL )
|
cc-multilingual-main/cc_net/vcpkg/ports/libqcow/vcpkg.json
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "libqcow",
|
3 |
+
"version": "20221124",
|
4 |
+
"port-version": 1,
|
5 |
+
"description": "Library and tools to access the QEMU Copy-On-Write (QCOW) image format.",
|
6 |
+
"homepage": "https://github.com/libyal/libqcow",
|
7 |
+
"license": "LGPL-3.0-or-later",
|
8 |
+
"supports": "!uwp & !xbox",
|
9 |
+
"dependencies": [
|
10 |
+
"gettext",
|
11 |
+
"openssl",
|
12 |
+
{
|
13 |
+
"name": "vcpkg-cmake",
|
14 |
+
"host": true
|
15 |
+
},
|
16 |
+
{
|
17 |
+
"name": "vcpkg-cmake-config",
|
18 |
+
"host": true
|
19 |
+
},
|
20 |
+
"zlib"
|
21 |
+
]
|
22 |
+
}
|
cc-multilingual-main/cc_net/vcpkg/ports/oatpp-mbedtls/find-mbedtls.patch
ADDED
@@ -0,0 +1,135 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2 |
+
index 6b1e8c0f2..b0ef5518d 100644
|
3 |
+
--- a/CMakeLists.txt
|
4 |
+
+++ b/CMakeLists.txt
|
5 |
+
@@ -97,7 +97,7 @@ message("## ${OATPP_THIS_MODULE_NAME} module. Resolving dependencies...\n")
|
6 |
+
include(FindPkgConfig)
|
7 |
+
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/module")
|
8 |
+
|
9 |
+
-find_package(mbedtls 2.16.0 REQUIRED)
|
10 |
+
+find_package(mbedtls 2.16.3 REQUIRED)
|
11 |
+
|
12 |
+
message("MBEDTLS_INCLUDE_DIR=${MBEDTLS_INCLUDE_DIR}")
|
13 |
+
message("MBEDTLS_TLS_LIBRARY=${MBEDTLS_TLS_LIBRARY}")
|
14 |
+
diff --git a/cmake/module/Findmbedtls.cmake b/cmake/module/Findmbedtls.cmake
|
15 |
+
index 8c76d0a73..5c223a615 100644
|
16 |
+
--- a/cmake/module/Findmbedtls.cmake
|
17 |
+
+++ b/cmake/module/Findmbedtls.cmake
|
18 |
+
@@ -14,10 +14,10 @@ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
19 |
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
20 |
+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
21 |
+
|
22 |
+
-FindmbedTLS
|
23 |
+
+Findmbedtls
|
24 |
+
------------
|
25 |
+
|
26 |
+
-Find the mbedTLS encryption library.
|
27 |
+
+Find the mbedtls encryption library.
|
28 |
+
|
29 |
+
Optional Components
|
30 |
+
^^^^^^^^^^^^^^^^^^^
|
31 |
+
@@ -31,16 +31,16 @@ Imported Targets
|
32 |
+
This module defines the following imported targets:
|
33 |
+
|
34 |
+
mbedtls::Crypto
|
35 |
+
- The mbedTLS crypto library, if found.
|
36 |
+
+ The mbedtls crypto library, if found.
|
37 |
+
|
38 |
+
mbedtls::X509
|
39 |
+
- The mbedTLS x509 library, if found.
|
40 |
+
+ The mbedtls x509 library, if found.
|
41 |
+
|
42 |
+
mbedtls::SSL
|
43 |
+
- The mbedTLS ssl library, if found. Requires and includes mbedtls::Crypto automatically.
|
44 |
+
+ The mbedtls ssl library, if found. Requires and includes mbedtls::Crypto automatically.
|
45 |
+
|
46 |
+
mbedtls::TLS
|
47 |
+
- The mbedTLS tls library, if found. Requires and includes mbedtls::SSL and mbedtls::Crypto automatically.
|
48 |
+
+ The mbedtls tls library, if found. Requires and includes mbedtls::SSL and mbedtls::Crypto automatically.
|
49 |
+
|
50 |
+
Result Variables
|
51 |
+
^^^^^^^^^^^^^^^^
|
52 |
+
@@ -48,26 +48,26 @@ Result Variables
|
53 |
+
This module will set the following variables in your project:
|
54 |
+
|
55 |
+
MBEDTLS_FOUND
|
56 |
+
- System has the mbedTLS library. If no components are requested it only requires the crypto library.
|
57 |
+
+ System has the mbedtls library. If no components are requested it only requires the crypto library.
|
58 |
+
MBEDTLS_INCLUDE_DIR
|
59 |
+
- The mbedTLS include directory.
|
60 |
+
+ The mbedtls include directory.
|
61 |
+
MBEDTLS_X509_LIBRARY
|
62 |
+
- The mbedTLS crypto library.
|
63 |
+
+ The mbedtls crypto library.
|
64 |
+
MBEDTLS_CRYPTO_LIBRARY
|
65 |
+
- The mbedTLS crypto library.
|
66 |
+
+ The mbedtls crypto library.
|
67 |
+
MBEDTLS_SSL_LIBRARY
|
68 |
+
- The mbedTLS SSL library.
|
69 |
+
+ The mbedtls SSL library.
|
70 |
+
MBEDTLS_TLS_LIBRARY
|
71 |
+
- The mbedTLS TLS library.
|
72 |
+
+ The mbedtls TLS library.
|
73 |
+
MBEDTLS_LIBRARIES
|
74 |
+
- All mbedTLS libraries.
|
75 |
+
+ All mbedtls libraries.
|
76 |
+
MBEDTLS_VERSION
|
77 |
+
This is set to $major.$minor.$revision (e.g. 2.6.8).
|
78 |
+
|
79 |
+
Hints
|
80 |
+
^^^^^
|
81 |
+
|
82 |
+
-Set MBEDTLS_ROOT_DIR to the root directory of an mbedTLS installation.
|
83 |
+
+Set MBEDTLS_ROOT_DIR to the root directory of an mbedtls installation.
|
84 |
+
|
85 |
+
]=======================================================================]
|
86 |
+
|
87 |
+
@@ -175,7 +175,7 @@ if(MBEDTLS_INCLUDE_DIR AND EXISTS "${MBEDTLS_INCLUDE_DIR}/mbedtls/version.h")
|
88 |
+
endif()
|
89 |
+
|
90 |
+
# Set Find Package Arguments
|
91 |
+
-find_package_handle_standard_args(mbedTLS
|
92 |
+
+find_package_handle_standard_args(mbedtls
|
93 |
+
REQUIRED_VARS
|
94 |
+
MBEDTLS_X509_LIBRARY
|
95 |
+
MBEDTLS_TLS_LIBRARY
|
96 |
+
@@ -185,12 +185,12 @@ find_package_handle_standard_args(mbedTLS
|
97 |
+
MBEDTLS_VERSION
|
98 |
+
HANDLE_COMPONENTS
|
99 |
+
FAIL_MESSAGE
|
100 |
+
- "Could NOT find mbedTLS, try setting the path to mbedTLS using the MBEDTLS_ROOT_DIR environment variable"
|
101 |
+
+ "Could NOT find mbedtls, try setting the path to mbedtls using the MBEDTLS_ROOT_DIR environment variable"
|
102 |
+
)
|
103 |
+
|
104 |
+
-# mbedTLS Found
|
105 |
+
-if(MBEDTLS_FOUND)
|
106 |
+
-
|
107 |
+
+# mbedtls Found
|
108 |
+
+if(mbedtls_FOUND)
|
109 |
+
+ set(MBEDTLS_FOUND ${mbedtls_FOUND})
|
110 |
+
# Set mbedtls::Crypto
|
111 |
+
if(NOT TARGET mbedtls::Crypto AND EXISTS "${MBEDTLS_CRYPTO_LIBRARY}")
|
112 |
+
|
113 |
+
@@ -257,4 +257,4 @@ if(MBEDTLS_FOUND)
|
114 |
+
|
115 |
+
endif() # mbedtls::TLS
|
116 |
+
|
117 |
+
-endif(MBEDTLS_FOUND)
|
118 |
+
+endif(mbedtls_FOUND)
|
119 |
+
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
120 |
+
index 6811f05ea..d80430c3e 100644
|
121 |
+
--- a/src/CMakeLists.txt
|
122 |
+
+++ b/src/CMakeLists.txt
|
123 |
+
@@ -31,9 +31,9 @@ target_include_directories(${OATPP_THIS_MODULE_NAME}
|
124 |
+
)
|
125 |
+
|
126 |
+
target_link_libraries(${OATPP_THIS_MODULE_NAME}
|
127 |
+
- PRIVATE mbedtls::TLS
|
128 |
+
- PRIVATE mbedtls::X509
|
129 |
+
- PRIVATE mbedtls::Crypto
|
130 |
+
+ PRIVATE ${MBEDTLS_TLS_LIBRARY}
|
131 |
+
+ PRIVATE ${MBEDTLS_X509_LIBRARY}
|
132 |
+
+ PRIVATE ${MBEDTLS_CRYPTO_LIBRARY}
|
133 |
+
)
|
134 |
+
|
135 |
+
if(${OATPP_MBEDTLS_DEBUG} GREATER 0)
|
cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/cmake/configure_qt.cmake
ADDED
@@ -0,0 +1,210 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
function(configure_qt)
|
2 |
+
cmake_parse_arguments(_csc "" "SOURCE_PATH;TARGET_PLATFORM;HOST_PLATFORM;HOST_TOOLS_ROOT" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" ${ARGN})
|
3 |
+
|
4 |
+
if(NOT _csc_TARGET_PLATFORM)
|
5 |
+
message(FATAL_ERROR "configure_qt requires a TARGET_PLATFORM argument.")
|
6 |
+
endif()
|
7 |
+
|
8 |
+
if(DEFINED _csc_HOST_PLATFORM)
|
9 |
+
list(APPEND _csc_OPTIONS -platform ${_csc_HOST_PLATFORM})
|
10 |
+
endif()
|
11 |
+
|
12 |
+
if(DEFINED _csc_HOST_TOOLS_ROOT)
|
13 |
+
## vcpkg internal file struture assumed here!
|
14 |
+
message(STATUS "Building Qt with prepared host tools from ${_csc_HOST_TOOLS_ROOT}!")
|
15 |
+
vcpkg_add_to_path("${_csc_HOST_TOOLS_ROOT}/bin")
|
16 |
+
vcpkg_add_to_path("${_csc_HOST_TOOLS_ROOT}")
|
17 |
+
set(EXT_BIN_DIR -external-hostbindir ${_csc_HOST_TOOLS_ROOT}/bin) # we only use release binaries for building
|
18 |
+
find_program(QMAKE_COMMAND NAMES qmake PATHS ${_csc_HOST_TOOLS_ROOT}/bin NO_DEFAULT_PATH)
|
19 |
+
set(INVOKE "${QMAKE_COMMAND}" )
|
20 |
+
else()
|
21 |
+
if(CMAKE_HOST_WIN32)
|
22 |
+
set(CONFIGURE_BAT "configure.bat")
|
23 |
+
else()
|
24 |
+
set(CONFIGURE_BAT "configure")
|
25 |
+
endif()
|
26 |
+
set(INVOKE "${_csc_SOURCE_PATH}/${CONFIGURE_BAT}")
|
27 |
+
endif()
|
28 |
+
|
29 |
+
#Cleanup previous build folders
|
30 |
+
file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
31 |
+
|
32 |
+
vcpkg_cmake_get_vars(detected_file)
|
33 |
+
include("${detected_file}")
|
34 |
+
function(qmake_append_program var qmake_var value)
|
35 |
+
get_filename_component(prog "${value}" NAME)
|
36 |
+
# QMake assumes everything is on PATH?
|
37 |
+
vcpkg_list(APPEND ${var} "${qmake_var}=${prog}")
|
38 |
+
find_program(${qmake_var} NAMES "${prog}")
|
39 |
+
cmake_path(COMPARE "${${qmake_var}}" EQUAL "${value}" correct_prog_on_path)
|
40 |
+
if(NOT correct_prog_on_path AND NOT "${value}" MATCHES "|:")
|
41 |
+
message(FATAL_ERROR "Detect path mismatch for '${qmake_var}'. '${value}' is not the same as '${${qmake_var}}'. Please correct your PATH!")
|
42 |
+
endif()
|
43 |
+
unset(${qmake_var})
|
44 |
+
unset(${qmake_var} CACHE)
|
45 |
+
set(${var} "${${var}}" PARENT_SCOPE)
|
46 |
+
endfunction()
|
47 |
+
# Setup Build tools
|
48 |
+
set(qmake_build_tools "")
|
49 |
+
qmake_append_program(qmake_build_tools "QMAKE_CC" "${VCPKG_DETECTED_CMAKE_C_COMPILER}")
|
50 |
+
qmake_append_program(qmake_build_tools "QMAKE_CXX" "${VCPKG_DETECTED_CMAKE_CXX_COMPILER}")
|
51 |
+
qmake_append_program(qmake_build_tools "QMAKE_AR" "${VCPKG_DETECTED_CMAKE_AR}")
|
52 |
+
qmake_append_program(qmake_build_tools "QMAKE_RANLIB" "${VCPKG_DETECTED_CMAKE_RANLIB}")
|
53 |
+
qmake_append_program(qmake_build_tools "QMAKE_STRIP" "${VCPKG_DETECTED_CMAKE_STRIP}")
|
54 |
+
qmake_append_program(qmake_build_tools "QMAKE_NM" "${VCPKG_DETECTED_CMAKE_NM}")
|
55 |
+
qmake_append_program(qmake_build_tools "QMAKE_RC" "${VCPKG_DETECTED_CMAKE_RC_COMPILER}")
|
56 |
+
qmake_append_program(qmake_build_tools "QMAKE_MT" "${VCPKG_DETECTED_CMAKE_MT}")
|
57 |
+
if(NOT VCPKG_TARGET_IS_WINDOWS OR VCPKG_DETECTED_CMAKE_AR MATCHES "ar$")
|
58 |
+
# This is the reason why users should probably use a
|
59 |
+
# customized qt.conf with more domain knowledge.
|
60 |
+
vcpkg_list(APPEND qmake_build_tools "QMAKE_AR+=qc")
|
61 |
+
endif()
|
62 |
+
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
63 |
+
qmake_append_program(qmake_build_tools "QMAKE_LIB" "${VCPKG_DETECTED_CMAKE_AR}")
|
64 |
+
qmake_append_program(qmake_build_tools "QMAKE_LINK" "${VCPKG_DETECTED_CMAKE_LINKER}")
|
65 |
+
else()
|
66 |
+
qmake_append_program(qmake_build_tools "QMAKE_LINK" "${VCPKG_DETECTED_CMAKE_CXX_COMPILER}")
|
67 |
+
qmake_append_program(qmake_build_tools "QMAKE_LINK_SHLIB" "${VCPKG_DETECTED_CMAKE_CXX_COMPILER}")
|
68 |
+
qmake_append_program(qmake_build_tools "QMAKE_LINK_C" "${VCPKG_DETECTED_CMAKE_C_COMPILER}")
|
69 |
+
qmake_append_program(qmake_build_tools "QMAKE_LINK_C_SHLIB" "${VCPKG_DETECTED_CMAKE_C_COMPILER}")
|
70 |
+
endif()
|
71 |
+
|
72 |
+
#Find and ad Perl to PATH
|
73 |
+
vcpkg_find_acquire_program(PERL)
|
74 |
+
get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY)
|
75 |
+
vcpkg_add_to_path("${PERL_EXE_PATH}")
|
76 |
+
|
77 |
+
if("${VCPKG_LIBRARY_LINKAGE}" STREQUAL "static")
|
78 |
+
list(APPEND _csc_OPTIONS -static)
|
79 |
+
else()
|
80 |
+
#list(APPEND _csc_OPTIONS_DEBUG -separate-debug-info)
|
81 |
+
endif()
|
82 |
+
|
83 |
+
if(VCPKG_TARGET_IS_WINDOWS AND "${VCPKG_CRT_LINKAGE}" STREQUAL "static")
|
84 |
+
list(APPEND _csc_OPTIONS -static-runtime)
|
85 |
+
endif()
|
86 |
+
|
87 |
+
list(APPEND _csc_OPTIONS_RELEASE -release)
|
88 |
+
list(APPEND _csc_OPTIONS_DEBUG -debug)
|
89 |
+
|
90 |
+
#Replace with VCPKG variables if PR #7733 is merged
|
91 |
+
unset(BUILDTYPES)
|
92 |
+
if(NOT DEFINED VCPKG_BUILD_TYPE OR "${VCPKG_BUILD_TYPE}" STREQUAL "debug")
|
93 |
+
set(_buildname "DEBUG")
|
94 |
+
list(APPEND BUILDTYPES ${_buildname})
|
95 |
+
set(_short_name_${_buildname} "dbg")
|
96 |
+
set(_path_suffix_${_buildname} "/debug")
|
97 |
+
set(_build_type_${_buildname} "debug")
|
98 |
+
endif()
|
99 |
+
if(NOT DEFINED VCPKG_BUILD_TYPE OR "${VCPKG_BUILD_TYPE}" STREQUAL "release")
|
100 |
+
set(_buildname "RELEASE")
|
101 |
+
list(APPEND BUILDTYPES ${_buildname})
|
102 |
+
set(_short_name_${_buildname} "rel")
|
103 |
+
set(_path_suffix_${_buildname} "")
|
104 |
+
set(_build_type_${_buildname} "release")
|
105 |
+
endif()
|
106 |
+
unset(_buildname)
|
107 |
+
|
108 |
+
vcpkg_find_acquire_program(PKGCONFIG)
|
109 |
+
set(ENV{PKG_CONFIG} "${PKGCONFIG}")
|
110 |
+
get_filename_component(PKGCONFIG_PATH "${PKGCONFIG}" DIRECTORY)
|
111 |
+
vcpkg_add_to_path("${PKGCONFIG_PATH}")
|
112 |
+
|
113 |
+
foreach(_buildname ${BUILDTYPES})
|
114 |
+
set(PKGCONFIG_INSTALLED_DIR "${CURRENT_INSTALLED_DIR}${_path_suffix_${_buildname}}/lib/pkgconfig")
|
115 |
+
set(PKGCONFIG_INSTALLED_SHARE_DIR "${CURRENT_INSTALLED_DIR}/share/pkgconfig")
|
116 |
+
set(PKGCONFIG_PACKAGES_DIR "${CURRENT_PACKAGES_DIR}${_path_suffix_${_buildname}}/lib/pkgconfig")
|
117 |
+
set(PKGCONFIG_PACKAGES_SHARE_DIR "${CURRENT_PACKAGES_DIR}/share/pkgconfig")
|
118 |
+
if(DEFINED ENV{PKG_CONFIG_PATH})
|
119 |
+
set(BACKUP_ENV_PKG_CONFIG_PATH_${_config} $ENV{PKG_CONFIG_PATH})
|
120 |
+
set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_INSTALLED_SHARE_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_PACKAGES_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_PACKAGES_SHARE_DIR}${VCPKG_HOST_PATH_SEPARATOR}$ENV{PKG_CONFIG_PATH}")
|
121 |
+
else()
|
122 |
+
set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_INSTALLED_SHARE_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_PACKAGES_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_PACKAGES_SHARE_DIR}")
|
123 |
+
endif()
|
124 |
+
|
125 |
+
set(_build_triplet ${TARGET_TRIPLET}-${_short_name_${_buildname}})
|
126 |
+
message(STATUS "Configuring ${_build_triplet}")
|
127 |
+
set(_build_dir "${CURRENT_BUILDTREES_DIR}/${_build_triplet}")
|
128 |
+
file(MAKE_DIRECTORY ${_build_dir})
|
129 |
+
|
130 |
+
set(qmake_comp_flags "")
|
131 |
+
# Note sure about these. VCPKG_QMAKE_OPTIONS offers a way to opt out of these. (earlier values being overwritten by later values; = set +=append *=append unique -=remove)
|
132 |
+
macro(qmake_add_flags qmake_var operation flags)
|
133 |
+
string(STRIP "${flags}" striped_flags)
|
134 |
+
if(striped_flags)
|
135 |
+
vcpkg_list(APPEND qmake_comp_flags "${qmake_var}${operation}${striped_flags}")
|
136 |
+
endif()
|
137 |
+
endmacro()
|
138 |
+
|
139 |
+
qmake_add_flags("QMAKE_LIBS" "+=" "${VCPKG_DETECTED_CMAKE_C_STANDARD_LIBRARIES} ${VCPKG_DETECTED_CMAKE_CXX_STANDARD_LIBRARIES}")
|
140 |
+
qmake_add_flags("QMAKE_RC" "+=" "${VCPKG_COMBINED_RC_FLAGS_${_buildname}}")
|
141 |
+
qmake_add_flags("QMAKE_CFLAGS_${_buildname}" "+=" "${VCPKG_COMBINED_C_FLAGS_${_buildname}}")
|
142 |
+
qmake_add_flags("QMAKE_CXXFLAGS_${_buildname}" "+=" "${VCPKG_COMBINED_CXX_FLAGS_${_buildname}}")
|
143 |
+
qmake_add_flags("QMAKE_LFLAGS" "+=" "${VCPKG_COMBINED_SHARED_LINKER_FLAGS_${_buildname}}")
|
144 |
+
qmake_add_flags("QMAKE_LFLAGS_SHLIB" "+=" "${VCPKG_COMBINED_SHARED_LINKER_FLAGS_${_buildname}}")
|
145 |
+
qmake_add_flags("QMAKE_LFLAGS_PLUGIN" "+=" "${VCPKG_COMBINED_MODULE_LINKER_FLAGS_${_buildname}}")
|
146 |
+
qmake_add_flags("QMAKE_LIBFLAGS_${_buildname}" "+=" "${VCPKG_COMBINED_STATIC_LINKER_FLAGS_${_buildname}}")
|
147 |
+
|
148 |
+
# These paths get hardcoded into qmake. So point them into the CURRENT_INSTALLED_DIR instead of CURRENT_PACKAGES_DIR
|
149 |
+
# makefiles will be fixed to install into CURRENT_PACKAGES_DIR in install_qt
|
150 |
+
set(BUILD_OPTIONS ${_csc_OPTIONS} ${_csc_OPTIONS_${_buildname}}
|
151 |
+
-prefix ${CURRENT_INSTALLED_DIR}
|
152 |
+
#-extprefix ${CURRENT_INSTALLED_DIR}
|
153 |
+
${EXT_BIN_DIR}
|
154 |
+
-hostprefix ${CURRENT_INSTALLED_DIR}/tools/qt5${_path_suffix_${_buildname}}
|
155 |
+
#-hostprefix ${CURRENT_INSTALLED_DIR}/tools/qt5
|
156 |
+
-hostlibdir ${CURRENT_INSTALLED_DIR}/tools/qt5${_path_suffix_${_buildname}}/lib # could probably be move to manual-link
|
157 |
+
-hostbindir ${CURRENT_INSTALLED_DIR}/tools/qt5${_path_suffix_${_buildname}}/bin
|
158 |
+
#-hostbindir ${CURRENT_INSTALLED_DIR}/tools/qt5/bin
|
159 |
+
# Qt VS Plugin requires a /bin subfolder with the executables in the root dir. But to use the wizard a correctly setup lib folder is also required
|
160 |
+
# So with the vcpkg layout there is no way to make it work unless all dll are are copied to tools/qt5/bin and all libs to tools/qt5/lib
|
161 |
+
-archdatadir ${CURRENT_INSTALLED_DIR}/tools/qt5${_path_suffix_${_buildname}}
|
162 |
+
-datadir ${CURRENT_INSTALLED_DIR}${_path_suffix}/share/qt5${_path_suffix_${_buildname}}
|
163 |
+
-plugindir ${CURRENT_INSTALLED_DIR}${_path_suffix_${_buildname}}/plugins
|
164 |
+
-qmldir ${CURRENT_INSTALLED_DIR}${_path_suffix_${_buildname}}/qml
|
165 |
+
-headerdir ${CURRENT_INSTALLED_DIR}/include/qt5
|
166 |
+
-libexecdir ${CURRENT_INSTALLED_DIR}/tools/qt5${_path_suffix_${_buildname}}
|
167 |
+
-bindir ${CURRENT_INSTALLED_DIR}${_path_suffix_${_buildname}}/bin
|
168 |
+
-libdir ${CURRENT_INSTALLED_DIR}${_path_suffix_${_buildname}}/lib
|
169 |
+
-I ${CURRENT_INSTALLED_DIR}/include
|
170 |
+
-I ${CURRENT_INSTALLED_DIR}/include/qt5
|
171 |
+
-L ${CURRENT_INSTALLED_DIR}${_path_suffix_${_buildname}}/lib
|
172 |
+
-L ${CURRENT_INSTALLED_DIR}${_path_suffix_${_buildname}}/lib/manual-link
|
173 |
+
-platform ${_csc_TARGET_PLATFORM}
|
174 |
+
)
|
175 |
+
|
176 |
+
if(DEFINED _csc_HOST_TOOLS_ROOT) #use qmake
|
177 |
+
if(WIN32)
|
178 |
+
set(INVOKE_OPTIONS "QMAKE_CXX.QMAKE_MSC_VER=1911" "QMAKE_MSC_VER=1911")
|
179 |
+
endif()
|
180 |
+
vcpkg_execute_required_process(
|
181 |
+
COMMAND ${INVOKE} "${_csc_SOURCE_PATH}" "${INVOKE_OPTIONS}" -- ${BUILD_OPTIONS} ${qmake_build_tools} ${qmake_comp_flags}
|
182 |
+
WORKING_DIRECTORY ${_build_dir}
|
183 |
+
LOGNAME config-${_build_triplet}
|
184 |
+
)
|
185 |
+
else()# call configure (builds qmake for triplet and calls it like above)
|
186 |
+
vcpkg_execute_required_process(
|
187 |
+
COMMAND "${INVOKE}" ${BUILD_OPTIONS} ${qmake_build_tools} ${qmake_comp_flags}
|
188 |
+
WORKING_DIRECTORY ${_build_dir}
|
189 |
+
LOGNAME config-${_build_triplet}
|
190 |
+
)
|
191 |
+
endif()
|
192 |
+
|
193 |
+
# Note archdatadir and datadir are required to be prefixed with the hostprefix?
|
194 |
+
message(STATUS "Configuring ${_build_triplet} done")
|
195 |
+
|
196 |
+
# Copy configuration dependent qt.conf
|
197 |
+
file(TO_CMAKE_PATH "${CURRENT_PACKAGES_DIR}" CMAKE_CURRENT_PACKAGES_DIR_PATH)
|
198 |
+
file(TO_CMAKE_PATH "${CURRENT_INSTALLED_DIR}" CMAKE_CURRENT_INSTALLED_DIR_PATH)
|
199 |
+
file(READ "${CURRENT_BUILDTREES_DIR}/${_build_triplet}/bin/qt.conf" _contents)
|
200 |
+
string(REPLACE "${CMAKE_CURRENT_PACKAGES_DIR_PATH}" "\${CURRENT_INSTALLED_DIR}" _contents ${_contents})
|
201 |
+
string(REPLACE "${CMAKE_CURRENT_INSTALLED_DIR_PATH}" "\${CURRENT_INSTALLED_DIR}" _contents ${_contents})
|
202 |
+
#string(REPLACE "HostPrefix=\${CURRENT_PACKAGES_DIR}" "HostPrefix=\${CURRENT_INSTALLED_DIR}" _contents ${_contents})
|
203 |
+
string(REPLACE "[EffectivePaths]\nPrefix=..\n" "" _contents ${_contents})
|
204 |
+
string(REGEX REPLACE "\\[EffectiveSourcePaths\\]\r?\nPrefix=[^\r\n]+\r?\n" "" _contents ${_contents})
|
205 |
+
string(REPLACE "Sysroot=\n" "" _contents ${_contents})
|
206 |
+
string(REPLACE "SysrootifyPrefix=false\n" "" _contents ${_contents})
|
207 |
+
file(WRITE "${CURRENT_PACKAGES_DIR}/tools/qt5/qt_${_build_type_${_buildname}}.conf" "${_contents}")
|
208 |
+
endforeach()
|
209 |
+
|
210 |
+
endfunction()
|
cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/cmake/find_qt_mkspec.cmake
ADDED
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
function(find_qt_mkspec TARGET_PLATFORM_MKSPEC_OUT HOST_PLATFORM_MKSPEC_OUT EXT_HOST_TOOLS_OUT)
|
2 |
+
## Figure out QTs target mkspec
|
3 |
+
if(NOT DEFINED VCPKG_QT_TARGET_MKSPEC)
|
4 |
+
message(STATUS "Figuring out qt target mkspec. Target arch ${VCPKG_TARGET_ARCHITECTURE}")
|
5 |
+
if(VCPKG_TARGET_IS_WINDOWS)
|
6 |
+
if(VCPKG_TARGET_IS_MINGW)
|
7 |
+
set(_tmp_targ_out "win32-g++")
|
8 |
+
elseif(VCPKG_TARGET_IS_UWP)
|
9 |
+
if(VCPKG_PLATFORM_TOOLSET STREQUAL "v140")
|
10 |
+
set(msvc_year "2015")
|
11 |
+
elseif(VCPKG_PLATFORM_TOOLSET STREQUAL "v141")
|
12 |
+
set(msvc_year "2017")
|
13 |
+
elseif(VCPKG_PLATFORM_TOOLSET STREQUAL "v142")
|
14 |
+
set(msvc_year "2019")
|
15 |
+
else()
|
16 |
+
message(FATAL_ERROR "No target mkspec found!")
|
17 |
+
endif()
|
18 |
+
set(_tmp_targ_out "winrt-${VCPKG_TARGET_ARCHITECTURE}-msvc${msvc_year}")
|
19 |
+
else()
|
20 |
+
if("${VCPKG_TARGET_ARCHITECTURE}" MATCHES "arm64")
|
21 |
+
message(STATUS "Figuring out arm64")
|
22 |
+
set(_tmp_targ_out "win32-arm64-msvc2017") #mkspec does not have anything defined related to msvc2017 so this should work
|
23 |
+
else()
|
24 |
+
set(_tmp_targ_out "win32-msvc")
|
25 |
+
endif()
|
26 |
+
endif()
|
27 |
+
elseif(VCPKG_TARGET_IS_LINUX)
|
28 |
+
set(_tmp_targ_out "linux-g++" )
|
29 |
+
elseif(VCPKG_TARGET_IS_OSX)
|
30 |
+
set(_tmp_targ_out "macx-clang") # switch to macx-g++ since vcpkg requires g++ to compile any way?
|
31 |
+
endif()
|
32 |
+
else()
|
33 |
+
set(_tmp_targ_out ${VCPKG_QT_TARGET_MKSPEC})
|
34 |
+
endif()
|
35 |
+
message(STATUS "Target mkspec set to: ${_tmp_targ_out}")
|
36 |
+
set(${TARGET_PLATFORM_MKSPEC_OUT} ${_tmp_targ_out} PARENT_SCOPE)
|
37 |
+
|
38 |
+
## Figure out QTs host mkspec
|
39 |
+
if(NOT DEFINED VCPKG_QT_HOST_MKSPEC)
|
40 |
+
#if(WIN32)
|
41 |
+
# set(_tmp_host_out "win32-msvc")
|
42 |
+
#elseif("${CMAKE_HOST_SYSTEM}" STREQUAL "Linux")
|
43 |
+
# set(_tmp_host_out "linux-g++")
|
44 |
+
#elseif("${CMAKE_HOST_SYSTEM}" STREQUAL "Darwin")
|
45 |
+
# set(_tmp_host_out "macx-clang")
|
46 |
+
#endif()
|
47 |
+
if(DEFINED _tmp_host_out)
|
48 |
+
message(STATUS "Host mkspec set to: ${_tmp_host_out}")
|
49 |
+
else()
|
50 |
+
message(STATUS "Host mkspec not set. Qt's own buildsystem will try to figure out the host system")
|
51 |
+
endif()
|
52 |
+
else()
|
53 |
+
set(_tmp_host_out ${VCPKG_QT_HOST_MKSPEC})
|
54 |
+
endif()
|
55 |
+
|
56 |
+
if(DEFINED _tmp_host_out)
|
57 |
+
set(${HOST_PLATFORM_MKSPEC_OUT} ${_tmp_host_out} PARENT_SCOPE)
|
58 |
+
endif()
|
59 |
+
|
60 |
+
## Figure out VCPKG qt-tools directory for the port.
|
61 |
+
if(NOT DEFINED VCPKG_QT_HOST_TOOLS_ROOT AND DEFINED VCPKG_QT_HOST_PLATFORM) ## Root dir of the required host tools
|
62 |
+
if(NOT "${_tmp_host_out}" MATCHES "${_tmp_host_out}")
|
63 |
+
if(CMAKE_HOST_WIN32)
|
64 |
+
|
65 |
+
if($ENV{PROCESSOR_ARCHITECTURE} MATCHES "[aA][rR][mM]64")
|
66 |
+
list(APPEND _test_triplets arm64-windows)
|
67 |
+
elseif($ENV{PROCESSOR_ARCHITECTURE} MATCHES "[aA][mM][dD]64")
|
68 |
+
list(APPEND _test_triplets x64-windows x64-windows-static)
|
69 |
+
list(APPEND _test_triplets x86-windows x86-windows-static)
|
70 |
+
elseif($ENV{PROCESSOR_ARCHITECTURE} MATCHES "x86")
|
71 |
+
list(APPEND _test_triplets x86-windows x86-windows-static)
|
72 |
+
else()
|
73 |
+
message(FATAL_ERROR "Unknown host processor! Host Processor $ENV{PROCESSOR_ARCHITECTURE}")
|
74 |
+
endif()
|
75 |
+
elseif(CMAKE_HOST_SYSTEM STREQUAL "Linux")
|
76 |
+
list(APPEND _test_triplets "x64-linux")
|
77 |
+
elseif(CMAKE_HOST_SYSTEM STREQUAL "Darwin")
|
78 |
+
list(APPEND _test_triplets "x64-osx")
|
79 |
+
else()
|
80 |
+
endif()
|
81 |
+
foreach(_triplet ${_test_triplets})
|
82 |
+
find_program(QMAKE_PATH qmake PATHS ${VCPKG_INSTALLED_DIR}/${_triplet}/tools/qt5/bin NO_DEFAULT_PATHS)
|
83 |
+
message(STATUS "Checking: ${VCPKG_INSTALLED_DIR}/${_triplet}/tools/qt5/bin. ${QMAKE_PATH}")
|
84 |
+
if(QMAKE_PATH)
|
85 |
+
set(_tmp_host_root "${VCPKG_INSTALLED_DIR}/${_triplet}/tools/qt5")
|
86 |
+
set(_tmp_host_qmake ${QMAKE_PATH} PARENT_SCOPE)
|
87 |
+
message(STATUS "Qt host tools root dir within vcpkg: ${_tmp_host_root}")
|
88 |
+
break()
|
89 |
+
endif()
|
90 |
+
endforeach()
|
91 |
+
if(NOT DEFINED _tmp_host_root)
|
92 |
+
message(FATAL_ERROR "Unable to locate required host tools. Please define VCPKG_QT_HOST_TOOLS_ROOT to the required root dir of the host tools")
|
93 |
+
endif()
|
94 |
+
endif()
|
95 |
+
else()
|
96 |
+
set(_tmp_host_root ${VCPKG_QT_HOST_TOOLS_ROOT})
|
97 |
+
endif()
|
98 |
+
|
99 |
+
if(DEFINED _tmp_host_root)
|
100 |
+
set(${EXT_HOST_TOOLS_OUT} ${_tmp_host_root} PARENT_SCOPE)
|
101 |
+
endif()
|
102 |
+
|
103 |
+
endfunction()
|
cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/cmake/install_qt.cmake
ADDED
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
include(qt_fix_makefile_install)
|
2 |
+
|
3 |
+
function(install_qt)
|
4 |
+
if(CMAKE_HOST_WIN32)
|
5 |
+
if(VCPKG_TARGET_IS_MINGW)
|
6 |
+
find_program(MINGW32_MAKE mingw32-make REQUIRED)
|
7 |
+
set(INVOKE "${MINGW32_MAKE}" -j${VCPKG_CONCURRENCY})
|
8 |
+
set(INVOKE_SINGLE "${MINGW32_MAKE}" -j1)
|
9 |
+
elseif (VCPKG_QMAKE_USE_NMAKE)
|
10 |
+
find_program(NMAKE nmake REQUIRED)
|
11 |
+
set(INVOKE "${NMAKE}")
|
12 |
+
set(INVOKE_SINGLE "${NMAKE}")
|
13 |
+
get_filename_component(NMAKE_EXE_PATH ${NMAKE} DIRECTORY)
|
14 |
+
set(PATH_GLOBAL "$ENV{PATH}")
|
15 |
+
set(ENV{PATH} "$ENV{PATH};${NMAKE_EXE_PATH}")
|
16 |
+
set(ENV{CL} "$ENV{CL} /MP${VCPKG_CONCURRENCY}")
|
17 |
+
else()
|
18 |
+
vcpkg_find_acquire_program(JOM)
|
19 |
+
set(INVOKE "${JOM}" /J ${VCPKG_CONCURRENCY})
|
20 |
+
set(INVOKE_SINGLE "${JOM}" /J 1)
|
21 |
+
endif()
|
22 |
+
else()
|
23 |
+
find_program(MAKE make)
|
24 |
+
set(INVOKE "${MAKE}" -j${VCPKG_CONCURRENCY})
|
25 |
+
set(INVOKE_SINGLE "${MAKE}" -j1)
|
26 |
+
endif()
|
27 |
+
vcpkg_find_acquire_program(PYTHON3)
|
28 |
+
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
|
29 |
+
vcpkg_add_to_path(PREPEND "${PYTHON3_EXE_PATH}")
|
30 |
+
|
31 |
+
if (CMAKE_HOST_WIN32)
|
32 |
+
# flex and bison for ANGLE library
|
33 |
+
vcpkg_find_acquire_program(FLEX)
|
34 |
+
get_filename_component(FLEX_EXE_PATH ${FLEX} DIRECTORY)
|
35 |
+
get_filename_component(FLEX_DIR ${FLEX_EXE_PATH} NAME)
|
36 |
+
|
37 |
+
file(COPY ${FLEX_EXE_PATH} DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-tools" )
|
38 |
+
set(FLEX_TEMP "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-tools/${FLEX_DIR}")
|
39 |
+
file(RENAME "${FLEX_TEMP}/win_bison.exe" "${FLEX_TEMP}/bison.exe")
|
40 |
+
file(RENAME "${FLEX_TEMP}/win_flex.exe" "${FLEX_TEMP}/flex.exe")
|
41 |
+
vcpkg_add_to_path("${FLEX_TEMP}")
|
42 |
+
endif()
|
43 |
+
|
44 |
+
set(_path "$ENV{PATH}")
|
45 |
+
|
46 |
+
#Replace with VCPKG variables if PR #7733 is merged
|
47 |
+
unset(BUILDTYPES)
|
48 |
+
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
49 |
+
set(_buildname "DEBUG")
|
50 |
+
list(APPEND BUILDTYPES ${_buildname})
|
51 |
+
set(_short_name_${_buildname} "dbg")
|
52 |
+
set(_path_suffix_${_buildname} "/debug")
|
53 |
+
set(_build_type_${_buildname} "debug")
|
54 |
+
endif()
|
55 |
+
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
56 |
+
set(_buildname "RELEASE")
|
57 |
+
list(APPEND BUILDTYPES ${_buildname})
|
58 |
+
set(_short_name_${_buildname} "rel")
|
59 |
+
set(_path_suffix_${_buildname} "")
|
60 |
+
set(_build_type_${_buildname} "release")
|
61 |
+
endif()
|
62 |
+
unset(_buildname)
|
63 |
+
|
64 |
+
foreach(_buildname ${BUILDTYPES})
|
65 |
+
set(_build_triplet ${TARGET_TRIPLET}-${_short_name_${_buildname}})
|
66 |
+
|
67 |
+
set(_installed_prefix_ "${CURRENT_INSTALLED_DIR}${_path_suffix_${_buildname}}")
|
68 |
+
set(_installed_libpath_ "${_installed_prefix_}/lib/${VCPKG_HOST_PATH_SEPARATOR}${_installed_prefix_}/lib/manual-link/")
|
69 |
+
|
70 |
+
vcpkg_add_to_path(PREPEND "${_installed_prefix_}/bin")
|
71 |
+
vcpkg_add_to_path(PREPEND "${_installed_prefix_}/lib")
|
72 |
+
|
73 |
+
# We set LD_LIBRARY_PATH ENV variable to allow executing Qt tools (rcc,...) even with dynamic linking
|
74 |
+
if(CMAKE_HOST_UNIX)
|
75 |
+
if(DEFINED ENV{LD_LIBRARY_PATH})
|
76 |
+
set(_ld_library_path_defined_ TRUE)
|
77 |
+
set(_ld_library_path_backup_ $ENV{LD_LIBRARY_PATH})
|
78 |
+
set(ENV{LD_LIBRARY_PATH} "${_installed_libpath_}${VCPKG_HOST_PATH_SEPARATOR}${_ld_library_path_backup_}")
|
79 |
+
else()
|
80 |
+
set(_ld_library_path_defined_ FALSE)
|
81 |
+
set(ENV{LD_LIBRARY_PATH} "${_installed_libpath_}")
|
82 |
+
endif()
|
83 |
+
endif()
|
84 |
+
|
85 |
+
message(STATUS "Building ${_build_triplet}")
|
86 |
+
vcpkg_execute_build_process(
|
87 |
+
COMMAND ${INVOKE}
|
88 |
+
NO_PARALLEL_COMMAND ${INVOKE_SINGLE}
|
89 |
+
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${_build_triplet}
|
90 |
+
LOGNAME build-${_build_triplet}
|
91 |
+
)
|
92 |
+
|
93 |
+
if(VCPKG_TARGET_IS_OSX)
|
94 |
+
# For some reason there will be an error on MacOSX without this clean!
|
95 |
+
message(STATUS "Cleaning after build before install ${_build_triplet}")
|
96 |
+
vcpkg_execute_required_process(
|
97 |
+
COMMAND ${INVOKE_SINGLE} clean
|
98 |
+
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${_build_triplet}/qmake
|
99 |
+
LOGNAME cleaning-after-build-${_build_triplet}
|
100 |
+
)
|
101 |
+
endif()
|
102 |
+
|
103 |
+
message(STATUS "Fixing makefile installation path ${_build_triplet}")
|
104 |
+
qt_fix_makefile_install("${CURRENT_BUILDTREES_DIR}/${_build_triplet}")
|
105 |
+
message(STATUS "Installing ${_build_triplet}")
|
106 |
+
vcpkg_execute_required_process(
|
107 |
+
COMMAND ${INVOKE} install
|
108 |
+
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${_build_triplet}
|
109 |
+
LOGNAME package-${_build_triplet}
|
110 |
+
)
|
111 |
+
message(STATUS "Package ${_build_triplet} done")
|
112 |
+
set(ENV{PATH} "${_path}")
|
113 |
+
|
114 |
+
# Restore backup
|
115 |
+
if(CMAKE_HOST_UNIX)
|
116 |
+
if(_ld_library_path_defined_)
|
117 |
+
set(ENV{LD_LIBRARY_PATH} "${_ld_library_path_backup_}")
|
118 |
+
else()
|
119 |
+
unset(ENV{LD_LIBRARY_PATH})
|
120 |
+
endif()
|
121 |
+
endif()
|
122 |
+
endforeach()
|
123 |
+
endfunction()
|
cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/cmake/qt_build_submodule.cmake
ADDED
@@ -0,0 +1,131 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
function(qt_build_submodule SOURCE_PATH)
|
3 |
+
if(NOT PORT STREQUAL "qt5-webengine")
|
4 |
+
vcpkg_find_acquire_program(PYTHON3)
|
5 |
+
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
|
6 |
+
vcpkg_add_to_path("${PYTHON3_EXE_PATH}")
|
7 |
+
endif()
|
8 |
+
|
9 |
+
vcpkg_configure_qmake(SOURCE_PATH ${SOURCE_PATH} ${ARGV})
|
10 |
+
|
11 |
+
vcpkg_build_qmake(SKIP_MAKEFILES)
|
12 |
+
|
13 |
+
#Fix the installation location within the makefiles
|
14 |
+
qt_fix_makefile_install("${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/")
|
15 |
+
qt_fix_makefile_install("${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/")
|
16 |
+
|
17 |
+
#Install the module files
|
18 |
+
vcpkg_build_qmake(TARGETS install SKIP_MAKEFILES BUILD_LOGNAME install)
|
19 |
+
|
20 |
+
qt_fix_cmake(${CURRENT_PACKAGES_DIR} ${PORT})
|
21 |
+
vcpkg_fixup_pkgconfig() # Needs further investigation if this is enough!
|
22 |
+
|
23 |
+
#Replace with VCPKG variables if PR #7733 is merged
|
24 |
+
unset(BUILDTYPES)
|
25 |
+
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
26 |
+
set(_buildname "DEBUG")
|
27 |
+
list(APPEND BUILDTYPES ${_buildname})
|
28 |
+
set(_short_name_${_buildname} "dbg")
|
29 |
+
set(_path_suffix_${_buildname} "/debug")
|
30 |
+
endif()
|
31 |
+
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
32 |
+
set(_buildname "RELEASE")
|
33 |
+
list(APPEND BUILDTYPES ${_buildname})
|
34 |
+
set(_short_name_${_buildname} "rel")
|
35 |
+
set(_path_suffix_${_buildname} "")
|
36 |
+
endif()
|
37 |
+
unset(_buildname)
|
38 |
+
|
39 |
+
foreach(_buildname ${BUILDTYPES})
|
40 |
+
set(CURRENT_BUILD_PACKAGE_DIR "${CURRENT_PACKAGES_DIR}${_path_suffix_${_buildname}}")
|
41 |
+
#Fix PRL files
|
42 |
+
file(GLOB_RECURSE PRL_FILES "${CURRENT_BUILD_PACKAGE_DIR}/lib/*.prl" "${CURRENT_PACKAGES_DIR}/tools/qt5${_path_suffix_${_buildname}}/lib/*.prl"
|
43 |
+
"${CURRENT_PACKAGES_DIR}/tools/qt5${_path_suffix_${_buildname}}/mkspecs/*.pri")
|
44 |
+
qt_fix_prl("${CURRENT_BUILD_PACKAGE_DIR}" "${PRL_FILES}")
|
45 |
+
|
46 |
+
# This makes it impossible to use the build tools in any meaningful way. qt5 assumes they are all in one folder!
|
47 |
+
# So does the Qt VS Plugin which even assumes all of the in a bin folder
|
48 |
+
#Move tools to the correct directory
|
49 |
+
#if(EXISTS ${CURRENT_BUILD_PACKAGE_DIR}/tools/qt5)
|
50 |
+
# file(RENAME ${CURRENT_BUILD_PACKAGE_DIR}/tools/qt5 ${CURRENT_PACKAGES_DIR}/tools/${PORT})
|
51 |
+
#endif()
|
52 |
+
|
53 |
+
# Move executables in bin to tools
|
54 |
+
# This is ok since those are not build tools.
|
55 |
+
file(GLOB PACKAGE_EXE ${CURRENT_BUILD_PACKAGE_DIR}/bin/*.exe)
|
56 |
+
if(PACKAGE_EXE)
|
57 |
+
file(INSTALL ${PACKAGE_EXE} DESTINATION "${CURRENT_BUILD_PACKAGE_DIR}/tools/${PORT}")
|
58 |
+
file(REMOVE ${PACKAGE_EXE})
|
59 |
+
foreach(_exe ${PACKAGE_EXE})
|
60 |
+
string(REPLACE ".exe" ".pdb" _prb_file ${_exe})
|
61 |
+
if(EXISTS ${_prb_file})
|
62 |
+
file(INSTALL ${_prb_file} DESTINATION "${CURRENT_BUILD_PACKAGE_DIR}/tools/${PORT}")
|
63 |
+
file(REMOVE ${_prb_file})
|
64 |
+
endif()
|
65 |
+
endforeach()
|
66 |
+
endif()
|
67 |
+
|
68 |
+
#cleanup empty folders
|
69 |
+
file(GLOB PACKAGE_LIBS "${CURRENT_BUILD_PACKAGE_DIR}/lib/*")
|
70 |
+
if(NOT PACKAGE_LIBS)
|
71 |
+
file(REMOVE_RECURSE "${CURRENT_BUILD_PACKAGE_DIR}/lib")
|
72 |
+
endif()
|
73 |
+
|
74 |
+
file(GLOB PACKAGE_BINS "${CURRENT_BUILD_PACKAGE_DIR}/bin/*")
|
75 |
+
if(NOT PACKAGE_BINS)
|
76 |
+
file(REMOVE_RECURSE "${CURRENT_BUILD_PACKAGE_DIR}/bin")
|
77 |
+
endif()
|
78 |
+
endforeach()
|
79 |
+
if(EXISTS "${CURRENT_PACKAGES_DIR}/tools/qt5/bin")
|
80 |
+
file(COPY "${CURRENT_PACKAGES_DIR}/tools/qt5/bin" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
|
81 |
+
|
82 |
+
set(CURRENT_INSTALLED_DIR_BACKUP "${CURRENT_INSTALLED_DIR}")
|
83 |
+
set(CURRENT_INSTALLED_DIR "./../../.." ) # Making the qt.conf relative and not absolute
|
84 |
+
configure_file(${CURRENT_INSTALLED_DIR_BACKUP}/tools/qt5/qt_release.conf ${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/qt.conf) # This makes the tools at least useable for release
|
85 |
+
set(CURRENT_INSTALLED_DIR "${CURRENT_INSTALLED_DIR_BACKUP}")
|
86 |
+
|
87 |
+
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin")
|
88 |
+
if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
89 |
+
file(GLOB_RECURSE DLL_DEPS_AVAIL "${CURRENT_INSTALLED_DIR}/tools/qt5/bin/*.dll")
|
90 |
+
string(REPLACE "${CURRENT_INSTALLED_DIR}/tools/qt5/bin/" "" DLL_DEPS_AVAIL "${DLL_DEPS_AVAIL}")
|
91 |
+
file(GLOB_RECURSE DLL_DEPS_NEEDED "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/*.dll")
|
92 |
+
string(REPLACE "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/" "" DLL_DEPS_NEEDED "${DLL_DEPS_NEEDED}")
|
93 |
+
if(DLL_DEPS_AVAIL AND DLL_DEPS_NEEDED)
|
94 |
+
list(REMOVE_ITEM DLL_DEPS_NEEDED ${DLL_DEPS_AVAIL})
|
95 |
+
endif()
|
96 |
+
foreach(dll_dep ${DLL_DEPS_NEEDED})
|
97 |
+
string(REGEX REPLACE "[^/]+$" "" dll_subpath "${dll_dep}")
|
98 |
+
file(COPY "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/${dll_dep}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/qt5/bin/${dll_subpath}")
|
99 |
+
endforeach()
|
100 |
+
endif()
|
101 |
+
endif()
|
102 |
+
|
103 |
+
#This should be removed if somehow possible
|
104 |
+
if(EXISTS "${CURRENT_PACKAGES_DIR}/tools/qt5/debug/bin")
|
105 |
+
set(CURRENT_INSTALLED_DIR_BACKUP "${CURRENT_INSTALLED_DIR}")
|
106 |
+
set(CURRENT_INSTALLED_DIR "./../../../.." ) # Making the qt.conf relative and not absolute
|
107 |
+
configure_file(${CURRENT_INSTALLED_DIR_BACKUP}/tools/qt5/qt_debug.conf ${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin/qt.conf) # This makes the tools at least useable for release
|
108 |
+
set(CURRENT_INSTALLED_DIR "${CURRENT_INSTALLED_DIR_BACKUP}")
|
109 |
+
|
110 |
+
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin")
|
111 |
+
if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
112 |
+
file(GLOB_RECURSE DLL_DEPS_AVAIL "${CURRENT_INSTALLED_DIR}/tools/qt5/debug/bin/*.dll")
|
113 |
+
string(REPLACE "${CURRENT_INSTALLED_DIR}/tools/qt5/debug/bin/" "" DLL_DEPS_AVAIL "${DLL_DEPS_AVAIL}")
|
114 |
+
file(GLOB_RECURSE DLL_DEPS_NEEDED "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin/*.dll")
|
115 |
+
string(REPLACE "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/" "" DLL_DEPS_NEEDED "${DLL_DEPS_NEEDED}")
|
116 |
+
if(DLL_DEPS_AVAIL AND DLL_DEPS_NEEDED)
|
117 |
+
list(REMOVE_ITEM DLL_DEPS_NEEDED ${DLL_DEPS_AVAIL})
|
118 |
+
endif()
|
119 |
+
foreach(dll_dep ${DLL_DEPS_NEEDED})
|
120 |
+
string(REGEX REPLACE "[^/]+$" "" dll_subpath "${dll_dep}")
|
121 |
+
file(COPY "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin/${dll_dep}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/qt5/debug/bin/${dll_subpath}")
|
122 |
+
endforeach()
|
123 |
+
endif()
|
124 |
+
endif()
|
125 |
+
|
126 |
+
# Remove duplicate flags from qmodule.pri issue -> https://github.com/microsoft/vcpkg/issues/28835
|
127 |
+
file(READ "${CURRENT_INSTALLED_DIR}/tools/qt5/mkspecs/qmodule.pri" QMODULE_PRI_CONTENT)
|
128 |
+
string(REGEX REPLACE "QMAKE_CXXFLAGS_RELEASE\\+=[^\n]*\n" "QMAKE_CXXFLAGS_RELEASE=\n" QMODULE_PRI_CONTENT ${QMODULE_PRI_CONTENT})
|
129 |
+
file(WRITE "${CURRENT_INSTALLED_DIR}/tools/qt5/mkspecs/qmodule.pri" "${QMODULE_PRI_CONTENT}")
|
130 |
+
|
131 |
+
endfunction()
|
cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/cmake/qt_download_submodule.cmake
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
function(qt_get_submodule_name OUT_NAME)
|
2 |
+
string(REPLACE "5-" "" _tmp_name ${PORT})
|
3 |
+
set(${OUT_NAME} ${_tmp_name} PARENT_SCOPE)
|
4 |
+
endfunction()
|
5 |
+
|
6 |
+
function(qt_download_submodule)
|
7 |
+
cmake_parse_arguments(_csc "" "OUT_SOURCE_PATH" "PATCHES;BUILD_OPTIONS;BUILD_OPTIONS_RELEASE;BUILD_OPTIONS_DEBUG" ${ARGN})
|
8 |
+
|
9 |
+
if(NOT DEFINED _csc_OUT_SOURCE_PATH)
|
10 |
+
message(FATAL_ERROR "qt_download_module requires parameter OUT_SOURCE_PATH to be set! Please correct the portfile!")
|
11 |
+
endif()
|
12 |
+
|
13 |
+
vcpkg_buildpath_length_warning(37)
|
14 |
+
qt_get_submodule_name(NAME)
|
15 |
+
|
16 |
+
set(FULL_VERSION "${QT_MAJOR_MINOR_VER}.${QT_PATCH_VER}")
|
17 |
+
set(ARCHIVE_NAME "${NAME}-everywhere-opensource-src-${FULL_VERSION}.tar.xz")
|
18 |
+
set(URLS
|
19 |
+
"https://download.qt.io/archive/qt/${QT_MAJOR_MINOR_VER}/${FULL_VERSION}/submodules/${ARCHIVE_NAME}"
|
20 |
+
"https://mirrors.ocf.berkeley.edu/qt/archive/qt/${QT_MAJOR_MINOR_VER}/${FULL_VERSION}/submodules/${ARCHIVE_NAME}"
|
21 |
+
)
|
22 |
+
vcpkg_download_distfile(ARCHIVE_FILE
|
23 |
+
URLS ${URLS}
|
24 |
+
FILENAME ${ARCHIVE_NAME}
|
25 |
+
SHA512 ${QT_HASH_${PORT}}
|
26 |
+
)
|
27 |
+
|
28 |
+
if(QT_UPDATE_VERSION)
|
29 |
+
file(SHA512 "${ARCHIVE_FILE}" ARCHIVE_HASH)
|
30 |
+
message(STATUS "${PORT} new hash is ${ARCHIVE_HASH}")
|
31 |
+
file(APPEND "${VCPKG_ROOT_DIR}/ports/qt5-base/cmake/qt_new_hashes.cmake" "set(QT_HASH_${PORT} ${ARCHIVE_HASH})\n")
|
32 |
+
else()
|
33 |
+
vcpkg_extract_source_archive_ex(
|
34 |
+
OUT_SOURCE_PATH SOURCE_PATH
|
35 |
+
ARCHIVE "${ARCHIVE_FILE}"
|
36 |
+
REF ${FULL_VERSION}
|
37 |
+
PATCHES ${_csc_PATCHES}
|
38 |
+
)
|
39 |
+
endif()
|
40 |
+
|
41 |
+
set(${_csc_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE)
|
42 |
+
endfunction()
|
cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/cmake/qt_fix_cmake.cmake
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
function(qt_fix_cmake PACKAGE_DIR_TO_FIX PORT_TO_FIX)
|
2 |
+
|
3 |
+
file(GLOB_RECURSE cmakefiles ${PACKAGE_DIR_TO_FIX}/share/cmake/*.cmake ${PACKAGE_DIR_TO_FIX}/lib/cmake/*.cmake)
|
4 |
+
foreach(cmakefile ${cmakefiles})
|
5 |
+
file(READ "${cmakefile}" _contents)
|
6 |
+
if(_contents MATCHES "_install_prefix}/tools/qt5/bin/([a-z0-9]+)") # there are only about 3 to 5 cmake files which require the fix in ports: qt5-tools qt5-xmlpattern at5-activeqt qt5-quick
|
7 |
+
string(REGEX REPLACE "_install_prefix}/tools/qt5/bin/([a-z0-9]+)" "_install_prefix}/tools/${PORT_TO_FIX}/bin/\\1" _contents "${_contents}")
|
8 |
+
file(WRITE "${cmakefile}" "${_contents}")
|
9 |
+
endif()
|
10 |
+
endforeach()
|
11 |
+
|
12 |
+
#Install cmake files
|
13 |
+
if(EXISTS ${PACKAGE_DIR_TO_FIX}/lib/cmake)
|
14 |
+
file(MAKE_DIRECTORY ${PACKAGE_DIR_TO_FIX}/share)
|
15 |
+
file(RENAME ${PACKAGE_DIR_TO_FIX}/lib/cmake ${PACKAGE_DIR_TO_FIX}/share/cmake)
|
16 |
+
endif()
|
17 |
+
#Remove extra cmake files
|
18 |
+
if(EXISTS ${PACKAGE_DIR_TO_FIX}/debug/lib/cmake)
|
19 |
+
file(REMOVE_RECURSE ${PACKAGE_DIR_TO_FIX}/debug/lib/cmake)
|
20 |
+
endif()
|
21 |
+
endfunction()
|
cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/cmake/qt_fix_makefile_install.cmake
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#Could probably be a vcpkg_fix_makefile_install for other ports?
|
2 |
+
function(qt_fix_makefile_install BUILD_DIR)
|
3 |
+
#Fix the installation location
|
4 |
+
set(MSYS_HACK "")
|
5 |
+
if(VCPKG_HOST_IS_WINDOWS)
|
6 |
+
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" NATIVE_INSTALLED_DIR)
|
7 |
+
file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" NATIVE_PACKAGES_DIR)
|
8 |
+
if(VCPKG_TARGET_IS_MINGW)
|
9 |
+
set(MSYS_HACK ":@msyshack@%=%")
|
10 |
+
file(STRINGS "${BUILD_DIR}/Makefile" using_sh REGEX "= rm -f")
|
11 |
+
if(using_sh)
|
12 |
+
set(NATIVE_INSTALLED_DIR "${CURRENT_INSTALLED_DIR}")
|
13 |
+
set(NATIVE_PACKAGES_DIR "${CURRENT_PACKAGES_DIR}")
|
14 |
+
endif()
|
15 |
+
endif()
|
16 |
+
string(SUBSTRING "${NATIVE_INSTALLED_DIR}" 0 2 INSTALLED_DRIVE)
|
17 |
+
string(SUBSTRING "${NATIVE_PACKAGES_DIR}" 0 2 PACKAGES_DRIVE)
|
18 |
+
string(SUBSTRING "${NATIVE_INSTALLED_DIR}" 2 -1 INSTALLED_DIR_WITHOUT_DRIVE)
|
19 |
+
string(SUBSTRING "${NATIVE_PACKAGES_DIR}" 2 -1 PACKAGES_DIR_WITHOUT_DRIVE)
|
20 |
+
else()
|
21 |
+
set(INSTALLED_DRIVE "")
|
22 |
+
set(PACKAGES_DRIVE "")
|
23 |
+
set(INSTALLED_DIR_WITHOUT_DRIVE "${CURRENT_INSTALLED_DIR}")
|
24 |
+
set(PACKAGES_DIR_WITHOUT_DRIVE "${CURRENT_PACKAGES_DIR}")
|
25 |
+
endif()
|
26 |
+
set(installed "${INSTALLED_DRIVE}$(INSTALL_ROOT${MSYS_HACK})${INSTALLED_DIR_WITHOUT_DRIVE}")
|
27 |
+
set(packages "${PACKAGES_DRIVE}$(INSTALL_ROOT${MSYS_HACK})${PACKAGES_DIR_WITHOUT_DRIVE}")
|
28 |
+
|
29 |
+
file(GLOB_RECURSE MAKEFILES "${BUILD_DIR}/*Makefile*")
|
30 |
+
foreach(MAKEFILE ${MAKEFILES})
|
31 |
+
vcpkg_replace_string("${MAKEFILE}" "${installed}" "${packages}")
|
32 |
+
endforeach()
|
33 |
+
endfunction()
|
cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/cmake/qt_fix_prl.cmake
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
function(qt_fix_prl PACKAGE_DIR PRL_FILES)
|
2 |
+
file(TO_CMAKE_PATH "${PACKAGE_DIR}/lib" CMAKE_LIB_PATH)
|
3 |
+
file(TO_CMAKE_PATH "${PACKAGE_DIR}/include/qt5" CMAKE_INCLUDE_PATH)
|
4 |
+
file(TO_CMAKE_PATH "${PACKAGE_DIR}/include" CMAKE_INCLUDE_PATH2)
|
5 |
+
file(TO_CMAKE_PATH "${CURRENT_INSTALLED_DIR}" CMAKE_INSTALLED_PREFIX)
|
6 |
+
foreach(PRL_FILE IN LISTS PRL_FILES)
|
7 |
+
file(READ "${PRL_FILE}" _contents)
|
8 |
+
string(REPLACE "${CMAKE_LIB_PATH}" "\$\$[QT_INSTALL_LIBS]" _contents "${_contents}")
|
9 |
+
string(REPLACE "${CMAKE_INCLUDE_PATH}" "\$\$[QT_INSTALL_HEADERS]" _contents "${_contents}")
|
10 |
+
string(REPLACE "${CMAKE_INCLUDE_PATH2}" "\$\$[QT_INSTALL_HEADERS]/../" _contents "${_contents}")
|
11 |
+
string(REPLACE "${CMAKE_INSTALLED_PREFIX}" "\$\$[QT_INSTALL_PREFIX]" _contents "${_contents}")
|
12 |
+
#Note: This only works without an extra if case since QT_INSTALL_PREFIX is the same for debug and release
|
13 |
+
file(WRITE "${PRL_FILE}" "${_contents}")
|
14 |
+
endforeach()
|
15 |
+
endfunction()
|
cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/cmake/qt_install_copyright.cmake
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#Could probably be the beginning of a vcpkg_install_copyright?
|
2 |
+
function(qt_install_copyright SOURCE_PATH)
|
3 |
+
#Find the relevant license file and install it
|
4 |
+
if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3")
|
5 |
+
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3")
|
6 |
+
elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3")
|
7 |
+
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3")
|
8 |
+
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3")
|
9 |
+
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3")
|
10 |
+
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3")
|
11 |
+
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3")
|
12 |
+
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3-EXCEPT")
|
13 |
+
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3-EXCEPT")
|
14 |
+
elseif(EXISTS "${SOURCE_PATH}/LICENSE.FDL")
|
15 |
+
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.FDL")
|
16 |
+
endif()
|
17 |
+
file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
18 |
+
endfunction()
|
cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/cmake/qt_port_functions.cmake
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
|
2 |
+
|
3 |
+
#Basic setup
|
4 |
+
include(qt_port_hashes)
|
5 |
+
#Fixup scripts
|
6 |
+
include(qt_fix_makefile_install)
|
7 |
+
include(qt_fix_cmake)
|
8 |
+
include(qt_fix_prl)
|
9 |
+
#Helper functions
|
10 |
+
include(qt_download_submodule)
|
11 |
+
include(qt_build_submodule)
|
12 |
+
include(qt_install_copyright)
|
13 |
+
|
14 |
+
include(qt_submodule_installation)
|
cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/cmake/qt_port_hashes.cmake
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Every update requires an update of these hashes and the version within the control file of each of the 32 ports.
|
2 |
+
# So it is probably better to have a central location for these hashes and let the ports update via a script
|
3 |
+
set(QT_MAJOR_MINOR_VER 5.15)
|
4 |
+
set(QT_PATCH_VER 13)
|
5 |
+
set(QT_UPDATE_VERSION 0) # Switch to update qt and not build qt. Creates a file cmake/qt_new_hashes.cmake in qt5-base with the new hashes.
|
6 |
+
|
7 |
+
set(QT_PORT_LIST base 3d activeqt charts connectivity datavis3d declarative gamepad graphicaleffects imageformats location macextras mqtt multimedia networkauth
|
8 |
+
purchasing quickcontrols quickcontrols2 remoteobjects script scxml sensors serialport speech svg tools virtualkeyboard webchannel websockets
|
9 |
+
webview winextras xmlpatterns doc x11extras androidextras translations serialbus webengine webglplugin wayland)
|
10 |
+
|
11 |
+
set(QT_HASH_qt5-3d 30bb061b13f91a8137e961948431b0ca697135a62c8f601eb0c65dc46f0a1f3e7d850141952f0b673a80002e8493289860d9b86840406e3e72fab4eb515688ad)
|
12 |
+
set(QT_HASH_qt5-activeqt 09aaf289be9136762934358083819ff0f6ceccd2e56699184ea4787cc51d0173b2581f316c9181d21a05bc6d80992867b40677998d436e370666bcd090ce7a8b)
|
13 |
+
set(QT_HASH_qt5-androidextras f5eae2dfd9ff92096b7b636ec3f23825d54303e2ebfd3f597ee9e7c5ecea3883cd8a11e81cba6d9a3e0d6884e60ff00551a51fc2c735d0ad5ca227de56850ff6)
|
14 |
+
set(QT_HASH_qt5-base 565632646b04eed525530a50f1228dd1aa3b8f1318485fa7cf6ad96eabdc2208ed1522b3fc174bd4797b7d51edff18ea1f91a82dd701379407b880f1dd0d16ef)
|
15 |
+
set(QT_HASH_qt5-charts a4ebdb7577683a68c960fee649ffac543528791daa88fd412ab5fdda3765719921cd4daebc49395c4108a3da2bafdbf8e08008fcced4c18b4d1a3acedb377796)
|
16 |
+
set(QT_HASH_qt5-connectivity 631947135a362b5a417b84702b3755588e5c7fe1c9cca5b523c8d8ca340b42f929aaf58c49d8282ec46b85b58afe8f0f2600024875fb9a7bd1145566ca328966)
|
17 |
+
set(QT_HASH_qt5-datavis3d ced9c6083ade43f43db2a86b20188a75a7028b7f89613a0d94ea48ec795b234af669caa45227cbbc7c2c3187b017fb5521c2d7c16834277d9dba1671afb00076)
|
18 |
+
set(QT_HASH_qt5-declarative fd16159217f7526f6e56d1849ffb2d219e0bee48581e4a1d3bdec1602f884038f3747da68b8905a6858e6e8e03e18b9da4d598a154d4d0a11a62b818940d3113)
|
19 |
+
set(QT_HASH_qt5-doc a9acd8ee19f1fe7f2f30865449b37c8c67a1cc7029fdbcc2d267932d1c73f4b0c478a9023fe724aed8269b22b63dce824624e9cbc5fd6b5f08a719a6007ff076)
|
20 |
+
set(QT_HASH_qt5-gamepad 03f403c0f966c95b0c64286c047c54bc09e49ad7029de8476d792cc240d0d8b78a426f98e6358376cfc2abcaefb2500ff2182414bd8c2244541b065220780f63)
|
21 |
+
set(QT_HASH_qt5-graphicaleffects ee2f4e24ced70c1531ceb310c90d6c0bb5300f527a247f07599467f355fb89a426cce6bacb25b77b6ec62f4e358d2345093343ad442acd182dcaca77e031a0bf)
|
22 |
+
set(QT_HASH_qt5-imageformats 48b0dac1acfdae1b090bc5d0054610f61290135363400a629ce3650cddd4c11f7bd95edd5bd1d36d758006a5fd54ded29f540a6e8dc675ca2e85d4ae169add50)
|
23 |
+
set(QT_HASH_qt5-location 37ccec9d9ce4ab59c0e4a2827c94d2e7247786fa53dc340539160631aaa9e5de02fbff1a5fadc5d96c64b2d9a81a5912a562beb6e4d0ec09186f8508626ade36)
|
24 |
+
set(QT_HASH_qt5-macextras 62603dee7741845ad4ecdfd8dd81042031851bebe3f13281bc9fb18c56cfd546abeba200f57e1ca0364d8271bd76a8e2180e2403270fec914ee04be7dfb4248d)
|
25 |
+
set(QT_HASH_qt5-mqtt 09476ce6922a89f513f588a15c4b664f637b2d6fa17545d2a6d8d176b6f32bf41263200f52e9755f5d4d349ac2662ead4efb2a8375a19005947228a6e64c8222)
|
26 |
+
set(QT_HASH_qt5-multimedia fa70146275d03c1bb8da1930eb66a9bbbf2a6c25cb6e6204a58b8338f58e671634eab878e9bac785ae2394de7dc38d30025a4afe4d26060e2f23a44758b2e5a4)
|
27 |
+
set(QT_HASH_qt5-networkauth 939ee9759fa0584aab060f420bdd98a44c49d93291dabff74bd90536a4cbd666899d3c1e19b438c1c3333d7d3f374a7a3b0beb8728b69ef19b915d2496f3fba8)
|
28 |
+
set(QT_HASH_qt5-purchasing 0b6b81e0ba458a7dd51cd373f1c74e63a6577dbf28c0c660d47b43a00c53d4bb6e14592d2a9210d8b843abddf92f8012d188bfd374ec086776c19df82df5308d)
|
29 |
+
set(QT_HASH_qt5-quickcontrols 9d84b2a0b0c752df7dd735a29b04a2e6351e016bb693ace49d05b51754784f7da3e335e8da1070b2e31391a4dc35a55adb36286bb5ec4e29e608801fcd8d2bcc)
|
30 |
+
set(QT_HASH_qt5-quickcontrols2 0aae8d2f208a47c38f8604879a55e019b7b34a1f1202fa9b447a30753d540de9cdc3c7a8658c36a5d4c01596d2c8c65ba279d7c67e70c48a6ebdb5ad443ca8b0)
|
31 |
+
set(QT_HASH_qt5-remoteobjects 5bdcb7560f4b08e81b0646790c145598524e4e75888b96ffad2f19c51896fbbcc56d50ad24ae4072a87b63a494250dc30aca782bd093f4f49e649d670e557117)
|
32 |
+
set(QT_HASH_qt5-script 38060e3cece2819befa67e078eee6a4bcf9c0135015724af4786eb3190cb1bf6895dc5b8a919da83b6d0576d1aa109ab4050c997409c7f5eed52385ef325e2de)
|
33 |
+
set(QT_HASH_qt5-scxml ba7c40b08951521e8d56372456c6e613a49cd2bc42d8def7b477e0334100dd741fb20a6ef9d860dba9be44547998eee6bea30de0f16f43b3152e51132bcb2d90)
|
34 |
+
set(QT_HASH_qt5-sensors d6bd4fe02625272786f8c0f384ecce7497eebc3d691deaf9a42b9b221e4905715c7adb4e56fc04487b39f950b34f2239e8902e6e7880bf793461e808d6c9d245)
|
35 |
+
set(QT_HASH_qt5-serialbus 12e5580249f0d241b0536be8c4ab5a01eed722c9cbaaa4c052ecacb8e105c0d31f4e83e87fcf7f30711e48b0a6d0ee413bd837ea2bb7fbc41bddb7e6ab18ea22)
|
36 |
+
set(QT_HASH_qt5-serialport 5eab045b704f101f046880e57ff5f3c0f901867d092892939c0c20e54624f30b676802ec9535f3be39e9687497e28bfb71b560635b0cb38e241a225d377e74ee)
|
37 |
+
set(QT_HASH_qt5-speech 43b97ddc333d1c4a9715b1c306ced0506eb8faf69f1d22500b74e509d33b5a5cb9d0c166b9211a32a78eaba57925195d8ba0c39c8ae6a15551f841426294c75f)
|
38 |
+
set(QT_HASH_qt5-svg 17d13fdeec439c02e7b7e478527376da2d4efd65e019fb18822d3d7883cbf129eea2661c19e931e59280c3bda7233fa6cfd84c4d76365abc63814a80e99f2a65)
|
39 |
+
set(QT_HASH_qt5-tools a73abba58c76a69e2208c4228bf115f2ef6173db8fa00df9302eb4c8f04ff04b64690367c31a680dba3b0b8865ef27343e8d7343f7f81954c39458c443fd3500)
|
40 |
+
set(QT_HASH_qt5-translations 5404c98ba6303986da0ffc5f715cf7024b724183e6f30b15bc9825cac2d1715239a4479093cb46239cceaa0a7468dd05e190cd0a6911b22f3628ff57ff3d8c57)
|
41 |
+
set(QT_HASH_qt5-virtualkeyboard abe58c132c8bd23d29de1937e2f1fb6571aec829ce74f4904d322c4046d8c70b4b9b508930e4c681a8e30ff1d8a63c627cc3bec1560e83dada426c09d827ae29)
|
42 |
+
set(QT_HASH_qt5-wayland 1f5b5e911ad9026d08260e5ce15aad5c9167726ce42db85634392f1e49d545ca5bcd4e44304f1ff633ffe110712a2b5dad87de6cd89eb3b7e6c657fe260e388d)
|
43 |
+
set(QT_HASH_qt5-webchannel f0c698aded46ae1f2932a79bdf9d5601466b7e88f6af96fe48d346144fd2e5bbaa81c7c6a82ed78fe8a0314218827704648741b0b47c0efefc31eb447643ad23)
|
44 |
+
set(QT_HASH_qt5-webengine 0c9aa844148e908c2eb5af93b51d2809f183f775d5760b4654f8f34ac825fd8b9d81a9b70cb9d79d16502bdce7bd6d77484c5b04797d99726f6ff5e9e40af03f)
|
45 |
+
set(QT_HASH_qt5-webglplugin 14de04d356fb1d3475f5630ecd020b1d5c1127e1bd1032a668b6e0bb6073b04225494cf8a45c62c6b02d95f64fa81d4c0598f7e3e6a39787eeb23096da351e5a)
|
46 |
+
set(QT_HASH_qt5-websockets 578ccdb69602f978b9a10c08045f3a6fd0fe2247c07703617c1a717dc8910b383bff4c1f6a8195643f0552cb707ece5eca4c7e7f4d90356c26a409a849200489)
|
47 |
+
set(QT_HASH_qt5-webview 886c46dfb2e66ceeeb423220b48e47bdc8968faf5b9553f9e206ddb84d201341c6ad49308740835de3f27960ef04276477df5a55faf9e3c4c68180ae96acbc6a)
|
48 |
+
set(QT_HASH_qt5-winextras c0c7193f0f4c3011ff44eb98fbb66780d64037e0b8cd46554b57849e1a5e926b666263ab64bd3a1d8ff116b364425b077fae4c4d839c80d89bdf214f78fe8c65)
|
49 |
+
set(QT_HASH_qt5-x11extras 8fcaab6a1ba13798bb86c236102b2af932e46de25de3bddc11baff5175db65ab0bea123d5c8477fea36fe1075481c335dbf554165c22e43a3409706b5f330695)
|
50 |
+
set(QT_HASH_qt5-xmlpatterns 01a7e41c0fb8c97b72a503c5a8276f2a9744aac624be79c50d366a5229f91920d0827c36ee9e434c78ded4b1624c8491da08af36ccd9dedd59d0d0785a5bb776)
|
51 |
+
|
52 |
+
if(QT_UPDATE_VERSION)
|
53 |
+
message(STATUS "Running Qt in automatic version port update mode!")
|
54 |
+
set(_VCPKG_INTERNAL_NO_HASH_CHECK 1)
|
55 |
+
if("${PORT}" MATCHES "qt5-base")
|
56 |
+
function(update_qt_version_in_manifest _port_name)
|
57 |
+
set(_current_control "${VCPKG_ROOT_DIR}/ports/${_port_name}/vcpkg.json")
|
58 |
+
file(READ ${_current_control} _control_contents)
|
59 |
+
#message(STATUS "Before: \n${_control_contents}")
|
60 |
+
string(REGEX REPLACE "\"version.*\": \"[0-9]+\.[0-9]+\.[0-9]+\",\n" "\"version\": \"${QT_MAJOR_MINOR_VER}.${QT_PATCH_VER}\",\n" _control_contents "${_control_contents}")
|
61 |
+
string(REGEX REPLACE "\n \"port-version\": [0-9]+," "" _control_contents "${_control_contents}")
|
62 |
+
#message(STATUS "After: \n${_control_contents}")
|
63 |
+
file(WRITE ${_current_control} "${_control_contents}")
|
64 |
+
configure_file("${_current_control}" "${_current_control}" @ONLY NEWLINE_STYLE LF)
|
65 |
+
endfunction()
|
66 |
+
|
67 |
+
update_qt_version_in_manifest("qt5")
|
68 |
+
foreach(_current_qt_port_basename ${QT_PORT_LIST})
|
69 |
+
update_qt_version_in_manifest("qt5-${_current_qt_port_basename}")
|
70 |
+
endforeach()
|
71 |
+
endif()
|
72 |
+
endif()
|
cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/cmake/qt_submodule_installation.cmake
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
|
3 |
+
function(qt_submodule_installation)
|
4 |
+
cmake_parse_arguments(_csc "" "OUT_SOURCE_PATH" "" ${ARGN})
|
5 |
+
qt_download_submodule(OUT_SOURCE_PATH TARGET_SOURCE_PATH ${_csc_UNPARSED_ARGUMENTS})
|
6 |
+
if(QT_UPDATE_VERSION)
|
7 |
+
SET(VCPKG_POLICY_EMPTY_PACKAGE enabled PARENT_SCOPE)
|
8 |
+
else()
|
9 |
+
qt_build_submodule(${TARGET_SOURCE_PATH} ${_csc_UNPARSED_ARGUMENTS})
|
10 |
+
qt_install_copyright(${TARGET_SOURCE_PATH})
|
11 |
+
endif()
|
12 |
+
if(DEFINED _csc_OUT_SOURCE_PATH)
|
13 |
+
set(${_csc_OUT_SOURCE_PATH} ${TARGET_SOURCE_PATH} PARENT_SCOPE)
|
14 |
+
endif()
|
15 |
+
endfunction()
|
cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/0001-CVE-2023-51714-qtbase-5.15.diff
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
From ea63c28efc1d2ecb467b83a34923d12462efa96f Mon Sep 17 00:00:00 2001
|
2 |
+
From: Marc Mutz <[email protected]>
|
3 |
+
Date: Tue, 12 Dec 2023 20:51:56 +0100
|
4 |
+
Subject: [PATCH] HPack: fix a Yoda Condition
|
5 |
+
|
6 |
+
Putting the variable on the LHS of a relational operation makes the
|
7 |
+
expression easier to read. In this case, we find that the whole
|
8 |
+
expression is nonsensical as an overflow protection, because if
|
9 |
+
name.size() + value.size() overflows, the result will exactly _not_
|
10 |
+
be > max() - 32, because UB will have happened.
|
11 |
+
|
12 |
+
To be fixed in a follow-up commit.
|
13 |
+
|
14 |
+
As a drive-by, add parentheses around the RHS.
|
15 |
+
|
16 |
+
Change-Id: I35ce598884c37c51b74756b3bd2734b9aad63c09
|
17 |
+
Reviewed-by: Allan Sandfeld Jensen <[email protected]>
|
18 |
+
(cherry picked from commit 658607a34ead214fbacbc2cca44915655c318ea9)
|
19 |
+
Reviewed-by: Qt Cherry-pick Bot <[email protected]>
|
20 |
+
(cherry picked from commit 4f7efd41740107f90960116700e3134f5e433867)
|
21 |
+
(cherry picked from commit 13c16b756900fe524f6d9534e8a07aa003c05e0c)
|
22 |
+
(cherry picked from commit 1d4788a39668fb2dc5912a8d9c4272dc40e99f92)
|
23 |
+
(cherry picked from commit 87de75b5cc946d196decaa6aef4792a6cac0b6db)
|
24 |
+
---
|
25 |
+
|
26 |
+
diff --git a/src/network/access/http2/hpacktable.cpp b/src/network/access/http2/hpacktable.cpp
|
27 |
+
index 834214f..ab166a6 100644
|
28 |
+
--- a/src/network/access/http2/hpacktable.cpp
|
29 |
+
+++ b/src/network/access/http2/hpacktable.cpp
|
30 |
+
@@ -63,7 +63,7 @@
|
31 |
+
// 32 octets of overhead."
|
32 |
+
|
33 |
+
const unsigned sum = unsigned(name.size() + value.size());
|
34 |
+
- if (std::numeric_limits<unsigned>::max() - 32 < sum)
|
35 |
+
+ if (sum > (std::numeric_limits<unsigned>::max() - 32))
|
36 |
+
return HeaderSize();
|
37 |
+
return HeaderSize(true, quint32(sum + 32));
|
38 |
+
}
|
cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/0002-CVE-2023-51714-qtbase-5.15.diff
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
From 23c3fc483e8b6e21012a61f0bea884446f727776 Mon Sep 17 00:00:00 2001
|
2 |
+
From: Marc Mutz <[email protected]>
|
3 |
+
Date: Tue, 12 Dec 2023 22:08:07 +0100
|
4 |
+
Subject: [PATCH] HPack: fix incorrect integer overflow check
|
5 |
+
|
6 |
+
This code never worked:
|
7 |
+
|
8 |
+
For the comparison with max() - 32 to trigger, on 32-bit platforms (or
|
9 |
+
Qt 5) signed interger overflow would have had to happen in the
|
10 |
+
addition of the two sizes. The compiler can therefore remove the
|
11 |
+
overflow check as dead code.
|
12 |
+
|
13 |
+
On Qt 6 and 64-bit platforms, the signed integer addition would be
|
14 |
+
very unlikely to overflow, but the following truncation to uint32
|
15 |
+
would yield the correct result only in a narrow 32-value window just
|
16 |
+
below UINT_MAX, if even that.
|
17 |
+
|
18 |
+
Fix by using the proper tool, qAddOverflow.
|
19 |
+
|
20 |
+
Manual conflict resolutions:
|
21 |
+
- qAddOverflow doesn't exist in Qt 5, use private add_overflow
|
22 |
+
predecessor API instead
|
23 |
+
|
24 |
+
Change-Id: I7599f2e75ff7f488077b0c60b81022591005661c
|
25 |
+
Reviewed-by: Allan Sandfeld Jensen <[email protected]>
|
26 |
+
(cherry picked from commit ee5da1f2eaf8932aeca02ffea6e4c618585e29e3)
|
27 |
+
Reviewed-by: Qt Cherry-pick Bot <[email protected]>
|
28 |
+
(cherry picked from commit debeb8878da2dc706ead04b6072ecbe7e5313860)
|
29 |
+
Reviewed-by: Thiago Macieira <[email protected]>
|
30 |
+
Reviewed-by: Marc Mutz <[email protected]>
|
31 |
+
(cherry picked from commit 811b9eef6d08d929af8708adbf2a5effb0eb62d7)
|
32 |
+
(cherry picked from commit f931facd077ce945f1e42eaa3bead208822d3e00)
|
33 |
+
(cherry picked from commit 9ef4ca5ecfed771dab890856130e93ef5ceabef5)
|
34 |
+
Reviewed-by: Mårten Nordheim <[email protected]>
|
35 |
+
---
|
36 |
+
|
37 |
+
diff --git a/src/network/access/http2/hpacktable.cpp b/src/network/access/http2/hpacktable.cpp
|
38 |
+
index ab166a6..de91fc0 100644
|
39 |
+
--- a/src/network/access/http2/hpacktable.cpp
|
40 |
+
+++ b/src/network/access/http2/hpacktable.cpp
|
41 |
+
@@ -40,6 +40,7 @@
|
42 |
+
#include "hpacktable_p.h"
|
43 |
+
|
44 |
+
#include <QtCore/qdebug.h>
|
45 |
+
+#include <QtCore/private/qnumeric_p.h>
|
46 |
+
|
47 |
+
#include <algorithm>
|
48 |
+
#include <cstddef>
|
49 |
+
@@ -62,7 +63,9 @@
|
50 |
+
// for counting the number of references to the name and value would have
|
51 |
+
// 32 octets of overhead."
|
52 |
+
|
53 |
+
- const unsigned sum = unsigned(name.size() + value.size());
|
54 |
+
+ size_t sum;
|
55 |
+
+ if (add_overflow(size_t(name.size()), size_t(value.size()), &sum))
|
56 |
+
+ return HeaderSize();
|
57 |
+
if (sum > (std::numeric_limits<unsigned>::max() - 32))
|
58 |
+
return HeaderSize();
|
59 |
+
return HeaderSize(true, quint32(sum + 32));
|
cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/CVE-2023-32762-qtbase-5.15.diff
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
--- a/src/network/access/qhsts.cpp
|
2 |
+
+++ b/src/network/access/qhsts.cpp
|
3 |
+
@@ -364,8 +364,8 @@ quoted-pair = "\" CHAR
|
4 |
+
bool QHstsHeaderParser::parse(const QList<QPair<QByteArray, QByteArray>> &headers)
|
5 |
+
{
|
6 |
+
for (const auto &h : headers) {
|
7 |
+
- // We use '==' since header name was already 'trimmed' for us:
|
8 |
+
- if (h.first == "Strict-Transport-Security") {
|
9 |
+
+ // We compare directly because header name was already 'trimmed' for us:
|
10 |
+
+ if (h.first.compare("Strict-Transport-Security", Qt::CaseInsensitive) == 0) {
|
11 |
+
header = h.second;
|
12 |
+
// RFC6797, 8.1:
|
13 |
+
//
|
cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/CVE-2023-32763-qtbase-5.15.diff
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
--- a/src/gui/painting/qfixed_p.h
|
2 |
+
+++ b/src/gui/painting/qfixed_p.h
|
3 |
+
@@ -54,6 +54,7 @@
|
4 |
+
#include <QtGui/private/qtguiglobal_p.h>
|
5 |
+
#include "QtCore/qdebug.h"
|
6 |
+
#include "QtCore/qpoint.h"
|
7 |
+
+#include <QtCore/private/qnumeric_p.h>
|
8 |
+
#include "QtCore/qsize.h"
|
9 |
+
|
10 |
+
QT_BEGIN_NAMESPACE
|
11 |
+
@@ -182,6 +183,14 @@ Q_DECL_CONSTEXPR inline bool operator<(int i, const QFixed &f) { return i * 64 <
|
12 |
+
Q_DECL_CONSTEXPR inline bool operator>(const QFixed &f, int i) { return f.value() > i * 64; }
|
13 |
+
Q_DECL_CONSTEXPR inline bool operator>(int i, const QFixed &f) { return i * 64 > f.value(); }
|
14 |
+
|
15 |
+
+inline bool qAddOverflow(QFixed v1, QFixed v2, QFixed *r)
|
16 |
+
+{
|
17 |
+
+ int val;
|
18 |
+
+ bool result = add_overflow(v1.value(), v2.value(), &val);
|
19 |
+
+ r->setValue(val);
|
20 |
+
+ return result;
|
21 |
+
+}
|
22 |
+
+
|
23 |
+
#ifndef QT_NO_DEBUG_STREAM
|
24 |
+
inline QDebug &operator<<(QDebug &dbg, const QFixed &f)
|
25 |
+
{ return dbg << f.toReal(); }
|
26 |
+
--- a/src/gui/text/qtextlayout.cpp
|
27 |
+
+++ b/src/gui/text/qtextlayout.cpp
|
28 |
+
@@ -2163,11 +2163,14 @@ found:
|
29 |
+
eng->maxWidth = qMax(eng->maxWidth, line.textWidth);
|
30 |
+
} else {
|
31 |
+
eng->minWidth = qMax(eng->minWidth, lbh.minw);
|
32 |
+
- eng->maxWidth += line.textWidth;
|
33 |
+
+ if (qAddOverflow(eng->maxWidth, line.textWidth, &eng->maxWidth))
|
34 |
+
+ eng->maxWidth = QFIXED_MAX;
|
35 |
+
}
|
36 |
+
|
37 |
+
- if (line.textWidth > 0 && item < eng->layoutData->items.size())
|
38 |
+
- eng->maxWidth += lbh.spaceData.textWidth;
|
39 |
+
+ if (line.textWidth > 0 && item < eng->layoutData->items.size()) {
|
40 |
+
+ if (qAddOverflow(eng->maxWidth, lbh.spaceData.textWidth, &eng->maxWidth))
|
41 |
+
+ eng->maxWidth = QFIXED_MAX;
|
42 |
+
+ }
|
43 |
+
|
44 |
+
line.textWidth += trailingSpace;
|
45 |
+
if (lbh.spaceData.length) {
|
cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/CVE-2023-33285-qtbase-5.15.diff
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
--- a/src/network/kernel/qdnslookup_unix.cpp
|
2 |
+
+++ b/src/network/kernel/qdnslookup_unix.cpp
|
3 |
+
@@ -227,7 +227,6 @@ void QDnsLookupRunnable::query(const int requestType, const QByteArray &requestN
|
4 |
+
// responseLength in case of error, we still can extract the
|
5 |
+
// exact error code from the response.
|
6 |
+
HEADER *header = (HEADER*)response;
|
7 |
+
- const int answerCount = ntohs(header->ancount);
|
8 |
+
switch (header->rcode) {
|
9 |
+
case NOERROR:
|
10 |
+
break;
|
11 |
+
@@ -260,18 +259,31 @@ void QDnsLookupRunnable::query(const int requestType, const QByteArray &requestN
|
12 |
+
return;
|
13 |
+
}
|
14 |
+
|
15 |
+
- // Skip the query host, type (2 bytes) and class (2 bytes).
|
16 |
+
char host[PACKETSZ], answer[PACKETSZ];
|
17 |
+
unsigned char *p = response + sizeof(HEADER);
|
18 |
+
- int status = local_dn_expand(response, response + responseLength, p, host, sizeof(host));
|
19 |
+
- if (status < 0) {
|
20 |
+
+ int status;
|
21 |
+
+
|
22 |
+
+ if (ntohs(header->qdcount) == 1) {
|
23 |
+
+ // Skip the query host, type (2 bytes) and class (2 bytes).
|
24 |
+
+ status = local_dn_expand(response, response + responseLength, p, host, sizeof(host));
|
25 |
+
+ if (status < 0) {
|
26 |
+
+ reply->error = QDnsLookup::InvalidReplyError;
|
27 |
+
+ reply->errorString = tr("Could not expand domain name");
|
28 |
+
+ return;
|
29 |
+
+ }
|
30 |
+
+ if ((p - response) + status + 4 >= responseLength)
|
31 |
+
+ header->qdcount = 0xffff; // invalid reply below
|
32 |
+
+ else
|
33 |
+
+ p += status + 4;
|
34 |
+
+ }
|
35 |
+
+ if (ntohs(header->qdcount) > 1) {
|
36 |
+
reply->error = QDnsLookup::InvalidReplyError;
|
37 |
+
- reply->errorString = tr("Could not expand domain name");
|
38 |
+
+ reply->errorString = tr("Invalid reply received");
|
39 |
+
return;
|
40 |
+
}
|
41 |
+
- p += status + 4;
|
42 |
+
|
43 |
+
// Extract results.
|
44 |
+
+ const int answerCount = ntohs(header->ancount);
|
45 |
+
int answerIndex = 0;
|
46 |
+
while ((p < response + responseLength) && (answerIndex < answerCount)) {
|
47 |
+
status = local_dn_expand(response, response + responseLength, p, host, sizeof(host));
|
48 |
+
@@ -283,6 +295,11 @@ void QDnsLookupRunnable::query(const int requestType, const QByteArray &requestN
|
49 |
+
const QString name = QUrl::fromAce(host);
|
50 |
+
|
51 |
+
p += status;
|
52 |
+
+
|
53 |
+
+ if ((p - response) + 10 > responseLength) {
|
54 |
+
+ // probably just a truncated reply, return what we have
|
55 |
+
+ return;
|
56 |
+
+ }
|
57 |
+
const quint16 type = (p[0] << 8) | p[1];
|
58 |
+
p += 2; // RR type
|
59 |
+
p += 2; // RR class
|
60 |
+
@@ -290,6 +307,8 @@ void QDnsLookupRunnable::query(const int requestType, const QByteArray &requestN
|
61 |
+
p += 4;
|
62 |
+
const quint16 size = (p[0] << 8) | p[1];
|
63 |
+
p += 2;
|
64 |
+
+ if ((p - response) + size > responseLength)
|
65 |
+
+ return; // truncated
|
66 |
+
|
67 |
+
if (type == QDnsLookup::A) {
|
68 |
+
if (size != 4) {
|
cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/CVE-2023-34410-qtbase-5.15.diff
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
--- a/src/network/ssl/qsslsocket_schannel.cpp
|
2 |
+
+++ b/src/network/ssl/qsslsocket_schannel.cpp
|
3 |
+
@@ -1880,6 +1880,28 @@ bool QSslSocketBackendPrivate::verifyCertContext(CERT_CONTEXT *certContext)
|
4 |
+
if (configuration.peerVerifyDepth > 0 && DWORD(configuration.peerVerifyDepth) < verifyDepth)
|
5 |
+
verifyDepth = DWORD(configuration.peerVerifyDepth);
|
6 |
+
|
7 |
+
+ const auto &caCertificates = q->sslConfiguration().caCertificates();
|
8 |
+
+
|
9 |
+
+ if (!rootCertOnDemandLoadingAllowed()
|
10 |
+
+ && !(chain->TrustStatus.dwErrorStatus & CERT_TRUST_IS_PARTIAL_CHAIN)
|
11 |
+
+ && (q->peerVerifyMode() == QSslSocket::VerifyPeer
|
12 |
+
+ || (isClient && q->peerVerifyMode() == QSslSocket::AutoVerifyPeer))) {
|
13 |
+
+ // When verifying a peer Windows "helpfully" builds a chain that
|
14 |
+
+ // may include roots from the system store. But we don't want that if
|
15 |
+
+ // the user has set their own CA certificates.
|
16 |
+
+ // Since Windows claims this is not a partial chain the root is included
|
17 |
+
+ // and we have to check that it is one of our configured CAs.
|
18 |
+
+ CERT_CHAIN_ELEMENT *element = chain->rgpElement[chain->cElement - 1];
|
19 |
+
+ QSslCertificate certificate = getCertificateFromChainElement(element);
|
20 |
+
+ if (!caCertificates.contains(certificate)) {
|
21 |
+
+ auto error = QSslError(QSslError::CertificateUntrusted, certificate);
|
22 |
+
+ sslErrors += error;
|
23 |
+
+ emit q->peerVerifyError(error);
|
24 |
+
+ if (q->state() != QAbstractSocket::ConnectedState)
|
25 |
+
+ return false;
|
26 |
+
+ }
|
27 |
+
+ }
|
28 |
+
+
|
29 |
+
for (DWORD i = 0; i < verifyDepth; i++) {
|
30 |
+
CERT_CHAIN_ELEMENT *element = chain->rgpElement[i];
|
31 |
+
QSslCertificate certificate = getCertificateFromChainElement(element);
|
32 |
+
--- a/src/network/ssl/qsslsocket.cpp
|
33 |
+
+++ b/src/network/ssl/qsslsocket.cpp
|
34 |
+
@@ -2221,6 +2221,10 @@ QSslSocketPrivate::QSslSocketPrivate()
|
35 |
+
, flushTriggered(false)
|
36 |
+
{
|
37 |
+
QSslConfigurationPrivate::deepCopyDefaultConfiguration(&configuration);
|
38 |
+
+ // If the global configuration doesn't allow root certificates to be loaded
|
39 |
+
+ // on demand then we have to disable it for this socket as well.
|
40 |
+
+ if (!configuration.allowRootCertOnDemandLoading)
|
41 |
+
+ allowRootCertOnDemandLoading = false;
|
42 |
+
}
|
43 |
+
|
44 |
+
/*!
|
45 |
+
@@ -2470,6 +2474,7 @@ void QSslConfigurationPrivate::deepCopyDefaultConfiguration(QSslConfigurationPri
|
46 |
+
ptr->sessionProtocol = global->sessionProtocol;
|
47 |
+
ptr->ciphers = global->ciphers;
|
48 |
+
ptr->caCertificates = global->caCertificates;
|
49 |
+
+ ptr->allowRootCertOnDemandLoading = global->allowRootCertOnDemandLoading;
|
50 |
+
ptr->protocol = global->protocol;
|
51 |
+
ptr->peerVerifyMode = global->peerVerifyMode;
|
52 |
+
ptr->peerVerifyDepth = global->peerVerifyDepth;
|
cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/CVE-2023-37369-qtbase-5.15.diff
ADDED
@@ -0,0 +1,203 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/src/corelib/serialization/qxmlstream.cpp b/src/corelib/serialization/qxmlstream.cpp
|
2 |
+
index 7cd457ba3a..11d162cb79 100644
|
3 |
+
--- a/src/corelib/serialization/qxmlstream.cpp
|
4 |
+
+++ b/src/corelib/serialization/qxmlstream.cpp
|
5 |
+
@@ -1302,15 +1302,18 @@ inline int QXmlStreamReaderPrivate::fastScanContentCharList()
|
6 |
+
return n;
|
7 |
+
}
|
8 |
+
|
9 |
+
-inline int QXmlStreamReaderPrivate::fastScanName(int *prefix)
|
10 |
+
+// Fast scan an XML attribute name (e.g. "xml:lang").
|
11 |
+
+inline QXmlStreamReaderPrivate::FastScanNameResult
|
12 |
+
+QXmlStreamReaderPrivate::fastScanName(Value *val)
|
13 |
+
{
|
14 |
+
int n = 0;
|
15 |
+
uint c;
|
16 |
+
while ((c = getChar()) != StreamEOF) {
|
17 |
+
if (n >= 4096) {
|
18 |
+
// This is too long to be a sensible name, and
|
19 |
+
- // can exhaust memory
|
20 |
+
- return 0;
|
21 |
+
+ // can exhaust memory, or the range of decltype(*prefix)
|
22 |
+
+ raiseNamePrefixTooLongError();
|
23 |
+
+ return {};
|
24 |
+
}
|
25 |
+
switch (c) {
|
26 |
+
case '\n':
|
27 |
+
@@ -1339,23 +1342,23 @@ inline int QXmlStreamReaderPrivate::fastScanName(int *prefix)
|
28 |
+
case '+':
|
29 |
+
case '*':
|
30 |
+
putChar(c);
|
31 |
+
- if (prefix && *prefix == n+1) {
|
32 |
+
- *prefix = 0;
|
33 |
+
+ if (val && val->prefix == n + 1) {
|
34 |
+
+ val->prefix = 0;
|
35 |
+
putChar(':');
|
36 |
+
--n;
|
37 |
+
}
|
38 |
+
- return n;
|
39 |
+
+ return FastScanNameResult(n);
|
40 |
+
case ':':
|
41 |
+
- if (prefix) {
|
42 |
+
- if (*prefix == 0) {
|
43 |
+
- *prefix = n+2;
|
44 |
+
+ if (val) {
|
45 |
+
+ if (val->prefix == 0) {
|
46 |
+
+ val->prefix = n + 2;
|
47 |
+
} else { // only one colon allowed according to the namespace spec.
|
48 |
+
putChar(c);
|
49 |
+
- return n;
|
50 |
+
+ return FastScanNameResult(n);
|
51 |
+
}
|
52 |
+
} else {
|
53 |
+
putChar(c);
|
54 |
+
- return n;
|
55 |
+
+ return FastScanNameResult(n);
|
56 |
+
}
|
57 |
+
Q_FALLTHROUGH();
|
58 |
+
default:
|
59 |
+
@@ -1364,12 +1367,12 @@ inline int QXmlStreamReaderPrivate::fastScanName(int *prefix)
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
+
- if (prefix)
|
64 |
+
- *prefix = 0;
|
65 |
+
+ if (val)
|
66 |
+
+ val->prefix = 0;
|
67 |
+
int pos = textBuffer.size() - n;
|
68 |
+
putString(textBuffer, pos);
|
69 |
+
textBuffer.resize(pos);
|
70 |
+
- return 0;
|
71 |
+
+ return FastScanNameResult(0);
|
72 |
+
}
|
73 |
+
|
74 |
+
enum NameChar { NameBeginning, NameNotBeginning, NotName };
|
75 |
+
@@ -1878,6 +1881,14 @@ void QXmlStreamReaderPrivate::raiseWellFormedError(const QString &message)
|
76 |
+
raiseError(QXmlStreamReader::NotWellFormedError, message);
|
77 |
+
}
|
78 |
+
|
79 |
+
+void QXmlStreamReaderPrivate::raiseNamePrefixTooLongError()
|
80 |
+
+{
|
81 |
+
+ // TODO: add a ImplementationLimitsExceededError and use it instead
|
82 |
+
+ raiseError(QXmlStreamReader::NotWellFormedError,
|
83 |
+
+ QXmlStream::tr("Length of XML attribute name exceeds implemnetation limits (4KiB "
|
84 |
+
+ "characters)."));
|
85 |
+
+}
|
86 |
+
+
|
87 |
+
void QXmlStreamReaderPrivate::parseError()
|
88 |
+
{
|
89 |
+
|
90 |
+
diff --git a/src/corelib/serialization/qxmlstream.g b/src/corelib/serialization/qxmlstream.g
|
91 |
+
index 4321fed68a..8c6a1a5887 100644
|
92 |
+
--- a/src/corelib/serialization/qxmlstream.g
|
93 |
+
+++ b/src/corelib/serialization/qxmlstream.g
|
94 |
+
@@ -516,7 +516,16 @@ public:
|
95 |
+
int fastScanLiteralContent();
|
96 |
+
int fastScanSpace();
|
97 |
+
int fastScanContentCharList();
|
98 |
+
- int fastScanName(int *prefix = nullptr);
|
99 |
+
+
|
100 |
+
+ struct FastScanNameResult {
|
101 |
+
+ FastScanNameResult() : ok(false) {}
|
102 |
+
+ explicit FastScanNameResult(int len) : addToLen(len), ok(true) { }
|
103 |
+
+ operator bool() { return ok; }
|
104 |
+
+ int operator*() { Q_ASSERT(ok); return addToLen; }
|
105 |
+
+ int addToLen;
|
106 |
+
+ bool ok;
|
107 |
+
+ };
|
108 |
+
+ FastScanNameResult fastScanName(Value *val = nullptr);
|
109 |
+
inline int fastScanNMTOKEN();
|
110 |
+
|
111 |
+
|
112 |
+
@@ -525,6 +534,7 @@ public:
|
113 |
+
|
114 |
+
void raiseError(QXmlStreamReader::Error error, const QString& message = QString());
|
115 |
+
void raiseWellFormedError(const QString &message);
|
116 |
+
+ void raiseNamePrefixTooLongError();
|
117 |
+
|
118 |
+
QXmlStreamEntityResolver *entityResolver;
|
119 |
+
|
120 |
+
@@ -1811,7 +1821,12 @@ space_opt ::= space;
|
121 |
+
qname ::= LETTER;
|
122 |
+
/.
|
123 |
+
case $rule_number: {
|
124 |
+
- sym(1).len += fastScanName(&sym(1).prefix);
|
125 |
+
+ Value &val = sym(1);
|
126 |
+
+ if (auto res = fastScanName(&val))
|
127 |
+
+ val.len += *res;
|
128 |
+
+ else
|
129 |
+
+ return false;
|
130 |
+
+
|
131 |
+
if (atEnd) {
|
132 |
+
resume($rule_number);
|
133 |
+
return false;
|
134 |
+
@@ -1822,7 +1837,11 @@ qname ::= LETTER;
|
135 |
+
name ::= LETTER;
|
136 |
+
/.
|
137 |
+
case $rule_number:
|
138 |
+
- sym(1).len += fastScanName();
|
139 |
+
+ if (auto res = fastScanName())
|
140 |
+
+ sym(1).len += *res;
|
141 |
+
+ else
|
142 |
+
+ return false;
|
143 |
+
+
|
144 |
+
if (atEnd) {
|
145 |
+
resume($rule_number);
|
146 |
+
return false;
|
147 |
+
diff --git a/src/corelib/serialization/qxmlstream_p.h b/src/corelib/serialization/qxmlstream_p.h
|
148 |
+
index e5bde7b98e..b01484cac3 100644
|
149 |
+
--- a/src/corelib/serialization/qxmlstream_p.h
|
150 |
+
+++ b/src/corelib/serialization/qxmlstream_p.h
|
151 |
+
@@ -1005,7 +1005,16 @@ public:
|
152 |
+
int fastScanLiteralContent();
|
153 |
+
int fastScanSpace();
|
154 |
+
int fastScanContentCharList();
|
155 |
+
- int fastScanName(int *prefix = nullptr);
|
156 |
+
+
|
157 |
+
+ struct FastScanNameResult {
|
158 |
+
+ FastScanNameResult() : ok(false) {}
|
159 |
+
+ explicit FastScanNameResult(int len) : addToLen(len), ok(true) { }
|
160 |
+
+ operator bool() { return ok; }
|
161 |
+
+ int operator*() { Q_ASSERT(ok); return addToLen; }
|
162 |
+
+ int addToLen;
|
163 |
+
+ bool ok;
|
164 |
+
+ };
|
165 |
+
+ FastScanNameResult fastScanName(Value *val = nullptr);
|
166 |
+
inline int fastScanNMTOKEN();
|
167 |
+
|
168 |
+
|
169 |
+
@@ -1014,6 +1023,7 @@ public:
|
170 |
+
|
171 |
+
void raiseError(QXmlStreamReader::Error error, const QString& message = QString());
|
172 |
+
void raiseWellFormedError(const QString &message);
|
173 |
+
+ void raiseNamePrefixTooLongError();
|
174 |
+
|
175 |
+
QXmlStreamEntityResolver *entityResolver;
|
176 |
+
|
177 |
+
@@ -1939,7 +1949,12 @@ bool QXmlStreamReaderPrivate::parse()
|
178 |
+
break;
|
179 |
+
|
180 |
+
case 262: {
|
181 |
+
- sym(1).len += fastScanName(&sym(1).prefix);
|
182 |
+
+ Value &val = sym(1);
|
183 |
+
+ if (auto res = fastScanName(&val))
|
184 |
+
+ val.len += *res;
|
185 |
+
+ else
|
186 |
+
+ return false;
|
187 |
+
+
|
188 |
+
if (atEnd) {
|
189 |
+
resume(262);
|
190 |
+
return false;
|
191 |
+
@@ -1947,7 +1962,11 @@ bool QXmlStreamReaderPrivate::parse()
|
192 |
+
} break;
|
193 |
+
|
194 |
+
case 263:
|
195 |
+
- sym(1).len += fastScanName();
|
196 |
+
+ if (auto res = fastScanName())
|
197 |
+
+ sym(1).len += *res;
|
198 |
+
+ else
|
199 |
+
+ return false;
|
200 |
+
+
|
201 |
+
if (atEnd) {
|
202 |
+
resume(263);
|
203 |
+
return false;
|
cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/CVE-2023-38197-qtbase-5.15.diff
ADDED
@@ -0,0 +1,219 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/src/corelib/serialization/qxmlstream.cpp b/src/corelib/serialization/qxmlstream.cpp
|
2 |
+
index bf8a2a9..6ab5d49 100644
|
3 |
+
--- a/src/corelib/serialization/qxmlstream.cpp
|
4 |
+
+++ b/src/corelib/serialization/qxmlstream.cpp
|
5 |
+
@@ -160,7 +160,7 @@
|
6 |
+
addData() or by waiting for it to arrive on the device().
|
7 |
+
|
8 |
+
\value UnexpectedElementError The parser encountered an element
|
9 |
+
- that was different to those it expected.
|
10 |
+
+ or token that was different to those it expected.
|
11 |
+
|
12 |
+
*/
|
13 |
+
|
14 |
+
@@ -295,13 +295,34 @@
|
15 |
+
|
16 |
+
QXmlStreamReader is a well-formed XML 1.0 parser that does \e not
|
17 |
+
include external parsed entities. As long as no error occurs, the
|
18 |
+
- application code can thus be assured that the data provided by the
|
19 |
+
- stream reader satisfies the W3C's criteria for well-formed XML. For
|
20 |
+
- example, you can be certain that all tags are indeed nested and
|
21 |
+
- closed properly, that references to internal entities have been
|
22 |
+
- replaced with the correct replacement text, and that attributes have
|
23 |
+
- been normalized or added according to the internal subset of the
|
24 |
+
- DTD.
|
25 |
+
+ application code can thus be assured, that
|
26 |
+
+ \list
|
27 |
+
+ \li the data provided by the stream reader satisfies the W3C's
|
28 |
+
+ criteria for well-formed XML,
|
29 |
+
+ \li tokens are provided in a valid order.
|
30 |
+
+ \endlist
|
31 |
+
+
|
32 |
+
+ Unless QXmlStreamReader raises an error, it guarantees the following:
|
33 |
+
+ \list
|
34 |
+
+ \li All tags are nested and closed properly.
|
35 |
+
+ \li References to internal entities have been replaced with the
|
36 |
+
+ correct replacement text.
|
37 |
+
+ \li Attributes have been normalized or added according to the
|
38 |
+
+ internal subset of the \l DTD.
|
39 |
+
+ \li Tokens of type \l StartDocument happen before all others,
|
40 |
+
+ aside from comments and processing instructions.
|
41 |
+
+ \li At most one DOCTYPE element (a token of type \l DTD) is present.
|
42 |
+
+ \li If present, the DOCTYPE appears before all other elements,
|
43 |
+
+ aside from StartDocument, comments and processing instructions.
|
44 |
+
+ \endlist
|
45 |
+
+
|
46 |
+
+ In particular, once any token of type \l StartElement, \l EndElement,
|
47 |
+
+ \l Characters, \l EntityReference or \l EndDocument is seen, no
|
48 |
+
+ tokens of type StartDocument or DTD will be seen. If one is present in
|
49 |
+
+ the input stream, out of order, an error is raised.
|
50 |
+
+
|
51 |
+
+ \note The token types \l Comment and \l ProcessingInstruction may appear
|
52 |
+
+ anywhere in the stream.
|
53 |
+
|
54 |
+
If an error occurs while parsing, atEnd() and hasError() return
|
55 |
+
true, and error() returns the error that occurred. The functions
|
56 |
+
@@ -620,6 +641,7 @@
|
57 |
+
d->token = -1;
|
58 |
+
return readNext();
|
59 |
+
}
|
60 |
+
+ d->checkToken();
|
61 |
+
return d->type;
|
62 |
+
}
|
63 |
+
|
64 |
+
@@ -740,6 +762,14 @@
|
65 |
+
};
|
66 |
+
|
67 |
+
|
68 |
+
+static const char QXmlStreamReader_XmlContextString[] =
|
69 |
+
+ "Prolog\0"
|
70 |
+
+ "Body\0";
|
71 |
+
+
|
72 |
+
+static const short QXmlStreamReader_XmlContextString_indices[] = {
|
73 |
+
+ 0, 7
|
74 |
+
+};
|
75 |
+
+
|
76 |
+
/*!
|
77 |
+
\property QXmlStreamReader::namespaceProcessing
|
78 |
+
The namespace-processing flag of the stream reader
|
79 |
+
@@ -775,6 +805,16 @@
|
80 |
+
QXmlStreamReader_tokenTypeString_indices[d->type]);
|
81 |
+
}
|
82 |
+
|
83 |
+
+/*!
|
84 |
+
+ \internal
|
85 |
+
+ \return \param ctxt (Prolog/Body) as a string.
|
86 |
+
+ */
|
87 |
+
+QString contextString(QXmlStreamReaderPrivate::XmlContext ctxt)
|
88 |
+
+{
|
89 |
+
+ return QLatin1String(QXmlStreamReader_XmlContextString +
|
90 |
+
+ QXmlStreamReader_XmlContextString_indices[static_cast<int>(ctxt)]);
|
91 |
+
+}
|
92 |
+
+
|
93 |
+
#endif // QT_NO_XMLSTREAMREADER
|
94 |
+
|
95 |
+
QXmlStreamPrivateTagStack::QXmlStreamPrivateTagStack()
|
96 |
+
@@ -866,6 +906,8 @@
|
97 |
+
|
98 |
+
type = QXmlStreamReader::NoToken;
|
99 |
+
error = QXmlStreamReader::NoError;
|
100 |
+
+ currentContext = XmlContext::Prolog;
|
101 |
+
+ foundDTD = false;
|
102 |
+
}
|
103 |
+
|
104 |
+
/*
|
105 |
+
@@ -4061,6 +4103,92 @@
|
106 |
+
}
|
107 |
+
}
|
108 |
+
|
109 |
+
+static bool isTokenAllowedInContext(QXmlStreamReader::TokenType type,
|
110 |
+
+ QXmlStreamReaderPrivate::XmlContext loc)
|
111 |
+
+{
|
112 |
+
+ switch (type) {
|
113 |
+
+ case QXmlStreamReader::StartDocument:
|
114 |
+
+ case QXmlStreamReader::DTD:
|
115 |
+
+ return loc == QXmlStreamReaderPrivate::XmlContext::Prolog;
|
116 |
+
+
|
117 |
+
+ case QXmlStreamReader::StartElement:
|
118 |
+
+ case QXmlStreamReader::EndElement:
|
119 |
+
+ case QXmlStreamReader::Characters:
|
120 |
+
+ case QXmlStreamReader::EntityReference:
|
121 |
+
+ case QXmlStreamReader::EndDocument:
|
122 |
+
+ return loc == QXmlStreamReaderPrivate::XmlContext::Body;
|
123 |
+
+
|
124 |
+
+ case QXmlStreamReader::Comment:
|
125 |
+
+ case QXmlStreamReader::ProcessingInstruction:
|
126 |
+
+ return true;
|
127 |
+
+
|
128 |
+
+ case QXmlStreamReader::NoToken:
|
129 |
+
+ case QXmlStreamReader::Invalid:
|
130 |
+
+ return false;
|
131 |
+
+ default:
|
132 |
+
+ return false;
|
133 |
+
+ }
|
134 |
+
+}
|
135 |
+
+
|
136 |
+
+/*!
|
137 |
+
+ \internal
|
138 |
+
+ \brief QXmlStreamReader::isValidToken
|
139 |
+
+ \return \c true if \param type is a valid token type.
|
140 |
+
+ \return \c false if \param type is an unexpected token,
|
141 |
+
+ which indicates a non-well-formed or invalid XML stream.
|
142 |
+
+ */
|
143 |
+
+bool QXmlStreamReaderPrivate::isValidToken(QXmlStreamReader::TokenType type)
|
144 |
+
+{
|
145 |
+
+ // Don't change currentContext, if Invalid or NoToken occur in the prolog
|
146 |
+
+ if (type == QXmlStreamReader::Invalid || type == QXmlStreamReader::NoToken)
|
147 |
+
+ return false;
|
148 |
+
+
|
149 |
+
+ // If a token type gets rejected in the body, there is no recovery
|
150 |
+
+ const bool result = isTokenAllowedInContext(type, currentContext);
|
151 |
+
+ if (result || currentContext == XmlContext::Body)
|
152 |
+
+ return result;
|
153 |
+
+
|
154 |
+
+ // First non-Prolog token observed => switch context to body and check again.
|
155 |
+
+ currentContext = XmlContext::Body;
|
156 |
+
+ return isTokenAllowedInContext(type, currentContext);
|
157 |
+
+}
|
158 |
+
+
|
159 |
+
+/*!
|
160 |
+
+ \internal
|
161 |
+
+ Checks token type and raises an error, if it is invalid
|
162 |
+
+ in the current context (prolog/body).
|
163 |
+
+ */
|
164 |
+
+void QXmlStreamReaderPrivate::checkToken()
|
165 |
+
+{
|
166 |
+
+ Q_Q(QXmlStreamReader);
|
167 |
+
+
|
168 |
+
+ // The token type must be consumed, to keep track if the body has been reached.
|
169 |
+
+ const XmlContext context = currentContext;
|
170 |
+
+ const bool ok = isValidToken(type);
|
171 |
+
+
|
172 |
+
+ // Do nothing if an error has been raised already (going along with an unexpected token)
|
173 |
+
+ if (error != QXmlStreamReader::Error::NoError)
|
174 |
+
+ return;
|
175 |
+
+
|
176 |
+
+ if (!ok) {
|
177 |
+
+ raiseError(QXmlStreamReader::UnexpectedElementError,
|
178 |
+
+ QLatin1String("Unexpected token type %1 in %2.")
|
179 |
+
+ .arg(q->tokenString(), contextString(context)));
|
180 |
+
+ return;
|
181 |
+
+ }
|
182 |
+
+
|
183 |
+
+ if (type != QXmlStreamReader::DTD)
|
184 |
+
+ return;
|
185 |
+
+
|
186 |
+
+ // Raise error on multiple DTD tokens
|
187 |
+
+ if (foundDTD) {
|
188 |
+
+ raiseError(QXmlStreamReader::UnexpectedElementError,
|
189 |
+
+ QLatin1String("Found second DTD token in %1.").arg(contextString(context)));
|
190 |
+
+ } else {
|
191 |
+
+ foundDTD = true;
|
192 |
+
+ }
|
193 |
+
+}
|
194 |
+
+
|
195 |
+
/*!
|
196 |
+
\fn bool QXmlStreamAttributes::hasAttribute(const QString &qualifiedName) const
|
197 |
+
\since 4.5
|
198 |
+
diff --git a/src/corelib/serialization/qxmlstream_p.h b/src/corelib/serialization/qxmlstream_p.h
|
199 |
+
index 8f7c9e0..708059b 100644
|
200 |
+
--- a/src/corelib/serialization/qxmlstream_p.h
|
201 |
+
+++ b/src/corelib/serialization/qxmlstream_p.h
|
202 |
+
@@ -804,6 +804,17 @@
|
203 |
+
#endif
|
204 |
+
bool atEnd;
|
205 |
+
|
206 |
+
+ enum class XmlContext
|
207 |
+
+ {
|
208 |
+
+ Prolog,
|
209 |
+
+ Body,
|
210 |
+
+ };
|
211 |
+
+
|
212 |
+
+ XmlContext currentContext = XmlContext::Prolog;
|
213 |
+
+ bool foundDTD = false;
|
214 |
+
+ bool isValidToken(QXmlStreamReader::TokenType type);
|
215 |
+
+ void checkToken();
|
216 |
+
+
|
217 |
+
/*!
|
218 |
+
\sa setType()
|
219 |
+
*/
|
cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/CVE-2023-43114-5.15.patch
ADDED
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp b/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp
|
2 |
+
index ba683cf686..217a968c64 100644
|
3 |
+
--- a/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp
|
4 |
+
+++ b/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp
|
5 |
+
@@ -1471,36 +1471,70 @@ QT_WARNING_POP
|
6 |
+
return fontEngine;
|
7 |
+
}
|
8 |
+
|
9 |
+
-static QList<quint32> getTrueTypeFontOffsets(const uchar *fontData)
|
10 |
+
+static QList<quint32> getTrueTypeFontOffsets(const uchar *fontData, const uchar *fileEndSentinel)
|
11 |
+
{
|
12 |
+
QList<quint32> offsets;
|
13 |
+
- const quint32 headerTag = *reinterpret_cast<const quint32 *>(fontData);
|
14 |
+
+ if (fileEndSentinel - fontData < 12) {
|
15 |
+
+ qCWarning(lcQpaFonts) << "Corrupted font data detected";
|
16 |
+
+ return offsets;
|
17 |
+
+ }
|
18 |
+
+
|
19 |
+
+ const quint32 headerTag = qFromUnaligned<quint32>(fontData);
|
20 |
+
if (headerTag != MAKE_TAG('t', 't', 'c', 'f')) {
|
21 |
+
if (headerTag != MAKE_TAG(0, 1, 0, 0)
|
22 |
+
&& headerTag != MAKE_TAG('O', 'T', 'T', 'O')
|
23 |
+
&& headerTag != MAKE_TAG('t', 'r', 'u', 'e')
|
24 |
+
- && headerTag != MAKE_TAG('t', 'y', 'p', '1'))
|
25 |
+
+ && headerTag != MAKE_TAG('t', 'y', 'p', '1')) {
|
26 |
+
return offsets;
|
27 |
+
+ }
|
28 |
+
offsets << 0;
|
29 |
+
return offsets;
|
30 |
+
}
|
31 |
+
+
|
32 |
+
+ const quint32 maximumNumFonts = 0xffff;
|
33 |
+
const quint32 numFonts = qFromBigEndian<quint32>(fontData + 8);
|
34 |
+
- for (uint i = 0; i < numFonts; ++i) {
|
35 |
+
- offsets << qFromBigEndian<quint32>(fontData + 12 + i * 4);
|
36 |
+
+ if (numFonts > maximumNumFonts) {
|
37 |
+
+ qCWarning(lcQpaFonts) << "Font collection of" << numFonts << "fonts is too large. Aborting.";
|
38 |
+
+ return offsets;
|
39 |
+
}
|
40 |
+
+
|
41 |
+
+ if (quintptr(fileEndSentinel - fontData) > 12 + (numFonts - 1) * 4) {
|
42 |
+
+ for (quint32 i = 0; i < numFonts; ++i)
|
43 |
+
+ offsets << qFromBigEndian<quint32>(fontData + 12 + i * 4);
|
44 |
+
+ } else {
|
45 |
+
+ qCWarning(lcQpaFonts) << "Corrupted font data detected";
|
46 |
+
+ }
|
47 |
+
+
|
48 |
+
return offsets;
|
49 |
+
}
|
50 |
+
|
51 |
+
-static void getFontTable(const uchar *fileBegin, const uchar *data, quint32 tag, const uchar **table, quint32 *length)
|
52 |
+
+static void getFontTable(const uchar *fileBegin, const uchar *fileEndSentinel, const uchar *data, quint32 tag, const uchar **table, quint32 *length)
|
53 |
+
{
|
54 |
+
- const quint16 numTables = qFromBigEndian<quint16>(data + 4);
|
55 |
+
- for (uint i = 0; i < numTables; ++i) {
|
56 |
+
- const quint32 offset = 12 + 16 * i;
|
57 |
+
- if (*reinterpret_cast<const quint32 *>(data + offset) == tag) {
|
58 |
+
- *table = fileBegin + qFromBigEndian<quint32>(data + offset + 8);
|
59 |
+
- *length = qFromBigEndian<quint32>(data + offset + 12);
|
60 |
+
- return;
|
61 |
+
+ if (fileEndSentinel - data >= 6) {
|
62 |
+
+ const quint16 numTables = qFromBigEndian<quint16>(data + 4);
|
63 |
+
+ if (fileEndSentinel - data >= 28 + 16 * (numTables - 1)) {
|
64 |
+
+ for (quint32 i = 0; i < numTables; ++i) {
|
65 |
+
+ const quint32 offset = 12 + 16 * i;
|
66 |
+
+ if (qFromUnaligned<quint32>(data + offset) == tag) {
|
67 |
+
+ const quint32 tableOffset = qFromBigEndian<quint32>(data + offset + 8);
|
68 |
+
+ if (quintptr(fileEndSentinel - fileBegin) <= tableOffset) {
|
69 |
+
+ qCWarning(lcQpaFonts) << "Corrupted font data detected";
|
70 |
+
+ break;
|
71 |
+
+ }
|
72 |
+
+ *table = fileBegin + tableOffset;
|
73 |
+
+ *length = qFromBigEndian<quint32>(data + offset + 12);
|
74 |
+
+ if (quintptr(fileEndSentinel - *table) < *length) {
|
75 |
+
+ qCWarning(lcQpaFonts) << "Corrupted font data detected";
|
76 |
+
+ break;
|
77 |
+
+ }
|
78 |
+
+ return;
|
79 |
+
+ }
|
80 |
+
+ }
|
81 |
+
+ } else {
|
82 |
+
+ qCWarning(lcQpaFonts) << "Corrupted font data detected";
|
83 |
+
}
|
84 |
+
+ } else {
|
85 |
+
+ qCWarning(lcQpaFonts) << "Corrupted font data detected";
|
86 |
+
}
|
87 |
+
*table = 0;
|
88 |
+
*length = 0;
|
89 |
+
@@ -1513,8 +1547,9 @@ static void getFamiliesAndSignatures(const QByteArray &fontData,
|
90 |
+
QVector<QFontValues> *values)
|
91 |
+
{
|
92 |
+
const uchar *data = reinterpret_cast<const uchar *>(fontData.constData());
|
93 |
+
+ const uchar *dataEndSentinel = data + fontData.size();
|
94 |
+
|
95 |
+
- QList<quint32> offsets = getTrueTypeFontOffsets(data);
|
96 |
+
+ QList<quint32> offsets = getTrueTypeFontOffsets(data, dataEndSentinel);
|
97 |
+
if (offsets.isEmpty())
|
98 |
+
return;
|
99 |
+
|
100 |
+
@@ -1522,7 +1557,7 @@ static void getFamiliesAndSignatures(const QByteArray &fontData,
|
101 |
+
const uchar *font = data + offsets.at(i);
|
102 |
+
const uchar *table;
|
103 |
+
quint32 length;
|
104 |
+
- getFontTable(data, font, MAKE_TAG('n', 'a', 'm', 'e'), &table, &length);
|
105 |
+
+ getFontTable(data, dataEndSentinel, font, MAKE_TAG('n', 'a', 'm', 'e'), &table, &length);
|
106 |
+
if (!table)
|
107 |
+
continue;
|
108 |
+
QFontNames names = qt_getCanonicalFontNames(table, length);
|
109 |
+
@@ -1532,7 +1567,7 @@ static void getFamiliesAndSignatures(const QByteArray &fontData,
|
110 |
+
families->append(std::move(names));
|
111 |
+
|
112 |
+
if (values || signatures)
|
113 |
+
- getFontTable(data, font, MAKE_TAG('O', 'S', '/', '2'), &table, &length);
|
114 |
+
+ getFontTable(data, dataEndSentinel, font, MAKE_TAG('O', 'S', '/', '2'), &table, &length);
|
115 |
+
|
116 |
+
if (values) {
|
117 |
+
QFontValues fontValues;
|
118 |
+
--
|
119 |
+
2.27.0.windows.1
|
120 |
+
|
cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/CVE-2024-25580-qtbase-5.15.diff
ADDED
@@ -0,0 +1,197 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/src/gui/util/qktxhandler.cpp b/src/gui/util/qktxhandler.cpp
|
2 |
+
index 0d98e97453..6a79e55109 100644
|
3 |
+
--- a/src/gui/util/qktxhandler.cpp
|
4 |
+
+++ b/src/gui/util/qktxhandler.cpp
|
5 |
+
@@ -73,7 +73,7 @@ struct KTXHeader {
|
6 |
+
quint32 bytesOfKeyValueData;
|
7 |
+
};
|
8 |
+
|
9 |
+
-static const quint32 headerSize = sizeof(KTXHeader);
|
10 |
+
+static constexpr quint32 qktxh_headerSize = sizeof(KTXHeader);
|
11 |
+
|
12 |
+
// Currently unused, declared for future reference
|
13 |
+
struct KTXKeyValuePairItem {
|
14 |
+
@@ -103,11 +103,36 @@ struct KTXMipmapLevel {
|
15 |
+
*/
|
16 |
+
};
|
17 |
+
|
18 |
+
-bool QKtxHandler::canRead(const QByteArray &suffix, const QByteArray &block)
|
19 |
+
+static bool qAddOverflow(quint32 v1, quint32 v2, quint32 *r) {
|
20 |
+
+ // unsigned additions are well-defined
|
21 |
+
+ *r = v1 + v2;
|
22 |
+
+ return v1 > quint32(v1 + v2);
|
23 |
+
+}
|
24 |
+
+
|
25 |
+
+// Returns the nearest multiple of 4 greater than or equal to 'value'
|
26 |
+
+static bool nearestMultipleOf4(quint32 value, quint32 *result)
|
27 |
+
+{
|
28 |
+
+ constexpr quint32 rounding = 4;
|
29 |
+
+ *result = 0;
|
30 |
+
+ if (qAddOverflow(value, rounding - 1, result))
|
31 |
+
+ return true;
|
32 |
+
+ *result &= ~(rounding - 1);
|
33 |
+
+ return false;
|
34 |
+
+}
|
35 |
+
+
|
36 |
+
+// Returns a slice with prechecked bounds
|
37 |
+
+static QByteArray safeSlice(const QByteArray& array, quint32 start, quint32 length)
|
38 |
+
{
|
39 |
+
- Q_UNUSED(suffix)
|
40 |
+
+ quint32 end = 0;
|
41 |
+
+ if (qAddOverflow(start, length, &end) || end > quint32(array.length()))
|
42 |
+
+ return {};
|
43 |
+
+ return QByteArray(array.data() + start, length);
|
44 |
+
+}
|
45 |
+
|
46 |
+
- return (qstrncmp(block.constData(), ktxIdentifier, KTX_IDENTIFIER_LENGTH) == 0);
|
47 |
+
+bool QKtxHandler::canRead(const QByteArray &suffix, const QByteArray &block)
|
48 |
+
+{
|
49 |
+
+ Q_UNUSED(suffix);
|
50 |
+
+ return block.startsWith(QByteArray::fromRawData(ktxIdentifier, KTX_IDENTIFIER_LENGTH));
|
51 |
+
}
|
52 |
+
|
53 |
+
QTextureFileData QKtxHandler::read()
|
54 |
+
@@ -115,42 +140,97 @@ QTextureFileData QKtxHandler::read()
|
55 |
+
if (!device())
|
56 |
+
return QTextureFileData();
|
57 |
+
|
58 |
+
- QByteArray buf = device()->readAll();
|
59 |
+
- const quint32 dataSize = quint32(buf.size());
|
60 |
+
- if (dataSize < headerSize || !canRead(QByteArray(), buf)) {
|
61 |
+
- qCDebug(lcQtGuiTextureIO, "Invalid KTX file %s", logName().constData());
|
62 |
+
+ const QByteArray buf = device()->readAll();
|
63 |
+
+ if (size_t(buf.size()) > std::numeric_limits<quint32>::max()) {
|
64 |
+
+ qWarning(lcQtGuiTextureIO, "Too big KTX file %s", logName().constData());
|
65 |
+
+ return QTextureFileData();
|
66 |
+
+ }
|
67 |
+
+
|
68 |
+
+ if (!canRead(QByteArray(), buf)) {
|
69 |
+
+ qWarning(lcQtGuiTextureIO, "Invalid KTX file %s", logName().constData());
|
70 |
+
+ return QTextureFileData();
|
71 |
+
+ }
|
72 |
+
+
|
73 |
+
+ if (buf.size() < qsizetype(qktxh_headerSize)) {
|
74 |
+
+ qWarning(lcQtGuiTextureIO, "Invalid KTX header size in %s", logName().constData());
|
75 |
+
return QTextureFileData();
|
76 |
+
}
|
77 |
+
|
78 |
+
- const KTXHeader *header = reinterpret_cast<const KTXHeader *>(buf.constData());
|
79 |
+
- if (!checkHeader(*header)) {
|
80 |
+
- qCDebug(lcQtGuiTextureIO, "Unsupported KTX file format in %s", logName().constData());
|
81 |
+
+ KTXHeader header;
|
82 |
+
+ memcpy(&header, buf.data(), qktxh_headerSize);
|
83 |
+
+ if (!checkHeader(header)) {
|
84 |
+
+ qWarning(lcQtGuiTextureIO, "Unsupported KTX file format in %s", logName().constData());
|
85 |
+
return QTextureFileData();
|
86 |
+
}
|
87 |
+
|
88 |
+
QTextureFileData texData;
|
89 |
+
texData.setData(buf);
|
90 |
+
|
91 |
+
- texData.setSize(QSize(decode(header->pixelWidth), decode(header->pixelHeight)));
|
92 |
+
- texData.setGLFormat(decode(header->glFormat));
|
93 |
+
- texData.setGLInternalFormat(decode(header->glInternalFormat));
|
94 |
+
- texData.setGLBaseInternalFormat(decode(header->glBaseInternalFormat));
|
95 |
+
-
|
96 |
+
- texData.setNumLevels(decode(header->numberOfMipmapLevels));
|
97 |
+
- quint32 offset = headerSize + decode(header->bytesOfKeyValueData);
|
98 |
+
- const int maxLevels = qMin(texData.numLevels(), 32); // Cap iterations in case of corrupt file.
|
99 |
+
- for (int i = 0; i < maxLevels; i++) {
|
100 |
+
- if (offset + sizeof(KTXMipmapLevel) > dataSize) // Corrupt file; avoid oob read
|
101 |
+
- break;
|
102 |
+
- const KTXMipmapLevel *level = reinterpret_cast<const KTXMipmapLevel *>(buf.constData() + offset);
|
103 |
+
- quint32 levelLen = decode(level->imageSize);
|
104 |
+
- texData.setDataOffset(offset + sizeof(KTXMipmapLevel::imageSize), i);
|
105 |
+
- texData.setDataLength(levelLen, i);
|
106 |
+
- offset += sizeof(KTXMipmapLevel::imageSize) + levelLen + (3 - ((levelLen + 3) % 4));
|
107 |
+
+ texData.setSize(QSize(decode(header.pixelWidth), decode(header.pixelHeight)));
|
108 |
+
+ texData.setGLFormat(decode(header.glFormat));
|
109 |
+
+ texData.setGLInternalFormat(decode(header.glInternalFormat));
|
110 |
+
+ texData.setGLBaseInternalFormat(decode(header.glBaseInternalFormat));
|
111 |
+
+
|
112 |
+
+ texData.setNumLevels(decode(header.numberOfMipmapLevels));
|
113 |
+
+
|
114 |
+
+ const quint32 bytesOfKeyValueData = decode(header.bytesOfKeyValueData);
|
115 |
+
+ quint32 headerKeyValueSize;
|
116 |
+
+ if (qAddOverflow(qktxh_headerSize, bytesOfKeyValueData, &headerKeyValueSize)) {
|
117 |
+
+ qWarning(lcQtGuiTextureIO, "Overflow in size of key value data in header of KTX file %s",
|
118 |
+
+ logName().constData());
|
119 |
+
+ return QTextureFileData();
|
120 |
+
+ }
|
121 |
+
+
|
122 |
+
+ if (headerKeyValueSize >= quint32(buf.size())) {
|
123 |
+
+ qWarning(lcQtGuiTextureIO, "OOB request in KTX file %s", logName().constData());
|
124 |
+
+ return QTextureFileData();
|
125 |
+
+ }
|
126 |
+
+
|
127 |
+
+ // Technically, any number of levels is allowed but if the value is bigger than
|
128 |
+
+ // what is possible in KTX V2 (and what makes sense) we return an error.
|
129 |
+
+ // maxLevels = log2(max(width, height, depth))
|
130 |
+
+ const int maxLevels = (sizeof(quint32) * 8)
|
131 |
+
+ - qCountLeadingZeroBits(std::max(
|
132 |
+
+ { header.pixelWidth, header.pixelHeight, header.pixelDepth }));
|
133 |
+
+
|
134 |
+
+ if (texData.numLevels() > maxLevels) {
|
135 |
+
+ qWarning(lcQtGuiTextureIO, "Too many levels in KTX file %s", logName().constData());
|
136 |
+
+ return QTextureFileData();
|
137 |
+
+ }
|
138 |
+
+
|
139 |
+
+ quint32 offset = headerKeyValueSize;
|
140 |
+
+ for (int level = 0; level < texData.numLevels(); level++) {
|
141 |
+
+ const auto imageSizeSlice = safeSlice(buf, offset, sizeof(quint32));
|
142 |
+
+ if (imageSizeSlice.isEmpty()) {
|
143 |
+
+ qWarning(lcQtGuiTextureIO, "OOB request in KTX file %s", logName().constData());
|
144 |
+
+ return QTextureFileData();
|
145 |
+
+ }
|
146 |
+
+
|
147 |
+
+ const quint32 imageSize = decode(qFromUnaligned<quint32>(imageSizeSlice.data()));
|
148 |
+
+ offset += sizeof(quint32); // overflow checked indirectly above
|
149 |
+
+
|
150 |
+
+ texData.setDataOffset(offset, level);
|
151 |
+
+ texData.setDataLength(imageSize, level);
|
152 |
+
+
|
153 |
+
+ // Add image data and padding to offset
|
154 |
+
+ quint32 padded = 0;
|
155 |
+
+ if (nearestMultipleOf4(imageSize, &padded)) {
|
156 |
+
+ qWarning(lcQtGuiTextureIO, "Overflow in KTX file %s", logName().constData());
|
157 |
+
+ return QTextureFileData();
|
158 |
+
+ }
|
159 |
+
+
|
160 |
+
+ quint32 offsetNext;
|
161 |
+
+ if (qAddOverflow(offset, padded, &offsetNext)) {
|
162 |
+
+ qWarning(lcQtGuiTextureIO, "OOB request in KTX file %s", logName().constData());
|
163 |
+
+ return QTextureFileData();
|
164 |
+
+ }
|
165 |
+
+
|
166 |
+
+ offset = offsetNext;
|
167 |
+
}
|
168 |
+
|
169 |
+
if (!texData.isValid()) {
|
170 |
+
- qCDebug(lcQtGuiTextureIO, "Invalid values in header of KTX file %s", logName().constData());
|
171 |
+
+ qWarning(lcQtGuiTextureIO, "Invalid values in header of KTX file %s",
|
172 |
+
+ logName().constData());
|
173 |
+
return QTextureFileData();
|
174 |
+
}
|
175 |
+
|
176 |
+
@@ -191,7 +271,7 @@ bool QKtxHandler::checkHeader(const KTXHeader &header)
|
177 |
+
(decode(header.numberOfFaces) == 1));
|
178 |
+
}
|
179 |
+
|
180 |
+
-quint32 QKtxHandler::decode(quint32 val)
|
181 |
+
+quint32 QKtxHandler::decode(quint32 val) const
|
182 |
+
{
|
183 |
+
return inverseEndian ? qbswap<quint32>(val) : val;
|
184 |
+
}
|
185 |
+
diff --git a/src/gui/util/qktxhandler_p.h b/src/gui/util/qktxhandler_p.h
|
186 |
+
index f831e59d95..cdf1b2eaf8 100644
|
187 |
+
--- a/src/gui/util/qktxhandler_p.h
|
188 |
+
+++ b/src/gui/util/qktxhandler_p.h
|
189 |
+
@@ -68,7 +68,7 @@ public:
|
190 |
+
|
191 |
+
private:
|
192 |
+
bool checkHeader(const KTXHeader &header);
|
193 |
+
- quint32 decode(quint32 val);
|
194 |
+
+ quint32 decode(quint32 val) const;
|
195 |
+
|
196 |
+
bool inverseEndian = false;
|
197 |
+
};
|
cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/Qt5BasicConfig.patch
ADDED
@@ -0,0 +1,194 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
|
2 |
+
index c72989288..a88234dca 100644
|
3 |
+
--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
|
4 |
+
+++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
|
5 |
+
@@ -53,8 +53,12 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura
|
6 |
+
set(_lib_deps)
|
7 |
+
set(_link_flags)
|
8 |
+
|
9 |
+
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
10 |
+
- set(_qt5_install_libs \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}\")
|
11 |
+
+!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
12 |
+
+ if(\"${Configuration}\" STREQUAL \"DEBUG\")
|
13 |
+
+ set(_qt5_install_libs \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_LIB_DIR}\")
|
14 |
+
+ else()
|
15 |
+
+ set(_qt5_install_libs \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}\")
|
16 |
+
+ endif()
|
17 |
+
!!ELSE
|
18 |
+
set(_qt5_install_libs \"$${CMAKE_LIB_DIR}\")
|
19 |
+
!!ENDIF
|
20 |
+
@@ -125,6 +129,8 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura
|
21 |
+
elseif(EXISTS \"${_flag}\")
|
22 |
+
# The flag is an absolute path to an existing library
|
23 |
+
list(APPEND _lib_deps \"${_flag}\")
|
24 |
+
+ elseif(_flag MATCHES \"\\\\.lib$\") #Library name only. No -l. Probably missing some cases
|
25 |
+
+ list(APPEND _lib_deps \"${_flag}\")
|
26 |
+
elseif(_flag MATCHES \"^-L(.*)$\")
|
27 |
+
# Handle -Lfoo flags by putting their paths in the search path used by find_library above
|
28 |
+
list(APPEND _search_paths \"${CMAKE_MATCH_1}\")
|
29 |
+
@@ -147,7 +153,11 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI
|
30 |
+
set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
|
31 |
+
|
32 |
+
!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
|
33 |
+
- set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
|
34 |
+
+ if(\"${Configuration}\" STREQUAL \"DEBUG\") # 1
|
35 |
+
+ set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
|
36 |
+
+ else()
|
37 |
+
+ set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
|
38 |
+
+ endif()
|
39 |
+
!!ELSE
|
40 |
+
set(imported_location \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
|
41 |
+
!!ENDIF
|
42 |
+
@@ -174,21 +184,22 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI
|
43 |
+
)
|
44 |
+
|
45 |
+
!!IF !isEmpty(CMAKE_STATIC_TYPE)
|
46 |
+
- if(NOT "${IsDebugAndRelease}")
|
47 |
+
- set(_genex_condition \"1\")
|
48 |
+
+ #if(NOT "${IsDebugAndRelease}")
|
49 |
+
+ # set(_genex_condition \"1\")
|
50 |
+
+ #else()
|
51 |
+
+ if("${Configuration}" STREQUAL "DEBUG")
|
52 |
+
+ set(_genex_condition \"$<CONFIG:Debug>\")
|
53 |
+
else()
|
54 |
+
- if("${Configuration}" STREQUAL "DEBUG")
|
55 |
+
- set(_genex_condition \"$<CONFIG:Debug>\")
|
56 |
+
- else()
|
57 |
+
- set(_genex_condition \"$<NOT:$<CONFIG:Debug>>\")
|
58 |
+
- endif()
|
59 |
+
+ set(_genex_condition \"$<NOT:$<CONFIG:Debug>>\")
|
60 |
+
endif()
|
61 |
+
+ #endif()
|
62 |
+
|
63 |
+
if(_static_deps)
|
64 |
+
set(_static_deps_genex \"$<${_genex_condition}:${_static_deps}>\")
|
65 |
+
set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY INTERFACE_LINK_LIBRARIES
|
66 |
+
\"${_static_deps_genex}\"
|
67 |
+
)
|
68 |
+
+ #message(STATUS \"Target Qt5::$${CMAKE_MODULE_NAME} static links: ${_static_dep} through ${_static_dep_genex}\") # Added for debugging
|
69 |
+
endif()
|
70 |
+
|
71 |
+
set(_static_link_flags \"${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LINK_FLAGS}\")
|
72 |
+
@@ -205,13 +216,18 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI
|
73 |
+
set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY INTERFACE_LINK_LIBRARIES
|
74 |
+
\"${_static_link_flags_genex}\"
|
75 |
+
)
|
76 |
+
+ #message(STATUS \"Target Qt5::$${CMAKE_MODULE_NAME} static link flags: ${_static_link_flags} through ${_static_link_flags_genex}\")
|
77 |
+
endif()
|
78 |
+
endif()
|
79 |
+
!!ENDIF
|
80 |
+
|
81 |
+
!!IF !isEmpty(CMAKE_WINDOWS_BUILD)
|
82 |
+
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
83 |
+
- set(imported_implib \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
|
84 |
+
+ if(\"${Configuration}\" STREQUAL \"DEBUG\")
|
85 |
+
+ set(imported_implib \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
|
86 |
+
+ else()
|
87 |
+
+ set(imported_implib \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
|
88 |
+
+ endif()
|
89 |
+
!!ELSE
|
90 |
+
set(imported_implib \"IMPORTED_IMPLIB_${Configuration}\" \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
|
91 |
+
!!ENDIF
|
92 |
+
@@ -373,13 +389,14 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
|
93 |
+
|
94 |
+
!!IF !isEmpty(CMAKE_STATIC_TYPE)
|
95 |
+
if(NOT Qt5_EXCLUDE_STATIC_DEPENDENCIES)
|
96 |
+
-!!IF !isEmpty(CMAKE_DEBUG_TYPE)
|
97 |
+
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
98 |
+
+ if(EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\")
|
99 |
+
_qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
|
100 |
+
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG
|
101 |
+
+ \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG
|
102 |
+
_Qt5$${CMAKE_MODULE_NAME}_STATIC_DEBUG_LIB_DEPENDENCIES
|
103 |
+
_Qt5$${CMAKE_MODULE_NAME}_STATIC_DEBUG_LINK_FLAGS
|
104 |
+
)
|
105 |
+
+ endif()
|
106 |
+
!!ELSE
|
107 |
+
_qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
|
108 |
+
\"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG
|
109 |
+
@@ -387,22 +404,21 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
|
110 |
+
_Qt5$${CMAKE_MODULE_NAME}_STATIC_DEBUG_LINK_FLAGS
|
111 |
+
)
|
112 |
+
!!ENDIF
|
113 |
+
-!!ENDIF
|
114 |
+
|
115 |
+
-!!IF !isEmpty(CMAKE_RELEASE_TYPE)
|
116 |
+
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
117 |
+
+ if(EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\")
|
118 |
+
_qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
|
119 |
+
\"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE
|
120 |
+
_Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LIB_DEPENDENCIES
|
121 |
+
_Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LINK_FLAGS
|
122 |
+
)
|
123 |
+
+ endif()
|
124 |
+
!!ELSE
|
125 |
+
_qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
|
126 |
+
\"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE
|
127 |
+
_Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LIB_DEPENDENCIES
|
128 |
+
_Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LINK_FLAGS
|
129 |
+
)
|
130 |
+
-!!ENDIF
|
131 |
+
!!ENDIF
|
132 |
+
endif()
|
133 |
+
|
134 |
+
@@ -466,7 +482,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
|
135 |
+
!!IF isEmpty(CMAKE_DEBUG_TYPE)
|
136 |
+
!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
|
137 |
+
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
138 |
+
- if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
|
139 |
+
+ if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
|
140 |
+
!!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE
|
141 |
+
if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
|
142 |
+
!!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE
|
143 |
+
@@ -474,13 +490,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
|
144 |
+
!!ELSE // CMAKE_STATIC_WINDOWS_BUILD
|
145 |
+
if (EXISTS
|
146 |
+
!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
|
147 |
+
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_DEBUG}\"
|
148 |
+
+ \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_DEBUG}\"
|
149 |
+
!!ELSE
|
150 |
+
\"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\"
|
151 |
+
!!ENDIF
|
152 |
+
AND EXISTS
|
153 |
+
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
154 |
+
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
|
155 |
+
+ \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
|
156 |
+
!!ELSE
|
157 |
+
\"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
|
158 |
+
!!ENDIF
|
159 |
+
@@ -543,7 +559,11 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
|
160 |
+
set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
|
161 |
+
|
162 |
+
!!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE)
|
163 |
+
- set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
|
164 |
+
+ if(\"${Configuration}\" STREQUAL \"DEBUG\")
|
165 |
+
+ set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
|
166 |
+
+ else()
|
167 |
+
+ set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
|
168 |
+
+ endif()
|
169 |
+
!!ELSE
|
170 |
+
set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
|
171 |
+
!!ENDIF
|
172 |
+
@@ -557,15 +577,15 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
|
173 |
+
${_Qt5${Plugin}_STATIC_${Configuration}_LIB_DEPENDENCIES}
|
174 |
+
)
|
175 |
+
|
176 |
+
- if(NOT "${IsDebugAndRelease}")
|
177 |
+
- set(_genex_condition \"1\")
|
178 |
+
+ #if(NOT "${IsDebugAndRelease}")
|
179 |
+
+ # set(_genex_condition \"1\")
|
180 |
+
+ #else()
|
181 |
+
+ if("${Configuration}" STREQUAL "DEBUG")
|
182 |
+
+ set(_genex_condition \"$<CONFIG:Debug>\")
|
183 |
+
else()
|
184 |
+
- if("${Configuration}" STREQUAL "DEBUG")
|
185 |
+
- set(_genex_condition \"$<CONFIG:Debug>\")
|
186 |
+
- else()
|
187 |
+
- set(_genex_condition \"$<NOT:$<CONFIG:Debug>>\")
|
188 |
+
- endif()
|
189 |
+
+ set(_genex_condition \"$<NOT:$<CONFIG:Debug>>\")
|
190 |
+
endif()
|
191 |
+
+ #endif()
|
192 |
+
if(_static_deps)
|
193 |
+
set(_static_deps_genex \"$<${_genex_condition}:${_static_deps}>\")
|
194 |
+
set_property(TARGET Qt5::${Plugin} APPEND PROPERTY INTERFACE_LINK_LIBRARIES
|
cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/Qt5GuiConfigExtras.patch
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in
|
2 |
+
index 84dbbfebd..accb86e3f 100644
|
3 |
+
--- a/src/gui/Qt5GuiConfigExtras.cmake.in
|
4 |
+
+++ b/src/gui/Qt5GuiConfigExtras.cmake.in
|
5 |
+
@@ -148,6 +153,8 @@ macro(_qt5gui_find_extra_libs Name Libs LibDir IncDirs)
|
6 |
+
!!ENDIF
|
7 |
+
unset(Qt5Gui_${_cmake_lib_name}_LIBRARY CACHE)
|
8 |
+
|
9 |
+
+ find_library(Qt5Gui_${_cmake_lib_name}_LIBRARY_DEBUG ${_lib}d ${_lib} NAMES_PER_DIR
|
10 |
+
+ PATHS \"${_qt5Gui_install_prefix}/debug/lib\" NO_DEFAULT_PATH)
|
11 |
+
find_library(Qt5Gui_${_cmake_lib_name}_LIBRARY_DEBUG ${_lib}d
|
12 |
+
PATHS \"${LibDir}\"
|
13 |
+
!!IF !mac
|
cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/Qt5PluginTarget.patch
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
|
2 |
+
index 5baf0fdb1..185abfffd 100644
|
3 |
+
--- a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
|
4 |
+
+++ b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
|
5 |
+
@@ -15,13 +15,14 @@ foreach(_module_dep ${_Qt5$${CMAKE_PLUGIN_NAME}_MODULE_DEPENDENCIES})
|
6 |
+
endif()
|
7 |
+
endforeach()
|
8 |
+
|
9 |
+
-!!IF !isEmpty(CMAKE_RELEASE_TYPE)
|
10 |
+
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
11 |
+
-_qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
|
12 |
+
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE
|
13 |
+
- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_RELEASE_LIB_DEPENDENCIES
|
14 |
+
- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_RELEASE_LINK_FLAGS
|
15 |
+
-)
|
16 |
+
+if(EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\")
|
17 |
+
+ _qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
|
18 |
+
+ \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE
|
19 |
+
+ _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_RELEASE_LIB_DEPENDENCIES
|
20 |
+
+ _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_RELEASE_LINK_FLAGS
|
21 |
+
+ )
|
22 |
+
+endif()
|
23 |
+
!!ELSE
|
24 |
+
_qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
|
25 |
+
\"$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE
|
26 |
+
@@ -29,15 +30,15 @@ _qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
|
27 |
+
_Qt5$${CMAKE_PLUGIN_NAME}_STATIC_RELEASE_LINK_FLAGS
|
28 |
+
)
|
29 |
+
!!ENDIF
|
30 |
+
-!!ENDIF
|
31 |
+
|
32 |
+
-!!IF !isEmpty(CMAKE_DEBUG_TYPE)
|
33 |
+
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
34 |
+
-_qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
|
35 |
+
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG
|
36 |
+
- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_DEBUG_LIB_DEPENDENCIES
|
37 |
+
- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_DEBUG_LINK_FLAGS
|
38 |
+
-)
|
39 |
+
+if(EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\")
|
40 |
+
+ _qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
|
41 |
+
+ \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG
|
42 |
+
+ _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_DEBUG_LIB_DEPENDENCIES
|
43 |
+
+ _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_DEBUG_LINK_FLAGS
|
44 |
+
+ )
|
45 |
+
+endif()
|
46 |
+
!!ELSE
|
47 |
+
_qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
|
48 |
+
\"$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG
|
49 |
+
@@ -45,19 +46,18 @@ _qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
|
50 |
+
_Qt5$${CMAKE_PLUGIN_NAME}_STATIC_DEBUG_LINK_FLAGS
|
51 |
+
)
|
52 |
+
!!ENDIF
|
53 |
+
-!!ENDIF
|
54 |
+
|
55 |
+
set_property(TARGET Qt5::$$CMAKE_PLUGIN_NAME PROPERTY INTERFACE_SOURCES
|
56 |
+
\"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}_$${CMAKE_PLUGIN_NAME}_Import.cpp\"
|
57 |
+
)
|
58 |
+
!!ENDIF
|
59 |
+
|
60 |
+
-!!IF !isEmpty(CMAKE_RELEASE_TYPE)
|
61 |
+
-_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE})
|
62 |
+
-!!ENDIF
|
63 |
+
-!!IF !isEmpty(CMAKE_DEBUG_TYPE)
|
64 |
+
-_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG}\" $${CMAKE_DEBUG_AND_RELEASE})
|
65 |
+
-!!ENDIF
|
66 |
+
+if(EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}$${CMAKE_PLUGIN_LOCATION_RELEASE}\")
|
67 |
+
+ _populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE})
|
68 |
+
+endif()
|
69 |
+
+if(EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_PLUGIN_DIR}$${CMAKE_PLUGIN_LOCATION_DEBUG}\")
|
70 |
+
+ _populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG}\" $${CMAKE_DEBUG_AND_RELEASE})
|
71 |
+
+endif()
|
72 |
+
|
73 |
+
list(APPEND Qt5$${CMAKE_MODULE_NAME}_PLUGINS Qt5::$$CMAKE_PLUGIN_NAME)
|
74 |
+
set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY QT_ALL_PLUGINS_$${CMAKE_PLUGIN_TYPE_ESCAPED} Qt5::$${CMAKE_PLUGIN_NAME})
|
cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/XKB_KEY_dead_lowline.patch
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/src/platformsupport/input/xkbcommon/qxkbcommon.cpp b/src/platformsupport/input/xkbcommon/qxkbcommon.cpp
|
2 |
+
index 7bfacf4..ded358a 100644
|
3 |
+
--- a/src/platformsupport/input/xkbcommon/qxkbcommon.cpp
|
4 |
+
+++ b/src/platformsupport/input/xkbcommon/qxkbcommon.cpp
|
5 |
+
@@ -273,11 +273,13 @@ static constexpr const auto KeyTbl = qMakeArray(
|
6 |
+
Xkb2Qt<XKB_KEY_dead_small_schwa, Qt::Key_Dead_Small_Schwa>,
|
7 |
+
Xkb2Qt<XKB_KEY_dead_capital_schwa, Qt::Key_Dead_Capital_Schwa>,
|
8 |
+
Xkb2Qt<XKB_KEY_dead_greek, Qt::Key_Dead_Greek>,
|
9 |
+
+#ifdef XKB_KEY_dead_lowline
|
10 |
+
Xkb2Qt<XKB_KEY_dead_lowline, Qt::Key_Dead_Lowline>,
|
11 |
+
Xkb2Qt<XKB_KEY_dead_aboveverticalline, Qt::Key_Dead_Aboveverticalline>,
|
12 |
+
Xkb2Qt<XKB_KEY_dead_belowverticalline, Qt::Key_Dead_Belowverticalline>,
|
13 |
+
Xkb2Qt<XKB_KEY_dead_longsolidusoverlay, Qt::Key_Dead_Longsolidusoverlay>,
|
14 |
+
|
15 |
+
+#endif
|
16 |
+
// Special keys from X.org - This include multimedia keys,
|
17 |
+
// wireless/bluetooth/uwb keys, special launcher keys, etc.
|
18 |
+
Xkb2Qt<XKB_KEY_XF86Back, Qt::Key_Back>,
|
cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/cocoa.patch
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h b/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h
|
2 |
+
index e070ba97..07c75b04 100644
|
3 |
+
--- a/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h
|
4 |
+
+++ b/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h
|
5 |
+
@@ -40,6 +40,7 @@
|
6 |
+
#ifndef QIOSURFACEGRAPHICSBUFFER_H
|
7 |
+
#define QIOSURFACEGRAPHICSBUFFER_H
|
8 |
+
|
9 |
+
+#include <CoreGraphics/CGColorSpace.h>
|
10 |
+
#include <qpa/qplatformgraphicsbuffer.h>
|
11 |
+
#include <private/qcore_mac_p.h>
|
12 |
+
|
cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/create_cmake.patch
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
|
2 |
+
index 4aa5dad46..cee6d2882 100644
|
3 |
+
--- a/mkspecs/features/create_cmake.prf
|
4 |
+
+++ b/mkspecs/features/create_cmake.prf
|
5 |
+
@@ -212,10 +212,10 @@ contains(CONFIG, plugin) {
|
6 |
+
CMAKE_PLUGIN_TYPE_ESCAPED = $$replace(PLUGIN_TYPE, [-/], _)
|
7 |
+
|
8 |
+
win32 {
|
9 |
+
- !mingw|qtConfig(debug_and_release): debug_suffix="d"
|
10 |
+
+ debug_suffix="d"
|
11 |
+
|
12 |
+
CMAKE_PRL_FILE_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.prl
|
13 |
+
CMAKE_PRL_FILE_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}$${debug_suffix}.prl
|
14 |
+
|
15 |
+
isEmpty(CMAKE_STATIC_TYPE) {
|
16 |
+
CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.dll
|
17 |
+
@@ -295,6 +295,7 @@ CMAKE_INTERFACE_QT5_MODULE_DEPS = $$join(aux_lib_deps, ";")
|
18 |
+
equals(TEMPLATE, aux): CMAKE_FEATURE_PROPERTY_PREFIX = "INTERFACE_"
|
19 |
+
|
20 |
+
mac {
|
21 |
+
+ CMAKE_FIND_OTHER_LIBRARY_BUILD = "true"
|
22 |
+
!isEmpty(CMAKE_STATIC_TYPE) {
|
23 |
+
CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}_debug.a
|
24 |
+
CMAKE_LIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a
|
25 |
+
@@ -315,7 +316,7 @@ mac {
|
26 |
+
CMAKE_WINDOWS_BUILD = "true"
|
27 |
+
CMAKE_FIND_OTHER_LIBRARY_BUILD = "true"
|
28 |
+
|
29 |
+
- !mingw|qtConfig(debug_and_release): debug_suffix="d"
|
30 |
+
+ debug_suffix="d"
|
31 |
+
|
32 |
+
CMAKE_LIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}$${debug_suffix}.dll
|
33 |
+
CMAKE_LIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.dll
|
34 |
+
@@ -342,6 +342,7 @@ mac {
|
35 |
+
CMAKE_IMPLIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.lib
|
36 |
+
}
|
37 |
+
} else {
|
38 |
+
+ CMAKE_FIND_OTHER_LIBRARY_BUILD = "true"
|
39 |
+
!isEmpty(CMAKE_STATIC_TYPE) {
|
40 |
+
CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}.a
|
41 |
+
CMAKE_LIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a
|
cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/egl.patch
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/src/gui/configure.json b/src/gui/configure.json
|
2 |
+
index 5fceb1150..7702cb261 100644
|
3 |
+
--- a/src/gui/configure.json
|
4 |
+
+++ b/src/gui/configure.json
|
5 |
+
@@ -220,7 +220,10 @@
|
6 |
+
"headers": "EGL/egl.h",
|
7 |
+
"sources": [
|
8 |
+
{ "type": "pkgConfig", "args": "egl" },
|
9 |
+
- { "type": "makeSpec", "spec": "EGL" }
|
10 |
+
+ { "type": "makeSpec", "spec": "EGL" },
|
11 |
+
+ { "libs": "-lEGL -lGLESv2 -lGL -lANGLE -lGL -lX11 -ldl -lm -lpthread" },
|
12 |
+
+ { "libs": "-DGL_GLES_PROTOTYPES=1 -DGL_GLEXT_PROTOTYPES -DEGL_EGL_PROTOTYPES=1 -DEGL_EGLEXT_PROTOTYPES -lEGL -lGLESv2 -lGL -lANGLE -lGL -lX11 -ldl -lm -lpthread" },
|
13 |
+
+ { "libs": "-DANGLE_EXPORT -DANGLE_UTIL_EXPORT -DGL_API -DGL_APICALL -DEGLAPI -DGL_GLES_PROTOTYPES=1 -DGL_GLEXT_PROTOTYPES -DEGL_EGL_PROTOTYPES=1 -DEGL_EGLEXT_PROTOTYPES -lEGL -lGLESv2 -lGL -lANGLE -lGL -lX11 -ldl -lm -lpthread" }
|
14 |
+
]
|
15 |
+
},
|
16 |
+
"freetype": {
|
cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/fix_angle.patch
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/src/plugins/platforms/windows/qwindowseglcontext.cpp b/src/plugins/platforms/windows/qwindowseglcontext.cpp
|
2 |
+
index 4ae087dfa..3a07d511e 100644
|
3 |
+
--- a/src/plugins/platforms/windows/qwindowseglcontext.cpp
|
4 |
+
+++ b/src/plugins/platforms/windows/qwindowseglcontext.cpp
|
5 |
+
@@ -46,6 +46,21 @@
|
6 |
+
|
7 |
+
#if defined(QT_OPENGL_ES_2_ANGLE) || defined(QT_OPENGL_DYNAMIC)
|
8 |
+
# include <EGL/eglext.h>
|
9 |
+
+
|
10 |
+
+#ifndef EGL_ANGLE_platform_angle
|
11 |
+
+#define EGL_ANGLE_platform_angle 1
|
12 |
+
+#define EGL_PLATFORM_ANGLE_ANGLE 0x3202
|
13 |
+
+#define EGL_PLATFORM_ANGLE_TYPE_ANGLE 0x3203
|
14 |
+
+#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE 0x3209
|
15 |
+
+#endif /* EGL_ANGLE_platform_angle */
|
16 |
+
+
|
17 |
+
+#ifndef EGL_ANGLE_platform_angle_d3d
|
18 |
+
+#define EGL_ANGLE_platform_angle_d3d 1
|
19 |
+
+#define EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE 0x3207
|
20 |
+
+#define EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE 0x3208
|
21 |
+
+#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_WARP_ANGLE 0x320B
|
22 |
+
+#endif /* EGL_ANGLE_platform_angle_d3d */
|
23 |
+
+
|
24 |
+
#endif
|
25 |
+
|
26 |
+
QT_BEGIN_NAMESPACE
|
27 |
+
@@ -210,7 +225,7 @@ bool QWindowsEGLStaticContext::initializeAngle(QWindowsOpenGLTester::Renderers p
|
28 |
+
{ EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, EGL_NONE },
|
29 |
+
{ EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE, EGL_NONE },
|
30 |
+
{ EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
|
31 |
+
- EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE, EGL_NONE }
|
32 |
+
+ EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_WARP_ANGLE, EGL_NONE }
|
33 |
+
};
|
34 |
+
const EGLint *attributes = nullptr;
|
35 |
+
if (preferredType & QWindowsOpenGLTester::AngleRendererD3d11)
|
cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/gui_configure.patch
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/src/gui/configure.json b/src/gui/configure.json
|
2 |
+
index c51e3ceee..7f7e206b6 100644
|
3 |
+
--- a/src/gui/configure.json
|
4 |
+
+++ b/src/gui/configure.json
|
5 |
+
@@ -239,9 +239,9 @@
|
6 |
+
"headers": "ft2build.h",
|
7 |
+
"sources": [
|
8 |
+
{ "type": "pkgConfig", "args": "freetype2" },
|
9 |
+
- { "type": "freetype", "libs": "-lfreetype", "condition": "!config.wasm" },
|
10 |
+
+ { "type": "freetype", "libs": "-lbreakfreetypeautofind", "condition": "!config.wasm" },
|
11 |
+
{ "libs": "-s USE_FREETYPE=1", "condition": "config.wasm" },
|
12 |
+
- { "libs": "-lfreetype" }
|
13 |
+
+ { "libs": "-lbreakfreetypeautofind" }
|
14 |
+
],
|
15 |
+
"use": [
|
16 |
+
{ "lib": "zlib", "condition": "features.system-zlib" }
|
17 |
+
@@ -262,7 +262,10 @@
|
18 |
+
"headers": "fontconfig/fontconfig.h",
|
19 |
+
"sources": [
|
20 |
+
- { "type": "pkgConfig", "args": "fontconfig" },
|
21 |
+
+ { "type": "pkgConfig", "args": "breakfontconfig" },
|
22 |
+
- { "type": "freetype", "libs": "-lfontconfig" }
|
23 |
+
+ { "type": "freetype", "libs": "-lbreakautofind" },
|
24 |
+
+ { "libs": "-lfontconfig -lexpat" },
|
25 |
+
+ { "libs": "-llibfontconfig -llibexpat" },
|
26 |
+
+ "-lfontconfig"
|
27 |
+
],
|
28 |
+
"use": "freetype"
|
29 |
+
},
|
cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/mingw9.patch
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp
|
2 |
+
index 075ce0ffac..0d3dd2e0b2 100644
|
3 |
+
--- a/src/corelib/io/qfilesystemengine_win.cpp
|
4 |
+
+++ b/src/corelib/io/qfilesystemengine_win.cpp
|
5 |
+
@@ -627,14 +627,14 @@ QFileSystemEntry QFileSystemEngine::absoluteName(const QFileSystemEntry &entry)
|
6 |
+
return QFileSystemEntry(ret, QFileSystemEntry::FromInternalPath());
|
7 |
+
}
|
8 |
+
|
9 |
+
-#if defined(Q_CC_MINGW) && WINVER < 0x0602 // Windows 8 onwards
|
10 |
+
+#if defined(Q_CC_MINGW) && WINVER < 0x0602 && _WIN32_WINNT < _WIN32_WINNT_WIN8 // Windows 8 onwards
|
11 |
+
|
12 |
+
typedef struct _FILE_ID_INFO {
|
13 |
+
ULONGLONG VolumeSerialNumber;
|
14 |
+
FILE_ID_128 FileId;
|
15 |
+
} FILE_ID_INFO, *PFILE_ID_INFO;
|
16 |
+
|
17 |
+
-#endif // if defined (Q_CC_MINGW) && WINVER < 0x0602
|
18 |
+
+#endif // if defined(Q_CC_MINGW) && WINVER < 0x0602 && _WIN32_WINNT < _WIN32_WINNT_WIN8
|
19 |
+
|
20 |
+
// File ID for Windows up to version 7 and FAT32 drives
|
21 |
+
static inline QByteArray fileId(HANDLE handle)
|
cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/mysql-configure.patch
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
--- a/src/plugins/sqldrivers/configure.json
|
2 |
+
+++ b/src/plugins/sqldrivers/configure.json
|
3 |
+
@@ -65,7 +65,7 @@
|
4 |
+
],
|
5 |
+
"main": "mysql_get_client_version();"
|
6 |
+
},
|
7 |
+
- "headers": "mysql.h",
|
8 |
+
+ "headers": "mysql/mysql.h",
|
9 |
+
"sources": [
|
10 |
+
{ "type": "mysqlConfig", "query": "--libs_r", "cleanlibs": true },
|
11 |
+
{ "type": "mysqlConfig", "query": "--libs", "cleanlibs": true },
|
cc-multilingual-main/cc_net/vcpkg/ports/qt5-base/patches/mysql_plugin_include.patch
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
--- a/src/plugins/sqldrivers/mysql/qsql_mysql_p.h
|
2 |
+
+++ b/src/plugins/sqldrivers/mysql/qsql_mysql_p.h
|
3 |
+
@@ -57,7 +57,7 @@
|
4 |
+
#include <QtCore/qt_windows.h>
|
5 |
+
#endif
|
6 |
+
|
7 |
+
-#include <mysql.h>
|
8 |
+
+#include <mysql/mysql.h>
|
9 |
+
|
10 |
+
#ifdef QT_PLUGIN
|
11 |
+
#define Q_EXPORT_SQLDRIVER_MYSQL
|