aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/qt5-base/patches
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/qt5-base/patches')
-rw-r--r--vcpkg/ports/qt5-base/patches/CVE-2025-30348-qtbase-5.15.diff156
-rw-r--r--vcpkg/ports/qt5-base/patches/CVE-2025-4211-qtbase-5.15.diff61
-rw-r--r--vcpkg/ports/qt5-base/patches/CVE-2025-5455-qtbase-5.15.patch20
-rw-r--r--vcpkg/ports/qt5-base/patches/Qt5BasicConfig.patch194
-rw-r--r--vcpkg/ports/qt5-base/patches/Qt5GuiConfigExtras.patch13
-rw-r--r--vcpkg/ports/qt5-base/patches/Qt5PluginTarget.patch74
-rw-r--r--vcpkg/ports/qt5-base/patches/create_cmake.patch41
-rw-r--r--vcpkg/ports/qt5-base/patches/egl.patch16
-rw-r--r--vcpkg/ports/qt5-base/patches/fix_angle.patch35
-rw-r--r--vcpkg/ports/qt5-base/patches/mingw9.patch21
-rw-r--r--vcpkg/ports/qt5-base/patches/mysql-configure.patch11
-rw-r--r--vcpkg/ports/qt5-base/patches/mysql_plugin_include.patch11
-rw-r--r--vcpkg/ports/qt5-base/patches/patch-qtbase-memory_resource.diff11
-rw-r--r--vcpkg/ports/qt5-base/patches/qmake-arm64.patch18
-rw-r--r--vcpkg/ports/qt5-base/patches/qt_app.patch17
-rw-r--r--vcpkg/ports/qt5-base/patches/qtbug_96392.patch27
-rw-r--r--vcpkg/ports/qt5-base/patches/static_opengl.patch62
-rw-r--r--vcpkg/ports/qt5-base/patches/vulkan-windows.diff13
-rw-r--r--vcpkg/ports/qt5-base/patches/windows_prf.patch13
-rw-r--r--vcpkg/ports/qt5-base/patches/winmain_pro.patch27
-rw-r--r--vcpkg/ports/qt5-base/patches/xlib.patch39
21 files changed, 880 insertions, 0 deletions
diff --git a/vcpkg/ports/qt5-base/patches/CVE-2025-30348-qtbase-5.15.diff b/vcpkg/ports/qt5-base/patches/CVE-2025-30348-qtbase-5.15.diff
new file mode 100644
index 0000000..bbc001a
--- /dev/null
+++ b/vcpkg/ports/qt5-base/patches/CVE-2025-30348-qtbase-5.15.diff
@@ -0,0 +1,156 @@
+From 16918c1df3e709df2a97281e3825d94c84edb668 Mon Sep 17 00:00:00 2001
+From: Christian Ehrlicher <ch.ehrlicher@gmx.de>
+Date: Tue, 06 Aug 2024 22:39:44 +0200
+Subject: [PATCH] XML/QDom: speedup encodeText()
+
+The code copied the whole string, then replaced parts inline, at
+the cost of relocating everything beyond, at each replacement.
+Instead, copy character by character (in chunks where possible)
+and append replacements as we skip what they replace.
+
+Manual conflict resolution for 6.5:
+- This is a manual cherry-pick. The original change was only
+ picked to 6.8, but the quadratic behavior is present in Qt 5, too.
+- Changed Task-number to Fixes: because this is the real fix;
+ the QString change, 315210de916d060c044c01e53ff249d676122b1b,
+ was unrelated to the original QTBUG-127549.
+
+Manual conflcit resolution for 5.15:
+- Kept/re-added QTextCodec::canEncode() check
+- Ported from Qt 6 to 5, to wit:
+ - qsizetype -> int
+ - QStringView::first/sliced(n) -> left/mid(n)
+ (these functions are clearly called in-range, so the widened
+ contract of the Qt 5 functions doesn't matter)
+- Ported from C++17- and C++14-isms to C++11:
+ - replaced polymorphic lambda with a normal one (this requires
+ rewriting the !canEncode() branch to use QByteArray/QLatin1String
+ instead of QString)
+- As a drive-by, corrected the indentation of the case labels to
+ horizontally align existing code (and follow Qt style)
+
+Fixes: QTBUG-127549
+Change-Id: I368482859ed0c4127f1eec2919183711b5488ada
+Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
+(cherry picked from commit 2ce08e3671b8d18b0284447e5908ce15e6e8f80f)
+Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
+(cherry picked from commit 225e235cf966a44af23dbe9aaaa2fd20ab6430ee)
+Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
+(cherry picked from commit 905a5bd421efff6a1d90b6140500d134d32ca745)
+---
+
+diff --git a/src/xml/dom/qdom.cpp b/src/xml/dom/qdom.cpp
+index 872221c..bf70477 100644
+--- a/src/xml/dom/qdom.cpp
++++ b/src/xml/dom/qdom.cpp
+@@ -3676,59 +3676,67 @@
+ const QTextCodec *const codec = s.codec();
+ Q_ASSERT(codec);
+ #endif
+- QString retval(str);
+- int len = retval.length();
+- int i = 0;
++ QString retval;
++ int start = 0;
++ auto appendToOutput = [&](int cur, QLatin1String replacement)
++ {
++ if (start < cur) {
++ retval.reserve(str.size() + replacement.size());
++ retval.append(QStringView(str).left(cur).mid(start));
++ }
++ // Skip over str[cur], replaced by replacement
++ start = cur + 1;
++ retval.append(replacement);
++ };
+
+- while (i < len) {
+- const QChar ati(retval.at(i));
+-
+- if (ati == QLatin1Char('<')) {
+- retval.replace(i, 1, QLatin1String("&lt;"));
+- len += 3;
+- i += 4;
+- } else if (encodeQuotes && (ati == QLatin1Char('"'))) {
+- retval.replace(i, 1, QLatin1String("&quot;"));
+- len += 5;
+- i += 6;
+- } else if (ati == QLatin1Char('&')) {
+- retval.replace(i, 1, QLatin1String("&amp;"));
+- len += 4;
+- i += 5;
+- } else if (ati == QLatin1Char('>') && i >= 2 && retval[i - 1] == QLatin1Char(']') && retval[i - 2] == QLatin1Char(']')) {
+- retval.replace(i, 1, QLatin1String("&gt;"));
+- len += 3;
+- i += 4;
+- } else if (performAVN &&
+- (ati == QChar(0xA) ||
+- ati == QChar(0xD) ||
+- ati == QChar(0x9))) {
+- const QString replacement(QLatin1String("&#x") + QString::number(ati.unicode(), 16) + QLatin1Char(';'));
+- retval.replace(i, 1, replacement);
+- i += replacement.length();
+- len += replacement.length() - 1;
+- } else if (encodeEOLs && ati == QChar(0xD)) {
+- retval.replace(i, 1, QLatin1String("&#xd;")); // Replace a single 0xD with a ref for 0xD
+- len += 4;
+- i += 5;
+- } else {
++ const int len = str.size();
++ for (int cur = 0; cur < len; ++cur) {
++ switch (const char16_t ati = str[cur].unicode()) {
++ case u'<':
++ appendToOutput(cur, QLatin1String("&lt;"));
++ break;
++ case u'"':
++ if (encodeQuotes)
++ appendToOutput(cur, QLatin1String("&quot;"));
++ break;
++ case u'&':
++ appendToOutput(cur, QLatin1String("&amp;"));
++ break;
++ case u'>':
++ if (cur >= 2 && str[cur - 1] == u']' && str[cur - 2] == u']')
++ appendToOutput(cur, QLatin1String("&gt;"));
++ break;
++ case u'\r':
++ if (performAVN || encodeEOLs)
++ appendToOutput(cur, QLatin1String("&#xd;")); // \r == 0x0d
++ break;
++ case u'\n':
++ if (performAVN)
++ appendToOutput(cur, QLatin1String("&#xa;")); // \n == 0x0a
++ break;
++ case u'\t':
++ if (performAVN)
++ appendToOutput(cur, QLatin1String("&#x9;")); // \t == 0x09
++ break;
++ default:
+ #if QT_CONFIG(textcodec)
+ if(codec->canEncode(ati))
+- ++i;
++ ; // continue
+ else
+ #endif
+ {
+ // We have to use a character reference to get it through.
+- const ushort codepoint(ati.unicode());
+- const QString replacement(QLatin1String("&#x") + QString::number(codepoint, 16) + QLatin1Char(';'));
+- retval.replace(i, 1, replacement);
+- i += replacement.length();
+- len += replacement.length() - 1;
++ const QByteArray replacement = "&#x" + QByteArray::number(uint{ati}, 16) + ';';
++ appendToOutput(cur, QLatin1String{replacement});
+ }
++ break;
+ }
+ }
+-
+- return retval;
++ if (start > 0) {
++ retval.append(QStringView(str).left(len).mid(start));
++ return retval;
++ }
++ return str;
+ }
+
+ void QDomAttrPrivate::save(QTextStream& s, int, int) const
diff --git a/vcpkg/ports/qt5-base/patches/CVE-2025-4211-qtbase-5.15.diff b/vcpkg/ports/qt5-base/patches/CVE-2025-4211-qtbase-5.15.diff
new file mode 100644
index 0000000..1437f33
--- /dev/null
+++ b/vcpkg/ports/qt5-base/patches/CVE-2025-4211-qtbase-5.15.diff
@@ -0,0 +1,61 @@
+From 3d20cd0105c2ae06605c5078e7675e200f1a001a Mon Sep 17 00:00:00 2001
+From: MÃ¥rten Nordheim <marten.nordheim@qt.io>
+Date: Mon, 17 Mar 2025 14:22:11 +0100
+Subject: [PATCH] QFileSystemEngine/Win: Use GetTempPath2 when available
+
+Because the documentation for GetTempPath nows says apps should call
+GetTempPath2.[0]
+
+Starting with Windows 11[1], and recently Windows 10[2],
+GetTempPath2 was added. The difference being that elevated
+processes are returned a different directory. Usually
+'C:\Windows\SystemTemp'.
+
+Currently temporary files of an elevated process may be placed in a
+world write-able location. GetTempPath2, by default, but can be
+overridden, places it in a directory that's only accessible by SYSTEM
+and administrators.
+
+[0] https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-gettemppathw#remarks
+[1] https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-gettemppath2w
+(Minimum supported client - Windows 11 Build 22000)
+[2] https://blogs.windows.com/windows-insider/2025/03/13/releasing-windows-10-build-19045-5674-to-the-release-preview-channel/
+(This update enables system processes to store temporary files ...)
+
+[ChangeLog][QtCore][Important Behavior Changes] On
+Windows, generating temporary directories for processes with elevated
+privileges may now return a different path with a stricter
+set of permissions. Please consult Microsoft's documentation from when
+they made the same change for the .NET framework:
+https://support.microsoft.com/en-us/topic/gettemppath-changes-in-windows-february-cumulative-update-preview-4cc631fb-9d97-4118-ab6d-f643cd0a7259
+
+Change-Id: I5caf11151fb2f711bbc5599231f140598b3c9d03
+Reviewed-by: Marc Mutz <marc.mutz@qt.io>
+(cherry picked from commit 69633bcb58e681bac5bff3744e5a2352788dc36c)
+Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
+(cherry picked from commit 6a684a53b371ec483b27bf243af24819be63f85f)
+(cherry picked from commit bbeccc0c22e520f46f0b33e281fa5ac85ac9c727)
+(cherry picked from commit 59d7eb9bbb4f13cccbd9323fd995a8c108b56e60)
+---
+
+diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp
+index 75c661f..37a400f 100644
+--- a/src/corelib/io/qfilesystemengine_win.cpp
++++ b/src/corelib/io/qfilesystemengine_win.cpp
+@@ -1390,7 +1390,15 @@
+ QString ret;
+ #ifndef Q_OS_WINRT
+ wchar_t tempPath[MAX_PATH];
+- const DWORD len = GetTempPath(MAX_PATH, tempPath);
++ using GetTempPathPrototype = DWORD (WINAPI *)(DWORD, LPWSTR);
++ // We try to resolve GetTempPath2 and use that, otherwise fall back to GetTempPath:
++ static GetTempPathPrototype getTempPathW = []() {
++ const HMODULE kernel32 = GetModuleHandleW(L"kernel32.dll");
++ if (auto *func = QFunctionPointer(GetProcAddress(kernel32, "GetTempPath2W")))
++ return GetTempPathPrototype(func);
++ return GetTempPath;
++ }();
++ const DWORD len = getTempPathW(MAX_PATH, tempPath);
+ if (len) { // GetTempPath() can return short names, expand.
+ wchar_t longTempPath[MAX_PATH];
+ const DWORD longLen = GetLongPathName(tempPath, longTempPath, MAX_PATH);
diff --git a/vcpkg/ports/qt5-base/patches/CVE-2025-5455-qtbase-5.15.patch b/vcpkg/ports/qt5-base/patches/CVE-2025-5455-qtbase-5.15.patch
new file mode 100644
index 0000000..9cee864
--- /dev/null
+++ b/vcpkg/ports/qt5-base/patches/CVE-2025-5455-qtbase-5.15.patch
@@ -0,0 +1,20 @@
+diff --git a/src/corelib/io/qdataurl.cpp b/src/corelib/io/qdataurl.cpp
+index f14d399301f..83e59e3ac00 100644
+--- a/src/corelib/io/qdataurl.cpp
++++ b/src/corelib/io/qdataurl.cpp
+@@ -76,10 +76,11 @@ Q_CORE_EXPORT bool qDecodeDataUrl(const QUrl &uri, QString &mimeType, QByteArray
+ }
+
+ if (data.toLower().startsWith("charset")) {
+- int i = 7; // strlen("charset")
+- while (data.at(i) == ' ')
+- ++i;
+- if (data.at(i) == '=')
++ int prefixSize = 7; // strlen("charset")
++ QLatin1String copy(data.constData() + prefixSize, data.size() - prefixSize);
++ while (copy.startsWith(QLatin1String(" ")))
++ copy = copy.mid(1);
++ if (copy.startsWith(QLatin1String("=")))
+ data.prepend("text/plain;");
+ }
+
diff --git a/vcpkg/ports/qt5-base/patches/Qt5BasicConfig.patch b/vcpkg/ports/qt5-base/patches/Qt5BasicConfig.patch
new file mode 100644
index 0000000..4f5d1fa
--- /dev/null
+++ b/vcpkg/ports/qt5-base/patches/Qt5BasicConfig.patch
@@ -0,0 +1,194 @@
+diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
+index c72989288..a88234dca 100644
+--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
++++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
+@@ -53,8 +53,12 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura
+ set(_lib_deps)
+ set(_link_flags)
+
+-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
+- set(_qt5_install_libs \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}\")
++!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
++ if(\"${Configuration}\" STREQUAL \"DEBUG\")
++ set(_qt5_install_libs \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_LIB_DIR}\")
++ else()
++ set(_qt5_install_libs \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}\")
++ endif()
+ !!ELSE
+ set(_qt5_install_libs \"$${CMAKE_LIB_DIR}\")
+ !!ENDIF
+@@ -125,6 +129,8 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura
+ elseif(EXISTS \"${_flag}\")
+ # The flag is an absolute path to an existing library
+ list(APPEND _lib_deps \"${_flag}\")
++ elseif(_flag MATCHES \"\\\\.lib$\") #Library name only. No -l. Probably missing some cases
++ list(APPEND _lib_deps \"${_flag}\")
+ elseif(_flag MATCHES \"^-L(.*)$\")
+ # Handle -Lfoo flags by putting their paths in the search path used by find_library above
+ list(APPEND _search_paths \"${CMAKE_MATCH_1}\")
+@@ -147,7 +153,11 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI
+ set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
+
+ !!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
+- set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
++ if(\"${Configuration}\" STREQUAL \"DEBUG\") # 1
++ set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
++ else()
++ set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
++ endif()
+ !!ELSE
+ set(imported_location \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
+ !!ENDIF
+@@ -174,21 +184,22 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI
+ )
+
+ !!IF !isEmpty(CMAKE_STATIC_TYPE)
+- if(NOT "${IsDebugAndRelease}")
+- set(_genex_condition \"1\")
++ #if(NOT "${IsDebugAndRelease}")
++ # set(_genex_condition \"1\")
++ #else()
++ if("${Configuration}" STREQUAL "DEBUG")
++ set(_genex_condition \"$<CONFIG:Debug>\")
+ else()
+- if("${Configuration}" STREQUAL "DEBUG")
+- set(_genex_condition \"$<CONFIG:Debug>\")
+- else()
+- set(_genex_condition \"$<NOT:$<CONFIG:Debug>>\")
+- endif()
++ set(_genex_condition \"$<NOT:$<CONFIG:Debug>>\")
+ endif()
++ #endif()
+
+ if(_static_deps)
+ set(_static_deps_genex \"$<${_genex_condition}:${_static_deps}>\")
+ set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY INTERFACE_LINK_LIBRARIES
+ \"${_static_deps_genex}\"
+ )
++ #message(STATUS \"Target Qt5::$${CMAKE_MODULE_NAME} static links: ${_static_dep} through ${_static_dep_genex}\") # Added for debugging
+ endif()
+
+ set(_static_link_flags \"${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LINK_FLAGS}\")
+@@ -205,13 +216,18 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI
+ set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY INTERFACE_LINK_LIBRARIES
+ \"${_static_link_flags_genex}\"
+ )
++ #message(STATUS \"Target Qt5::$${CMAKE_MODULE_NAME} static link flags: ${_static_link_flags} through ${_static_link_flags_genex}\")
+ endif()
+ endif()
+ !!ENDIF
+
+ !!IF !isEmpty(CMAKE_WINDOWS_BUILD)
+ !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
+- set(imported_implib \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
++ if(\"${Configuration}\" STREQUAL \"DEBUG\")
++ set(imported_implib \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
++ else()
++ set(imported_implib \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
++ endif()
+ !!ELSE
+ set(imported_implib \"IMPORTED_IMPLIB_${Configuration}\" \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
+ !!ENDIF
+@@ -373,13 +389,14 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+
+ !!IF !isEmpty(CMAKE_STATIC_TYPE)
+ if(NOT Qt5_EXCLUDE_STATIC_DEPENDENCIES)
+-!!IF !isEmpty(CMAKE_DEBUG_TYPE)
+ !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
++ if(EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\")
+ _qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
+- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG
++ \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG
+ _Qt5$${CMAKE_MODULE_NAME}_STATIC_DEBUG_LIB_DEPENDENCIES
+ _Qt5$${CMAKE_MODULE_NAME}_STATIC_DEBUG_LINK_FLAGS
+ )
++ endif()
+ !!ELSE
+ _qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
+ \"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG
+@@ -387,22 +404,21 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+ _Qt5$${CMAKE_MODULE_NAME}_STATIC_DEBUG_LINK_FLAGS
+ )
+ !!ENDIF
+-!!ENDIF
+
+-!!IF !isEmpty(CMAKE_RELEASE_TYPE)
+ !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
++ if(EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\")
+ _qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
+ \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE
+ _Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LIB_DEPENDENCIES
+ _Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LINK_FLAGS
+ )
++ endif()
+ !!ELSE
+ _qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
+ \"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE
+ _Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LIB_DEPENDENCIES
+ _Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LINK_FLAGS
+ )
+-!!ENDIF
+ !!ENDIF
+ endif()
+
+@@ -466,7 +482,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+ !!IF isEmpty(CMAKE_DEBUG_TYPE)
+ !!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
+ !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
+- if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
++ if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
+ !!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE
+ if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
+ !!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE
+@@ -474,13 +490,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+ !!ELSE // CMAKE_STATIC_WINDOWS_BUILD
+ if (EXISTS
+ !!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
+- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_DEBUG}\"
++ \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_DEBUG}\"
+ !!ELSE
+ \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\"
+ !!ENDIF
+ AND EXISTS
+ !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
+- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
++ \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
+ !!ELSE
+ \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
+ !!ENDIF
+@@ -543,7 +559,11 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+ set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
+
+ !!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE)
+- set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
++ if(\"${Configuration}\" STREQUAL \"DEBUG\")
++ set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
++ else()
++ set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
++ endif()
+ !!ELSE
+ set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
+ !!ENDIF
+@@ -557,15 +577,15 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+ ${_Qt5${Plugin}_STATIC_${Configuration}_LIB_DEPENDENCIES}
+ )
+
+- if(NOT "${IsDebugAndRelease}")
+- set(_genex_condition \"1\")
++ #if(NOT "${IsDebugAndRelease}")
++ # set(_genex_condition \"1\")
++ #else()
++ if("${Configuration}" STREQUAL "DEBUG")
++ set(_genex_condition \"$<CONFIG:Debug>\")
+ else()
+- if("${Configuration}" STREQUAL "DEBUG")
+- set(_genex_condition \"$<CONFIG:Debug>\")
+- else()
+- set(_genex_condition \"$<NOT:$<CONFIG:Debug>>\")
+- endif()
++ set(_genex_condition \"$<NOT:$<CONFIG:Debug>>\")
+ endif()
++ #endif()
+ if(_static_deps)
+ set(_static_deps_genex \"$<${_genex_condition}:${_static_deps}>\")
+ set_property(TARGET Qt5::${Plugin} APPEND PROPERTY INTERFACE_LINK_LIBRARIES
diff --git a/vcpkg/ports/qt5-base/patches/Qt5GuiConfigExtras.patch b/vcpkg/ports/qt5-base/patches/Qt5GuiConfigExtras.patch
new file mode 100644
index 0000000..0029f2a
--- /dev/null
+++ b/vcpkg/ports/qt5-base/patches/Qt5GuiConfigExtras.patch
@@ -0,0 +1,13 @@
+diff --git a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in
+index 84dbbfebd..accb86e3f 100644
+--- a/src/gui/Qt5GuiConfigExtras.cmake.in
++++ b/src/gui/Qt5GuiConfigExtras.cmake.in
+@@ -148,6 +153,8 @@ macro(_qt5gui_find_extra_libs Name Libs LibDir IncDirs)
+ !!ENDIF
+ unset(Qt5Gui_${_cmake_lib_name}_LIBRARY CACHE)
+
++ find_library(Qt5Gui_${_cmake_lib_name}_LIBRARY_DEBUG ${_lib}d ${_lib} NAMES_PER_DIR
++ PATHS \"${_qt5Gui_install_prefix}/debug/lib\" NO_DEFAULT_PATH)
+ find_library(Qt5Gui_${_cmake_lib_name}_LIBRARY_DEBUG ${_lib}d
+ PATHS \"${LibDir}\"
+ !!IF !mac
diff --git a/vcpkg/ports/qt5-base/patches/Qt5PluginTarget.patch b/vcpkg/ports/qt5-base/patches/Qt5PluginTarget.patch
new file mode 100644
index 0000000..a8377b5
--- /dev/null
+++ b/vcpkg/ports/qt5-base/patches/Qt5PluginTarget.patch
@@ -0,0 +1,74 @@
+diff --git a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
+index 5baf0fdb1..185abfffd 100644
+--- a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
++++ b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
+@@ -15,13 +15,14 @@ foreach(_module_dep ${_Qt5$${CMAKE_PLUGIN_NAME}_MODULE_DEPENDENCIES})
+ endif()
+ endforeach()
+
+-!!IF !isEmpty(CMAKE_RELEASE_TYPE)
+ !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
+-_qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
+- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE
+- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_RELEASE_LIB_DEPENDENCIES
+- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_RELEASE_LINK_FLAGS
+-)
++if(EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\")
++ _qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
++ \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE
++ _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_RELEASE_LIB_DEPENDENCIES
++ _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_RELEASE_LINK_FLAGS
++ )
++endif()
+ !!ELSE
+ _qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
+ \"$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE
+@@ -29,15 +30,15 @@ _qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
+ _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_RELEASE_LINK_FLAGS
+ )
+ !!ENDIF
+-!!ENDIF
+
+-!!IF !isEmpty(CMAKE_DEBUG_TYPE)
+ !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
+-_qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
+- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG
+- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_DEBUG_LIB_DEPENDENCIES
+- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_DEBUG_LINK_FLAGS
+-)
++if(EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\")
++ _qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
++ \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG
++ _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_DEBUG_LIB_DEPENDENCIES
++ _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_DEBUG_LINK_FLAGS
++ )
++endif()
+ !!ELSE
+ _qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
+ \"$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG
+@@ -45,19 +46,18 @@ _qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
+ _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_DEBUG_LINK_FLAGS
+ )
+ !!ENDIF
+-!!ENDIF
+
+ set_property(TARGET Qt5::$$CMAKE_PLUGIN_NAME PROPERTY INTERFACE_SOURCES
+ \"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}_$${CMAKE_PLUGIN_NAME}_Import.cpp\"
+ )
+ !!ENDIF
+
+-!!IF !isEmpty(CMAKE_RELEASE_TYPE)
+-_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE})
+-!!ENDIF
+-!!IF !isEmpty(CMAKE_DEBUG_TYPE)
+-_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG}\" $${CMAKE_DEBUG_AND_RELEASE})
+-!!ENDIF
++if(EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}$${CMAKE_PLUGIN_LOCATION_RELEASE}\")
++ _populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE})
++endif()
++if(EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_PLUGIN_DIR}$${CMAKE_PLUGIN_LOCATION_DEBUG}\")
++ _populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG}\" $${CMAKE_DEBUG_AND_RELEASE})
++endif()
+
+ list(APPEND Qt5$${CMAKE_MODULE_NAME}_PLUGINS Qt5::$$CMAKE_PLUGIN_NAME)
+ set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY QT_ALL_PLUGINS_$${CMAKE_PLUGIN_TYPE_ESCAPED} Qt5::$${CMAKE_PLUGIN_NAME})
diff --git a/vcpkg/ports/qt5-base/patches/create_cmake.patch b/vcpkg/ports/qt5-base/patches/create_cmake.patch
new file mode 100644
index 0000000..69bd39a
--- /dev/null
+++ b/vcpkg/ports/qt5-base/patches/create_cmake.patch
@@ -0,0 +1,41 @@
+diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
+index 4aa5dad46..cee6d2882 100644
+--- a/mkspecs/features/create_cmake.prf
++++ b/mkspecs/features/create_cmake.prf
+@@ -212,10 +212,10 @@ contains(CONFIG, plugin) {
+ CMAKE_PLUGIN_TYPE_ESCAPED = $$replace(PLUGIN_TYPE, [-/], _)
+
+ win32 {
+- !mingw|qtConfig(debug_and_release): debug_suffix="d"
++ debug_suffix="d"
+
+ CMAKE_PRL_FILE_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.prl
+ CMAKE_PRL_FILE_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}$${debug_suffix}.prl
+
+ isEmpty(CMAKE_STATIC_TYPE) {
+ CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.dll
+@@ -295,6 +295,7 @@ CMAKE_INTERFACE_QT5_MODULE_DEPS = $$join(aux_lib_deps, ";")
+ equals(TEMPLATE, aux): CMAKE_FEATURE_PROPERTY_PREFIX = "INTERFACE_"
+
+ mac {
++ CMAKE_FIND_OTHER_LIBRARY_BUILD = "true"
+ !isEmpty(CMAKE_STATIC_TYPE) {
+ CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}_debug.a
+ CMAKE_LIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a
+@@ -315,7 +316,7 @@ mac {
+ CMAKE_WINDOWS_BUILD = "true"
+ CMAKE_FIND_OTHER_LIBRARY_BUILD = "true"
+
+- !mingw|qtConfig(debug_and_release): debug_suffix="d"
++ debug_suffix="d"
+
+ CMAKE_LIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}$${debug_suffix}.dll
+ CMAKE_LIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.dll
+@@ -342,6 +342,7 @@ mac {
+ CMAKE_IMPLIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.lib
+ }
+ } else {
++ CMAKE_FIND_OTHER_LIBRARY_BUILD = "true"
+ !isEmpty(CMAKE_STATIC_TYPE) {
+ CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}.a
+ CMAKE_LIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a
diff --git a/vcpkg/ports/qt5-base/patches/egl.patch b/vcpkg/ports/qt5-base/patches/egl.patch
new file mode 100644
index 0000000..17f0a55
--- /dev/null
+++ b/vcpkg/ports/qt5-base/patches/egl.patch
@@ -0,0 +1,16 @@
+diff --git a/src/gui/configure.json b/src/gui/configure.json
+index 5fceb1150..7702cb261 100644
+--- a/src/gui/configure.json
++++ b/src/gui/configure.json
+@@ -220,7 +220,10 @@
+ "headers": "EGL/egl.h",
+ "sources": [
+ { "type": "pkgConfig", "args": "egl" },
+- { "type": "makeSpec", "spec": "EGL" }
++ { "type": "makeSpec", "spec": "EGL" },
++ { "libs": "-lEGL -lGLESv2 -lGL -lANGLE -lGL -lX11 -ldl -lm -lpthread" },
++ { "libs": "-DGL_GLES_PROTOTYPES=1 -DGL_GLEXT_PROTOTYPES -DEGL_EGL_PROTOTYPES=1 -DEGL_EGLEXT_PROTOTYPES -lEGL -lGLESv2 -lGL -lANGLE -lGL -lX11 -ldl -lm -lpthread" },
++ { "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" }
+ ]
+ },
+ "freetype": {
diff --git a/vcpkg/ports/qt5-base/patches/fix_angle.patch b/vcpkg/ports/qt5-base/patches/fix_angle.patch
new file mode 100644
index 0000000..3287585
--- /dev/null
+++ b/vcpkg/ports/qt5-base/patches/fix_angle.patch
@@ -0,0 +1,35 @@
+diff --git a/src/plugins/platforms/windows/qwindowseglcontext.cpp b/src/plugins/platforms/windows/qwindowseglcontext.cpp
+index 4ae087dfa..3a07d511e 100644
+--- a/src/plugins/platforms/windows/qwindowseglcontext.cpp
++++ b/src/plugins/platforms/windows/qwindowseglcontext.cpp
+@@ -46,6 +46,21 @@
+
+ #if defined(QT_OPENGL_ES_2_ANGLE) || defined(QT_OPENGL_DYNAMIC)
+ # include <EGL/eglext.h>
++
++#ifndef EGL_ANGLE_platform_angle
++#define EGL_ANGLE_platform_angle 1
++#define EGL_PLATFORM_ANGLE_ANGLE 0x3202
++#define EGL_PLATFORM_ANGLE_TYPE_ANGLE 0x3203
++#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE 0x3209
++#endif /* EGL_ANGLE_platform_angle */
++
++#ifndef EGL_ANGLE_platform_angle_d3d
++#define EGL_ANGLE_platform_angle_d3d 1
++#define EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE 0x3207
++#define EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE 0x3208
++#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_WARP_ANGLE 0x320B
++#endif /* EGL_ANGLE_platform_angle_d3d */
++
+ #endif
+
+ QT_BEGIN_NAMESPACE
+@@ -210,7 +225,7 @@ bool QWindowsEGLStaticContext::initializeAngle(QWindowsOpenGLTester::Renderers p
+ { EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, EGL_NONE },
+ { EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE, EGL_NONE },
+ { EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
+- EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE, EGL_NONE }
++ EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_WARP_ANGLE, EGL_NONE }
+ };
+ const EGLint *attributes = nullptr;
+ if (preferredType & QWindowsOpenGLTester::AngleRendererD3d11)
diff --git a/vcpkg/ports/qt5-base/patches/mingw9.patch b/vcpkg/ports/qt5-base/patches/mingw9.patch
new file mode 100644
index 0000000..03991d7
--- /dev/null
+++ b/vcpkg/ports/qt5-base/patches/mingw9.patch
@@ -0,0 +1,21 @@
+diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp
+index 075ce0ffac..0d3dd2e0b2 100644
+--- a/src/corelib/io/qfilesystemengine_win.cpp
++++ b/src/corelib/io/qfilesystemengine_win.cpp
+@@ -627,14 +627,14 @@ QFileSystemEntry QFileSystemEngine::absoluteName(const QFileSystemEntry &entry)
+ return QFileSystemEntry(ret, QFileSystemEntry::FromInternalPath());
+ }
+
+-#if defined(Q_CC_MINGW) && WINVER < 0x0602 // Windows 8 onwards
++#if defined(Q_CC_MINGW) && WINVER < 0x0602 && _WIN32_WINNT < _WIN32_WINNT_WIN8 // Windows 8 onwards
+
+ typedef struct _FILE_ID_INFO {
+ ULONGLONG VolumeSerialNumber;
+ FILE_ID_128 FileId;
+ } FILE_ID_INFO, *PFILE_ID_INFO;
+
+-#endif // if defined (Q_CC_MINGW) && WINVER < 0x0602
++#endif // if defined(Q_CC_MINGW) && WINVER < 0x0602 && _WIN32_WINNT < _WIN32_WINNT_WIN8
+
+ // File ID for Windows up to version 7 and FAT32 drives
+ static inline QByteArray fileId(HANDLE handle)
diff --git a/vcpkg/ports/qt5-base/patches/mysql-configure.patch b/vcpkg/ports/qt5-base/patches/mysql-configure.patch
new file mode 100644
index 0000000..1ec0673
--- /dev/null
+++ b/vcpkg/ports/qt5-base/patches/mysql-configure.patch
@@ -0,0 +1,11 @@
+--- a/src/plugins/sqldrivers/configure.json
++++ b/src/plugins/sqldrivers/configure.json
+@@ -65,7 +65,7 @@
+ ],
+ "main": "mysql_get_client_version();"
+ },
+- "headers": "mysql.h",
++ "headers": "mysql/mysql.h",
+ "sources": [
+ { "type": "mysqlConfig", "query": "--libs_r", "cleanlibs": true },
+ { "type": "mysqlConfig", "query": "--libs", "cleanlibs": true },
diff --git a/vcpkg/ports/qt5-base/patches/mysql_plugin_include.patch b/vcpkg/ports/qt5-base/patches/mysql_plugin_include.patch
new file mode 100644
index 0000000..a66300d
--- /dev/null
+++ b/vcpkg/ports/qt5-base/patches/mysql_plugin_include.patch
@@ -0,0 +1,11 @@
+--- a/src/plugins/sqldrivers/mysql/qsql_mysql_p.h
++++ b/src/plugins/sqldrivers/mysql/qsql_mysql_p.h
+@@ -57,7 +57,7 @@
+ #include <QtCore/qt_windows.h>
+ #endif
+
+-#include <mysql.h>
++#include <mysql/mysql.h>
+
+ #ifdef QT_PLUGIN
+ #define Q_EXPORT_SQLDRIVER_MYSQL
diff --git a/vcpkg/ports/qt5-base/patches/patch-qtbase-memory_resource.diff b/vcpkg/ports/qt5-base/patches/patch-qtbase-memory_resource.diff
new file mode 100644
index 0000000..ff05ede
--- /dev/null
+++ b/vcpkg/ports/qt5-base/patches/patch-qtbase-memory_resource.diff
@@ -0,0 +1,11 @@
+--- a/src/corelib/tools/qduplicatetracker_p.h
++++ b/src/corelib/tools/qduplicatetracker_p.h
+@@ -52,7 +52,7 @@
+
+ #include <qglobal.h>
+
+-#if QT_HAS_INCLUDE(<memory_resource>) && __cplusplus > 201402L
++#ifdef __cpp_lib_memory_resource
+ # include <unordered_set>
+ # include <memory_resource>
+ #else
diff --git a/vcpkg/ports/qt5-base/patches/qmake-arm64.patch b/vcpkg/ports/qt5-base/patches/qmake-arm64.patch
new file mode 100644
index 0000000..17ba77b
--- /dev/null
+++ b/vcpkg/ports/qt5-base/patches/qmake-arm64.patch
@@ -0,0 +1,18 @@
+diff --git a/qmake/library/qmakeevaluator.cpp b/qmake/library/qmakeevaluator.cpp
+index df3f92d7d5df..0ee8cdbf11e1 100644
+--- a/qmake/library/qmakeevaluator.cpp
++++ b/qmake/library/qmakeevaluator.cpp
+@@ -1046,6 +1046,11 @@ void QMakeEvaluator::loadDefaults()
+ case PROCESSOR_ARCHITECTURE_AMD64:
+ archStr = ProString("x86_64");
+ break;
++# endif
++# ifdef PROCESSOR_ARCHITECTURE_ARM64
++ case PROCESSOR_ARCHITECTURE_ARM64:
++ archStr = ProString("arm64");
++ break;
+ # endif
+ case PROCESSOR_ARCHITECTURE_INTEL:
+ archStr = ProString("x86");
+--
+2.16.3
diff --git a/vcpkg/ports/qt5-base/patches/qt_app.patch b/vcpkg/ports/qt5-base/patches/qt_app.patch
new file mode 100644
index 0000000..e04446b
--- /dev/null
+++ b/vcpkg/ports/qt5-base/patches/qt_app.patch
@@ -0,0 +1,17 @@
+diff --git a/mkspecs/features/qt_app.prf b/mkspecs/features/qt_app.prf
+index 8354f30e..8f24b72e 100644
+--- a/mkspecs/features/qt_app.prf
++++ b/mkspecs/features/qt_app.prf
+@@ -27,10 +27,11 @@ host_build:force_bootstrap {
+ QT -= core core-private xml
+ QT += bootstrap-private
+ }
+ target.path = $$[QT_HOST_BINS]
++ CONFIG += relative_qt_rpath # Qt's tools and apps should be relocatable
+ } else {
+ !build_pass:qtConfig(debug_and_release): CONFIG += release
+- target.path = $$[QT_INSTALL_BINS]
++ target.path = $$[QT_HOST_BINS]
+ CONFIG += relative_qt_rpath # Qt's tools and apps should be relocatable
+ }
+ INSTALLS += target
diff --git a/vcpkg/ports/qt5-base/patches/qtbug_96392.patch b/vcpkg/ports/qt5-base/patches/qtbug_96392.patch
new file mode 100644
index 0000000..2f70dfe
--- /dev/null
+++ b/vcpkg/ports/qt5-base/patches/qtbug_96392.patch
@@ -0,0 +1,27 @@
+--- a/src/gui/configure.json
++++ b/src/gui/configure.json
+@@ -842,7 +842,8 @@ "// Check if EGL is compatible with X. Some EGL implementations, typically on",
+ "// embedded devices, are not intended to be used together with X. EGL support",
+ "// has to be disabled in plugins like xcb in this case since the native display,",
+ "// window and pixmap types will be different than what an X-based platform",
+- "// plugin would expect."
++ "// plugin would expect.",
++ "#define USE_X11"
+ ],
+ "include": [ "EGL/egl.h", "X11/Xlib.h" ],
+ "main": [
+--- a/src/platformsupport/eglconvenience/qt_egl_p.h
++++ b/src/platformsupport/eglconvenience/qt_egl_p.h
+@@ -61,7 +61,11 @@ # endif
+ # if !defined(Q_OS_INTEGRITY)
+ # define WIN_INTERFACE_CUSTOM // NV
+ # endif // Q_OS_INTEGRITY
+-#endif // QT_EGL_NO_X11
++#else // QT_EGL_NO_X11
++// If one has an eglplatform.h with https://github.com/KhronosGroup/EGL-Registry/pull/130
++// that needs USE_X11 to be defined.
++# define USE_X11
++#endif
+
+ #ifdef QT_EGL_WAYLAND
+ # define WAYLAND // NV
diff --git a/vcpkg/ports/qt5-base/patches/static_opengl.patch b/vcpkg/ports/qt5-base/patches/static_opengl.patch
new file mode 100644
index 0000000..51818b8
--- /dev/null
+++ b/vcpkg/ports/qt5-base/patches/static_opengl.patch
@@ -0,0 +1,62 @@
+diff --git a/mkspecs/features/win32/opengl.prf b/mkspecs/features/win32/opengl.prf
+index f21848f94..202c49688 100644
+--- a/mkspecs/features/win32/opengl.prf
++++ b/mkspecs/features/win32/opengl.prf
+@@ -30,7 +30,7 @@ qtConfig(opengles2) {
+ LIBS += $$QMAKE_LIBS_OPENGL_ES2
+ QMAKE_LIBDIR += $$QMAKE_LIBDIR_OPENGL_ES2_RELEASE
+ }
+- qtConfig(static): DEFINES += GL_APICALL= EGLAPI=
++ qtConfig(static): DEFINES += _GDI32_ GL_APICALL= EGLAPI= ANGLE_EXPORT= ANGLE_PLATFORM_EXPORT=
+ } else {
+ !qtConfig(dynamicgl) {
+ QMAKE_LIBS += $$QMAKE_LIBS_OPENGL
+diff --git a/src/angle/src/common/gles_common.pri b/src/angle/src/common/gles_common.pri
+index 70b65dd4c..1dcc96af5 100644
+--- a/src/angle/src/common/gles_common.pri
++++ b/src/angle/src/common/gles_common.pri
+@@ -23,7 +23,8 @@ for(libname, STATICLIBS) {
+ PRE_TARGETDEPS += $$staticlib
+ }
+
+-DEFINES += LIBANGLE_IMPLEMENTATION LIBGLESV2_IMPLEMENTATION GL_APICALL= GL_GLEXT_PROTOTYPES= EGLAPI=
++!qtConfig(static): DEFINES += LIBANGLE_IMPLEMENTATION LIBGLESV2_IMPLEMENTATION
++qtConfig(static): DEFINES += GL_APICALL= EGLAPI= ANGLE_EXPORT= ANGLE_PLATFORM_EXPORT=
+ !winrt: DEFINES += ANGLE_ENABLE_D3D9 ANGLE_SKIP_DXGI_1_2_CHECK
+
+ QT_FOR_CONFIG += gui-private
+diff --git a/src/3rdparty/angle/include/platform/Platform.h b/src/3rdparty/angle/include/platform/Platform.h
+index aa1221a86..a49ee4f6d 100644
+--- a/src/3rdparty/angle/include/platform/Platform.h
++++ b/src/3rdparty/angle/include/platform/Platform.h
+@@ -12,7 +12,7 @@
+ #include <stdint.h>
+ #include <array>
+
+-#if defined(_WIN32)
++#if defined(_WIN32) && !defined(ANGLE_PLATFORM_EXPORT)
+ # if !defined(LIBANGLE_IMPLEMENTATION)
+ # define ANGLE_PLATFORM_EXPORT __declspec(dllimport)
+ # else
+diff --git a/src/3rdparty/angle/src/libGLESv2/entry_points_gles_2_0_ext.cpp b/src/3rdparty/angle/src/libGLESv2/entry_points_gles_2_0_ext.cpp
+index d4459ec28..d1416041e 100644
+--- a/src/3rdparty/angle/src/libGLESv2/entry_points_gles_2_0_ext.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/entry_points_gles_2_0_ext.cpp
+@@ -3505,7 +3505,7 @@ ANGLE_EXPORT void GL_APIENTRY GetQueryObjectui64vRobustANGLE(GLuint id,
+ }
+ }
+
+-GL_APICALL void GL_APIENTRY FramebufferTextureMultiviewLayeredANGLE(GLenum target,
++ANGLE_EXPORT void GL_APIENTRY FramebufferTextureMultiviewLayeredANGLE(GLenum target,
+ GLenum attachment,
+ GLuint texture,
+ GLint level,
+@@ -3530,7 +3530,7 @@ GL_APICALL void GL_APIENTRY FramebufferTextureMultiviewLayeredANGLE(GLenum targe
+ }
+ }
+
+-GL_APICALL void GL_APIENTRY FramebufferTextureMultiviewSideBySideANGLE(GLenum target,
++ANGLE_EXPORT void GL_APIENTRY FramebufferTextureMultiviewSideBySideANGLE(GLenum target,
+ GLenum attachment,
+ GLuint texture,
+ GLint level,
diff --git a/vcpkg/ports/qt5-base/patches/vulkan-windows.diff b/vcpkg/ports/qt5-base/patches/vulkan-windows.diff
new file mode 100644
index 0000000..0315a20
--- /dev/null
+++ b/vcpkg/ports/qt5-base/patches/vulkan-windows.diff
@@ -0,0 +1,13 @@
+diff --git a/mkspecs/features/win32/windows_vulkan_sdk.prf b/mkspecs/features/win32/windows_vulkan_sdk.prf
+index 9a749516b..242f47504 100644
+--- a/mkspecs/features/win32/windows_vulkan_sdk.prf
++++ b/mkspecs/features/win32/windows_vulkan_sdk.prf
+@@ -1,7 +1,7 @@
+ isEmpty(QMAKE_INCDIR_VULKAN) {
+ # Pick up the VULKAN_SDK env var set by the LunarG SDK so that the Vulkan
+ # headers are found out-of-the-box on typical Windows setups.
+- QMAKE_INCDIR_VULKAN = $$(VULKAN_SDK)/include
++ # QMAKE_INCDIR_VULKAN = $$(VULKAN_SDK)/include
+
+ # Do not add default include paths as that can knock std headers
+ # out of their stride due to their usage of #include_next.
diff --git a/vcpkg/ports/qt5-base/patches/windows_prf.patch b/vcpkg/ports/qt5-base/patches/windows_prf.patch
new file mode 100644
index 0000000..6051daa
--- /dev/null
+++ b/vcpkg/ports/qt5-base/patches/windows_prf.patch
@@ -0,0 +1,13 @@
+diff --git a/mkspecs/features/win32/windows.prf b/mkspecs/features/win32/windows.prf
+index 272170d4..70b8ea2e 100644
+--- a/mkspecs/features/win32/windows.prf
++++ b/mkspecs/features/win32/windows.prf
+@@ -6,7 +6,7 @@ contains(TEMPLATE, ".*app") {
+
+ qt:for(entryLib, $$list($$unique(QMAKE_LIBS_QT_ENTRY))) {
+ isEqual(entryLib, -lqtmain) {
+- lib = $$QT.core.libs/$${QMAKE_PREFIX_STATICLIB}qtmain$$QT_LIBINFIX$$qtPlatformTargetSuffix().$$QMAKE_EXTENSION_STATICLIB
++ lib = $$QT.core.libs/manual-link/$${QMAKE_PREFIX_STATICLIB}qtmain$$QT_LIBINFIX$$qtPlatformTargetSuffix().$$QMAKE_EXTENSION_STATICLIB
+ PRE_TARGETDEPS += $$lib
+ QMAKE_LIBS += $$lib
+ } else {
diff --git a/vcpkg/ports/qt5-base/patches/winmain_pro.patch b/vcpkg/ports/qt5-base/patches/winmain_pro.patch
new file mode 100644
index 0000000..66460cc
--- /dev/null
+++ b/vcpkg/ports/qt5-base/patches/winmain_pro.patch
@@ -0,0 +1,27 @@
+diff --git a/src/winmain/winmain.pro b/src/winmain/winmain.pro
+index 9cb6ab0c..52c7876e 100644
+--- a/src/winmain/winmain.pro
++++ b/src/winmain/winmain.pro
+@@ -3,7 +3,7 @@
+
+ TEMPLATE = lib
+ TARGET = qtmain
+-DESTDIR = $$QT.core.libs
++DESTDIR = $$QT.core.libs/manual-link
+
+ CONFIG += static
+ QT = core
+@@ -27,7 +27,12 @@ winrt {
+ }
+
+ load(qt_installs)
+-
++!qt_no_install_library {
++ host_build: \
++ target.path = $$[QT_HOST_LIBS]/manual-link
++ else: \
++ target.path = $$[QT_INSTALL_LIBS]/manual-link
++}
+ TARGET = $$qtLibraryTarget($$TARGET$$QT_LIBINFIX) #do this towards the end
+
+ load(qt_targets)
diff --git a/vcpkg/ports/qt5-base/patches/xlib.patch b/vcpkg/ports/qt5-base/patches/xlib.patch
new file mode 100644
index 0000000..07cba5b
--- /dev/null
+++ b/vcpkg/ports/qt5-base/patches/xlib.patch
@@ -0,0 +1,39 @@
+diff --git a/src/gui/configure.json b/src/gui/configure.json
+index 9a749516b..242f47504 100644
+--- a/src/gui/configure.json
++++ b/src/gui/configure.json
+@@ -568,7 +568,9 @@
+ },
+ "headers": "X11/Xlib.h",
+ "sources": [
+- { "type": "makeSpec", "spec": "X11" }
++ { "type": "makeSpec", "spec": "X11" },
++ { "type": "pkgConfig", "args": "x11" },
++ { "type": "pkgConfig", "args": "x11 --static" }
+ ]
+ },
+ "x11sm": {
+@@ -590,6 +592,7 @@
+ "headers": "xcb/xcb.h",
+ "sources": [
+ { "type": "pkgConfig", "args": "xcb >= 1.11" },
++ { "type": "pkgConfig", "args": "xcb >= 1.11 --static" },
+ "-lxcb"
+ ]
+ },
+@@ -691,6 +694,7 @@
+ "headers": "X11/Xlib-xcb.h",
+ "sources": [
+ { "type": "pkgConfig", "args": "x11-xcb" },
++ { "type": "pkgConfig", "args": "x11-xcb --static" },
+ "-lX11-xcb"
+ ],
+ "use": "xcb xlib"
+@@ -711,6 +715,7 @@
+ "headers": "xcb/xkb.h",
+ "sources": [
+ { "type": "pkgConfig", "args": "xcb-xkb" },
++ { "type": "pkgConfig", "args": "xcb-xkb --static" },
+ "-lxcb-xkb"
+ ],
+ "use": "xcb"