aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO144
-rw-r--r--0001-Add-profile-for-cross-compilation-with-mingw-w64.patch308
-rw-r--r--0001-Adjust-win32-g-profile-for-cross-compilation-with-mi.patch165
-rw-r--r--0002-Ensure-GLdouble-is-defined-when-using-dynamic-OpenGL.patch8
-rw-r--r--0003-Fix-too-many-sections-assemler-error-in-OpenGL-facto.patch (renamed from 0004-Fix-too-many-sections-assemler-error-in-OpenGL-facto.patch)8
-rw-r--r--0003-Use-external-ANGLE-library.patch97
-rw-r--r--0004-Make-sure-.pc-files-are-installed-correctly.patch (renamed from 0005-Make-sure-.pc-files-are-installed-correctly.patch)20
-rw-r--r--0005-Don-t-add-resource-files-to-LIBS-parameter.patch (renamed from 0006-Don-t-add-resource-files-to-LIBS-parameter.patch)12
-rw-r--r--0006-Prevent-debug-library-names-in-pkg-config-files.patch (renamed from 0007-Prevent-debug-library-names-in-pkg-config-files.patch)10
-rw-r--r--0007-Fix-linking-against-shared-static-libpng.patch30
-rw-r--r--0008-Fix-linking-against-shared-static-libpng.patch27
-rw-r--r--0008-Fix-linking-against-static-D-Bus.patch (renamed from 0009-Fix-linking-against-static-D-Bus.patch)26
-rw-r--r--0009-Don-t-try-to-use-debug-version-of-D-Bus-library.patch (renamed from 0010-Don-t-try-to-use-debug-version-of-D-Bus-library.patch)10
-rw-r--r--0010-Fix-linking-against-static-freetype2.patch (renamed from 0011-Fix-linking-against-static-freetype2.patch)26
-rw-r--r--0011-Fix-linking-against-static-harfbuzz.patch (renamed from 0012-Fix-linking-against-static-harfbuzz.patch)12
-rw-r--r--0012-Fix-linking-against-static-pcre.patch28
-rw-r--r--0013-Fix-linking-against-shared-static-MariaDB.patch (renamed from 0014-Fix-linking-against-shared-static-MariaDB.patch)19
-rw-r--r--0013-Fix-linking-against-static-pcre.patch28
-rw-r--r--0014-Fix-linking-against-shared-static-PostgreSQL.patch (renamed from 0015-Fix-linking-against-shared-static-PostgreSQL.patch)19
-rw-r--r--0015-Rename-qtmain-to-qt5main.patch80
-rw-r--r--0016-Enable-rpath-for-build-tools.patch (renamed from 0018-Enable-rpath-for-build-tools.patch)14
-rw-r--r--0016-Rename-qtmain-to-qt5main.patch56
-rw-r--r--0017-Build-dynamic-host-libraries.patch41
-rw-r--r--0017-Use-system-zlib-for-build-tools.patch (renamed from 0019-Use-system-zlib-for-build-tools.patch)18
-rw-r--r--0018-Merge-shared-and-static-library-trees.patch208
-rw-r--r--0019-Use-.dll.a-as-import-lib-extension.patch98
-rw-r--r--0020-Disable-determing-default-include-and-lib-dirs-at-qm.patch26
-rw-r--r--0020-Pull-dependencies-of-static-libraries-in-CMake-modul.patch505
-rw-r--r--0021-Allow-usage-of-static-version-with-CMake.patch (renamed from 0024-Allow-usage-of-static-version-with-CMake.patch)616
-rw-r--r--0021-Use-.dll.a-as-import-lib-extension.patch68
-rw-r--r--0022-Adjust-linker-flags-for-static-build-with-cmake-ming.patch (renamed from 0025-Adjust-linker-flags-for-static-build-with-cmake-ming.patch)26
-rw-r--r--0022-Merge-shared-and-static-library-trees.patch130
-rw-r--r--0023-Pull-dependencies-of-static-libraries-in-CMake-modul.patch273
-rw-r--r--0023-Use-correct-pkg-config-static-flag.patch (renamed from 0026-Use-correct-pkg-config-static-flag.patch)10
-rw-r--r--0024-Fix-macro-invoking-moc-rcc-and-uic.patch (renamed from 0027-Fix-macro-invoking-moc-rcc-and-uic.patch)30
-rw-r--r--0025-Ignore-errors-about-missing-feature-static.patch (renamed from 0028-Ignore-errors-about-missing-feature-static.patch)14
-rw-r--r--0026-Enable-and-fix-use-of-iconv.patch (renamed from 0029-Enable-and-fix-use-of-iconv.patch)49
-rw-r--r--0027-Ignore-failing-pkg-config-test.patch (renamed from 0030-Ignore-failing-pkg-config-test.patch)10
-rw-r--r--0028-Prevent-qmake-from-messing-static-lib-dependencies.patch (renamed from 0031-Prevent-qmake-from-messing-static-lib-dependencies.patch)36
-rw-r--r--0029-Hardcode-linker-flags-for-platform-plugins.patch176
-rw-r--r--0030-Fix-linking-against-static-plugins-with-qmake.patch (renamed from 0033-Fix-linking-against-static-plugins-with-qmake.patch)12
-rw-r--r--0031-Prevent-Cannot-find-feature-windows_vulkan_sdk.patch37
-rw-r--r--0032-Hardcode-linker-flags-for-platform-plugins.patch110
-rw-r--r--0034-Don-t-use-the-statx-syscall.patch27
-rw-r--r--PKGBUILD498
-rw-r--r--PKGBUILD.sh.ep1
-rw-r--r--README.md91
-rw-r--r--qtbase-sha256.txt1
48 files changed, 2220 insertions, 2038 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9aebfd51ebd9..f6a43ab0140d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,7 @@
-# Generated by mksrcinfo v8
-# Fri Dec 15 21:53:39 UTC 2017
pkgbase = mingw-w64-qt5-base-angle
- pkgdesc = A cross-platform application and UI framework (mingw-w64)
- pkgver = 5.10.0
- pkgrel = 2
+ pkgdesc = A cross-platform application and UI framework, ANGLE OpenGL backend (mingw-w64)
+ pkgver = 5.15.1
+ pkgrel = 1
url = https://www.qt.io/
arch = i686
arch = x86_64
@@ -15,7 +13,9 @@ pkgbase = mingw-w64-qt5-base-angle
makedepends = mingw-w64-gcc
makedepends = mingw-w64-postgresql
makedepends = mingw-w64-mariadb-connector-c
+ makedepends = mingw-w64-vulkan-headers
makedepends = mingw-w64-pkg-config
+ makedepends = mingw-w64-environment
depends = mingw-w64-crt
depends = mingw-w64-zlib
depends = mingw-w64-libjpeg-turbo
@@ -25,7 +25,7 @@ pkgbase = mingw-w64-qt5-base-angle
depends = mingw-w64-dbus
depends = mingw-w64-harfbuzz
depends = mingw-w64-pcre2
- depends = mingw-w64-angleproject
+ optdepends = mingw-w64-mesa: use LLVMpipe software rasterizer for Qt Quick
optdepends = mingw-w64-postgresql: PostgreSQL support
optdepends = mingw-w64-mariadb-connector-c: MySQL support
provides = mingw-w64-qt5-base
@@ -38,76 +38,70 @@ pkgbase = mingw-w64-qt5-base-angle
options = !buildflags
options = staticlibs
options = !emptydirs
- source = https://download.qt.io/official_releases/qt/5.10/5.10.0/submodules/qtbase-everywhere-src-5.10.0.tar.xz
- source = 0001-Add-profile-for-cross-compilation-with-mingw-w64.patch
+ source = https://download.qt.io/official_releases/qt/5.15/5.15.1/submodules/qtbase-everywhere-src-5.15.1.tar.xz
+ source = 0001-Adjust-win32-g-profile-for-cross-compilation-with-mi.patch
source = 0002-Ensure-GLdouble-is-defined-when-using-dynamic-OpenGL.patch
- source = 0003-Use-external-ANGLE-library.patch
- source = 0004-Fix-too-many-sections-assemler-error-in-OpenGL-facto.patch
- source = 0005-Make-sure-.pc-files-are-installed-correctly.patch
- source = 0006-Don-t-add-resource-files-to-LIBS-parameter.patch
- source = 0007-Prevent-debug-library-names-in-pkg-config-files.patch
- source = 0008-Fix-linking-against-shared-static-libpng.patch
- source = 0009-Fix-linking-against-static-D-Bus.patch
- source = 0010-Don-t-try-to-use-debug-version-of-D-Bus-library.patch
- source = 0011-Fix-linking-against-static-freetype2.patch
- source = 0012-Fix-linking-against-static-harfbuzz.patch
- source = 0013-Fix-linking-against-static-pcre.patch
- source = 0014-Fix-linking-against-shared-static-MariaDB.patch
- source = 0015-Fix-linking-against-shared-static-PostgreSQL.patch
- source = 0016-Rename-qtmain-to-qt5main.patch
- source = 0017-Build-dynamic-host-libraries.patch
- source = 0018-Enable-rpath-for-build-tools.patch
- source = 0019-Use-system-zlib-for-build-tools.patch
- source = 0020-Disable-determing-default-include-and-lib-dirs-at-qm.patch
- source = 0021-Use-.dll.a-as-import-lib-extension.patch
- source = 0022-Merge-shared-and-static-library-trees.patch
- source = 0023-Pull-dependencies-of-static-libraries-in-CMake-modul.patch
- source = 0024-Allow-usage-of-static-version-with-CMake.patch
- source = 0025-Adjust-linker-flags-for-static-build-with-cmake-ming.patch
- source = 0026-Use-correct-pkg-config-static-flag.patch
- source = 0027-Fix-macro-invoking-moc-rcc-and-uic.patch
- source = 0028-Ignore-errors-about-missing-feature-static.patch
- source = 0029-Enable-and-fix-use-of-iconv.patch
- source = 0030-Ignore-failing-pkg-config-test.patch
- source = 0031-Prevent-qmake-from-messing-static-lib-dependencies.patch
- source = 0032-Hardcode-linker-flags-for-platform-plugins.patch
- source = 0033-Fix-linking-against-static-plugins-with-qmake.patch
- source = 0034-Don-t-use-the-statx-syscall.patch
- sha256sums = fd5578cd320a13617c12cf2b19439386b203d6d45548e855f94e07be9829f762
- sha256sums = d10d56c65b632d881f79eda8c0caeffb1a53a4829ac886e80038cdc8929b1669
- sha256sums = 524883f46945ab2ce023e9de1144a7eebafdba936ea8c61e035006deff48fa5b
- sha256sums = cea0e73f831348e50285ab87149803d4dfb5650c4c96037844b98b3dc1c65159
- sha256sums = e333d61821a42710a00f9bd4d003d376f513ba6ca41a3739bfcd414c99b8e7dd
- sha256sums = e8b0bdcc39458105dd0e5c569c98ef53a84d2fe4e9e200e1b1c1b7b749e8e758
- sha256sums = e14860d560886b600373f639e89e9a60d77de9a536587633ea71e1fd907df3fb
- sha256sums = 447c27f0e87d5cdcbe9883f6d3aac0daefef28e09bd8afe8d07a650375ca8362
- sha256sums = e2f98037b93aa2970014c1d185912b49d4ab5506c24fa2410cb0e93d4e0a1f54
- sha256sums = 507537c73995715fa1a4e9e0f1ecfdf4afe409b5397366f551d06c6c406e088b
- sha256sums = 760093a185cd77bacec0d85c0c077370d6044b89a4d6f03944524d1aa2b82dfa
- sha256sums = 6052446a675be39dd663ef69ee5339ab67c2805b29ff4ef19bacf0f677a95182
- sha256sums = 60a6e236334d3950b40dbb0501cc733bc7a672b0c7fbf6e4792c0058bf20a859
- sha256sums = f58391f9407742a1543702fe0234a134883046ff99584c1cfa468893264bf5e9
- sha256sums = 9e406b466c2b447da5d44ea37cafe2b3c3caebfa54936eb71e816e60b186c47d
- sha256sums = 870ed7adb78d4f5b396fa9106777aaeefc2a8af406e1aa1655dfe3405974a1ce
- sha256sums = b51a2d707a09cce340ca10e4a93c18a0872881889a97dc3ea2aafe73d80dfd46
- sha256sums = ed206eef70d57cd1aeb31c9e65ceb46fe926bee462c9b6507d22b6daf9b03aff
- sha256sums = 00ea2ef2f2d8868351d857716e60e8e78ed90a294132cd1fbd8039aae50e7344
- sha256sums = f80e166e5a358cc3d0dca5f0a543b30271a1c536ff9ef73105f1e432b10d3afe
- sha256sums = 12c4ce015c5641376dea7a232f0fc9f8feb10ddee06c65f87e0f00ea2574ab15
- sha256sums = a3a6a12f94ed4a79b3910623e3a8a11859d7a6a72b4634ff8bd6d1269af615bd
- sha256sums = 6f1f96ec05f049a107f4b5b3fba05e088d47f1c4751fd21851ed48d5f1b5a274
- sha256sums = 2926f77fbab219cb2fe9bb630274b06594a72c9047d374209d96591e481015fd
- sha256sums = b36b7fce8e101444d17026002f8052be41de887ccd263188a64faeae31cc1c89
- sha256sums = 7bcfe130f6dc47c9fb4d3db6fe9634596ab2c01e421bfc9a0967463487b4b7f0
- sha256sums = 83f6a3fc2489da2686f035563542478fd01e2849e18ea02478d7850bd68f16be
- sha256sums = 7254445b4cea5e1d7efc25b923e755ab3b19856ee8bce2ebe2900b9bf4717841
- sha256sums = d03a3cc5dab9d9a843e73f241fee2778deffe9ee727e493a0052e62b2266923e
- sha256sums = d6dc468d67e782b64fbe9ba64dfc3fdf423c5d06205f4a87a0561bb53b35d7fc
- sha256sums = 43c367e31c1560178a1471a80a9e90391c7c93f8dfece8c4c9dfafea4a3ce180
- sha256sums = 2e89aca862a62cbf535faf4b01c00dfed40ad6ccb52ac998913e9e96801491a3
- sha256sums = 8b1402c8ac78c0870af19ccdd8b2603e164cf2ef4fd4446fd03ea40b68a35643
- sha256sums = 81d279b24a508656597fec9bf94bade25cf0d600607febcd35f7fd27d09970eb
- sha256sums = 95a8cd9553ef18e200a85ff6dc5c718525d71be92d4fa49b8cdceae73696e037
+ source = 0003-Fix-too-many-sections-assemler-error-in-OpenGL-facto.patch
+ source = 0004-Make-sure-.pc-files-are-installed-correctly.patch
+ source = 0005-Don-t-add-resource-files-to-LIBS-parameter.patch
+ source = 0006-Prevent-debug-library-names-in-pkg-config-files.patch
+ source = 0007-Fix-linking-against-shared-static-libpng.patch
+ source = 0008-Fix-linking-against-static-D-Bus.patch
+ source = 0009-Don-t-try-to-use-debug-version-of-D-Bus-library.patch
+ source = 0010-Fix-linking-against-static-freetype2.patch
+ source = 0011-Fix-linking-against-static-harfbuzz.patch
+ source = 0012-Fix-linking-against-static-pcre.patch
+ source = 0013-Fix-linking-against-shared-static-MariaDB.patch
+ source = 0014-Fix-linking-against-shared-static-PostgreSQL.patch
+ source = 0015-Rename-qtmain-to-qt5main.patch
+ source = 0016-Enable-rpath-for-build-tools.patch
+ source = 0017-Use-system-zlib-for-build-tools.patch
+ source = 0018-Merge-shared-and-static-library-trees.patch
+ source = 0019-Use-.dll.a-as-import-lib-extension.patch
+ source = 0020-Pull-dependencies-of-static-libraries-in-CMake-modul.patch
+ source = 0021-Allow-usage-of-static-version-with-CMake.patch
+ source = 0022-Adjust-linker-flags-for-static-build-with-cmake-ming.patch
+ source = 0023-Use-correct-pkg-config-static-flag.patch
+ source = 0024-Fix-macro-invoking-moc-rcc-and-uic.patch
+ source = 0025-Ignore-errors-about-missing-feature-static.patch
+ source = 0026-Enable-and-fix-use-of-iconv.patch
+ source = 0027-Ignore-failing-pkg-config-test.patch
+ source = 0028-Prevent-qmake-from-messing-static-lib-dependencies.patch
+ source = 0029-Hardcode-linker-flags-for-platform-plugins.patch
+ source = 0030-Fix-linking-against-static-plugins-with-qmake.patch
+ source = 0031-Prevent-Cannot-find-feature-windows_vulkan_sdk.patch
+ sha256sums = 48b9e79220941665a9dd827548c6428f7aa3052ccba8f4f7e039a94aa1d2b28a
+ sha256sums = fec4ca039859f9cc9685b34a7bd2da9e0fe24b5b1f85d7cd12665631fa797b44
+ sha256sums = a0ea35e6eef4fed06360efa05e11b898f6033d893e1f1657a240cc03e43f076e
+ sha256sums = cda13b2856fafe92b1369d6f2d01bd4d9bbdb0ec96c25e91e48ba25267c74c6c
+ sha256sums = e13cd18ad781512862b5d288a53ebd09dc0e8bcc6fd3c4e833d0c593f28edd3a
+ sha256sums = 273af9db2954c1d62e29d2a8328bbfa918bae617456aff6645df4bfb72796e0d
+ sha256sums = 84a801d904fe308a56a9112af9aa73656eacf36ed7684449363281bfe4108543
+ sha256sums = 190795aa778ae4e7bd8a74ce56504c697435129b73d2f0418511a4a230f68bc5
+ sha256sums = 3fff6151dcf76bed12864dba51e4d04d39f8b3969c502a71ed547b527b310d7a
+ sha256sums = 56240f509157a04ba1f1a23b0e058c2212d66e34aca68a688c15f5d8804bf174
+ sha256sums = 02ca3a112f3e35749c141ed9c7e87a1fd0e82aa852541024b85f40a99d24d9fc
+ sha256sums = 3b4dcce669d359953603257e621e6ebc30fb88f0f1c48b35ec443c574f2b05e8
+ sha256sums = ba302124391aea5438e82195dd276edd8942f04cff7c6b85a9f0a5279749566b
+ sha256sums = 68b5f9e0535c8d030161e67a0e8ee8bec2a80a9c8f69c09a4ad25fe98eb9dfd2
+ sha256sums = ab46b53eb6272185a05d11820317db421be6e4440166967911e7d59d4f0a03d4
+ sha256sums = c11a14a02e48e39e8212097915aed2347825a33022d367f322e34f3aaaf33f90
+ sha256sums = 6d7c8fd7a162174355dd12399bd8f47f470557751dc117271c02e2e7b385d424
+ sha256sums = 3c28f5658e0f960091c1991586167ee06bcecd8d843123fbf37ab78a1f5f30f0
+ sha256sums = f9545474bd73be049dbf84fc2ff455e924e6fb29bb807809c384bf56a0227ad6
+ sha256sums = 2998069e3a427c940f496d75df4cea05acb10d3e82c333a5c957e37f0543a0e8
+ sha256sums = a301ddcd46b9b2fb58d592af88ac6acf81b2dbd328fb8c4c3ef49abffe343267
+ sha256sums = 3d1257390ff151365d7fa29cde5f9c118310fe727243fb6f50ad30ab117c3384
+ sha256sums = 19534087d5fc4b434859d68476ebd0647fdc04bf78f24943b7ab88cccf09b08a
+ sha256sums = 5a57c66303d4a898dd5cccd9c639f367b50b508256fdf9c00ba5179bb00d701c
+ sha256sums = 84b9e41b7320834a73edf1d192e511801feb51cd2de60ecc28e46982cd572df4
+ sha256sums = 85bba2428090518dca878ca117299b065913f125c00cede57b31d37a02d0b787
+ sha256sums = f0429a442805c2e0181e8b3b7814259586fdcba000bf324c0e367858c351f6b1
+ sha256sums = c8479468cfb4a70fe65a1317f3fbacd40dcdc7a8bafc88648160509ee8b216e8
+ sha256sums = a2eb9e683b12efe7fbb365749bdd5373e0fbf6438fe5342effab93f3a262d808
+ sha256sums = 4c097460c443ec0ca47a41ea1ad6fdaa08e394b7a883d54da69bf9557ccbea31
+ sha256sums = e1f2b8bfe9f3cdacceb6d9b73573ad39ea73ac0fce74448c7df0262b34b703bb
+ sha256sums = 553c15e8cf230c3d3f3fa4c4a7a5a46d18027a4d6c7493f3eab56ca97bd906d9
pkgname = mingw-w64-qt5-base-angle
diff --git a/0001-Add-profile-for-cross-compilation-with-mingw-w64.patch b/0001-Add-profile-for-cross-compilation-with-mingw-w64.patch
deleted file mode 100644
index 341ba7ca4b8d..000000000000
--- a/0001-Add-profile-for-cross-compilation-with-mingw-w64.patch
+++ /dev/null
@@ -1,308 +0,0 @@
-From ae97e360a3e6402957a7e72d89adf71b94fc5730 Mon Sep 17 00:00:00 2001
-From: Martchus <martchus@gmx.net>
-Date: Fri, 3 Feb 2017 18:30:51 +0100
-Subject: [PATCH 01/34] Add profile for cross compilation with mingw-w64
-
----
- mkspecs/mingw-w64-g++/qmake.conf | 126 +++++++++++++++++++++++++++
- mkspecs/mingw-w64-g++/qplatformdefs.h | 155 ++++++++++++++++++++++++++++++++++
- 2 files changed, 281 insertions(+)
- create mode 100644 mkspecs/mingw-w64-g++/qmake.conf
- create mode 100644 mkspecs/mingw-w64-g++/qplatformdefs.h
-
-diff --git a/mkspecs/mingw-w64-g++/qmake.conf b/mkspecs/mingw-w64-g++/qmake.conf
-new file mode 100644
-index 0000000000..c49336845b
---- /dev/null
-+++ b/mkspecs/mingw-w64-g++/qmake.conf
-@@ -0,0 +1,126 @@
-+#
-+# qmake configuration for i686-w64-mingw32-g++ and x86_64-w64-mingw32-g++
-+#
-+# Written for cross compilation with mingw-w64 under GNU/Linux
-+#
-+# Cross compile example for i686-w64-mingw32-g++:
-+# configure -xplatform mingw-w64-g++ -device-option CROSS_COMPILE=i686-w64-mingw32-
-+#
-+
-+load(device_config)
-+include(../common/angle.conf)
-+
-+MAKEFILE_GENERATOR = MINGW
-+QMAKE_PLATFORM = win32 win32-g++ mingw
-+CONFIG += debug_and_release debug_and_release_target precompile_header $${CROSS_COMPILE_CUSTOM_CONFIG}
-+DEFINES += UNICODE
-+QMAKE_COMPILER_DEFINES += __GNUC__ WIN32
-+
-+QMAKE_EXT_OBJ = .o
-+QMAKE_EXT_RES = _res.o
-+
-+QMAKE_COMPILER = gcc
-+
-+QMAKE_CC = $${CROSS_COMPILE}gcc
-+QMAKE_LEX = flex
-+QMAKE_LEXFLAGS =
-+QMAKE_YACC = bison -y
-+QMAKE_YACCFLAGS = -d
-+QMAKE_CFLAGS = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -fno-keep-inline-dllexport $${CROSS_COMPILE_CFLAGS}
-+QMAKE_CFLAGS_DEPS = -M
-+QMAKE_CFLAGS_WARN_ON = -Wall -Wextra
-+QMAKE_CFLAGS_WARN_OFF = -w
-+QMAKE_CFLAGS_RELEASE = -O2
-+QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO = -O2 -g
-+QMAKE_CFLAGS_DEBUG = -g
-+QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
-+QMAKE_CFLAGS_SPLIT_SECTIONS = -ffunction-sections
-+QMAKE_CFLAGS_SSE2 = -msse2 -mstackrealign
-+QMAKE_CFLAGS_SSE3 = -msse3
-+QMAKE_CFLAGS_SSSE3 = -mssse3
-+QMAKE_CFLAGS_SSE4_1 = -msse4.1
-+QMAKE_CFLAGS_SSE4_2 = -msse4.2
-+QMAKE_CFLAGS_AVX = -mavx
-+QMAKE_CFLAGS_AVX2 = -mavx2
-+QMAKE_CFLAGS_NEON = -mfpu=neon
-+
-+QMAKE_CXX = $${CROSS_COMPILE}g++
-+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
-+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
-+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
-+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
-+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
-+QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO = $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO
-+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
-+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
-+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
-+QMAKE_CXXFLAGS_RTTI_ON = -frtti
-+QMAKE_CXXFLAGS_RTTI_OFF = -fno-rtti
-+QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions -mthreads
-+QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -fno-exceptions
-+QMAKE_CXXFLAGS_CXX11 = -std=c++11
-+QMAKE_CXXFLAGS_CXX14 = -std=c++1y
-+QMAKE_CXXFLAGS_CXX1Z = -std=c++1z
-+QMAKE_CXXFLAGS_GNUCXX11 = -std=gnu++11
-+QMAKE_CXXFLAGS_GNUCXX14 = -std=gnu++1y
-+QMAKE_CXXFLAGS_GNUCXX1Z = -std=gnu++1z
-+QMAKE_CXXFLAGS_SPLIT_SECTIONS = $$QMAKE_CFLAGS_SPLIT_SECTIONS
-+
-+QMAKE_INCDIR =
-+
-+QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -o $obj $src
-+QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
-+QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src
-+QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
-+
-+QMAKE_LINK = $${CROSS_COMPILE}g++
-+QMAKE_LINK_C = $${CROSS_COMPILE}gcc
-+QMAKE_LFLAGS = -g
-+QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads
-+QMAKE_LFLAGS_EXCEPTIONS_OFF =
-+QMAKE_LFLAGS_RELEASE =
-+QMAKE_LFLAGS_DEBUG =
-+QMAKE_LFLAGS_CONSOLE = -Wl,-subsystem,console
-+QMAKE_LFLAGS_WINDOWS = -Wl,-subsystem,windows
-+QMAKE_LFLAGS_DLL = -shared
-+QMAKE_LFLAGS_CXX11 =
-+QMAKE_LFLAGS_CXX14 =
-+QMAKE_LFLAGS_CXX1Z =
-+QMAKE_LFLAGS_GCSECTIONS = -Wl,--gc-sections
-+QMAKE_LINK_OBJECT_MAX = 10
-+QMAKE_LINK_OBJECT_SCRIPT = object_script
-+QMAKE_PREFIX_SHLIB =
-+QMAKE_EXTENSION_SHLIB = dll
-+QMAKE_PREFIX_STATICLIB = lib
-+QMAKE_EXTENSION_STATICLIB = a
-+QMAKE_EXTENSION_IMPORTLIB = dll.a
-+
-+QMAKE_IDL = $${CROSS_COMPILE}widl
-+QMAKE_LIB = $${CROSS_COMPILE}ar -rc
-+QMAKE_RC = $${CROSS_COMPILE}windres
-+QMAKE_DLLTOOL = $${CROSS_COMPILE}dlltool
-+QMAKE_LRELEASE = $${CROSS_COMPILE}lrelease-qt5
-+
-+QMAKE_STRIP = $${CROSS_COMPILE}strip
-+QMAKE_STRIPFLAGS_LIB += --strip-unneeded
-+QMAKE_OBJCOPY = $${CROSS_COMPILE}objcopy
-+QMAKE_NM = $${CROSS_COMPILE}nm -P
-+
-+PKG_CONFIG = $${CROSS_COMPILE}pkg-config
-+QMAKE_PKG_CONFIG = $${CROSS_COMPILE}pkg-config
-+
-+QMAKE_LIBS =
-+QMAKE_LIBS_CORE = -lz -lpcre2-16 -lversion -lnetapi32 -luserenv -lole32 -luuid -lwinmm -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32
-+QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luuid -luser32 -ladvapi32 -ljpeg -lpng \
-+ $$system($${QMAKE_PKG_CONFIG} --static --libs harfbuzz) \
-+ $$system($${QMAKE_PKG_CONFIG} --static --libs freetype2)
-+QMAKE_LIBS_NETWORK = -lws2_32 -lcrypt32 -ldnsapi
-+QMAKE_LIBS_NETWORK_STATIC = $$system($${QMAKE_PKG_CONFIG} --static --libs openssl) -ldnsapi
-+QMAKE_LIBS_DBUS = $$system($${QMAKE_PKG_CONFIG} --static --libs dbus-1)
-+QMAKE_LIBS_OPENGL = -lglu32 -lopengl32 -lgdi32 -luser32
-+QMAKE_LIBS_OPENGL_ES2 = -l$${LIBEGL_NAME} -l$${LIBGLESV2_NAME} -ld3d9 -ldxguid -lgdi32 -luser32
-+QMAKE_LIBS_OPENGL_ES2_DEBUG = -l$${LIBEGL_NAME} -l$${LIBGLESV2_NAME} -ld3d9 -ldxguid -lgdi32 -luser32
-+QMAKE_LIBS_COMPAT = -ladvapi32 -lshell32 -lcomdlg32 -luser32 -lgdi32 -lws2_32
-+QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqt5main
-+
-+load(qt_config)
-diff --git a/mkspecs/mingw-w64-g++/qplatformdefs.h b/mkspecs/mingw-w64-g++/qplatformdefs.h
-new file mode 100644
-index 0000000000..c5a70b1445
---- /dev/null
-+++ b/mkspecs/mingw-w64-g++/qplatformdefs.h
-@@ -0,0 +1,155 @@
-+/****************************************************************************
-+**
-+** Copyright (C) 2016 The Qt Company Ltd.
-+** Contact: https://www.qt.io/licensing/
-+**
-+** This file is part of the qmake spec of the Qt Toolkit.
-+**
-+** $QT_BEGIN_LICENSE:LGPL$
-+** Commercial License Usage
-+** Licensees holding valid commercial Qt licenses may use this file in
-+** accordance with the commercial license agreement provided with the
-+** Software or, alternatively, in accordance with the terms contained in
-+** a written agreement between you and The Qt Company. For licensing terms
-+** and conditions see https://www.qt.io/terms-conditions. For further
-+** information use the contact form at https://www.qt.io/contact-us.
-+**
-+** GNU Lesser General Public License Usage
-+** Alternatively, this file may be used under the terms of the GNU Lesser
-+** General Public License version 3 as published by the Free Software
-+** Foundation and appearing in the file LICENSE.LGPL3 included in the
-+** packaging of this file. Please review the following information to
-+** ensure the GNU Lesser General Public License version 3 requirements
-+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-+**
-+** GNU General Public License Usage
-+** Alternatively, this file may be used under the terms of the GNU
-+** General Public License version 2.0 or (at your option) the GNU General
-+** Public license version 3 or any later version approved by the KDE Free
-+** Qt Foundation. The licenses are as published by the Free Software
-+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-+** included in the packaging of this file. Please review the following
-+** information to ensure the GNU General Public License requirements will
-+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-+** https://www.gnu.org/licenses/gpl-3.0.html.
-+**
-+** $QT_END_LICENSE$
-+**
-+****************************************************************************/
-+
-+#ifndef QPLATFORMDEFS_H
-+#define QPLATFORMDEFS_H
-+
-+#ifdef UNICODE
-+#ifndef _UNICODE
-+#define _UNICODE
-+#endif
-+#endif
-+
-+// Get Qt defines/settings
-+
-+#include "qglobal.h"
-+
-+#include <tchar.h>
-+#include <io.h>
-+#include <direct.h>
-+#include <stdio.h>
-+#include <fcntl.h>
-+#include <errno.h>
-+#include <sys/stat.h>
-+#include <stdlib.h>
-+#include <limits.h>
-+
-+#if !defined(_WIN32_WINNT) || (_WIN32_WINNT-0 < 0x0500)
-+typedef enum {
-+ NameUnknown = 0,
-+ NameFullyQualifiedDN = 1,
-+ NameSamCompatible = 2,
-+ NameDisplay = 3,
-+ NameUniqueId = 6,
-+ NameCanonical = 7,
-+ NameUserPrincipal = 8,
-+ NameCanonicalEx = 9,
-+ NameServicePrincipal = 10,
-+ NameDnsDomain = 12
-+} EXTENDED_NAME_FORMAT, *PEXTENDED_NAME_FORMAT;
-+#endif
-+
-+#ifdef QT_LARGEFILE_SUPPORT
-+#define QT_STATBUF struct _stati64 // non-ANSI defs
-+#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs
-+#define QT_STAT ::_stati64
-+#define QT_FSTAT ::_fstati64
-+#else
-+#define QT_STATBUF struct _stat // non-ANSI defs
-+#define QT_STATBUF4TSTAT struct _stat // non-ANSI defs
-+#define QT_STAT ::_stat
-+#define QT_FSTAT ::_fstat
-+#endif
-+#define QT_STAT_REG _S_IFREG
-+#define QT_STAT_DIR _S_IFDIR
-+#define QT_STAT_MASK _S_IFMT
-+#if defined(_S_IFLNK)
-+# define QT_STAT_LNK _S_IFLNK
-+#endif
-+#define QT_FILENO _fileno
-+#define QT_OPEN ::_open
-+#define QT_CLOSE ::_close
-+#ifdef QT_LARGEFILE_SUPPORT
-+#define QT_LSEEK ::_lseeki64
-+#ifndef UNICODE
-+#define QT_TSTAT ::_stati64
-+#else
-+#define QT_TSTAT ::_wstati64
-+#endif
-+#else
-+#define QT_LSEEK ::_lseek
-+#ifndef UNICODE
-+#define QT_TSTAT ::_stat
-+#else
-+#define QT_TSTAT ::_wstat
-+#endif
-+#endif
-+#define QT_READ ::_read
-+#define QT_WRITE ::_write
-+#define QT_ACCESS ::_access
-+#define QT_GETCWD ::_getcwd
-+#define QT_CHDIR ::_chdir
-+#define QT_MKDIR ::_mkdir
-+#define QT_RMDIR ::_rmdir
-+#define QT_OPEN_LARGEFILE 0
-+#define QT_OPEN_RDONLY _O_RDONLY
-+#define QT_OPEN_WRONLY _O_WRONLY
-+#define QT_OPEN_RDWR _O_RDWR
-+#define QT_OPEN_CREAT _O_CREAT
-+#define QT_OPEN_TRUNC _O_TRUNC
-+#define QT_OPEN_APPEND _O_APPEND
-+#if defined(O_TEXT)
-+# define QT_OPEN_TEXT _O_TEXT
-+# define QT_OPEN_BINARY _O_BINARY
-+#endif
-+
-+#include "../common/c89/qplatformdefs.h"
-+
-+#ifdef QT_LARGEFILE_SUPPORT
-+#undef QT_FSEEK
-+#undef QT_FTELL
-+#undef QT_OFF_T
-+
-+#define QT_FSEEK ::fseeko64
-+#define QT_FTELL ::ftello64
-+#define QT_OFF_T off64_t
-+#endif
-+
-+#define QT_SIGNAL_ARGS int
-+
-+#define QT_VSNPRINTF ::_vsnprintf
-+#define QT_SNPRINTF ::_snprintf
-+
-+# define F_OK 0
-+# define X_OK 1
-+# define W_OK 2
-+# define R_OK 4
-+
-+
-+#endif // QPLATFORMDEFS_H
---
-2.15.1
-
diff --git a/0001-Adjust-win32-g-profile-for-cross-compilation-with-mi.patch b/0001-Adjust-win32-g-profile-for-cross-compilation-with-mi.patch
new file mode 100644
index 000000000000..deb6dcd8f5bf
--- /dev/null
+++ b/0001-Adjust-win32-g-profile-for-cross-compilation-with-mi.patch
@@ -0,0 +1,165 @@
+From 14c05838f544ef232c784aa546f2a11b4cf2593e Mon Sep 17 00:00:00 2001
+From: Martchus <martchus@gmx.net>
+Date: Fri, 3 Feb 2017 18:30:51 +0100
+Subject: [PATCH 01/31] Adjust win32-g++ profile for cross compilation with
+ mingw-w64
+
+Adding a new, separate mkspec instead of patching the existing one
+might be the cleaner solution. However, tools like windeployqt and
+qbs do checks based on the hardcoded mkspec name to detect MinGW.
+So for this to work, the mkspec must be called win32-g++.
+
+Also see the following issues:
+* https://github.com/Martchus/PKGBUILDs/issues/59
+* https://github.com/Martchus/PKGBUILDs/issues/60
+
+Change-Id: I127bb0516bd4acfea588a5d48c46811525a8fca8
+---
+ mkspecs/common/g++-win32.conf | 50 ++++++++++++++++++++----------
+ mkspecs/win32-clang-g++/qmake.conf | 4 +--
+ mkspecs/win32-g++/qmake.conf | 4 +--
+ 3 files changed, 37 insertions(+), 21 deletions(-)
+
+diff --git a/mkspecs/common/g++-win32.conf b/mkspecs/common/g++-win32.conf
+index c3a1f3a373..d852ccc2ad 100644
+--- a/mkspecs/common/g++-win32.conf
++++ b/mkspecs/common/g++-win32.conf
+@@ -8,18 +8,24 @@
+ # Compiler-specific settings go into win32-g++/qmake.conf and
+ # win32-clang-g++/qmake.conf
+ #
++# The device options CROSS_COMPILE_CUSTOM_CONFIG and CROSS_COMPILE_CFLAGS can be used
++# to specify custom config/flags for cross compilation.
++#
+
+ load(device_config)
+ include(gcc-base.conf)
+ include(g++-base.conf)
+
++include(angle.conf)
++include(windows-vulkan.conf)
++
+ # modifications to gcc-base.conf and g++-base.conf
+
+ MAKEFILE_GENERATOR = MINGW
+ QMAKE_PLATFORM = win32 mingw
+-CONFIG += debug_and_release debug_and_release_target precompile_header
+-DEFINES += UNICODE _UNICODE WIN32 MINGW_HAS_SECURE_API=1
+-QMAKE_COMPILER_DEFINES += __GNUC__ _WIN32
++CONFIG += debug_and_release debug_and_release_target precompile_header $${CROSS_COMPILE_CUSTOM_CONFIG}
++DEFINES += UNICODE _UNICODE MINGW_HAS_SECURE_API=1
++QMAKE_COMPILER_DEFINES += __GNUC__ _WIN32 WIN32
+ # can't add 'DEFINES += WIN64' and 'QMAKE_COMPILER_DEFINES += _WIN64' defines for
+ # x86_64 platform similar to 'msvc-desktop.conf' toolchain, because, unlike for MSVC,
+ # 'QMAKE_TARGET.arch' is inherently unavailable.
+@@ -32,6 +38,7 @@ QMAKE_YACCFLAGS = -d
+ QMAKE_CFLAGS_SSE2 += -mstackrealign
+
+ QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions -mthreads
++QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -fno-exceptions
+
+ QMAKE_INCDIR =
+
+@@ -41,40 +48,49 @@ QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src
+ QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
+
+ QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads
+-QMAKE_LFLAGS_RELEASE = -Wl,-s
++QMAKE_LFLAGS_RELEASE =
++QMAKE_LFLAGS_DEBUG =
+ QMAKE_LFLAGS_CONSOLE = -Wl,-subsystem,console
+ QMAKE_LFLAGS_WINDOWS = -Wl,-subsystem,windows
+ QMAKE_LFLAGS_DLL = -shared
+ QMAKE_LFLAGS_GCSECTIONS = -Wl,--gc-sections
+-equals(QMAKE_HOST.os, Windows) {
+- QMAKE_LINK_OBJECT_MAX = 10
+- QMAKE_LINK_OBJECT_SCRIPT = object_script
+-}
++QMAKE_LINK_OBJECT_MAX = 10
++QMAKE_LINK_OBJECT_SCRIPT = object_script
+ QMAKE_EXT_OBJ = .o
+ QMAKE_EXT_RES = _res.o
+ QMAKE_PREFIX_SHLIB =
+ QMAKE_EXTENSION_SHLIB = dll
+ QMAKE_PREFIX_STATICLIB = lib
+ QMAKE_EXTENSION_STATICLIB = a
+-QMAKE_LIB_EXTENSIONS = a dll.a
++QMAKE_EXTENSION_IMPORTLIB = dll.a
++
++PKG_CONFIG = $${CROSS_COMPILE}pkg-config
++QMAKE_PKG_CONFIG = $${CROSS_COMPILE}pkg-config
+
+ QMAKE_LIBS =
+-QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luuid -luser32 -ladvapi32
+-QMAKE_LIBS_NETWORK = -lws2_32
++QMAKE_LIBS_CORE = -lz -lpcre2-16 -liconv -lversion -lnetapi32 -luserenv -lole32 -luuid -lwinmm -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32
++QMAKE_LIBS_GUI = $$system($${QMAKE_PKG_CONFIG} --libs harfbuzz) $$system($${QMAKE_PKG_CONFIG} --libs freetype2) \
++ -ljpeg -lpng -lopengl32 -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luuid -luser32 -ladvapi32
++QMAKE_LIBS_GUI_STATIC = $$system($${QMAKE_PKG_CONFIG} --static --libs harfbuzz) $$system($${QMAKE_PKG_CONFIG} --static --libs freetype2) \
++ -ljpeg -lpng -lopengl32 -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luuid -luser32 -ladvapi32 -ldxgi -ld3d11
++QMAKE_LIBS_NETWORK = -lws2_32 -lcrypt32 -ldnsapi -liphlpapi
++QMAKE_LIBS_NETWORK_STATIC = $$system($${QMAKE_PKG_CONFIG} --static --libs openssl) -lws2_32 -lcrypt32 -ldnsapi -liphlpapi
++QMAKE_LIBS_DBUS = $$system($${QMAKE_PKG_CONFIG} --libs dbus-1)
++QMAKE_LIBS_DBUS_STATIC = $$system($${QMAKE_PKG_CONFIG} --static --libs dbus-1)
++QMAKE_LIBS_WIDGETS_STATIC = -ldwmapi -luxtheme
+ QMAKE_LIBS_OPENGL = -lglu32 -lopengl32 -lgdi32 -luser32
+-QMAKE_LIBS_OPENGL_ES2 = -lgdi32 -luser32
+-QMAKE_LIBS_OPENGL_ES2_DEBUG = -lgdi32 -luser32
++QMAKE_LIBS_OPENGL_ES2 = -l$${LIBEGL_NAME} -l$${LIBGLESV2_NAME} -ld3d9 -ldxguid -lgdi32 -luser32
++QMAKE_LIBS_OPENGL_ES2_DEBUG = -l$${LIBEGL_NAME} -l$${LIBGLESV2_NAME} -ld3d9 -ldxguid -lgdi32 -luser32
+ QMAKE_LIBS_COMPAT = -ladvapi32 -lshell32 -lcomdlg32 -luser32 -lgdi32 -lws2_32
+ QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqtmain
+
+-QMAKE_IDL = midl
++QMAKE_IDL = $${CROSS_COMPILE}widl
+ QMAKE_LIB = $${CROSS_COMPILE}ar -rc
+ QMAKE_RC = $${CROSS_COMPILE}windres
++QMAKE_DLLTOOL = $${CROSS_COMPILE}dlltool
++QMAKE_LRELEASE = $${CROSS_COMPILE}lrelease-qt5
+
+ QMAKE_STRIP = $${CROSS_COMPILE}strip
+ QMAKE_STRIPFLAGS_LIB += --strip-unneeded
+ QMAKE_OBJCOPY = $${CROSS_COMPILE}objcopy
+ QMAKE_NM = $${CROSS_COMPILE}nm -P
+-
+-include(angle.conf)
+-include(windows-vulkan.conf)
+diff --git a/mkspecs/win32-clang-g++/qmake.conf b/mkspecs/win32-clang-g++/qmake.conf
+index 59d42176f0..f8cb9859f2 100644
+--- a/mkspecs/win32-clang-g++/qmake.conf
++++ b/mkspecs/win32-clang-g++/qmake.conf
+@@ -14,11 +14,11 @@ include(../common/g++-win32.conf)
+ QMAKE_COMPILER += clang llvm # clang pretends to be gcc
+
+ QMAKE_CC = $${CROSS_COMPILE}clang
+-QMAKE_CFLAGS +=
++QMAKE_CFLAGS += $${CROSS_COMPILE_CFLAGS}
+ QMAKE_CFLAGS_WARN_ON += -Wextra -Wno-ignored-attributes
+
+ QMAKE_CXX = $${CROSS_COMPILE}clang++
+-QMAKE_CXXFLAGS +=
++QMAKE_CXXFLAGS += $${CROSS_COMPILE_CXXFLAGS}
+ QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+
+ QMAKE_LINK = $${CROSS_COMPILE}clang++
+diff --git a/mkspecs/win32-g++/qmake.conf b/mkspecs/win32-g++/qmake.conf
+index 5de482f23b..3c3d22c699 100644
+--- a/mkspecs/win32-g++/qmake.conf
++++ b/mkspecs/win32-g++/qmake.conf
+@@ -13,11 +13,11 @@ include(../common/windows-desktop.conf)
+ # modifications to g++-win32.conf
+
+ QMAKE_CC = $${CROSS_COMPILE}gcc
+-QMAKE_CFLAGS += -fno-keep-inline-dllexport
++QMAKE_CFLAGS += $${CROSS_COMPILE_CFLAGS}
+ QMAKE_CFLAGS_WARN_ON += -Wextra
+
+ QMAKE_CXX = $${CROSS_COMPILE}g++
+-QMAKE_CXXFLAGS += -fno-keep-inline-dllexport
++QMAKE_CXXFLAGS += $${CROSS_COMPILE_CXXFLAGS}
+ QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+
+ QMAKE_LINK = $${CROSS_COMPILE}g++
+--
+2.28.0
+
diff --git a/0002-Ensure-GLdouble-is-defined-when-using-dynamic-OpenGL.patch b/0002-Ensure-GLdouble-is-defined-when-using-dynamic-OpenGL.patch
index 28de9e203f66..255b881a4176 100644
--- a/0002-Ensure-GLdouble-is-defined-when-using-dynamic-OpenGL.patch
+++ b/0002-Ensure-GLdouble-is-defined-when-using-dynamic-OpenGL.patch
@@ -1,7 +1,7 @@
-From 009da5ac781ce0657808571538d6611166d0b4d9 Mon Sep 17 00:00:00 2001
+From 9fa2f31eb911ab3d64286af43961b7fe0b8afbea Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 13:36:53 +0200
-Subject: [PATCH 02/34] Ensure GLdouble is defined when using dynamic OpenGL
+Subject: [PATCH 02/31] Ensure GLdouble is defined when using dynamic OpenGL
FIXME: Not sure whether this is still required
---
@@ -9,7 +9,7 @@ FIXME: Not sure whether this is still required
1 file changed, 2 deletions(-)
diff --git a/src/gui/opengl/qopenglfunctions.h b/src/gui/opengl/qopenglfunctions.h
-index 0a5de2c9af..35798a2a28 100644
+index 4554291bbd..23d55bddeb 100644
--- a/src/gui/opengl/qopenglfunctions.h
+++ b/src/gui/opengl/qopenglfunctions.h
@@ -56,9 +56,7 @@
@@ -23,5 +23,5 @@ index 0a5de2c9af..35798a2a28 100644
#ifdef Q_ENABLE_OPENGL_FUNCTIONS_DEBUG
#include <stdio.h>
--
-2.15.1
+2.28.0
diff --git a/0004-Fix-too-many-sections-assemler-error-in-OpenGL-facto.patch b/0003-Fix-too-many-sections-assemler-error-in-OpenGL-facto.patch
index 13521b6f7010..e7c5c11f1b89 100644
--- a/0004-Fix-too-many-sections-assemler-error-in-OpenGL-facto.patch
+++ b/0003-Fix-too-many-sections-assemler-error-in-OpenGL-facto.patch
@@ -1,7 +1,7 @@
-From 2b0ac418d4007e8bbda1e2a4aacc508bd7a931a9 Mon Sep 17 00:00:00 2001
+From f6042da88367558cd294c2593c8cc3a6e8949667 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 13:48:51 +0200
-Subject: [PATCH 04/34] Fix too many sections assemler error in OpenGL factory
+Subject: [PATCH 03/31] Fix too many sections assemler error in OpenGL factory
On x86_64 qopenglversionfunctionsfactory.o exceeds the
limit of 32768 sections.
@@ -11,7 +11,7 @@ Hence the assembler option -mbig-obj is required.
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/gui/opengl/opengl.pri b/src/gui/opengl/opengl.pri
-index 4c778b184e..1dd1755d7f 100644
+index 24758afdeb..aa04b4a672 100644
--- a/src/gui/opengl/opengl.pri
+++ b/src/gui/opengl/opengl.pri
@@ -3,7 +3,8 @@
@@ -25,5 +25,5 @@ index 4c778b184e..1dd1755d7f 100644
HEADERS += opengl/qopengl.h \
opengl/qopengl_p.h \
--
-2.15.1
+2.28.0
diff --git a/0003-Use-external-ANGLE-library.patch b/0003-Use-external-ANGLE-library.patch
deleted file mode 100644
index 000082da0f9e..000000000000
--- a/0003-Use-external-ANGLE-library.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-From 3f183dac766bbaa507ff90dc7286e0c693f2dab1 Mon Sep 17 00:00:00 2001
-From: Martchus <martchus@gmx.net>
-Date: Sun, 18 Sep 2016 13:41:38 +0200
-Subject: [PATCH 03/34] Use external ANGLE library
-
----
- src/gui/Qt5GuiConfigExtras.cmake.in | 4 ++--
- src/gui/gui.pro | 8 ++------
- src/opengl/opengl.pro | 1 +
- src/plugins/platforms/windows/windows.pri | 1 +
- src/src.pro | 4 ----
- 5 files changed, 6 insertions(+), 12 deletions(-)
-
-diff --git a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in
-index 07869efd7d..2e32911a64 100644
---- a/src/gui/Qt5GuiConfigExtras.cmake.in
-+++ b/src/gui/Qt5GuiConfigExtras.cmake.in
-@@ -2,9 +2,9 @@
- !!IF !isEmpty(CMAKE_ANGLE_EGL_DLL_RELEASE)
-
- !!IF isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE)
--set(Qt5Gui_EGL_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR/QtANGLE\")
-+set(Qt5Gui_EGL_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR\")
- !!ELSE
--set(Qt5Gui_EGL_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR/QtANGLE\")
-+set(Qt5Gui_EGL_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR\")
- !!ENDIF
-
- _qt5_Gui_check_file_exists(${Qt5Gui_EGL_INCLUDE_DIRS})
-diff --git a/src/gui/gui.pro b/src/gui/gui.pro
-index f8cec00b82..d09c9fd49c 100644
---- a/src/gui/gui.pro
-+++ b/src/gui/gui.pro
-@@ -18,12 +18,6 @@ MODULE_PLUGIN_TYPES = \
- imageformats \
- egldeviceintegrations
-
--# This is here only because the platform plugin is no module, obviously.
--qtConfig(angle) {
-- MODULE_AUX_INCLUDES = \
-- \$\$QT_MODULE_INCLUDE_BASE/QtANGLE
--}
--
- # Code coverage with TestCocoon
- # The following is required as extra compilers use $$QMAKE_CXX instead of $(CXX).
- # Without this, testcocoon.prf is read only after $$QMAKE_CXX is used by the
-@@ -35,6 +29,8 @@ testcocoon {
- osx: LIBS_PRIVATE += -framework AppKit
- darwin: LIBS_PRIVATE += -framework CoreGraphics
-
-+win32:qtConfig(angle): LIBS_PRIVATE += -lGLESv2
-+
- CONFIG += simd optimize_full
-
- include(accessible/accessible.pri)
-diff --git a/src/opengl/opengl.pro b/src/opengl/opengl.pro
-index 016db46405..02f1204f0f 100644
---- a/src/opengl/opengl.pro
-+++ b/src/opengl/opengl.pro
-@@ -11,6 +11,7 @@ QMAKE_DOCS = $$PWD/doc/qtopengl.qdocconf
-
- qtConfig(opengl): CONFIG += opengl
- qtConfig(opengles2): CONFIG += opengles2
-+win32:qtConfig(angle): LIBS_PRIVATE += -lGLESv2
-
- HEADERS += qgl.h \
- qgl_p.h \
-diff --git a/src/plugins/platforms/windows/windows.pri b/src/plugins/platforms/windows/windows.pri
-index b7790a66e3..046fe34a06 100644
---- a/src/plugins/platforms/windows/windows.pri
-+++ b/src/plugins/platforms/windows/windows.pri
-@@ -4,6 +4,7 @@ LIBS += -lole32 -luser32 -lwinspool -limm32 -lwinmm -loleaut32
- QT_FOR_CONFIG += gui
-
- qtConfig(opengl):!qtConfig(opengles2):!qtConfig(dynamicgl): LIBS *= -lopengl32
-+qtConfig(angle):LIBS += -lGLESv2 -lEGL
-
- mingw: LIBS *= -luuid
- # For the dialog helpers:
-diff --git a/src/src.pro b/src/src.pro
-index a2064b1362..b9ba606b03 100644
---- a/src/src.pro
-+++ b/src/src.pro
-@@ -180,10 +180,6 @@ qtConfig(gui) {
- SUBDIRS += src_3rdparty_harfbuzzng
- src_gui.depends += src_3rdparty_harfbuzzng
- }
-- qtConfig(angle) {
-- SUBDIRS += src_angle
-- src_gui.depends += src_angle
-- }
- qtConfig(png):!qtConfig(system-png) {
- SUBDIRS += src_3rdparty_libpng
- src_3rdparty_freetype.depends += src_3rdparty_libpng
---
-2.15.1
-
diff --git a/0005-Make-sure-.pc-files-are-installed-correctly.patch b/0004-Make-sure-.pc-files-are-installed-correctly.patch
index 3d9c3cbcf6bc..97d28d1fb59d 100644
--- a/0005-Make-sure-.pc-files-are-installed-correctly.patch
+++ b/0004-Make-sure-.pc-files-are-installed-correctly.patch
@@ -1,7 +1,7 @@
-From 4e1350167ef79add7df24dd7ce0c84851465529c Mon Sep 17 00:00:00 2001
+From dcc115680078ce6d4c9682736b9b1fdf09abec63 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 13:54:12 +0200
-Subject: [PATCH 05/34] Make sure *.pc files are installed correctly
+Subject: [PATCH 04/31] Make sure *.pc files are installed correctly
---
qmake/generators/makefile.cpp | 8 ++++++--
@@ -10,10 +10,10 @@ Subject: [PATCH 05/34] Make sure *.pc files are installed correctly
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
-index 82573347b6..b9871ff49c 100644
+index 5c61a3c65c..e94084381c 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
-@@ -3146,7 +3146,7 @@ MakefileGenerator::openOutput(QFile &file, const QString &build) const
+@@ -3211,7 +3211,7 @@ MakefileGenerator::openOutput(QFile &file, const QString &build) const
}
QString
@@ -22,7 +22,7 @@ index 82573347b6..b9871ff49c 100644
{
QString ret = project->first("QMAKE_PKGCONFIG_FILE").toQString();
if (ret.isEmpty()) {
-@@ -3171,7 +3171,11 @@ MakefileGenerator::pkgConfigFileName(bool fixify)
+@@ -3236,7 +3236,11 @@ MakefileGenerator::pkgConfigFileName(bool fixify)
if(fixify) {
if(QDir::isRelativePath(ret) && !project->isEmpty("DESTDIR"))
ret.prepend(project->first("DESTDIR").toQString());
@@ -36,10 +36,10 @@ index 82573347b6..b9871ff49c 100644
return ret;
}
diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h
-index 4ced3bd121..f7cc3b9e9b 100644
+index a96b9c54da..5a7913be7a 100644
--- a/qmake/generators/makefile.h
+++ b/qmake/generators/makefile.h
-@@ -89,7 +89,7 @@ protected:
+@@ -96,7 +96,7 @@ protected:
virtual void writeDefaultVariables(QTextStream &t);
QString pkgConfigPrefix() const;
@@ -49,10 +49,10 @@ index 4ced3bd121..f7cc3b9e9b 100644
void writePkgConfigFile(); // for pkg-config
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
-index 75bb5d236d..737f3abc3a 100644
+index 5e446bd7e2..183cef2908 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
-@@ -726,7 +726,7 @@ QString Win32MakefileGenerator::defaultInstall(const QString &t)
+@@ -775,7 +775,7 @@ QString Win32MakefileGenerator::defaultInstall(const QString &t)
}
if(!ret.isEmpty())
ret += "\n\t";
@@ -62,5 +62,5 @@ index 75bb5d236d..737f3abc3a 100644
uninst.append("\n\t");
uninst.append("-$(DEL_FILE) " + escapeFilePath(dst_pc));
--
-2.15.1
+2.28.0
diff --git a/0006-Don-t-add-resource-files-to-LIBS-parameter.patch b/0005-Don-t-add-resource-files-to-LIBS-parameter.patch
index 099c3d8398c7..cce33fa07b04 100644
--- a/0006-Don-t-add-resource-files-to-LIBS-parameter.patch
+++ b/0005-Don-t-add-resource-files-to-LIBS-parameter.patch
@@ -1,7 +1,7 @@
-From 53088193a95b50d2bd88bf8a017a152e180404c9 Mon Sep 17 00:00:00 2001
+From a580a7539f99448391f2b16903f8746d610f131a Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 13:58:28 +0200
-Subject: [PATCH 06/34] Don't add resource files to LIBS parameter
+Subject: [PATCH 05/31] Don't add resource files to LIBS parameter
Solves an issue where the generated pkg-config
files contained invalid Libs.private references
@@ -11,18 +11,18 @@ like .obj/debug/Qt5Cored_resource_res.o
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp
-index 792ffb1997..faf8b5a275 100644
+index ee9a41838b..8d1dcae85b 100644
--- a/qmake/generators/win32/mingw_make.cpp
+++ b/qmake/generators/win32/mingw_make.cpp
-@@ -196,7 +196,7 @@ void MingwMakefileGenerator::init()
+@@ -147,7 +147,7 @@ void MingwMakefileGenerator::init()
processVars();
-- project->values("QMAKE_LIBS") += project->values("RES_FILE");
+- project->values("LIBS") += project->values("RES_FILE");
+ project->values("OBJECTS") += project->values("RES_FILE");
if (project->isActiveConfig("dll")) {
QString destDir = "";
--
-2.15.1
+2.28.0
diff --git a/0007-Prevent-debug-library-names-in-pkg-config-files.patch b/0006-Prevent-debug-library-names-in-pkg-config-files.patch
index 5543c88f9197..8070d2ed527f 100644
--- a/0007-Prevent-debug-library-names-in-pkg-config-files.patch
+++ b/0006-Prevent-debug-library-names-in-pkg-config-files.patch
@@ -1,7 +1,7 @@
-From 08fec3af6cd36be649cbab317ded9e2ff4a5a4c4 Mon Sep 17 00:00:00 2001
+From 006235cdee71011db441e0ea5265cb9c93937f6c Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 14:01:14 +0200
-Subject: [PATCH 07/34] Prevent debug library names in pkg-config files
+Subject: [PATCH 06/31] Prevent debug library names in pkg-config files
qmake generates the pkgconfig .pc files two times, once for the
release build and once for the debug build (which we're not actually
@@ -15,10 +15,10 @@ files for the debug build an unique file name.
1 file changed, 3 insertions(+)
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
-index b9871ff49c..0d07d6c333 100644
+index e94084381c..8e4d11484f 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
-@@ -3160,6 +3160,9 @@ MakefileGenerator::pkgConfigFileName(bool fixify, bool onlyPrependDestdir)
+@@ -3225,6 +3225,9 @@ MakefileGenerator::pkgConfigFileName(bool fixify, bool onlyPrependDestdir)
if (dot != -1)
ret = ret.left(dot);
}
@@ -29,5 +29,5 @@ index b9871ff49c..0d07d6c333 100644
QString subdir = project->first("QMAKE_PKGCONFIG_DESTDIR").toQString();
if(!subdir.isEmpty()) {
--
-2.15.1
+2.28.0
diff --git a/0007-Fix-linking-against-shared-static-libpng.patch b/0007-Fix-linking-against-shared-static-libpng.patch
new file mode 100644
index 000000000000..c777ccaf27e8
--- /dev/null
+++ b/0007-Fix-linking-against-shared-static-libpng.patch
@@ -0,0 +1,30 @@
+From 7122a1ddd12d8852ed31fc4cc2f6523f09f66363 Mon Sep 17 00:00:00 2001
+From: Martchus <martchus@gmx.net>
+Date: Thu, 26 Jan 2017 17:51:31 +0100
+Subject: [PATCH 07/31] Fix linking against shared/static libpng
+
+Change-Id: Ic7a0ec9544059b8e647a5d0186f1b88c00911dcf
+---
+ src/gui/configure.json | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/gui/configure.json b/src/gui/configure.json
+index 1f08795c57..7a5fc6ce7a 100644
+--- a/src/gui/configure.json
++++ b/src/gui/configure.json
+@@ -399,8 +399,10 @@
+ { "type": "pkgConfig", "args": "libpng" },
+ { "libs": "-llibpng16", "condition": "config.msvc" },
+ { "libs": "-llibpng", "condition": "config.msvc" },
+- { "libs": "-lpng16", "condition": "!config.msvc" },
+- { "libs": "-lpng", "condition": "!config.msvc" },
++ { "libs": "-lpng16 -lz", "condition": "!config.msvc && !features.shared" },
++ { "libs": "-lpng -lz", "condition": "!config.msvc && !features.shared" },
++ { "libs": "-lpng16", "condition": "!config.msvc && features.shared" },
++ { "libs": "-lpng", "condition": "!config.msvc && features.shared" },
+ { "libs": "-s USE_LIBPNG=1", "condition": "config.wasm" }
+ ],
+ "use": [
+--
+2.28.0
+
diff --git a/0008-Fix-linking-against-shared-static-libpng.patch b/0008-Fix-linking-against-shared-static-libpng.patch
deleted file mode 100644
index b51544fd5ae2..000000000000
--- a/0008-Fix-linking-against-shared-static-libpng.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 2e8a2b07a1b9ba68f0836fe9d1f6e88f55e362ac Mon Sep 17 00:00:00 2001
-From: Martchus <martchus@gmx.net>
-Date: Thu, 26 Jan 2017 17:51:31 +0100
-Subject: [PATCH 08/34] Fix linking against shared/static libpng
-
-Change-Id: Ic7a0ec9544059b8e647a5d0186f1b88c00911dcf
----
- src/gui/configure.json | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/src/gui/configure.json b/src/gui/configure.json
-index 0a591e110c..4ca919c6da 100644
---- a/src/gui/configure.json
-+++ b/src/gui/configure.json
-@@ -296,7 +296,8 @@
- "sources": [
- { "type": "pkgConfig", "args": "libpng" },
- { "libs": "-llibpng", "condition": "config.msvc" },
-- { "libs": "-lpng", "condition": "!config.msvc" }
-+ { "libs": "-lpng -lz", "condition": "!config.msvc && !features.shared" },
-+ { "libs": "-lpng", "condition": "!config.msvc && features.shared" }
- ],
- "use": [
- { "lib": "zlib", "condition": "features.system-zlib" }
---
-2.15.1
-
diff --git a/0009-Fix-linking-against-static-D-Bus.patch b/0008-Fix-linking-against-static-D-Bus.patch
index 58f370722f3c..160eb9c35419 100644
--- a/0009-Fix-linking-against-static-D-Bus.patch
+++ b/0008-Fix-linking-against-static-D-Bus.patch
@@ -1,7 +1,7 @@
-From 25273fb108f1e3a239d200570053ca3630461289 Mon Sep 17 00:00:00 2001
+From 4898dc76052b6d77f99e56270979a4bb251998c5 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Fri, 3 Feb 2017 19:36:25 +0100
-Subject: [PATCH 09/34] Fix linking against static D-Bus
+Subject: [PATCH 08/31] Fix linking against static D-Bus
---
configure.json | 9 +++++++--
@@ -9,18 +9,18 @@ Subject: [PATCH 09/34] Fix linking against static D-Bus
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/configure.json b/configure.json
-index 26e1572f32..108619634c 100644
+index 50d69b740d..2433da3c20 100644
--- a/configure.json
+++ b/configure.json
-@@ -171,18 +171,23 @@
- "CONFIG(debug, debug|release): \\",
- " LIBS += $$LIBS_DEBUG",
- "else: \\",
-- " LIBS += $$LIBS_RELEASE"
-+ " LIBS += $$LIBS_RELEASE",
-+ "static: DEFINES += DBUS_STATIC_BUILD"
- ]
+@@ -188,18 +188,23 @@
+ "dbus": {
+ "label": "D-Bus >= 1.2",
+ "test": {
+- "main": "(void) dbus_bus_get_private(DBUS_BUS_SYSTEM, (DBusError *)NULL);"
++ "main": "(void) dbus_bus_get_private(DBUS_BUS_SYSTEM, (DBusError *)NULL);",
++ "qmake": "static: DEFINES += DBUS_STATIC_BUILD"
},
+ "headers": "dbus/dbus.h",
"sources": [
{ "type": "pkgConfig", "args": "dbus-1 >= 1.2" },
+ {
@@ -39,7 +39,7 @@ index 26e1572f32..108619634c 100644
{ "libs": "-ldbus-1", "condition": "!config.win32" }
]
diff --git a/src/dbus/qdbus_symbols_p.h b/src/dbus/qdbus_symbols_p.h
-index cfc0e12046..65f1397cd6 100644
+index accaa4f5ed..4b11c74caa 100644
--- a/src/dbus/qdbus_symbols_p.h
+++ b/src/dbus/qdbus_symbols_p.h
@@ -57,6 +57,10 @@
@@ -54,5 +54,5 @@ index cfc0e12046..65f1397cd6 100644
# include <dbus/dbus.h>
#else
--
-2.15.1
+2.28.0
diff --git a/0010-Don-t-try-to-use-debug-version-of-D-Bus-library.patch b/0009-Don-t-try-to-use-debug-version-of-D-Bus-library.patch
index 4b1175f38f6c..08f2ac7f6378 100644
--- a/0010-Don-t-try-to-use-debug-version-of-D-Bus-library.patch
+++ b/0009-Don-t-try-to-use-debug-version-of-D-Bus-library.patch
@@ -1,7 +1,7 @@
-From 54e71f3f648c24958924ee52b427e777b979b47b Mon Sep 17 00:00:00 2001
+From 39cac9030befe8b2d490b3397c99fe5bbbd935b6 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Fri, 2 Jun 2017 18:28:10 +0200
-Subject: [PATCH 10/34] Don't try to use debug version of D-Bus library
+Subject: [PATCH 09/31] Don't try to use debug version of D-Bus library
Required for a debug build of Qt because mingw-w64-dbus
does not contain debug version
@@ -12,10 +12,10 @@ Change-Id: Ic34e1025fda55f9659e065f5bbe9d51f55420adb
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.json b/configure.json
-index 108619634c..d668ce0c98 100644
+index 2433da3c20..bde226843b 100644
--- a/configure.json
+++ b/configure.json
-@@ -184,7 +184,7 @@
+@@ -201,7 +201,7 @@
{
"libs": "",
"builds": {
@@ -25,5 +25,5 @@ index 108619634c..d668ce0c98 100644
},
"condition": "config.win32 && features.shared"
--
-2.15.1
+2.28.0
diff --git a/0011-Fix-linking-against-static-freetype2.patch b/0010-Fix-linking-against-static-freetype2.patch
index 4da1971a2e12..682678f7c698 100644
--- a/0011-Fix-linking-against-static-freetype2.patch
+++ b/0010-Fix-linking-against-static-freetype2.patch
@@ -1,30 +1,30 @@
-From 0d67a3dc557e4b4cc77e9c667dc427539a60c2af Mon Sep 17 00:00:00 2001
+From 788846ebc422894f3e6aa8f39485e0ab88abe81a Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Fri, 3 Feb 2017 20:51:19 +0100
-Subject: [PATCH 11/34] Fix linking against static freetype2
+Subject: [PATCH 10/31] Fix linking against static freetype2
---
src/gui/configure.json | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/gui/configure.json b/src/gui/configure.json
-index 4ca919c6da..5d524b1d73 100644
+index 7a5fc6ce7a..b117f6fff6 100644
--- a/src/gui/configure.json
+++ b/src/gui/configure.json
-@@ -158,8 +158,11 @@
- ]
+@@ -238,8 +238,11 @@
},
+ "headers": "ft2build.h",
"sources": [
- { "type": "pkgConfig", "args": "freetype2" },
-- { "type": "freetype", "libs": "-lfreetype" }
+- { "type": "freetype", "libs": "-lfreetype", "condition": "!config.wasm" },
+ { "type": "pkgConfig", "args": "--static --libs freetype2", "condition": "!features.shared" },
+ { "type": "pkgConfig", "args": "--libs freetype2", "condition": "features.shared" },
-+ { "libs": "-lfreetype -lharfbuzz -lfreetype -lglib-2.0 -lintl -lws2_32 -lole32 -lwinmm -lshlwapi -lpcre -lintl -lpcre -lintl -liconv -lgraphite2 -lbz2", "condition": "!features.shared" },
-+ { "libs": "-Wl,-Bdynamic -lfreetype -Wl,-Bstatic", "condition": "!features.shared" },
-+ { "libs": "-lfreetype", "condition": "features.shared" }
- ]
- },
- "fontconfig": {
++ { "libs": "-lfreetype -lharfbuzz -lfreetype -lglib-2.0 -lintl -lws2_32 -lole32 -lwinmm -lshlwapi -lpcre -lintl -lpcre -lintl -liconv -lgraphite2 -lbz2", "condition": "!features.shared && !config.wasm" },
++ { "libs": "-Wl,-Bdynamic -lfreetype -Wl,-Bstatic", "condition": "!features.shared && !config.wasm" },
++ { "libs": "-lfreetype", "condition": "features.shared && !config.wasm" },
+ { "libs": "-s USE_FREETYPE=1", "condition": "config.wasm" },
+ { "libs": "-lfreetype" }
+ ],
--
-2.15.1
+2.28.0
diff --git a/0012-Fix-linking-against-static-harfbuzz.patch b/0011-Fix-linking-against-static-harfbuzz.patch
index 75177fa48b4b..062c21f42ba1 100644
--- a/0012-Fix-linking-against-static-harfbuzz.patch
+++ b/0011-Fix-linking-against-static-harfbuzz.patch
@@ -1,19 +1,19 @@
-From bfb366d5d8746979429e89251993e1b4a4040e7d Mon Sep 17 00:00:00 2001
+From 0fb1b65cd6c37419e0292b90a47e1d4682cbb042 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 14:22:56 +0200
-Subject: [PATCH 12/34] Fix linking against static harfbuzz
+Subject: [PATCH 11/31] Fix linking against static harfbuzz
---
src/gui/configure.json | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/gui/configure.json b/src/gui/configure.json
-index 5d524b1d73..78f1b90d37 100644
+index b117f6fff6..2a0207920a 100644
--- a/src/gui/configure.json
+++ b/src/gui/configure.json
-@@ -223,7 +223,11 @@
- ]
+@@ -306,7 +306,11 @@
},
+ "headers": "harfbuzz/hb.h",
"sources": [
- "-lharfbuzz"
+ { "type": "pkgConfig", "args": "--static --libs harfbuzz", "condition": "!features.shared" },
@@ -25,5 +25,5 @@ index 5d524b1d73..78f1b90d37 100644
},
"imf": {
--
-2.15.1
+2.28.0
diff --git a/0012-Fix-linking-against-static-pcre.patch b/0012-Fix-linking-against-static-pcre.patch
new file mode 100644
index 000000000000..28b23b6848cb
--- /dev/null
+++ b/0012-Fix-linking-against-static-pcre.patch
@@ -0,0 +1,28 @@
+From f67ffa152627401a4daba9dea452acc4a6cb5621 Mon Sep 17 00:00:00 2001
+From: Martchus <martchus@gmx.net>
+Date: Sun, 18 Sep 2016 14:24:01 +0200
+Subject: [PATCH 12/31] Fix linking against static pcre
+
+Change-Id: I3225c6e82dc4d17aef37d4289c16eb7a5ea3c5a1
+---
+ src/corelib/text/qregularexpression.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/corelib/text/qregularexpression.cpp b/src/corelib/text/qregularexpression.cpp
+index 729269d0f4..128baafd56 100644
+--- a/src/corelib/text/qregularexpression.cpp
++++ b/src/corelib/text/qregularexpression.cpp
+@@ -53,6 +53,10 @@
+ #include <QtCore/qdatastream.h>
+
+ #define PCRE2_CODE_UNIT_WIDTH 16
++#ifdef QT_STATIC
++#define PCRE_STATIC
++#define PCRE2_STATIC
++#endif
+
+ #include <pcre2.h>
+
+--
+2.28.0
+
diff --git a/0014-Fix-linking-against-shared-static-MariaDB.patch b/0013-Fix-linking-against-shared-static-MariaDB.patch
index 366c143b02ac..2347714da5b1 100644
--- a/0014-Fix-linking-against-shared-static-MariaDB.patch
+++ b/0013-Fix-linking-against-shared-static-MariaDB.patch
@@ -1,27 +1,26 @@
-From 08683d4d220af8b00fd28d841d0027c2f830f3c9 Mon Sep 17 00:00:00 2001
+From d3170e1695855d72ca9a1e093a20d88ae12372ef Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 18:56:55 +0200
-Subject: [PATCH 14/34] Fix linking against shared/static MariaDB
+Subject: [PATCH 13/31] Fix linking against shared/static MariaDB
Change-Id: I9722c154d845f288a2d4d1ab14a014066b28819b
---
- src/plugins/sqldrivers/configure.json | 3 +++
- 1 file changed, 3 insertions(+)
+ src/plugins/sqldrivers/configure.json | 2 ++
+ 1 file changed, 2 insertions(+)
diff --git a/src/plugins/sqldrivers/configure.json b/src/plugins/sqldrivers/configure.json
-index 234f880579..4619db4a54 100644
+index 28ccbeadcd..7262914c64 100644
--- a/src/plugins/sqldrivers/configure.json
+++ b/src/plugins/sqldrivers/configure.json
-@@ -69,6 +69,9 @@
- "main": "mysql_get_client_version();"
+@@ -67,6 +67,8 @@
},
+ "headers": "mysql.h",
"sources": [
-+ { "libs": "-lmariadbclient -lssl -lcrypto -lgdi32 -lws2_32 -lpthread -lz -lm", "condition": "config.win32 && !features.shared" },
-+ { "libs": "-Wl,-Bdynamic -lmariadb -Wl,-Bstatic", "condition": "config.win32 && !features.shared" },
++ { "libs": "-lmariadbclient -lssl -lcrypto -lshlwapi -lgdi32 -lws2_32 -lpthread -lz -lm", "condition": "config.win32 && !features.shared" },
+ { "libs": "-lmariadb", "condition": "config.win32 && features.shared" },
{ "type": "mysqlConfig", "query": "--libs_r", "cleanlibs": true },
{ "type": "mysqlConfig", "query": "--libs", "cleanlibs": true },
{ "type": "mysqlConfig", "query": "--libs_r", "cleanlibs": false },
--
-2.15.1
+2.28.0
diff --git a/0013-Fix-linking-against-static-pcre.patch b/0013-Fix-linking-against-static-pcre.patch
deleted file mode 100644
index 38c77dd9665c..000000000000
--- a/0013-Fix-linking-against-static-pcre.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From b14796dc6a28a880c99f838e180c0398399d6418 Mon Sep 17 00:00:00 2001
-From: Martchus <martchus@gmx.net>
-Date: Sun, 18 Sep 2016 14:24:01 +0200
-Subject: [PATCH 13/34] Fix linking against static pcre
-
-Change-Id: I3225c6e82dc4d17aef37d4289c16eb7a5ea3c5a1
----
- src/corelib/tools/qregularexpression.cpp | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/corelib/tools/qregularexpression.cpp b/src/corelib/tools/qregularexpression.cpp
-index 86bc99716d..5037ae68a1 100644
---- a/src/corelib/tools/qregularexpression.cpp
-+++ b/src/corelib/tools/qregularexpression.cpp
-@@ -55,6 +55,10 @@
- #include <QtCore/qdatastream.h>
-
- #define PCRE2_CODE_UNIT_WIDTH 16
-+#ifdef QT_STATIC
-+#define PCRE_STATIC
-+#define PCRE2_STATIC
-+#endif
-
- #include <pcre2.h>
-
---
-2.15.1
-
diff --git a/0015-Fix-linking-against-shared-static-PostgreSQL.patch b/0014-Fix-linking-against-shared-static-PostgreSQL.patch
index 99525fa1b2fc..a9f801d18f60 100644
--- a/0015-Fix-linking-against-shared-static-PostgreSQL.patch
+++ b/0014-Fix-linking-against-shared-static-PostgreSQL.patch
@@ -1,29 +1,28 @@
-From 7f17b25b356d542355b1457b3eea211219768694 Mon Sep 17 00:00:00 2001
+From 997237bc94e9f12d309e55a119002be7496dd280 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 18:58:25 +0200
-Subject: [PATCH 15/34] Fix linking against shared/static PostgreSQL
+Subject: [PATCH 14/31] Fix linking against shared/static PostgreSQL
---
- src/plugins/sqldrivers/configure.json | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
+ src/plugins/sqldrivers/configure.json | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/plugins/sqldrivers/configure.json b/src/plugins/sqldrivers/configure.json
-index 4619db4a54..ef0d45f6cc 100644
+index 7262914c64..852ba558be 100644
--- a/src/plugins/sqldrivers/configure.json
+++ b/src/plugins/sqldrivers/configure.json
-@@ -91,9 +91,10 @@
- ]
+@@ -90,9 +90,9 @@
},
+ "headers": "libpq-fe.h",
"sources": [
- { "type": "pkgConfig", "args": "libpq" },
{ "type": "psqlConfig" },
- { "type": "psqlEnv", "libs": "-llibpq -lws2_32 -ladvapi32", "condition": "config.win32" },
-+ { "type": "psqlEnv", "libs": "-lpq -lintl -lssl -lcrypto -lshell32 -lws2_32 -lsecur32", "condition": "config.win32 && !features.shared" },
-+ { "type": "psqlEnv", "libs": "-Wl,-Bdynamic -lpq -Wl,-Bstatic", "condition": "config.win32 && !features.shared" },
++ { "type": "psqlEnv", "libs": "-lpq -lpgcommon -lpgport -lintl -lssl -lcrypto -lshell32 -lws2_32 -lsecur32 -liconv", "condition": "config.win32 && !features.shared" },
+ { "type": "psqlEnv", "libs": "-lpq", "condition": "config.win32 && features.shared" },
{ "type": "psqlEnv", "libs": "-lpq", "condition": "!config.win32" }
]
},
--
-2.15.1
+2.28.0
diff --git a/0015-Rename-qtmain-to-qt5main.patch b/0015-Rename-qtmain-to-qt5main.patch
new file mode 100644
index 000000000000..42308a30e374
--- /dev/null
+++ b/0015-Rename-qtmain-to-qt5main.patch
@@ -0,0 +1,80 @@
+From 7ef86aea3eaffb36605e5d53e8fd6759e0931699 Mon Sep 17 00:00:00 2001
+From: Martchus <martchus@gmx.net>
+Date: Sun, 18 Sep 2016 14:25:40 +0200
+Subject: [PATCH 15/31] Rename qtmain to qt5main
+
+Prevents conflict with mingw-w64-qt4 package
+---
+ mkspecs/common/g++-win32.conf | 2 +-
+ mkspecs/features/create_cmake.prf | 8 ++++----
+ mkspecs/features/win32/windows.prf | 4 ++--
+ src/winmain/winmain.pro | 2 +-
+ 4 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/mkspecs/common/g++-win32.conf b/mkspecs/common/g++-win32.conf
+index d852ccc2ad..11249c1470 100644
+--- a/mkspecs/common/g++-win32.conf
++++ b/mkspecs/common/g++-win32.conf
+@@ -82,7 +82,7 @@ QMAKE_LIBS_OPENGL = -lglu32 -lopengl32 -lgdi32 -luser32
+ QMAKE_LIBS_OPENGL_ES2 = -l$${LIBEGL_NAME} -l$${LIBGLESV2_NAME} -ld3d9 -ldxguid -lgdi32 -luser32
+ QMAKE_LIBS_OPENGL_ES2_DEBUG = -l$${LIBEGL_NAME} -l$${LIBGLESV2_NAME} -ld3d9 -ldxguid -lgdi32 -luser32
+ QMAKE_LIBS_COMPAT = -ladvapi32 -lshell32 -lcomdlg32 -luser32 -lgdi32 -lws2_32
+-QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqtmain
++QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqt5main
+
+ QMAKE_IDL = $${CROSS_COMPILE}widl
+ QMAKE_LIB = $${CROSS_COMPILE}ar -rc
+diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
+index 24ed125f12..593161f362 100644
+--- a/mkspecs/features/create_cmake.prf
++++ b/mkspecs/features/create_cmake.prf
+@@ -329,14 +329,14 @@ mac {
+ }
+
+ mingw {
+- CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqtmain$${QT_LIBINFIX}$${debug_suffix}.a
+- CMAKE_WINMAIN_FILE_LOCATION_RELEASE = libqtmain$${QT_LIBINFIX}.a
++ CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqt5main$${QT_LIBINFIX}$${debug_suffix}.a
++ CMAKE_WINMAIN_FILE_LOCATION_RELEASE = libqt5main$${QT_LIBINFIX}.a
+
+ CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}$${debug_suffix}.a
+ CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a
+ } else {
+- CMAKE_WINMAIN_FILE_LOCATION_DEBUG = qtmain$${QT_LIBINFIX}$${debug_suffix}.lib
+- CMAKE_WINMAIN_FILE_LOCATION_RELEASE = qtmain$${QT_LIBINFIX}.lib
++ CMAKE_WINMAIN_FILE_LOCATION_DEBUG = qt5main$${QT_LIBINFIX}$${debug_suffix}.lib
++ CMAKE_WINMAIN_FILE_LOCATION_RELEASE = qt5main$${QT_LIBINFIX}.lib
+
+ CMAKE_IMPLIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}$${debug_suffix}.lib
+ CMAKE_IMPLIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.lib
+diff --git a/mkspecs/features/win32/windows.prf b/mkspecs/features/win32/windows.prf
+index 272170d428..17f3ef9c2d 100644
+--- a/mkspecs/features/win32/windows.prf
++++ b/mkspecs/features/win32/windows.prf
+@@ -5,8 +5,8 @@ contains(TEMPLATE, ".*app") {
+ mingw:DEFINES += QT_NEEDS_QMAIN
+
+ 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
++ isEqual(entryLib, -lqt5main) {
++ lib = $$QT.core.libs/$${QMAKE_PREFIX_STATICLIB}qt5main$$QT_LIBINFIX$$qtPlatformTargetSuffix().$$QMAKE_EXTENSION_STATICLIB
+ PRE_TARGETDEPS += $$lib
+ QMAKE_LIBS += $$lib
+ } else {
+diff --git a/src/winmain/winmain.pro b/src/winmain/winmain.pro
+index 1f54c846ec..162e7a4b1b 100644
+--- a/src/winmain/winmain.pro
++++ b/src/winmain/winmain.pro
+@@ -2,7 +2,7 @@
+ !win32:error("$$_FILE_ is intended only for Windows!")
+
+ TEMPLATE = lib
+-TARGET = qtmain
++TARGET = qt5main
+ DESTDIR = $$QT.core.libs
+
+ CONFIG += static
+--
+2.28.0
+
diff --git a/0018-Enable-rpath-for-build-tools.patch b/0016-Enable-rpath-for-build-tools.patch
index 9a086a7035af..659a0ac70f94 100644
--- a/0018-Enable-rpath-for-build-tools.patch
+++ b/0016-Enable-rpath-for-build-tools.patch
@@ -1,7 +1,7 @@
-From 3e78a026458bf55398ec4c6cc31a66d2cca8b124 Mon Sep 17 00:00:00 2001
+From 2b3b220623dd50228e3b47403a7e07fc73804400 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 17:59:27 +0200
-Subject: [PATCH 18/34] Enable rpath for build tools
+Subject: [PATCH 16/31] Enable rpath for build tools
- Required because various tools depend on libQt5Bootstrap.so which resides
in folder /usr/${_arch}/lib
@@ -13,18 +13,18 @@ Change-Id: I9808062a66406cdec7446a75150b40b2f30038c7
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mkspecs/features/qt_app.prf b/mkspecs/features/qt_app.prf
-index 883f8ca215..786f2e660c 100644
+index 8354f30eea..30e8cf18c5 100644
--- a/mkspecs/features/qt_app.prf
+++ b/mkspecs/features/qt_app.prf
-@@ -24,6 +24,7 @@ isEmpty(QMAKE_INFO_PLIST): CONFIG -= app_bundle
- QMAKE_LFLAGS += $$QMAKE_LFLAGS_GCSECTIONS
+@@ -21,6 +21,7 @@ isEmpty(QMAKE_TARGET_DESCRIPTION): \
+ isEmpty(QMAKE_INFO_PLIST): CONFIG -= app_bundle
host_build: QT -= gui # no host tool will ever use gui
+host_build: QMAKE_RPATHDIR += $$[QT_INSTALL_LIBS/dev] # force rpath
host_build:force_bootstrap {
!build_pass:qtConfig(release_tools): CONFIG += release
contains(QT, core(-private)?|xml) {
-@@ -34,7 +35,6 @@ host_build:force_bootstrap {
+@@ -31,7 +32,6 @@ host_build:force_bootstrap {
} else {
!build_pass:qtConfig(debug_and_release): CONFIG += release
target.path = $$[QT_INSTALL_BINS]
@@ -33,5 +33,5 @@ index 883f8ca215..786f2e660c 100644
INSTALLS += target
--
-2.15.1
+2.28.0
diff --git a/0016-Rename-qtmain-to-qt5main.patch b/0016-Rename-qtmain-to-qt5main.patch
deleted file mode 100644
index 2b57ab9b8dd1..000000000000
--- a/0016-Rename-qtmain-to-qt5main.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 69c2a140953c4958dd59892bde8f4283e4ee2b35 Mon Sep 17 00:00:00 2001
-From: Martchus <martchus@gmx.net>
-Date: Sun, 18 Sep 2016 14:25:40 +0200
-Subject: [PATCH 16/34] Rename qtmain to qt5main
-
-Prevents conflict with mingw-w64-qt4 package
----
- mkspecs/features/create_cmake.prf | 4 ++--
- mkspecs/features/win32/windows.prf | 2 +-
- src/winmain/winmain.pro | 2 +-
- 3 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
-index bb5083c925..146e83ae67 100644
---- a/mkspecs/features/create_cmake.prf
-+++ b/mkspecs/features/create_cmake.prf
-@@ -225,8 +225,8 @@ mac {
- CMAKE_LIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.dll
-
- mingw {
-- CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqtmain$${QT_LIBINFIX}d.a
-- CMAKE_WINMAIN_FILE_LOCATION_RELEASE = libqtmain$${QT_LIBINFIX}.a
-+ CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqt5main$${QT_LIBINFIX}.a
-+ CMAKE_WINMAIN_FILE_LOCATION_RELEASE = libqt5main$${QT_LIBINFIX}.a
-
- !isEmpty(CMAKE_STATIC_TYPE) {
- CMAKE_STATIC_WINDOWS_BUILD = "true"
-diff --git a/mkspecs/features/win32/windows.prf b/mkspecs/features/win32/windows.prf
-index ecb167bf18..7c9368c3b3 100644
---- a/mkspecs/features/win32/windows.prf
-+++ b/mkspecs/features/win32/windows.prf
-@@ -5,7 +5,7 @@ contains(TEMPLATE, ".*app") {
- mingw:DEFINES += QT_NEEDS_QMAIN
-
- qt:for(entryLib, $$list($$unique(QMAKE_LIBS_QT_ENTRY))) {
-- isEqual(entryLib, -lqtmain) {
-+ isEqual(entryLib, -lqt5main): {
- !contains(QMAKE_DEFAULT_LIBDIRS, $$QT.core.libs): \
- QMAKE_LIBS += -L$$QT.core.libs
- CONFIG(debug, debug|release): QMAKE_LIBS += $${entryLib}$${QT_LIBINFIX}d
-diff --git a/src/winmain/winmain.pro b/src/winmain/winmain.pro
-index 4140ae48de..9ae73db74b 100644
---- a/src/winmain/winmain.pro
-+++ b/src/winmain/winmain.pro
-@@ -2,7 +2,7 @@
- !win32:error("$$_FILE_ is intended only for Windows!")
-
- TEMPLATE = lib
--TARGET = qtmain
-+TARGET = qt5main
- DESTDIR = $$QT.core.libs
-
- CONFIG += static
---
-2.15.1
-
diff --git a/0017-Build-dynamic-host-libraries.patch b/0017-Build-dynamic-host-libraries.patch
deleted file mode 100644
index 285b35e66655..000000000000
--- a/0017-Build-dynamic-host-libraries.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 06c0f7930559066186bbb79876843f5cdf425a4a Mon Sep 17 00:00:00 2001
-From: Martchus <martchus@gmx.net>
-Date: Sun, 18 Sep 2016 14:27:28 +0200
-Subject: [PATCH 17/34] Build dynamic host libraries
-
-This came initially from Fedora, not sure whether
-it makes sense to keep it. Regular Arch package
-uses static lib as intended by upstream.
-
-Change-Id: I91a3613955c656fb0d262ccb9b2529350bab032b
----
- mkspecs/features/qt_module.prf | 2 +-
- src/tools/bootstrap-dbus/bootstrap-dbus.pro | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf
-index c0a8dcc251..200fa40840 100644
---- a/mkspecs/features/qt_module.prf
-+++ b/mkspecs/features/qt_module.prf
-@@ -24,7 +24,7 @@ requires(!$$skip)
-
- # Compile as shared/DLL or static according to the option given to configure
- # unless overridden. Host builds are always static
--host_build|staticlib: CONFIG += static
-+staticlib: CONFIG += static
-
- host_build {
- QT -= gui # no host module will ever use gui
-diff --git a/src/tools/bootstrap-dbus/bootstrap-dbus.pro b/src/tools/bootstrap-dbus/bootstrap-dbus.pro
-index c3ed27d979..30d2114aa1 100644
---- a/src/tools/bootstrap-dbus/bootstrap-dbus.pro
-+++ b/src/tools/bootstrap-dbus/bootstrap-dbus.pro
-@@ -27,4 +27,4 @@ SOURCES = \
- load(qt_module)
-
- lib.CONFIG = dummy_install
--INSTALLS = lib
-+INSTALLS += lib
---
-2.15.1
-
diff --git a/0019-Use-system-zlib-for-build-tools.patch b/0017-Use-system-zlib-for-build-tools.patch
index 52eb3921ee7a..1caa3e443196 100644
--- a/0019-Use-system-zlib-for-build-tools.patch
+++ b/0017-Use-system-zlib-for-build-tools.patch
@@ -1,25 +1,27 @@
-From f88dd77ef98c92070659ff5d3371ae39779e630c Mon Sep 17 00:00:00 2001
+From 2509527af89dd69120d68c9a6959028a18649996 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 18:04:42 +0200
-Subject: [PATCH 19/34] Use system zlib for build tools
+Subject: [PATCH 17/31] Use system zlib for build tools
---
- src/tools/bootstrap/bootstrap.pro | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+ src/tools/bootstrap/bootstrap.pro | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro
-index 042ad7adb9..7e3bc3977a 100644
+index c212ccbb6f..1bf9f1e4f9 100644
--- a/src/tools/bootstrap/bootstrap.pro
+++ b/src/tools/bootstrap/bootstrap.pro
-@@ -132,7 +132,7 @@ macx {
+@@ -158,7 +158,9 @@ macx {
../../corelib/io/qstandardpaths_win.cpp
}
-!qtConfig(system-zlib)|cross_compile {
-+!qtConfig(system-zlib) {
++cross_compile {
++ LIBS += -lz
++} else:!qtConfig(system-zlib) {
include(../../3rdparty/zlib.pri)
} else {
CONFIG += no_core_dep
--
-2.15.1
+2.28.0
diff --git a/0018-Merge-shared-and-static-library-trees.patch b/0018-Merge-shared-and-static-library-trees.patch
new file mode 100644
index 000000000000..77d47d8f5e70
--- /dev/null
+++ b/0018-Merge-shared-and-static-library-trees.patch
@@ -0,0 +1,208 @@
+From 323393dab8e135dbfbba3e82b164765ac1c82a56 Mon Sep 17 00:00:00 2001
+From: Martchus <martchus@gmx.net>
+Date: Sun, 18 Sep 2016 18:45:08 +0200
+Subject: [PATCH 18/31] Merge shared and static library trees
+
+Allow installation of shared and static build in the same prefix
+
+Change-Id: I1de08df42d83d411aae519691cd3cde1fd6f3d1d
+---
+ configure.pri | 16 +++++++++++++++-
+ mkspecs/features/default_post.prf | 11 +++++++++++
+ mkspecs/features/device_config.prf | 9 ++++++++-
+ mkspecs/features/qt.prf | 17 +++++++++++++++++
+ mkspecs/features/spec_pre.prf | 11 ++++++++---
+ qmake/generators/makefile.cpp | 11 +++++++----
+ qtbase.pro | 10 ++++++++--
+ 7 files changed, 74 insertions(+), 11 deletions(-)
+
+diff --git a/configure.pri b/configure.pri
+index 3dedffcace..89938dfc32 100644
+--- a/configure.pri
++++ b/configure.pri
+@@ -654,7 +654,12 @@ defineTest(qtConfOutput_machineTuple) {
+
+ defineTest(qtConfOutput_commitOptions) {
+ # qdevice.pri needs to be written early, because the compile tests require it.
+- write_file($$QT_BUILD_TREE/mkspecs/qdevice.pri, $${currentConfig}.output.devicePro)|error()
++ shared|actually_a_shared_build {
++ DEVICE_PRI_SUFFIX = .pri
++ } else {
++ DEVICE_PRI_SUFFIX = .static.pri
++ }
++ write_file($$QT_BUILD_TREE/mkspecs/qdevice$$DEVICE_PRI_SUFFIX, $${currentConfig}.output.devicePro)|error()
+ }
+
+ # type (empty or 'host'), option name, default value
+@@ -1393,3 +1398,12 @@ defineTest(createConfigStatus) {
+
+ QMAKE_POST_CONFIGURE += \
+ "createConfigStatus()"
++
++# merge shared and static library trees
++contains(CONFIG, static) {
++ CONFIG -= shared
++ QT_CONFIG += static jpeg gif
++ QT_CONFIG -= shared
++ # prevent smart library merge from messing cyclic dependency between freetype2 and harfbuzz
++ CONFIG += no_smart_library_merge
++}
+diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf
+index 1d79f5c958..48f6e710b6 100644
+--- a/mkspecs/features/default_post.prf
++++ b/mkspecs/features/default_post.prf
+@@ -1,5 +1,16 @@
+ # This file is loaded by qmake right after loading the actual project file.
+
++win32:contains(CONFIG, static) {
++ # Ensure defines are set correctly for static build
++ DEFINES -= QT_SHARED
++ DEFINES *= QT_STATIC QT_DESIGNER_STATIC
++ contains(QT_CONFIG, angle): DEFINES *= QT_OPENGL_ES_2_ANGLE_STATIC
++ # Ensure we link against all dependencies statically
++ QMAKE_LFLAGS += -static -static-libstdc++ -static-libgcc
++ # Prevent qmake from finding the prl file for shared libs
++ QMAKE_EXT_PRL = .static.prl
++}
++
+ contains(TEMPLATE, ".*(lib|app)"):CONFIG += have_target
+
+ !have_target:!force_qt: CONFIG -= qt
+diff --git a/mkspecs/features/device_config.prf b/mkspecs/features/device_config.prf
+index c15559e174..dd09ac749d 100644
+--- a/mkspecs/features/device_config.prf
++++ b/mkspecs/features/device_config.prf
+@@ -4,7 +4,14 @@
+ # supposed to be influenced by -device-option then.
+ host_build: return()
+
+-DEVICE_PRI = $$[QT_HOST_DATA/get]/mkspecs/qdevice.pri
++shared|actually_a_shared_build {
++ DEVICE_PRI = $$[QT_HOST_DATA/get]/mkspecs/qdevice.pri
++} else {
++ DEVICE_PRI = $$[QT_HOST_DATA/get]/mkspecs/qdevice.static.pri
++ !exists($$DEVICE_PRI) {
++ DEVICE_PRI = $$[QT_HOST_DATA/get]/mkspecs/qdevice.pri
++ }
++}
+ exists($$DEVICE_PRI):include($$DEVICE_PRI)
+ unset(DEVICE_PRI)
+
+diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf
+index 69d1954306..2bc7b1dedd 100644
+--- a/mkspecs/features/qt.prf
++++ b/mkspecs/features/qt.prf
+@@ -235,6 +235,23 @@ for(ever) {
+ !isEmpty(MODULE_WINRT_CAPABILITIES_DEVICE): \
+ WINRT_MANIFEST.capabilities_device_default += $$MODULE_WINRT_CAPABILITIES_DEVICE
+ }
++
++ # Ensure linking against all required static libraries as defined in mingw-w64-g++ mkspec
++ win32:contains(CONFIG, static) {
++ isEqual(MODULE_NAME, QtCore) {
++ LIBS$$var_sfx += $$QMAKE_LIBS_CORE
++ } else:isEqual(MODULE_NAME, QtGui) {
++ LIBS$$var_sfx += $$QMAKE_LIBS_GUI_STATIC
++ } else:isEqual(MODULE_NAME, QtNetwork) {
++ LIBS$$var_sfx += $$QMAKE_LIBS_NETWORK_STATIC
++ } else:isEqual(MODULE_NAME, QtDBus) {
++ LIBS$$var_sfx += $$QMAKE_LIBS_DBUS_STATIC
++ } else:isEqual(MODULE_NAME, QtWidgets) {
++ LIBS$$var_sfx += $$QMAKE_LIBS_WIDGETS_STATIC
++ } else:isEqual(MODULE_NAME, QtOpenGL) {
++ LIBS$$var_sfx += $$QMAKE_LIBS_OPENGL
++ }
++ }
+ }
+ !isEmpty(BAD_QT):error("Unknown module(s) in QT$$var_sfx: $$replace(BAD_QT, _private$, -private)")
+
+diff --git a/mkspecs/features/spec_pre.prf b/mkspecs/features/spec_pre.prf
+index 51ea3a8321..275e080ae4 100644
+--- a/mkspecs/features/spec_pre.prf
++++ b/mkspecs/features/spec_pre.prf
+@@ -14,9 +14,14 @@ QMAKE_EXT_H = .h .hpp .hh .hxx
+ QMAKE_EXT_H_MOC = .cpp
+ QMAKE_EXT_JS = .js
+ QMAKE_EXT_LEX = .l
+-QMAKE_EXT_LIBTOOL = .la
+-QMAKE_EXT_PKGCONFIG = .pc
+-QMAKE_EXT_PRL = .prl
++QMAKE_EXT_PKGCONFIG = .pc
++contains(CONFIG, static) {
++ QMAKE_EXT_LIBTOOL = .static.la
++ QMAKE_EXT_PRL = .static.prl
++} else {
++ QMAKE_EXT_LIBTOOL = .la
++ QMAKE_EXT_PRL = .prl
++}
+ QMAKE_EXT_UI = .ui
+ QMAKE_EXT_YACC = .y
+
+diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
+index 8e4d11484f..c73b19c144 100644
+--- a/qmake/generators/makefile.cpp
++++ b/qmake/generators/makefile.cpp
+@@ -3228,6 +3228,9 @@ MakefileGenerator::pkgConfigFileName(bool fixify, bool onlyPrependDestdir)
+ if (project->isActiveConfig("debug")) {
+ ret += "d";
+ }
++ if (project->isActiveConfig("staticlib")) {
++ ret.insert(0, QStringLiteral("Static"));
++ }
+ ret += Option::pkgcfg_ext;
+ QString subdir = project->first("QMAKE_PKGCONFIG_DESTDIR").toQString();
+ if(!subdir.isEmpty()) {
+@@ -3404,11 +3407,11 @@ MakefileGenerator::writePkgConfigFile()
+ t << Qt::endl;
+
+ // requires
+- const QString requiresString = project->values("QMAKE_PKGCONFIG_REQUIRES").join(' ');
+- if (!requiresString.isEmpty()) {
+- t << "Requires: " << requiresString << Qt::endl;
++ t << "Requires:";
++ const auto pkgconfigRequires = project->values("QMAKE_PKGCONFIG_REQUIRES");
++ for (const auto &required : pkgconfigRequires) {
++ t << (project->isActiveConfig("staticlib") ? QStringLiteral(" Static") : QStringLiteral(" ")) << required.toQString();
+ }
+-
+ t << Qt::endl;
+ }
+
+diff --git a/qtbase.pro b/qtbase.pro
+index c0ce0972ef..5a2deaf31d 100644
+--- a/qtbase.pro
++++ b/qtbase.pro
+@@ -20,6 +20,12 @@ CLEAN_DEPS += qmake-clean
+ # recursive distclean proceeds, including beyond qtbase.
+ DISTCLEAN_DEPS += qmake-clean
+
++shared|actually_a_shared_build {
++ DEVICE_PRI_SUFFIX = .pri
++} else {
++ DEVICE_PRI_SUFFIX = .static.pri
++}
++
+ # Files created by configure.
+ # config.status (and configure.cache, which is the same for Windows)
+ # are omitted for convenience of rebuilds.
+@@ -27,7 +33,7 @@ QMAKE_DISTCLEAN += \
+ config.summary \
+ config.tests/.qmake.cache \
+ mkspecs/qconfig.pri \
+- mkspecs/qdevice.pri \
++ mkspecs/qdevice$$DEVICE_PRI_SUFFIX \
+ mkspecs/qmodule.pri \
+ src/corelib/global/qconfig.h \
+ src/corelib/global/qconfig_p.h \
+@@ -78,7 +84,7 @@ prefix_build|!equals(PWD, $$OUT_PWD) {
+ mkspecs.path = $$[QT_HOST_DATA]/mkspecs
+ mkspecs.files = \
+ $$OUT_PWD/mkspecs/qconfig.pri $$OUT_PWD/mkspecs/qmodule.pri \
+- $$OUT_PWD/mkspecs/qdevice.pri \
++ $$OUT_PWD/mkspecs/qdevice$$DEVICE_PRI_SUFFIX \
+ $$files($$PWD/mkspecs/*)
+ mkspecs.files -= $$PWD/mkspecs/modules $$PWD/mkspecs/modules-inst
+ INSTALLS += mkspecs
+--
+2.28.0
+
diff --git a/0019-Use-.dll.a-as-import-lib-extension.patch b/0019-Use-.dll.a-as-import-lib-extension.patch
new file mode 100644
index 000000000000..30de2d56d518
--- /dev/null
+++ b/0019-Use-.dll.a-as-import-lib-extension.patch
@@ -0,0 +1,98 @@
+From 366f840385b1e1f575bfb291806d5d0578e195af Mon Sep 17 00:00:00 2001
+From: Martchus <martchus@gmx.net>
+Date: Sun, 18 Sep 2016 18:26:18 +0200
+Subject: [PATCH 19/31] Use *.dll.a as import lib extension
+
+The variables used here are provided by
+g++-win32.conf
+
+Change-Id: I40acb56685628ed52b3e6b89aab7f53f9a872b1a
+---
+ mkspecs/features/create_cmake.prf | 5 +++--
+ mkspecs/features/qt.prf | 15 ++++++++++++---
+ qmake/generators/win32/winmakefile.cpp | 15 +++++++++++----
+ 3 files changed, 26 insertions(+), 9 deletions(-)
+
+diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
+index 593161f362..37689938eb 100644
+--- a/mkspecs/features/create_cmake.prf
++++ b/mkspecs/features/create_cmake.prf
+@@ -332,8 +332,9 @@ mac {
+ CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqt5main$${QT_LIBINFIX}$${debug_suffix}.a
+ CMAKE_WINMAIN_FILE_LOCATION_RELEASE = libqt5main$${QT_LIBINFIX}.a
+
+- CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}$${debug_suffix}.a
+- CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a
++ isEmpty(QMAKE_EXTENSION_IMPORTLIB): QMAKE_EXTENSION_IMPORTLIB = a
++ CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}$${debug_suffix}.$${QMAKE_EXTENSION_IMPORTLIB}
++ CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.$${QMAKE_EXTENSION_IMPORTLIB}
+ } else {
+ CMAKE_WINMAIN_FILE_LOCATION_DEBUG = qt5main$${QT_LIBINFIX}$${debug_suffix}.lib
+ CMAKE_WINMAIN_FILE_LOCATION_RELEASE = qt5main$${QT_LIBINFIX}.lib
+diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf
+index 2bc7b1dedd..b79b324b88 100644
+--- a/mkspecs/features/qt.prf
++++ b/mkspecs/features/qt.prf
+@@ -216,12 +216,21 @@ for(ever) {
+ LIBS$$var_sfx += -framework $$framework
+ } else {
+ lib = $$MODULE_MODULE$$qtPlatformTargetSuffix()
+- win32|contains(MODULE_CONFIG, staticlib) {
++ contains(MODULE_CONFIG, staticlib) {
+ lib = $$MODULE_LIBS/$$QMAKE_PREFIX_STATICLIB$${lib}.$$QMAKE_EXTENSION_STATICLIB
+ PRE_TARGETDEPS += $$lib
+ } else {
+- lib = $$MODULE_LIBS/$$QMAKE_PREFIX_SHLIB$${lib}.$$QMAKE_EXTENSION_SHLIB
+- }
++ win32 {
++ shared|actually_a_shared_build {
++ lib = $$MODULE_LIBS/$$QMAKE_PREFIX_STATICLIB$${lib}.$$QMAKE_EXTENSION_IMPORTLIB
++ } else {
++ lib = $$MODULE_LIBS/$$QMAKE_PREFIX_STATICLIB$${lib}.$$QMAKE_EXTENSION_STATICLIB
++ }
++ PRE_TARGETDEPS += $$lib
++ } else {
++ lib = $$MODULE_LIBS/$$QMAKE_PREFIX_SHLIB$${lib}.$$QMAKE_EXTENSION_SHLIB
++ }
++ }
+ LIBS$$var_sfx += $$lib
+ }
+ }
+diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
+index 183cef2908..03732df4a8 100644
+--- a/qmake/generators/win32/winmakefile.cpp
++++ b/qmake/generators/win32/winmakefile.cpp
+@@ -99,9 +99,13 @@ private:
+ bool
+ Win32MakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags)
+ {
+- ProStringList impexts = project->values("QMAKE_LIB_EXTENSIONS");
+- if (impexts.isEmpty())
+- impexts = project->values("QMAKE_EXTENSION_STATICLIB");
++ ProStringList impexts;
++ if (project->isActiveConfig("staticlib")) {
++ impexts.append(project->values("QMAKE_EXTENSION_STATICLIB"));
++ } else {
++ impexts.append(project->values("QMAKE_EXTENSION_IMPORTLIB"));
++ impexts.append(project->values("QMAKE_EXTENSION_STATICLIB"));
++ }
+ QVector<LibrarySearchPath> dirs;
+ int libidx = 0;
+ for (const ProString &dlib : project->values("QMAKE_DEFAULT_LIBDIRS"))
+@@ -283,9 +287,12 @@ void Win32MakefileGenerator::fixTargetExt()
+ if (!project->values("QMAKE_APP_FLAG").isEmpty()) {
+ project->values("TARGET_EXT").append(".exe");
+ } else if (project->isActiveConfig("shared")) {
++ ProString impext = project->first("QMAKE_EXTENSION_IMPORTLIB");
++ if (impext.isEmpty())
++ impext = project->first("QMAKE_PREFIX_STATICLIB");
+ project->values("LIB_TARGET").prepend(project->first("QMAKE_PREFIX_STATICLIB")
+ + project->first("TARGET") + project->first("TARGET_VERSION_EXT")
+- + '.' + project->first("QMAKE_EXTENSION_STATICLIB"));
++ + '.' + impext);
+ project->values("TARGET_EXT").append(project->first("TARGET_VERSION_EXT") + "."
+ + project->first("QMAKE_EXTENSION_SHLIB"));
+ project->values("TARGET").first() = project->first("QMAKE_PREFIX_SHLIB") + project->first("TARGET");
+--
+2.28.0
+
diff --git a/0020-Disable-determing-default-include-and-lib-dirs-at-qm.patch b/0020-Disable-determing-default-include-and-lib-dirs-at-qm.patch
deleted file mode 100644
index de3ebbdf3645..000000000000
--- a/0020-Disable-determing-default-include-and-lib-dirs-at-qm.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 440c61802ae80ceda51ed8d405ab922dddaa2d45 Mon Sep 17 00:00:00 2001
-From: Martchus <martchus@gmx.net>
-Date: Sun, 18 Sep 2016 18:20:25 +0200
-Subject: [PATCH 20/34] Disable determing default include and lib dirs at qmake
- time when building with mingw-w64
-
----
- mkspecs/features/toolchain.prf | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/mkspecs/features/toolchain.prf b/mkspecs/features/toolchain.prf
-index ba41598be1..6416db4d58 100644
---- a/mkspecs/features/toolchain.prf
-+++ b/mkspecs/features/toolchain.prf
-@@ -31,7 +31,7 @@ isEmpty($${target_prefix}.INCDIRS) {
- #
- # Get default include and library paths from compiler
- #
-- gcc {
-+ !win32:gcc {
- cmd_suffix = "<$$QMAKE_SYSTEM_NULL_DEVICE >$$QMAKE_SYSTEM_NULL_DEVICE"
- equals(QMAKE_HOST.os, Windows): \
- cmd_prefix = "set LC_ALL=C&"
---
-2.15.1
-
diff --git a/0020-Pull-dependencies-of-static-libraries-in-CMake-modul.patch b/0020-Pull-dependencies-of-static-libraries-in-CMake-modul.patch
new file mode 100644
index 000000000000..e526054bfafb
--- /dev/null
+++ b/0020-Pull-dependencies-of-static-libraries-in-CMake-modul.patch
@@ -0,0 +1,505 @@
+From 62658e138ba05a9c076cad73c6f007dcf4f7d3a7 Mon Sep 17 00:00:00 2001
+From: Martchus <martchus@gmx.net>
+Date: Sun, 18 Sep 2016 18:32:00 +0200
+Subject: [PATCH 20/31] Pull dependencies of static libraries in CMake modules
+
+When doing a static build of Qt, the dependencies of the Qt
+libraries and plugins itself must be specified when linking
+the final application.
+
+With Qt 5.13.0 the support for doing that has been re-added.
+However, some pieces are still missing and that's what this
+patch provides:
+
+1. Take dependencies of static plugins into account as well
+2. Create imported targets for the dependencies to prevent
+ CMake from adding wrong `-Wl,-Bstatic` and `-Wl,-Bdynamic`
+ linker flags
+
+This patch has been harmonized with official changes, e.g. to
+use QMAKE_PRL_LIBS instead of QMAKE_PRL_LIBS_FOR_CMAKE.
+
+See https://github.com/Martchus/PKGBUILDs/issues/86#issuecomment-476840055
+for further details on 2.
+
+With Qt 5.14.0 the support for using static libraries seems
+to be further improved. I had not time to test whether it
+actually works so I keep using my own implemention for now.
+That's why this patch now removes a lot of the 5.14.0 and 5.15.0
+additions in favour of 'how it used to work'.
+
+Change-Id: I75a9c91e9ab0dc06a941b576c28f87aef254669c
+---
+ .../data/cmake/Qt5BasicConfig.cmake.in | 242 +++++++++---------
+ .../data/cmake/Qt5PluginTarget.cmake.in | 93 +------
+ 2 files changed, 133 insertions(+), 202 deletions(-)
+
+diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
+index db18dbece6..5a5bc4d61d 100644
+--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
++++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
+@@ -52,6 +52,10 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura
+ set(_lib_deps)
+ set(_link_flags)
+
++ # prefer static libs
++ set(CMAKE_FIND_LIBRARY_SUFFIXES .a .lib)
++ set(CMAKE_FIND_LIBRARY_PREFIXES lib \"\")
++
+ !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
+ set(_qt5_install_libs \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}\")
+ !!ELSE
+@@ -60,6 +64,10 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura
+
+ if(EXISTS \"${prl_file_location}\")
+ file(STRINGS \"${prl_file_location}\" _prl_strings REGEX \"QMAKE_PRL_LIBS_FOR_CMAKE[ \\t]*=\")
++ if(NOT _prl_strings)
++ message(WARNING \"Prl file for Qt 5 module $${CMAKE_MODULE_NAME} does not contain QMAKE_PRL_LIBS_FOR_CMAKE. Was looking at \\\"${prl_file_location}\\\".\")
++ return()
++ endif()
+
+ # file(STRINGS) replaces all semicolons read from the file with backslash semicolons.
+ # We need to do a reverse transformation in CMake. For that we replace all backslash
+@@ -91,7 +99,7 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura
+ # Handle normal libraries passed as -lfoo
+ set(_lib \"${CMAKE_MATCH_1}\")
+ foreach(_standard_library ${_standard_libraries})
+- if(_standard_library MATCHES \"^${_lib}(\\\\.lib)?$\")
++ if(_standard_library MATCHES \"^${_lib}(\\\\.lib|\\\\.a)?$\")
+ set(_lib_is_default_linked TRUE)
+ break()
+ endif()
+@@ -138,6 +146,37 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura
+ set(${lib_deps} ${_lib_deps} PARENT_SCOPE)
+ set(${link_flags} \"SHELL:${_link_flags}\" PARENT_SCOPE)
+ endfunction()
++
++if(NOT COMMAND _qt5_add_dependencies)
++ # add dependencies via imported targets so CMake does not mess with their (absolute) file path
++ # which can be problematic with unwanted -Wl,-Bstatic or -Wl,-Bdynamic in the linker line
++ function(_qt5_add_dependencies IMPORTED_TARGET_NAME IMPORTED_TARGET_CONFIG STATIC_DEPENDENCIES)
++ set(DEPENDENCY_INDEX 0)
++ unset(EXTRA_PATHS)
++ unset(DEPENDENCY_TARGETS)
++
++ foreach(LIBRARY_LOCATION ${STATIC_DEPENDENCIES})
++ if (TARGET \"${LIBRARY_LOCATION}\")
++ list(APPEND DEPENDENCY_TARGETS \"${LIBRARY_LOCATION}\")
++ continue()
++ endif()
++ set(DEPENDENCY_NAME ${IMPORTED_TARGET_NAME}_DEPENDENCY_${DEPENDENCY_INDEX})
++ if (NOT TARGET \"${DEPENDENCY_NAME}\")
++ add_library(${DEPENDENCY_NAME} STATIC IMPORTED)
++ set_property(TARGET ${DEPENDENCY_NAME} PROPERTY IMPORTED_LOCATION ${LIBRARY_LOCATION})
++ endif()
++ list(APPEND DEPENDENCY_TARGETS ${DEPENDENCY_NAME})
++ math(EXPR DEPENDENCY_INDEX \"${DEPENDENCY_INDEX} + 1\")
++ endforeach()
++
++ if (\"${IMPORTED_TARGET_CONFIG}\" STREQUAL \"ALL\" OR \"${IMPORTED_TARGET_CONFIG}\" STREQUAL \"RELEASE\")
++ set_property(TARGET ${IMPORTED_TARGET_NAME} PROPERTY INTERFACE_LINK_LIBRARIES ${DEPENDENCY_TARGETS})
++ endif()
++ if (NOT \"${IMPORTED_TARGET_CONFIG}\" STREQUAL \"ALL\")
++ set_property(TARGET ${IMPORTED_TARGET_NAME} PROPERTY INTERFACE_LINK_LIBRARIES_${IMPORTED_TARGET_CONFIG} ${DEPENDENCY_TARGETS})
++ endif()
++ endfunction()
++endif()
+ !!ENDIF
+
+ !!IF !equals(TEMPLATE, aux)
+@@ -153,59 +192,36 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI
+ _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location})
+ set(_deps
+ ${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}
+- )
+- set(_static_deps
+ !!IF !isEmpty(CMAKE_STATIC_TYPE)
+ ${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES}
+ !!ENDIF
+ )
+
++ # FIXME: handle IsDebugAndRelease like in official version
++
++!!IF !isEmpty(CMAKE_STATIC_TYPE)
+ set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
+ \"IMPORTED_LOCATION_${Configuration}\" ${imported_location}
+ !!IF !isEmpty(CMAKE_LIB_SONAME)
+ \"IMPORTED_SONAME_${Configuration}\" \"$${CMAKE_LIB_SONAME}\"
+ !!ENDIF
+- # For backward compatibility with CMake < 2.8.12
+- \"IMPORTED_LINK_INTERFACE_LIBRARIES_${Configuration}\" \"${_deps};${_static_deps}\"
+ )
+- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY INTERFACE_LINK_LIBRARIES
+- \"${_deps}\"
+- )
+-
+-!!IF !isEmpty(CMAKE_STATIC_TYPE)
+- if(NOT "${IsDebugAndRelease}")
+- set(_genex_condition \"1\")
+- else()
+- if("${Configuration}" STREQUAL "DEBUG")
+- set(_genex_condition \"$<CONFIG:Debug>\")
+- else()
+- 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}\"
++ _qt5_add_dependencies(Qt5::$${CMAKE_MODULE_NAME} \"${Configuration}\" \"${_deps}\")
++ if(NOT CMAKE_VERSION VERSION_LESS \"3.13\")
++ set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
++ \"INTERFACE_LINK_OPTIONS\" \"${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LINK_FLAGS}\"
+ )
+ endif()
+-
+- set(_static_link_flags \"${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LINK_FLAGS}\")
+- if(_static_link_flags)
+- set(_static_link_flags_genex \"$<${_genex_condition}:${_static_link_flags}>\")
+- if(NOT CMAKE_VERSION VERSION_LESS \"3.13\")
+- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY INTERFACE_LINK_OPTIONS
+- \"${_static_link_flags_genex}\"
+- )
+- else()
+- # Abuse INTERFACE_LINK_LIBRARIES to add link flags when CMake version is too low.
+- # Strip out SHELL:, because it is not supported in this property. And hope for the best.
+- string(REPLACE \"SHELL:\" \"\" _static_link_flags_genex \"${_static_link_flags_genex}\")
+- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY INTERFACE_LINK_LIBRARIES
+- \"${_static_link_flags_genex}\"
+- )
+- endif()
+- endif()
++!!ELSE
++ set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
++ \"INTERFACE_LINK_LIBRARIES_${Configuration}\" \"${_deps}\"
++ \"IMPORTED_LOCATION_${Configuration}\" ${imported_location}
++!!IF !isEmpty(CMAKE_LIB_SONAME)
++ \"IMPORTED_SONAME_${Configuration}\" \"$${CMAKE_LIB_SONAME}\"
++!!ENDIF
++ # For backward compatibility with CMake < 2.8.12
++ \"IMPORTED_LINK_INTERFACE_LIBRARIES_${Configuration}\" \"${_deps}\"
++ )
+ !!ENDIF
+
+ !!IF !isEmpty(CMAKE_WINDOWS_BUILD)
+@@ -222,6 +238,15 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI
+ endif()
+ !!ENDIF
+ endmacro()
++
++macro(_populate_$${CMAKE_MODULE_NAME}_plugin_target_dependencies_from_prl_file PLUGIN_TARGET_NAME PRL_FILE_LOCATION CONFIGURATION LIB_DIRECTORY LIB_LOCATION)
++ _qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
++ \"${PRL_FILE_LOCATION}\"
++ \"${CONFIGURATION}\"
++ _Qt5$${CMAKE_MODULE_NAME}_STATIC_PLUGIN_${CONFIGURATION}_LIB_DEPENDENCIES
++ _Qt5$${CMAKE_MODULE_NAME}_STATIC_PLUGIN_${CONFIGURATION}_LINK_FLAGS)
++ _qt5_add_dependencies(\"${PLUGIN_TARGET_NAME}\" ALL \"${_Qt5$${CMAKE_MODULE_NAME}_STATIC_PLUGIN_${CONFIGURATION}_LIB_DEPENDENCIES}\")
++endmacro()
+ !!ENDIF
+
+ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+@@ -411,13 +436,14 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+ add_library(Qt5::$${CMAKE_MODULE_NAME} STATIC IMPORTED)
+ set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY IMPORTED_LINK_INTERFACE_LANGUAGES "CXX")
+ !!ENDIF
+-!!ELSE
++
++!!ELSE // !isEmpty(CMAKE_STATIC_TYPE)
+ !!IF equals(TEMPLATE, aux)
+ add_library(Qt5::$${CMAKE_MODULE_NAME} INTERFACE IMPORTED)
+ !!ELSE
+ add_library(Qt5::$${CMAKE_MODULE_NAME} SHARED IMPORTED)
+ !!ENDIF
+-!!ENDIF
++!!ENDIF // !isEmpty(CMAKE_STATIC_TYPE)
+
+ !!IF !equals(TEMPLATE, aux)
+ !!IF !isEmpty(CMAKE_BUILD_IS_FRAMEWORK)
+@@ -449,6 +475,56 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+
+ set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY INTERFACE_QT_PLUGIN_TYPES \"$${CMAKE_MODULE_PLUGIN_TYPES}\")
+
++ # Find plugin targets
++ file(GLOB pluginTargetsMaybe \"${CMAKE_CURRENT_LIST_DIR}/*Qt5$${CMAKE_MODULE_NAME}_*.cmake\")
++ unset(pluginTargets)
++ if(pluginTargetsMaybe)
++ foreach(pluginTarget ${pluginTargetsMaybe})
++ file(STRINGS ${pluginTarget} matched REGEX Qt5$${CMAKE_MODULE_NAME}_PLUGINS)
++ if(matched)
++ list(APPEND pluginTargets ${pluginTarget})
++ endif()
++ endforeach()
++ endif()
++
++ macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties TARGET_NAME PLUGIN_TARGET_NAME PLUGIN_NAME CONFIG PLUGIN_LOCATION)
++ set_property(TARGET ${PLUGIN_TARGET_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${CONFIG})
++
++!!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE)
++ set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
++!!ELSE
++ set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
++!!ENDIF
++ _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location})
++ set_target_properties(${PLUGIN_TARGET_NAME} PROPERTIES
++ \"IMPORTED_LOCATION_${CONFIG}\" ${imported_location}
++ )
++!!IF !isEmpty(CMAKE_STATIC_TYPE)
++ set_property(TARGET ${TARGET_NAME} APPEND PROPERTY STATIC_PLUGINS ${PLUGIN_NAME})
++ get_filename_component(_PLUGIN_DIR ${PLUGIN_LOCATION} PATH)
++ get_filename_component(_PLUGIN_DIR_NAME ${_PLUGIN_DIR} NAME)
++ get_filename_component(_PLUGIN_NAME ${PLUGIN_LOCATION} NAME)
++ string(REGEX REPLACE \"^lib(.*)\\\\.a\" \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/lib/qt/plugins/${_PLUGIN_DIR_NAME}/\\\\1.static.prl\" PLUGIN_PRL_FILE_LOCATION ${_PLUGIN_NAME})
++ if(NOT EXISTS ${PLUGIN_PRL_FILE_LOCATION})
++ string(REGEX REPLACE \"^lib(.*)\\\\.a\" \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/lib/qt/plugins/${_PLUGIN_DIR_NAME}/\\\\1.prl\" PLUGIN_PRL_FILE_LOCATION ${_PLUGIN_NAME})
++ endif()
++ if(NOT EXISTS ${PLUGIN_PRL_FILE_LOCATION})
++ string(REGEX REPLACE \"^lib(.*)\\\\.a\" \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/lib/qt/plugins/${_PLUGIN_DIR_NAME}/lib\\\\1.prl\" PLUGIN_PRL_FILE_LOCATION ${_PLUGIN_NAME})
++ endif()
++ if(NOT EXISTS ${PLUGIN_PRL_FILE_LOCATION})
++ message(FATAL_ERROR "The prl file containing dependencies of static plugin ${PLUGIN_TARGET_NAME} of ${TARGET_NAME} could not be found.")
++ endif()
++ _populate_$${CMAKE_MODULE_NAME}_plugin_target_dependencies_from_prl_file(${PLUGIN_TARGET_NAME} ${PLUGIN_PRL_FILE_LOCATION} ${CONFIG} \"lib/qt/plugins\" ${PLUGIN_LOCATION})
++!!ENDIF
++
++ endmacro()
++
++ if(pluginTargets)
++ foreach(pluginTarget ${pluginTargets})
++ include(${pluginTarget})
++ endforeach()
++ endif()
++
+ set(_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIRS_EXIST TRUE)
+ foreach (_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIR ${Qt5$${CMAKE_MODULE_NAME}_OWN_PRIVATE_INCLUDE_DIRS})
+ if (NOT EXISTS ${_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIR})
+@@ -467,6 +543,9 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+ list(APPEND _Qt5$${CMAKE_MODULE_NAME}_PRIVATEDEPS ${dep}Private)
+ endif()
+ endforeach()
++!!IF !isEmpty(CMAKE_STATIC_TYPE)
++ _qt5_add_dependencies(Qt5::$${CMAKE_MODULE_NAME}Private ALL \"Qt5::$${CMAKE_MODULE_NAME};${_Qt5$${CMAKE_MODULE_NAME}_PRIVATEDEPS}\")
++!!ELSE
+ set_property(TARGET Qt5::$${CMAKE_MODULE_NAME}Private PROPERTY
+ INTERFACE_LINK_LIBRARIES Qt5::$${CMAKE_MODULE_NAME} ${_Qt5$${CMAKE_MODULE_NAME}_PRIVATEDEPS}
+ )
+@@ -478,6 +557,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+ INTERFACE_LINK_LIBRARIES \"Qt5::$${CMAKE_MODULE_NAME}Private\"
+ )
+ endif()
++!!ENDIF // CMAKE_STATIC_TYPE
+ endif()
+
+ !!IF !equals(TEMPLATE, aux)
+@@ -547,9 +627,11 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+ !!ELSE
+ \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
+ !!ENDIF
+- _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE})
+-!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
++ _populate_$${CMAKE_MODULE_NAME}_target_properties(Qt5::$${CMAKE_MODULE_NAME} RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE})
+ endif()
++!!ENDIF // CMAKE_STATIC_TYPE
++
++
+ !!ENDIF // CMAKE_RELEASE_TYPE
+ !!ENDIF // CMAKE_FIND_OTHER_LIBRARY_BUILD
+
+@@ -560,76 +642,6 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+ )
+ !!ENDIF // TEMPLATE != aux
+
+-!!IF isEmpty(CMAKE_INTERNAL_MODULE)
+- # In Qt 5.15 the glob pattern was relaxed to also catch plugins not literally named "Plugin".
+- # Define QT5_STRICT_PLUGIN_GLOB or ModuleName_STRICT_PLUGIN_GLOB to revert to old behavior.
+- if (QT5_STRICT_PLUGIN_GLOB OR Qt5$${CMAKE_MODULE_NAME}_STRICT_PLUGIN_GLOB)
+- file(GLOB pluginTargets \"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}_*Plugin.cmake\")
+- else()
+- file(GLOB pluginTargets \"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}_*.cmake\")
+- endif()
+-
+- macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION
+- IsDebugAndRelease)
+- 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}\")
+-!!ELSE
+- set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
+-!!ENDIF
+- _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location})
+- set_target_properties(Qt5::${Plugin} PROPERTIES
+- \"IMPORTED_LOCATION_${Configuration}\" ${imported_location}
+- )
+-
+-!!IF !isEmpty(CMAKE_STATIC_TYPE)
+- set(_static_deps
+- ${_Qt5${Plugin}_STATIC_${Configuration}_LIB_DEPENDENCIES}
+- )
+-
+- if(NOT "${IsDebugAndRelease}")
+- set(_genex_condition \"1\")
+- else()
+- if("${Configuration}" STREQUAL "DEBUG")
+- set(_genex_condition \"$<CONFIG:Debug>\")
+- else()
+- 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
+- \"${_static_deps_genex}\"
+- )
+- endif()
+-
+- set(_static_link_flags \"${_Qt5${Plugin}_STATIC_${Configuration}_LINK_FLAGS}\")
+- if(_static_link_flags)
+- set(_static_link_flags_genex \"$<${_genex_condition}:${_static_link_flags}>\")
+- if(NOT CMAKE_VERSION VERSION_LESS \"3.13\")
+- set_property(TARGET Qt5::${Plugin} APPEND PROPERTY INTERFACE_LINK_OPTIONS
+- \"${_static_link_flags_genex}\"
+- )
+- else()
+- # Abuse INTERFACE_LINK_LIBRARIES to add link flags when CMake version is too low.
+- # Strip out SHELL:, because it is not supported in this property. And hope for the best.
+- string(REPLACE \"SHELL:\" \"\" _static_link_flags_genex \"${_static_link_flags_genex}\")
+- set_property(TARGET Qt5::${Plugin} APPEND PROPERTY INTERFACE_LINK_LIBRARIES
+- \"${_static_link_flags_genex}\"
+- )
+- endif()
+- endif()
+-!!ENDIF
+- endmacro()
+-
+- if (pluginTargets)
+- foreach(pluginTarget ${pluginTargets})
+- include(${pluginTarget})
+- endforeach()
+- endif()
+-!!ENDIF // isEmpty(CMAKE_INTERNAL_MODULE)
+-
+ !!IF !isEmpty(CMAKE_MODULE_EXTRAS)
+ include(\"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}ConfigExtras.cmake\")
+ !!ENDIF
+diff --git a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
+index b550a52c60..acbe1cc33b 100644
+--- a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
++++ b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
+@@ -1,5 +1,6 @@
+-
+-add_library(Qt5::$$CMAKE_PLUGIN_NAME MODULE IMPORTED)
++# Some Qt modules also load plugin target in extra config, so check whether the target already exists
++if(NOT TARGET Qt5::$$CMAKE_PLUGIN_NAME)
++ add_library(Qt5::$$CMAKE_PLUGIN_NAME MODULE IMPORTED)
+
+ !!IF !isEmpty(CMAKE_STATIC_TYPE)
+ set(_Qt5$${CMAKE_PLUGIN_NAME}_MODULE_DEPENDENCIES \"$${CMAKE_PLUGIN_MODULE_DEPS}\")
+@@ -16,99 +17,17 @@ foreach(_module_dep ${_Qt5$${CMAKE_PLUGIN_NAME}_MODULE_DEPENDENCIES})
+ 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
+-)
+-!!ELSE
+-_qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
+- \"$${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
+-)
++ _populate_$${CMAKE_MODULE_NAME}_plugin_properties(Qt5::$$CMAKE_MODULE_NAME Qt5::$$CMAKE_PLUGIN_NAME $$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE}\")
+ !!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
+-)
+-!!ELSE
+-_qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
+- \"$${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
+-!!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})
++ _populate_$${CMAKE_MODULE_NAME}_plugin_properties(Qt5::$$CMAKE_MODULE_NAME Qt5::$$CMAKE_PLUGIN_NAME $$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG}\")
+ !!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})
+-!!IF !isEmpty(CMAKE_STATIC_TYPE)
+-# $<GENEX_EVAL:...> wasn\'t added until CMake 3.12, so put a version guard around it
+-if(CMAKE_VERSION VERSION_LESS \"3.12\")
+- set(_manual_plugins_genex \"$<TARGET_PROPERTY:QT_PLUGINS>\")
+- set(_plugin_type_genex \"$<TARGET_PROPERTY:QT_PLUGINS_$${CMAKE_PLUGIN_TYPE_ESCAPED}>\")
+- set(_no_plugins_genex \"$<TARGET_PROPERTY:QT_NO_PLUGINS>\")
+-else()
+- set(_manual_plugins_genex \"$<GENEX_EVAL:$<TARGET_PROPERTY:QT_PLUGINS>>\")
+- set(_plugin_type_genex \"$<GENEX_EVAL:$<TARGET_PROPERTY:QT_PLUGINS_$${CMAKE_PLUGIN_TYPE_ESCAPED}>>\")
+- set(_no_plugins_genex \"$<GENEX_EVAL:$<TARGET_PROPERTY:QT_NO_PLUGINS>>\")
+-endif()
+-set(_user_specified_genex
+- \"$<IN_LIST:Qt5::$$CMAKE_PLUGIN_NAME,${_manual_plugins_genex};${_plugin_type_genex}>\"
+-)
+-set(_user_specified_genex_versionless
+- \"$<IN_LIST:Qt::$$CMAKE_PLUGIN_NAME,${_manual_plugins_genex};${_plugin_type_genex}>\"
+-)
+-string(CONCAT _plugin_genex
+- \"$<$<OR:\"
+- # Add this plugin if it\'s in the list of manually specified plugins or in the list of
+- # explicitly included plugin types.
+- \"${_user_specified_genex},\"
+- \"${_user_specified_genex_versionless},\"
+- # Add this plugin if all of the following are true:
+- # 1) the list of explicitly included plugin types is empty
+- # 2) the QT_PLUGIN_EXTENDS property for the plugin is empty or equal to the current
+- # module name
+- # 3) the user hasn\'t explicitly excluded the plugin.
+- \"$<AND:\"
+- \"$<STREQUAL:${_plugin_type_genex},>,\"
+- \"$<OR:\"
+- # FIXME: The value of CMAKE_MODULE_NAME seems to be wrong (e.g for Svg plugin
+- # it should be Qt::Svg instead of Qt::Gui).
+- \"$<STREQUAL:$<TARGET_PROPERTY:Qt5::$${CMAKE_PLUGIN_NAME},QT_PLUGIN_EXTENDS>,Qt::$${CMAKE_MODULE_NAME}>,\"
+- \"$<STREQUAL:$<TARGET_PROPERTY:Qt5::$${CMAKE_PLUGIN_NAME},QT_PLUGIN_EXTENDS>,>\"
+- \">,\"
+- \"$<NOT:$<IN_LIST:Qt5::$${CMAKE_PLUGIN_NAME},${_no_plugins_genex}>>,\"
+- \"$<NOT:$<IN_LIST:Qt::$${CMAKE_PLUGIN_NAME},${_no_plugins_genex}>>\"
+- \">\"
+- \">:Qt5::$$CMAKE_PLUGIN_NAME>\"
+-)
+-set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY INTERFACE_LINK_LIBRARIES
+- ${_plugin_genex}
+-)
+-set_property(TARGET Qt5::$${CMAKE_PLUGIN_NAME} APPEND PROPERTY INTERFACE_LINK_LIBRARIES
+- \"$${CMAKE_PLUGIN_QT5_MODULE_DEPS}\"
+-)
+-!!ENDIF
+ set_property(TARGET Qt5::$${CMAKE_PLUGIN_NAME} PROPERTY QT_PLUGIN_TYPE \"$$CMAKE_PLUGIN_TYPE\")
+ set_property(TARGET Qt5::$${CMAKE_PLUGIN_NAME} PROPERTY QT_PLUGIN_EXTENDS \"$$CMAKE_PLUGIN_EXTENDS\")
+ set_property(TARGET Qt5::$${CMAKE_PLUGIN_NAME} PROPERTY QT_PLUGIN_CLASS_NAME \"$$CMAKE_PLUGIN_NAME\")
++endif()
+\ No newline at end of file
+--
+2.28.0
+
diff --git a/0024-Allow-usage-of-static-version-with-CMake.patch b/0021-Allow-usage-of-static-version-with-CMake.patch
index 3abf04afb9af..8f3a83e02ff2 100644
--- a/0024-Allow-usage-of-static-version-with-CMake.patch
+++ b/0021-Allow-usage-of-static-version-with-CMake.patch
@@ -1,7 +1,7 @@
-From 169e2241bd5f8a47ff647a2ce1e8af43265fb32f Mon Sep 17 00:00:00 2001
+From ea8cf4e19c1f78d2f50ef20d92e89d32311eac7a Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sat, 5 Aug 2017 21:14:26 +0200
-Subject: [PATCH 24/34] Allow usage of static version with CMake
+Subject: [PATCH 21/31] Allow usage of static version with CMake
Allow selecting between dynamic and static Qt versions
installed in the same prefix
@@ -10,23 +10,25 @@ installed in the same prefix
- Static targets are prefixed, eg. StaticQt5::Core
- Set USE_STATIC_QT_BY_DEFAULT to use static version
via regular find_package(Qt5Core)
+
+Change-Id: I75f8ff616ad23038416be6271369f9dcc36f2528
---
- mkspecs/features/create_cmake.prf | 103 ++++---
- .../features/data/cmake/Qt5BasicConfig.cmake.in | 298 ++++++++++++++-------
- .../features/data/cmake/Qt5PluginTarget.cmake.in | 18 +-
- .../data/cmake/Qt5StaticOnlyRedirection.cmake.in | 11 +
- src/corelib/Qt5CoreConfigExtras.cmake.in | 26 +-
- src/gui/Qt5GuiConfigExtras.cmake.in | 8 +-
- src/testlib/Qt5TestConfigExtras.cmake.in | 2 +-
- 7 files changed, 314 insertions(+), 152 deletions(-)
+ mkspecs/features/create_cmake.prf | 96 ++++--
+ .../data/cmake/Qt5BasicConfig.cmake.in | 311 +++++++++++-------
+ .../data/cmake/Qt5PluginTarget.cmake.in | 32 +-
+ .../cmake/Qt5StaticOnlyRedirection.cmake.in | 11 +
+ src/corelib/Qt5CoreConfigExtras.cmake.in | 26 +-
+ src/gui/Qt5GuiConfigExtras.cmake.in | 8 +-
+ src/testlib/Qt5TestConfigExtras.cmake.in | 2 +-
+ 7 files changed, 319 insertions(+), 167 deletions(-)
create mode 100644 mkspecs/features/data/cmake/Qt5StaticOnlyRedirection.cmake.in
diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
-index 15fc070008..13bd362092 100644
+index 37689938eb..636a2af9b6 100644
--- a/mkspecs/features/create_cmake.prf
+++ b/mkspecs/features/create_cmake.prf
-@@ -38,7 +38,7 @@ split_incpath {
- $$QT_MODULE_INCLUDE_BASE/Qt$${CMAKE_MODULE_NAME}/$$eval(QT.$${MODULE}.VERSION)/Qt$${CMAKE_MODULE_NAME})
+@@ -68,7 +68,7 @@ split_incpath {
+ $$QT_MODULE_INCLUDE_BASE/$${CMAKE_INCLUDE_NAME}/$$eval(QT.$${MODULE}.VERSION)/$${CMAKE_INCLUDE_NAME})
cmake_extra_source_includes.input = $$PWD/data/cmake/ExtraSourceIncludes.cmake.in
- cmake_extra_source_includes.output = $$CMAKE_OUT_DIR/Qt5$${CMAKE_MODULE_NAME}/ExtraSourceIncludes.cmake
@@ -34,56 +36,70 @@ index 15fc070008..13bd362092 100644
!build_pass:QMAKE_SUBSTITUTES += \
cmake_extra_source_includes
-@@ -90,6 +90,8 @@ win32:!static:!staticlib {
+@@ -118,6 +118,8 @@ win32:!static:!staticlib {
}
static|staticlib:CMAKE_STATIC_TYPE = true
+static|staticlib:DEFAULT_QT_VARIANT_PREFIX = "Static"
+else:DEFAULT_QT_VARIANT_PREFIX = ""
- CMAKE_DEBUG_TYPE =
- CMAKE_RELEASE_TYPE =
-@@ -135,17 +137,19 @@ contains(CONFIG, plugin) {
- CMAKE_PLUGIN_NAME = $$PLUGIN_CLASS_NAME
-
+ internal_module {
+ CMAKE_INTERNAL_MODULE = true
+@@ -214,20 +216,25 @@ contains(CONFIG, plugin) {
win32 {
+ !mingw|qtConfig(debug_and_release): 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) {
+ mingw {
- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${TARGET}.dll
- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${TARGET}d.dll
+ CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.dll
+ CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}$${debug_suffix}.dll
- } else:mingw {
-- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${TARGET}.a
-- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${TARGET}d.a
-+ CMAKE_PLUGIN_LOCATION_RELEASE_STATIC = $$PLUGIN_TYPE/lib$${TARGET}.a
-+ CMAKE_PLUGIN_LOCATION_DEBUG_STATIC = $$PLUGIN_TYPE/lib$${TARGET}d.a
+- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}.a
+- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}$${debug_suffix}.a
++ CMAKE_PLUGIN_LOCATION_RELEASE_STATIC = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}.a
++ CMAKE_PLUGIN_LOCATION_DEBUG_STATIC = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}$${debug_suffix}.a
++ CMAKE_PRL_FILE_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.prl
++ CMAKE_PRL_FILE_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}$${debug_suffix}.prl
++ CMAKE_PRL_FILE_LOCATION_RELEASE_STATIC = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.static.prl
++ CMAKE_PRL_FILE_LOCATION_DEBUG_STATIC = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}$${debug_suffix}.static.prl
} else { # MSVC static
- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${TARGET}.lib
- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${TARGET}d.lib
-+ CMAKE_PLUGIN_LOCATION_RELEASE_STATIC = $$PLUGIN_TYPE/$${TARGET}.lib
-+ CMAKE_PLUGIN_LOCATION_DEBUG_STATIC = $$PLUGIN_TYPE/$${TARGET}d.lib
+ CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.lib
+ CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}$${debug_suffix}.lib
++ CMAKE_PLUGIN_LOCATION_RELEASE_STATIC = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.lib
++ CMAKE_PLUGIN_LOCATION_DEBUG_STATIC = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}$${debug_suffix}.lib
++ CMAKE_PRL_FILE_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.prl
++ CMAKE_PRL_FILE_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}$${debug_suffix}.prl
}
} else {
+ # this branch is broken by the patch, only apply when building for Windows
mac {
- isEmpty(CMAKE_STATIC_TYPE): CMAKE_PlUGIN_EXT = .dylib
- else: CMAKE_PlUGIN_EXT = .a
-@@ -161,13 +165,13 @@ contains(CONFIG, plugin) {
+ isEmpty(CMAKE_STATIC_TYPE): CMAKE_PLUGIN_EXT = .dylib
+ else: CMAKE_PLUGIN_EXT = .a
+@@ -247,9 +254,9 @@ contains(CONFIG, plugin) {
}
}
cmake_target_file.input = $$PWD/data/cmake/Qt5PluginTarget.cmake.in
- cmake_target_file.output = $$CMAKE_OUT_DIR/Qt5$${CMAKE_MODULE_NAME}/Qt5$${CMAKE_MODULE_NAME}_$${PLUGIN_CLASS_NAME}.cmake
+ cmake_target_file.output = $$CMAKE_OUT_DIR/$${DEFAULT_QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}/$${DEFAULT_QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_$${PLUGIN_CLASS_NAME}.cmake
+ cmake_qt5_plugin_import_file.input = $$PWD/data/cmake/Qt5ImportPlugin.cpp.in
+- cmake_qt5_plugin_import_file.output = $$CMAKE_OUT_DIR/Qt5$${CMAKE_MODULE_NAME}/Qt5$${CMAKE_MODULE_NAME}_$${PLUGIN_CLASS_NAME}_Import.cpp
++ cmake_qt5_plugin_import_file.output = $$CMAKE_OUT_DIR/$${DEFAULT_QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}/Qt5$${CMAKE_MODULE_NAME}_$${PLUGIN_CLASS_NAME}_Import.cpp
- !build_pass:QMAKE_SUBSTITUTES += \
- cmake_target_file
+ !build_pass {
+ QMAKE_SUBSTITUTES += cmake_target_file
+@@ -258,7 +265,7 @@ contains(CONFIG, plugin) {
cmake_qt5_plugin_file.files = $$cmake_target_file.output
+ static|staticlib: cmake_qt5_plugin_file.files += $$cmake_qt5_plugin_import_file.output
- cmake_qt5_plugin_file.path = $$[QT_INSTALL_LIBS]/cmake/Qt5$${CMAKE_MODULE_NAME}
+ cmake_qt5_plugin_file.path = $$[QT_INSTALL_LIBS]/cmake/$${DEFAULT_QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}
INSTALLS += cmake_qt5_plugin_file
return()
-@@ -180,27 +184,36 @@ mod_deps =
+@@ -271,30 +278,38 @@ mod_deps =
lib_deps =
aux_mod_deps =
aux_lib_deps =
@@ -113,65 +129,57 @@ index 15fc070008..13bd362092 100644
+CMAKE_QT5_MODULE_DEPS_STATIC = $$join(lib_deps_static, ";")
CMAKE_INTERFACE_MODULE_DEPS = $$join(aux_mod_deps, ";")
CMAKE_INTERFACE_QT5_MODULE_DEPS = $$join(aux_lib_deps, ";")
+ CMAKE_MODULE_PLUGIN_TYPES = $$join(QT.$${MODULE}.plugin_types, ";")
+CMAKE_INTERFACE_QT5_MODULE_DEPS_STATIC = $$join(aux_lib_deps_static, ";")
+CMAKE_INTERFACE_COMPILE_DEFINITIONS_STATIC = $$join(aux_compile_defs_static, ";")
-+
- CMAKE_QT_STEM = Qt$$QT_MAJOR_VERSION$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}
+ # Interface libraries have to have all properties starting with "INTERFACE_".
+ CMAKE_FEATURE_PROPERTY_PREFIX = ""
+ equals(TEMPLATE, aux): CMAKE_FEATURE_PROPERTY_PREFIX = "INTERFACE_"
mac {
+ # this branch is broken by the patch, only apply when building for Windows
!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
-@@ -228,35 +241,33 @@ mac {
- CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqt5main$${QT_LIBINFIX}.a
- CMAKE_WINMAIN_FILE_LOCATION_RELEASE = libqt5main$${QT_LIBINFIX}.a
+@@ -321,13 +336,6 @@ mac {
+ CMAKE_LIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}$${debug_suffix}.dll
+ CMAKE_LIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.dll
-- !isEmpty(CMAKE_STATIC_TYPE) {
-- CMAKE_STATIC_WINDOWS_BUILD = "true"
-- CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.a
-- CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a
-+ isEmpty(QMAKE_EXTENSION_IMPORTLIB): QMAKE_EXTENSION_IMPORTLIB = dll.a
-+ CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.$${QMAKE_EXTENSION_IMPORTLIB}
-+ CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.$${QMAKE_EXTENSION_IMPORTLIB}
-+ CMAKE_PRL_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.prl
+- !isEmpty(CMAKE_STATIC_TYPE) {
+- CMAKE_STATIC_WINDOWS_BUILD = "true"
+-
+- CMAKE_PRL_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}$${debug_suffix}.prl
+- CMAKE_PRL_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.prl
+- }
+-
+ mingw {
+ CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqt5main$${QT_LIBINFIX}$${debug_suffix}.a
+ CMAKE_WINMAIN_FILE_LOCATION_RELEASE = libqt5main$${QT_LIBINFIX}.a
+@@ -335,14 +343,30 @@ mac {
+ isEmpty(QMAKE_EXTENSION_IMPORTLIB): QMAKE_EXTENSION_IMPORTLIB = a
+ CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}$${debug_suffix}.$${QMAKE_EXTENSION_IMPORTLIB}
+ CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.$${QMAKE_EXTENSION_IMPORTLIB}
++ CMAKE_PRL_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}$${debug_suffix}.prl
+ CMAKE_PRL_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.prl
+
-+ CMAKE_IMPLIB_FILE_LOCATION_DEBUG_STATIC = lib$${CMAKE_QT_STEM}d.a
++ CMAKE_IMPLIB_FILE_LOCATION_DEBUG_STATIC = lib$${CMAKE_QT_STEM}$${debug_suffix}.a
+ CMAKE_IMPLIB_FILE_LOCATION_RELEASE_STATIC = lib$${CMAKE_QT_STEM}.a
-+ CMAKE_PRL_FILE_LOCATION_DEBUG_STATIC = $${CMAKE_QT_STEM}d.static.prl
++ CMAKE_PRL_FILE_LOCATION_DEBUG_STATIC = $${CMAKE_QT_STEM}$${debug_suffix}.static.prl
+ CMAKE_PRL_FILE_LOCATION_RELEASE_STATIC = $${CMAKE_QT_STEM}.static.prl
-
-- CMAKE_PRL_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.prl
-- CMAKE_PRL_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.prl
-- } else {
-- isEmpty(QMAKE_EXTENSION_IMPORTLIB): QMAKE_EXTENSION_IMPORTLIB = a
-- CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.$${QMAKE_EXTENSION_IMPORTLIB}
-- CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.$${QMAKE_EXTENSION_IMPORTLIB}
-- }
++
} else {
- CMAKE_WINMAIN_FILE_LOCATION_DEBUG = qtmain$${QT_LIBINFIX}d.lib
- CMAKE_WINMAIN_FILE_LOCATION_RELEASE = qtmain$${QT_LIBINFIX}.lib
-
-- !isEmpty(CMAKE_STATIC_TYPE) {
-- CMAKE_STATIC_WINDOWS_BUILD = "true"
-- CMAKE_IMPLIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.lib
-- CMAKE_IMPLIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.lib
-+ CMAKE_IMPLIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.lib
-+ CMAKE_IMPLIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.lib
-+ CMAKE_PRL_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.prl
-+ CMAKE_PRL_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.prl
+ CMAKE_WINMAIN_FILE_LOCATION_DEBUG = qt5main$${QT_LIBINFIX}$${debug_suffix}.lib
+ CMAKE_WINMAIN_FILE_LOCATION_RELEASE = qt5main$${QT_LIBINFIX}.lib
-- CMAKE_PRL_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.prl
-- CMAKE_PRL_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.prl
-- } else {
-- CMAKE_IMPLIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.lib
-- CMAKE_IMPLIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.lib
-- }
-+ CMAKE_IMPLIB_FILE_LOCATION_DEBUG_STATIC = $${CMAKE_QT_STEM}d.lib
+ CMAKE_IMPLIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}$${debug_suffix}.lib
+ CMAKE_IMPLIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.lib
++ CMAKE_PRL_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}$${debug_suffix}.prl
++ CMAKE_PRL_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.prl
++
++ CMAKE_IMPLIB_FILE_LOCATION_DEBUG_STATIC = $${CMAKE_QT_STEM}$${debug_suffix}.lib
+ CMAKE_IMPLIB_FILE_LOCATION_RELEASE_STATIC = $${CMAKE_QT_STEM}.lib
-+ CMAKE_PRL_FILE_LOCATION_DEBUG_STATIC = $${CMAKE_QT_STEM}d.static.prl
++ CMAKE_PRL_FILE_LOCATION_DEBUG_STATIC = $${CMAKE_QT_STEM}$${debug_suffix}.static.prl
+ CMAKE_PRL_FILE_LOCATION_RELEASE_STATIC = $${CMAKE_QT_STEM}.static.prl
}
} else {
@@ -179,7 +187,7 @@ index 15fc070008..13bd362092 100644
!isEmpty(CMAKE_STATIC_TYPE) {
CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}.a
CMAKE_LIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a
-@@ -276,12 +287,12 @@ mac {
+@@ -362,12 +386,12 @@ mac {
INSTALLS += cmake_qt5_module_files
cmake_config_file.input = $$PWD/data/cmake/Qt5BasicConfig.cmake.in
@@ -194,7 +202,7 @@ index 15fc070008..13bd362092 100644
!build_pass:QMAKE_SUBSTITUTES += \
cmake_config_file \
-@@ -291,11 +302,29 @@ cmake_qt5_module_files.files = \
+@@ -377,11 +401,29 @@ cmake_qt5_module_files.files = \
$$cmake_config_file.output \
$$cmake_config_version_file.output
@@ -225,7 +233,7 @@ index 15fc070008..13bd362092 100644
!build_pass:QMAKE_SUBSTITUTES += cmake_extras_file
-@@ -307,7 +336,7 @@ cmake_macros_file.input = $$_PRO_FILE_PWD_/Qt5$${CMAKE_MODULE_NAME}Macros.cmake
+@@ -393,7 +435,7 @@ cmake_macros_file.input = $$_PRO_FILE_PWD_/Qt5$${CMAKE_MODULE_NAME}Macros.cmake
exists($$cmake_macros_file.input) {
CMAKE_MODULE_MACROS = "true"
@@ -234,7 +242,7 @@ index 15fc070008..13bd362092 100644
cmake_macros_file.CONFIG = verbatim
!build_pass:QMAKE_SUBSTITUTES += cmake_macros_file
-@@ -315,7 +344,7 @@ exists($$cmake_macros_file.input) {
+@@ -401,7 +443,7 @@ exists($$cmake_macros_file.input) {
cmake_qt5_module_files.files += $$cmake_macros_file.output
}
@@ -244,12 +252,12 @@ index 15fc070008..13bd362092 100644
# We are generating cmake files. Most developers of Qt are not aware of cmake,
# so we require automatic tests to be available. The only module which should
diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
-index b401db5ac2..e6dd749c9e 100644
+index 5a5bc4d61d..97150fb244 100644
--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
+++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
-@@ -9,6 +9,33 @@ if (CMAKE_VERSION VERSION_LESS 3.0.0)
+@@ -2,6 +2,33 @@ if (CMAKE_VERSION VERSION_LESS 3.1.0)
+ message(FATAL_ERROR \"Qt 5 $${CMAKE_MODULE_NAME} module requires at least CMake version 3.1.0\")
endif()
- !!ENDIF
+!!IF isEmpty(CMAKE_STATIC_TYPE)
+# "redirect" to static package overriding variant prefix so it does not contain "Static" anymore
@@ -281,7 +289,7 @@ index b401db5ac2..e6dd749c9e 100644
!!IF !isEmpty(CMAKE_USR_MOVE_WORKAROUND)
!!IF !isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\")
-@@ -35,15 +62,19 @@ set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\")
+@@ -28,15 +55,19 @@ set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\")
!!IF !equals(TEMPLATE, aux)
# For backwards compatibility only. Use Qt5$${CMAKE_MODULE_NAME}_VERSION instead.
@@ -307,82 +315,61 @@ index b401db5ac2..e6dd749c9e 100644
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
-@@ -54,23 +85,60 @@ but not all the files it references.
- endif()
- endmacro()
-
-+!!IF !isEmpty(CMAKE_STATIC_TYPE)
+@@ -177,12 +208,24 @@ if(NOT COMMAND _qt5_add_dependencies)
+ endif()
+ endfunction()
+ endif()
++
+# ensure also regular/dynamic macro exists because it might be used in some extra config
+if(NOT COMMAND _qt5_$${CMAKE_MODULE_NAME}_check_file_exists)
+ macro(_qt5_$${CMAKE_MODULE_NAME}_check_file_exists FILE)
-+ _qt5_$${CMAKE_MODULE_NAME}_check_file_exists_static("${FILE}")
++ _qt5_$${CMAKE_MODULE_NAME}_check_file_exists_static(\"${FILE}\")
+ endmacro()
+endif()
-+!!ENDIF
-+
+ !!ENDIF
+
!!IF !equals(TEMPLATE, aux)
--macro(_populate_$${CMAKE_MODULE_NAME}_target_properties TARGET_CONFIG LIB_LOCATION IMPLIB_LOCATION)
-- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${TARGET_CONFIG})
+-macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATION IMPLIB_LOCATION
+!!IF !isEmpty(CMAKE_STATIC_TYPE)
-+macro(_populate_$${CMAKE_MODULE_NAME}_target_properties_static TARGET_NAME TARGET_CONFIG LIB_LOCATION IMPLIB_LOCATION)
++macro(_populate_$${CMAKE_MODULE_NAME}_target_properties_static TARGET_NAME Configuration LIB_LOCATION IMPLIB_LOCATION
++ IsDebugAndRelease)
+!!ELSE
-+macro(_populate_$${CMAKE_MODULE_NAME}_target_properties TARGET_NAME TARGET_CONFIG LIB_LOCATION IMPLIB_LOCATION)
++macro(_populate_$${CMAKE_MODULE_NAME}_target_properties TARGET_NAME Configuration LIB_LOCATION IMPLIB_LOCATION
+ IsDebugAndRelease)
+- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
+!!ENDIF
-+ set_property(TARGET ${TARGET_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${TARGET_CONFIG})
++ set_property(TARGET ${TARGET_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
-+
-+!!IF !isEmpty(CMAKE_WINDOWS_BUILD)
-+!!IF !isEmpty(CMAKE_STATIC_TYPE)
-+ set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/lib/${LIB_LOCATION}\")
-+!!ELSE
-+ set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/bin/${LIB_LOCATION}\")
-+!!ENDIF
-+!!ELSE
set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
-+!!ENDIF
-+
-+!!ELSE // isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
-+
-+!!IF !isEmpty(CMAKE_WINDOWS_BUILD)
-+!!IF !isEmpty(CMAKE_STATIC_TYPE)
-+ set(imported_location \"lib/${LIB_LOCATION}\")
-+!!ELSE
-+ set(imported_location \"bin/${LIB_LOCATION}\")
-+!!ENDIF
- !!ELSE
- set(imported_location \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
- !!ENDIF
-
-+!!ENDIF // isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
-+
-+!!IF !isEmpty(CMAKE_STATIC_TYPE)
-+ _qt5_$${CMAKE_MODULE_NAME}_check_file_exists_static(${imported_location})
-+!!ELSE
- _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location})
-+!!ENDIF
+@@ -200,20 +243,20 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI
+ # FIXME: handle IsDebugAndRelease like in official version
!!IF !isEmpty(CMAKE_STATIC_TYPE)
- if (_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES)
- set(_list_sep \";\")
- endif()
- set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
-+ set_target_properties(${TARGET_NAME} PROPERTIES
- \"INTERFACE_LINK_LIBRARIES_${TARGET_CONFIG}\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}${_list_sep}${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${TARGET_CONFIG}_LIB_DEPENDENCIES}\"
- \"IMPORTED_LOCATION_${TARGET_CONFIG}\" ${imported_location}
++ set_target_properties(\"${TARGET_NAME}\" PROPERTIES
+ \"IMPORTED_LOCATION_${Configuration}\" ${imported_location}
!!IF !isEmpty(CMAKE_LIB_SONAME)
-@@ -80,7 +148,7 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties TARGET_CONFIG LIB_LOCATI
- \"IMPORTED_LINK_INTERFACE_LIBRARIES_${TARGET_CONFIG}\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}${_list_sep}${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${TARGET_CONFIG}_LIB_DEPENDENCIES}\"
+ \"IMPORTED_SONAME_${Configuration}\" \"$${CMAKE_LIB_SONAME}\"
+ !!ENDIF
)
+- _qt5_add_dependencies(Qt5::$${CMAKE_MODULE_NAME} \"${Configuration}\" \"${_deps}\")
++ _qt5_add_dependencies(\"${TARGET_NAME}\" \"${Configuration}\" \"${_deps}\")
+ if(NOT CMAKE_VERSION VERSION_LESS \"3.13\")
+- set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
++ set_target_properties(\"${TARGET_NAME}\" PROPERTIES
+ \"INTERFACE_LINK_OPTIONS\" \"${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LINK_FLAGS}\"
+ )
+ endif()
!!ELSE
- set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
-+ set_target_properties(${TARGET_NAME} PROPERTIES
- \"INTERFACE_LINK_LIBRARIES_${TARGET_CONFIG}\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}\"
- \"IMPORTED_LOCATION_${TARGET_CONFIG}\" ${imported_location}
++ set_target_properties(\"${TARGET_NAME}\" PROPERTIES
+ \"INTERFACE_LINK_LIBRARIES_${Configuration}\" \"${_deps}\"
+ \"IMPORTED_LOCATION_${Configuration}\" ${imported_location}
!!IF !isEmpty(CMAKE_LIB_SONAME)
-@@ -97,9 +165,13 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties TARGET_CONFIG LIB_LOCATI
+@@ -230,9 +273,13 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI
!!ELSE
- set(imported_implib \"IMPORTED_IMPLIB_${TARGET_CONFIG}\" \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
+ set(imported_implib \"IMPORTED_IMPLIB_${Configuration}\" \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
!!ENDIF
+!!IF !isEmpty(CMAKE_STATIC_TYPE)
+ _qt5_$${CMAKE_MODULE_NAME}_check_file_exists_static(${imported_implib})
@@ -392,28 +379,27 @@ index b401db5ac2..e6dd749c9e 100644
if(NOT \"${IMPLIB_LOCATION}\" STREQUAL \"\")
- set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
+ set_target_properties(${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
- \"IMPORTED_IMPLIB_${TARGET_CONFIG}\" ${imported_implib}
+ \"IMPORTED_IMPLIB_${Configuration}\" ${imported_implib}
)
endif()
-@@ -107,8 +179,9 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties TARGET_CONFIG LIB_LOCATI
+@@ -249,8 +296,7 @@ macro(_populate_$${CMAKE_MODULE_NAME}_plugin_target_dependencies_from_prl_file P
endmacro()
!!ENDIF
-if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
-+set(TARGET_NAME ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME})
-
-+if(NOT TARGET ${TARGET_NAME})
+-
++if(NOT TARGET ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME})
!!IF !no_module_headers
!!IF !isEmpty(CMAKE_BUILD_IS_FRAMEWORK)
set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS
-@@ -116,46 +189,50 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Headers\"
+@@ -258,46 +304,50 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+ \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Headers\"
)
!!IF isEmpty(CMAKE_NO_PRIVATE_INCLUDES)
- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
+ set(${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/\"
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/$${MODULE_INCNAME}\"
+ \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/\"
+ \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/$${MODULE_INCNAME}\"
)
-!!ELSE
- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
@@ -431,15 +417,12 @@ index b401db5ac2..e6dd749c9e 100644
\"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION\"
\"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION/$${MODULE_INCNAME}\"
)
--!!ELSE
+ !!ELSE
- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
--!!ENDIF
--!!ELSE
-+!!ELSE // isEmpty(CMAKE_NO_PRIVATE_INCLUDES)
+ set(${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
-+!!ENDIF // isEmpty(CMAKE_NO_PRIVATE_INCLUDES)
-+!!ELSE // isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE)
- set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR\" \"$${CMAKE_INCLUDE_DIR}Qt$${CMAKE_MODULE_NAME}\")
+ !!ENDIF
+ !!ELSE
+ set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR\" \"$${CMAKE_INCLUDE_DIR}$${CMAKE_INCLUDE_NAME}\")
!!IF isEmpty(CMAKE_NO_PRIVATE_INCLUDES)
- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
+ set(${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
@@ -474,7 +457,7 @@ index b401db5ac2..e6dd749c9e 100644
endforeach()
!!IF isEmpty(CMAKE_BUILD_IS_FRAMEWORK)
-@@ -164,16 +241,20 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+@@ -306,16 +356,20 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
list(FIND Qt5$${CMAKE_MODULE_NAME}_FIND_COMPONENTS Private _check_private)
if (NOT _check_private STREQUAL -1)
foreach(_dir ${Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS})
@@ -498,8 +481,8 @@ index b401db5ac2..e6dd749c9e 100644
!!ENDIF // TEMPLATE != aux
set(_Qt5$${CMAKE_MODULE_NAME}_MODULE_DEPENDENCIES \"$${CMAKE_MODULE_DEPS}\")
-@@ -183,10 +264,10 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
- endif()
+@@ -323,10 +377,10 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+ list(APPEND _Qt5$${CMAKE_MODULE_NAME}_MODULE_DEPENDENCIES \"$${CMAKE_INTERFACE_MODULE_DEPS}\")
!!ENDIF
- set(Qt5$${CMAKE_MODULE_NAME}_OWN_PRIVATE_INCLUDE_DIRS ${Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS})
@@ -511,7 +494,7 @@ index b401db5ac2..e6dd749c9e 100644
set(_Qt5$${CMAKE_MODULE_NAME}_FIND_DEPENDENCIES_REQUIRED REQUIRED)
endif()
set(_Qt5$${CMAKE_MODULE_NAME}_FIND_DEPENDENCIES_QUIET)
-@@ -194,17 +275,17 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+@@ -334,17 +388,17 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
set(_Qt5$${CMAKE_MODULE_NAME}_DEPENDENCIES_FIND_QUIET QUIET)
endif()
set(_Qt5$${CMAKE_MODULE_NAME}_FIND_VERSION_EXACT)
@@ -533,7 +516,7 @@ index b401db5ac2..e6dd749c9e 100644
$$VERSION ${_Qt5$${CMAKE_MODULE_NAME}_FIND_VERSION_EXACT}
${_Qt5$${CMAKE_MODULE_NAME}_DEPENDENCIES_FIND_QUIET}
${_Qt5$${CMAKE_MODULE_NAME}_FIND_DEPENDENCIES_REQUIRED}
-@@ -212,28 +293,32 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+@@ -352,25 +406,25 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
)
endif()
@@ -570,6 +553,17 @@ index b401db5ac2..e6dd749c9e 100644
+ list(REMOVE_DUPLICATES ${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_EXECUTABLE_COMPILE_FLAGS)
!!ENDIF // TEMPLATE != aux
+ # It can happen that the same FooConfig.cmake file is included when calling find_package()
+@@ -385,11 +439,16 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+ #
+ # Make sure to return early in the original Config inclusion, because the target has already
+ # been defined as part of the second inclusion.
+- if(TARGET Qt5::$${CMAKE_MODULE_NAME})
++ set(TARGET_NAME ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME})
++ if(TARGET ${TARGET_NAME})
+ return()
+ endif()
+
+!!IF !isEmpty(CMAKE_STATIC_TYPE)
+ set(_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES \"$${CMAKE_QT5_MODULE_DEPS_STATIC}\")
+!!ELSE
@@ -577,76 +571,117 @@ index b401db5ac2..e6dd749c9e 100644
+!!ENDIF
!!IF !isEmpty(CMAKE_INTERFACE_QT5_MODULE_DEPS)
- if (NOT CMAKE_VERSION VERSION_LESS 3.0.0)
-@@ -242,8 +327,9 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
- !!ENDIF
-
- !!IF !isEmpty(CMAKE_STATIC_TYPE)
-- add_library(Qt5::$${CMAKE_MODULE_NAME} STATIC IMPORTED)
-- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY IMPORTED_LINK_INTERFACE_LANGUAGES "CXX")
-+ add_library(${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} STATIC IMPORTED)
-+ set_property(TARGET ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} PROPERTY IMPORTED_LINK_INTERFACE_LANGUAGES "CXX")
-+
- macro(_process_prl_file PRL_FILE_LOCATION CONFIGURATION)
- if (EXISTS \"${PRL_FILE_LOCATION}\")
- file(STRINGS \"${PRL_FILE_LOCATION}\" prl_strings REGEX \"QMAKE_PRL_LIBS_FOR_CMAKE\")
-@@ -267,34 +353,45 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
- endmacro()
-
+ list(APPEND _Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES \"$${CMAKE_INTERFACE_QT5_MODULE_DEPS}\")
+@@ -400,13 +459,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+ !!IF !isEmpty(CMAKE_DEBUG_TYPE)
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
-- _process_prl_file(\"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG)
-+ _process_prl_file(\"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG_STATIC}\" 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}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG_STATIC}\" DEBUG
+ _Qt5$${CMAKE_MODULE_NAME}_STATIC_DEBUG_LIB_DEPENDENCIES
+ _Qt5$${CMAKE_MODULE_NAME}_STATIC_DEBUG_LINK_FLAGS
+ )
!!ELSE
-- _process_prl_file(\"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG)
-+ _process_prl_file(\"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG_STATIC}\" DEBUG)
- !!ENDIF
+ _qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
+- \"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG
++ \"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG_STATIC}\" DEBUG
+ _Qt5$${CMAKE_MODULE_NAME}_STATIC_DEBUG_LIB_DEPENDENCIES
+ _Qt5$${CMAKE_MODULE_NAME}_STATIC_DEBUG_LINK_FLAGS
+ )
+@@ -416,13 +475,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+ !!IF !isEmpty(CMAKE_RELEASE_TYPE)
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
-- _process_prl_file(\"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE)
-+ _process_prl_file(\"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE_STATIC}\" 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}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE_STATIC}\" RELEASE
+ _Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LIB_DEPENDENCIES
+ _Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LINK_FLAGS
+ )
!!ELSE
-- _process_prl_file(\"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE)
-+ _process_prl_file(\"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE_STATIC}\" RELEASE)
+ _qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
+- \"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE
++ \"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE_STATIC}\" RELEASE
+ _Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LIB_DEPENDENCIES
+ _Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LINK_FLAGS
+ )
+@@ -431,49 +490,60 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+ endif()
+
+ !!IF equals(TEMPLATE, aux)
+- add_library(Qt5::$${CMAKE_MODULE_NAME} INTERFACE IMPORTED)
++ add_library(${TARGET_NAME} INTERFACE IMPORTED)
+ !!ELSE
+- add_library(Qt5::$${CMAKE_MODULE_NAME} STATIC IMPORTED)
+- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY IMPORTED_LINK_INTERFACE_LANGUAGES "CXX")
++ add_library(${TARGET_NAME} STATIC IMPORTED)
++ set_property(TARGET ${TARGET_NAME} PROPERTY IMPORTED_LINK_INTERFACE_LANGUAGES "CXX")
!!ENDIF
!!ELSE // !isEmpty(CMAKE_STATIC_TYPE)
!!IF equals(TEMPLATE, aux)
- add_library(Qt5::$${CMAKE_MODULE_NAME} INTERFACE IMPORTED)
-+ add_library(${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} INTERFACE IMPORTED)
++ add_library(${TARGET_NAME} INTERFACE IMPORTED)
!!ELSE
- add_library(Qt5::$${CMAKE_MODULE_NAME} SHARED IMPORTED)
-+ add_library(${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} SHARED IMPORTED)
++ add_library(${TARGET_NAME} SHARED IMPORTED)
!!ENDIF
!!ENDIF // !isEmpty(CMAKE_STATIC_TYPE)
!!IF !equals(TEMPLATE, aux)
!!IF !isEmpty(CMAKE_BUILD_IS_FRAMEWORK)
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY FRAMEWORK 1)
-+ set_property(TARGET ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} PROPERTY FRAMEWORK 1)
++ set_property(TARGET ${TARGET_NAME} PROPERTY FRAMEWORK 1)
++!!ENDIF
++!!ENDIF // TEMPLATE != aux
++
++!!IF !equals(TEMPLATE, aux)
++!!IF !isEmpty(CMAKE_BUILD_IS_FRAMEWORK)
++ set_property(TARGET ${TARGET_NAME} PROPERTY FRAMEWORK 1)
!!ENDIF
!!ENDIF // TEMPLATE != aux
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY
-+!!IF !equals(TEMPLATE, aux)
-+!!IF !isEmpty(CMAKE_BUILD_IS_FRAMEWORK)
-+ set_property(TARGET ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} PROPERTY FRAMEWORK 1)
-+!!ENDIF
-+!!ENDIF // TEMPLATE != aux
-+
-+ set_property(TARGET ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} PROPERTY
++ set_property(TARGET ${TARGET_NAME} PROPERTY
INTERFACE_INCLUDE_DIRECTORIES ${_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS})
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY
- INTERFACE_COMPILE_DEFINITIONS $${MODULE_DEFINES})
+!!IF !isEmpty(CMAKE_STATIC_TYPE)
-+ set_property(TARGET ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} PROPERTY
++ set_property(TARGET ${TARGET_NAME} PROPERTY
+ INTERFACE_COMPILE_DEFINITIONS $${CMAKE_INTERFACE_COMPILE_DEFINITIONS_STATIC} $${MODULE_DEFINES})
+!!ELSE
-+ set_property(TARGET ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} PROPERTY
++ set_property(TARGET ${TARGET_NAME} PROPERTY
+ INTERFACE_COMPILE_DEFINITIONS $${MODULE_DEFINES})
+!!ENDIF
+- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY INTERFACE_QT_ENABLED_FEATURES $$join(QT.$${MODULE}.enabled_features, ";"))
+- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY INTERFACE_QT_DISABLED_FEATURES $$join(QT.$${MODULE}.disabled_features, ";"))
++ set_property(TARGET ${TARGET_NAME} PROPERTY INTERFACE_QT_ENABLED_FEATURES $$join(QT.$${MODULE}.enabled_features, ";"))
++ set_property(TARGET ${TARGET_NAME} PROPERTY INTERFACE_QT_DISABLED_FEATURES $$join(QT.$${MODULE}.disabled_features, ";"))
+
+ # Qt 6 forward compatible properties.
+- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME}
++ set_property(TARGET ${TARGET_NAME}
+ PROPERTY $${CMAKE_FEATURE_PROPERTY_PREFIX}QT_ENABLED_PUBLIC_FEATURES
+ $$join(QT.$${MODULE}.enabled_features, ";"))
+- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME}
++ set_property(TARGET ${TARGET_NAME}
+ PROPERTY $${CMAKE_FEATURE_PROPERTY_PREFIX}QT_DISABLED_PUBLIC_FEATURES
+ $$join(QT.$${MODULE}.disabled_features, ";"))
+- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME}
++ set_property(TARGET ${TARGET_NAME}
+ PROPERTY $${CMAKE_FEATURE_PROPERTY_PREFIX}QT_ENABLED_PRIVATE_FEATURES
+ $$join(QT.$${MODULE}_private.enabled_features, ";"))
+- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME}
++ set_property(TARGET ${TARGET_NAME}
+ PROPERTY $${CMAKE_FEATURE_PROPERTY_PREFIX}QT_DISABLED_PRIVATE_FEATURES
+ $$join(QT.$${MODULE}_private.disabled_features, ";"))
+
+- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY INTERFACE_QT_PLUGIN_TYPES \"$${CMAKE_MODULE_PLUGIN_TYPES}\")
++ set_property(TARGET ${TARGET_NAME} PROPERTY INTERFACE_QT_PLUGIN_TYPES \"$${CMAKE_MODULE_PLUGIN_TYPES}\")
+
# Find plugin targets
file(GLOB pluginTargetsMaybe \"${CMAKE_CURRENT_LIST_DIR}/*Qt5$${CMAKE_MODULE_NAME}_*.cmake\")
-@@ -308,7 +405,11 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+@@ -487,7 +557,11 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
endforeach()
endif()
@@ -658,7 +693,7 @@ index b401db5ac2..e6dd749c9e 100644
set_property(TARGET ${PLUGIN_TARGET_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${CONFIG})
!!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE)
-@@ -316,7 +417,11 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+@@ -495,7 +569,11 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
!!ELSE
set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
!!ENDIF
@@ -670,49 +705,69 @@ index b401db5ac2..e6dd749c9e 100644
set_target_properties(${PLUGIN_TARGET_NAME} PROPERTIES
\"IMPORTED_LOCATION_${CONFIG}\" ${imported_location}
)
-@@ -347,7 +452,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+@@ -525,17 +603,20 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+ endforeach()
endif()
++ # set TARGET_NAME back to current module (when loading plugin targets other modules might have been loaded in the meantime)
++ set(TARGET_NAME ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME})
++
set(_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIRS_EXIST TRUE)
- foreach (_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIR ${Qt5$${CMAKE_MODULE_NAME}_OWN_PRIVATE_INCLUDE_DIRS})
-+ foreach (_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIR ${${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_OWN_PRIVATE_INCLUDE_DIRS})
++ foreach (_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIR ${${TARGET_NAME}_OWN_PRIVATE_INCLUDE_DIRS})
if (NOT EXISTS ${_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIR})
set(_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIRS_EXIST FALSE)
endif()
-@@ -355,9 +460,9 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+ endforeach()
- if (_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIRS_EXIST
- AND NOT CMAKE_VERSION VERSION_LESS 3.0.0 )
+ if (_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIRS_EXIST)
- add_library(Qt5::$${CMAKE_MODULE_NAME}Private INTERFACE IMPORTED)
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME}Private PROPERTY
- INTERFACE_INCLUDE_DIRECTORIES ${Qt5$${CMAKE_MODULE_NAME}_OWN_PRIVATE_INCLUDE_DIRS}
-+ add_library(${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME}Private INTERFACE IMPORTED)
-+ set_property(TARGET ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME}Private PROPERTY
-+ INTERFACE_INCLUDE_DIRECTORIES ${${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_OWN_PRIVATE_INCLUDE_DIRS}
++ add_library(${TARGET_NAME}Private INTERFACE IMPORTED)
++ set_property(TARGET ${TARGET_NAME}Private PROPERTY
++ INTERFACE_INCLUDE_DIRECTORIES ${${TARGET_NAME}_OWN_PRIVATE_INCLUDE_DIRS}
)
set(_Qt5$${CMAKE_MODULE_NAME}_PRIVATEDEPS)
foreach(dep ${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES})
-@@ -365,66 +470,68 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
- list(APPEND _Qt5$${CMAKE_MODULE_NAME}_PRIVATEDEPS ${dep}Private)
+@@ -544,17 +625,18 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
endif()
endforeach()
+ !!IF !isEmpty(CMAKE_STATIC_TYPE)
+- _qt5_add_dependencies(Qt5::$${CMAKE_MODULE_NAME}Private ALL \"Qt5::$${CMAKE_MODULE_NAME};${_Qt5$${CMAKE_MODULE_NAME}_PRIVATEDEPS}\")
++ _qt5_add_dependencies(${TARGET_NAME}Private ALL
++ \"${TARGET_NAME};${_Qt5$${CMAKE_MODULE_NAME}_PRIVATEDEPS}\")
+ !!ELSE
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME}Private PROPERTY
- INTERFACE_LINK_LIBRARIES Qt5::$${CMAKE_MODULE_NAME} ${_Qt5$${CMAKE_MODULE_NAME}_PRIVATEDEPS}
-+ set_property(TARGET ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME}Private PROPERTY
-+ INTERFACE_LINK_LIBRARIES ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} ${_Qt5$${CMAKE_MODULE_NAME}_PRIVATEDEPS}
++ set_property(TARGET ${TARGET_NAME}Private PROPERTY
++ INTERFACE_LINK_LIBRARIES ${TARGET_NAME} ${_Qt5$${CMAKE_MODULE_NAME}_PRIVATEDEPS}
)
- endif()
+
+ # Add a versionless target, for compatibility with Qt6.
+- if(NOT \"${QT_NO_CREATE_VERSIONLESS_TARGETS}\" AND NOT TARGET Qt::$${CMAKE_MODULE_NAME}Private)
+- add_library(Qt::$${CMAKE_MODULE_NAME}Private INTERFACE IMPORTED)
+- set_target_properties(Qt::$${CMAKE_MODULE_NAME}Private PROPERTIES
+- INTERFACE_LINK_LIBRARIES \"Qt5::$${CMAKE_MODULE_NAME}Private\"
++ if(NOT \"${QT_NO_CREATE_VERSIONLESS_TARGETS}\" AND NOT TARGET ${QT_VARIANT_PREFIX}Qt::$${CMAKE_MODULE_NAME}Private)
++ add_library(${QT_VARIANT_PREFIX}Qt::$${CMAKE_MODULE_NAME}Private INTERFACE IMPORTED)
++ set_target_properties(${QT_VARIANT_PREFIX}Qt::$${CMAKE_MODULE_NAME}Private PROPERTIES
++ INTERFACE_LINK_LIBRARIES \"${TARGET_NAME}Private\"
+ )
+ endif()
+ !!ENDIF // CMAKE_STATIC_TYPE
+@@ -562,59 +644,61 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
!!IF !equals(TEMPLATE, aux)
!!IF !isEmpty(CMAKE_RELEASE_TYPE)
-!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
-- _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" \"\" )
+- _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" \"\" $${CMAKE_DEBUG_AND_RELEASE})
+!!IF !isEmpty(CMAKE_STATIC_TYPE)
-+ _populate_$${CMAKE_MODULE_NAME}_target_properties_static(${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE_STATIC}\" \"\" )
++ _populate_$${CMAKE_MODULE_NAME}_target_properties_static(${TARGET_NAME} RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE_STATIC}\" \"\" $${CMAKE_DEBUG_AND_RELEASE})
!!ELSE
-- _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
+- _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE})
-!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
-+ _populate_$${CMAKE_MODULE_NAME}_target_properties(${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
++ _populate_$${CMAKE_MODULE_NAME}_target_properties(${TARGET_NAME} RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE})
+!!ENDIF // CMAKE_STATIC_TYPE
+
@@ -726,9 +781,9 @@ index b401db5ac2..e6dd749c9e 100644
!!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE
if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
!!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE
-- _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" \"\" )
+- _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" \"\" $${CMAKE_DEBUG_AND_RELEASE})
-!!ELSE // CMAKE_STATIC_WINDOWS_BUILD
-+ _populate_$${CMAKE_MODULE_NAME}_target_properties_static(${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG_STATIC}\" \"\" )
++ _populate_$${CMAKE_MODULE_NAME}_target_properties_static(${TARGET_NAME} DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG_STATIC}\" \"\" $${CMAKE_DEBUG_AND_RELEASE})
+ endif()
+!!ELSE // CMAKE_STATIC_TYPE
if (EXISTS
@@ -744,9 +799,9 @@ index b401db5ac2..e6dd749c9e 100644
!!ELSE
\"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
!!ENDIF
-- _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
+- _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" $${CMAKE_DEBUG_AND_RELEASE})
-!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
-+ _populate_$${CMAKE_MODULE_NAME}_target_properties(${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} DEBUG \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
++ _populate_$${CMAKE_MODULE_NAME}_target_properties(${TARGET_NAME} DEBUG \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" $${CMAKE_DEBUG_AND_RELEASE})
endif()
+!!ENDIF // CMAKE_STATIC_TYPE
!!ENDIF // CMAKE_DEBUG_TYPE
@@ -756,11 +811,11 @@ index b401db5ac2..e6dd749c9e 100644
!!IF !isEmpty(CMAKE_DEBUG_TYPE)
-!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
-- _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" \"\" )
+- _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" \"\" $${CMAKE_DEBUG_AND_RELEASE})
+!!IF !isEmpty(CMAKE_STATIC_TYPE)
-+ _populate_$${CMAKE_MODULE_NAME}_target_properties_static(DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" \"\" )
++ _populate_$${CMAKE_MODULE_NAME}_target_properties_static(DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" \"\" $${CMAKE_DEBUG_AND_RELEASE})
!!ELSE
- _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
+ _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" $${CMAKE_DEBUG_AND_RELEASE})
-!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
+!!ENDIF // CMAKE_STATIC_TYPE
@@ -776,28 +831,28 @@ index b401db5ac2..e6dd749c9e 100644
- if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
+ if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE_STATIC}\" )
!!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE
-- _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" \"\" )
+- _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" \"\" $${CMAKE_DEBUG_AND_RELEASE})
-!!ELSE // CMAKE_STATIC_WINDOWS_BUILD
-+ _populate_$${CMAKE_MODULE_NAME}_target_properties_static(${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE_STATIC}\" \"\" )
++ _populate_$${CMAKE_MODULE_NAME}_target_properties_static(${TARGET_NAME} RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE_STATIC}\" \"\" $${CMAKE_DEBUG_AND_RELEASE})
+!!ELSE // CMAKE_STATIC_TYPE
if (EXISTS
!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
\"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_RELEASE}\"
-@@ -437,7 +544,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+@@ -627,7 +711,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
!!ELSE
\"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
!!ENDIF
-- _populate_$${CMAKE_MODULE_NAME}_target_properties(Qt5::$${CMAKE_MODULE_NAME} RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
-+ _populate_$${CMAKE_MODULE_NAME}_target_properties(${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
+- _populate_$${CMAKE_MODULE_NAME}_target_properties(Qt5::$${CMAKE_MODULE_NAME} RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE})
++ _populate_$${CMAKE_MODULE_NAME}_target_properties(${TARGET_NAME} RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE})
endif()
!!ENDIF // CMAKE_STATIC_TYPE
-@@ -447,19 +554,22 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+@@ -637,26 +721,29 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
!!ENDIF // CMAKE_DEBUG_TYPE
!!ELSE // TEMPLATE != aux
- set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
-+ set_target_properties(${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
++ set_target_properties(${TARGET_NAME} PROPERTIES
INTERFACE_LINK_LIBRARIES \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}\"
)
!!ENDIF // TEMPLATE != aux
@@ -812,25 +867,50 @@ index b401db5ac2..e6dd749c9e 100644
+ include(\"${CMAKE_CURRENT_LIST_DIR}/../${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}/${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}Macros.cmake\")
!!ENDIF
--_qt5_$${CMAKE_MODULE_NAME}_check_file_exists(\"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}ConfigVersion.cmake\")
+- _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(\"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}ConfigVersion.cmake\")
+!!IF !isEmpty(CMAKE_STATIC_TYPE)
-+_qt5_$${CMAKE_MODULE_NAME}_check_file_exists_static(\"${CMAKE_CURRENT_LIST_DIR}/../${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}/${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}ConfigVersion.cmake\")
++ _qt5_$${CMAKE_MODULE_NAME}_check_file_exists_static(\"${CMAKE_CURRENT_LIST_DIR}/../${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}/${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}ConfigVersion.cmake\")
+!!ELSE
-+_qt5_$${CMAKE_MODULE_NAME}_check_file_exists(\"${CMAKE_CURRENT_LIST_DIR}/../${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}/${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}ConfigVersion.cmake\")
++ _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(\"${CMAKE_CURRENT_LIST_DIR}/../${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}/${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}ConfigVersion.cmake\")
+!!ENDIF
+ endif()
+ # Add a versionless target, for compatibility with Qt6.
+-if(NOT \"${QT_NO_CREATE_VERSIONLESS_TARGETS}\" AND TARGET Qt5::$${CMAKE_MODULE_NAME} AND NOT TARGET Qt::$${CMAKE_MODULE_NAME})
+- add_library(Qt::$${CMAKE_MODULE_NAME} INTERFACE IMPORTED)
+- set_target_properties(Qt::$${CMAKE_MODULE_NAME} PROPERTIES
+- INTERFACE_LINK_LIBRARIES \"Qt5::$${CMAKE_MODULE_NAME}\"
++if(NOT \"${QT_NO_CREATE_VERSIONLESS_TARGETS}\" AND TARGET ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} AND NOT TARGET ${QT_VARIANT_PREFIX}Qt::$${CMAKE_MODULE_NAME})
++ add_library(${QT_VARIANT_PREFIX}Qt::$${CMAKE_MODULE_NAME} INTERFACE IMPORTED)
++ set_target_properties(${QT_VARIANT_PREFIX}Qt::$${CMAKE_MODULE_NAME} PROPERTIES
++ INTERFACE_LINK_LIBRARIES \"${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME}\"
+ )
endif()
diff --git a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
-index ec5f3cc437..1e4d98086c 100644
+index acbe1cc33b..65869c5122 100644
--- a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
+++ b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
-@@ -1,14 +1,22 @@
+@@ -1,13 +1,13 @@
# Some Qt modules also load plugin target in extra config, so check whether the target already exists
-if(NOT TARGET Qt5::$$CMAKE_PLUGIN_NAME)
- add_library(Qt5::$$CMAKE_PLUGIN_NAME MODULE IMPORTED)
+if(NOT TARGET ${QT_VARIANT_PREFIX}Qt5::$$CMAKE_PLUGIN_NAME)
+ add_library(${QT_VARIANT_PREFIX}Qt5::$$CMAKE_PLUGIN_NAME MODULE IMPORTED)
+ !!IF !isEmpty(CMAKE_STATIC_TYPE)
+ set(_Qt5$${CMAKE_PLUGIN_NAME}_MODULE_DEPENDENCIES \"$${CMAKE_PLUGIN_MODULE_DEPS}\")
+
+ foreach(_module_dep ${_Qt5$${CMAKE_PLUGIN_NAME}_MODULE_DEPENDENCIES})
+- if(NOT Qt5${_module_dep}_FOUND)
+- find_package(Qt5${_module_dep}
++ if(NOT ${QT_VARIANT_PREFIX}Qt5${_module_dep}_FOUND)
++ find_package(${QT_VARIANT_PREFIX}Qt5${_module_dep}
+ $$VERSION ${_Qt5$${CMAKE_MODULE_NAME}_FIND_VERSION_EXACT}
+ ${_Qt5$${CMAKE_MODULE_NAME}_DEPENDENCIES_FIND_QUIET}
+ ${_Qt5$${CMAKE_MODULE_NAME}_FIND_DEPENDENCIES_REQUIRED}
+@@ -17,17 +17,25 @@ foreach(_module_dep ${_Qt5$${CMAKE_PLUGIN_NAME}_MODULE_DEPENDENCIES})
+ endforeach()
+
!!IF !isEmpty(CMAKE_RELEASE_TYPE)
- _populate_$${CMAKE_MODULE_NAME}_plugin_properties(Qt5::$$CMAKE_MODULE_NAME Qt5::$$CMAKE_PLUGIN_NAME $$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE}\")
+!!IF !isEmpty(CMAKE_STATIC_TYPE)
@@ -839,6 +919,8 @@ index ec5f3cc437..1e4d98086c 100644
+ _populate_$${CMAKE_MODULE_NAME}_plugin_properties(${QT_VARIANT_PREFIX}Qt5::$$CMAKE_MODULE_NAME ${QT_VARIANT_PREFIX}Qt5::$$CMAKE_PLUGIN_NAME $$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE}\")
+!!ENDIF
!!ENDIF
+ !!ENDIF
+
!!IF !isEmpty(CMAKE_DEBUG_TYPE)
- _populate_$${CMAKE_MODULE_NAME}_plugin_properties(Qt5::$$CMAKE_MODULE_NAME Qt5::$$CMAKE_PLUGIN_NAME $$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG}\")
+!!IF !isEmpty(CMAKE_STATIC_TYPE)
@@ -849,9 +931,18 @@ index ec5f3cc437..1e4d98086c 100644
!!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})
+-set_property(TARGET Qt5::$${CMAKE_PLUGIN_NAME} PROPERTY QT_PLUGIN_TYPE \"$$CMAKE_PLUGIN_TYPE\")
+-set_property(TARGET Qt5::$${CMAKE_PLUGIN_NAME} PROPERTY QT_PLUGIN_EXTENDS \"$$CMAKE_PLUGIN_EXTENDS\")
+-set_property(TARGET Qt5::$${CMAKE_PLUGIN_NAME} PROPERTY QT_PLUGIN_CLASS_NAME \"$$CMAKE_PLUGIN_NAME\")
+-endif()
+\ No newline at end of file
+list(APPEND ${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_PLUGINS ${QT_VARIANT_PREFIX}Qt5::$$CMAKE_PLUGIN_NAME)
-
- endif()
++set_property(TARGET ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY QT_ALL_PLUGINS_$${CMAKE_PLUGIN_TYPE_ESCAPED} ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_PLUGIN_NAME})
++set_property(TARGET ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_PLUGIN_NAME} PROPERTY QT_PLUGIN_TYPE \"$$CMAKE_PLUGIN_TYPE\")
++set_property(TARGET ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_PLUGIN_NAME} PROPERTY QT_PLUGIN_EXTENDS \"$$CMAKE_PLUGIN_EXTENDS\")
++set_property(TARGET ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_PLUGIN_NAME} PROPERTY QT_PLUGIN_CLASS_NAME \"$$CMAKE_PLUGIN_NAME\")
++endif()
diff --git a/mkspecs/features/data/cmake/Qt5StaticOnlyRedirection.cmake.in b/mkspecs/features/data/cmake/Qt5StaticOnlyRedirection.cmake.in
new file mode 100644
index 0000000000..0091940fd2
@@ -870,30 +961,36 @@ index 0000000000..0091940fd2
+set(OVERRIDE_QT_VARIANT_PREFIX "${ORIGINAL_OVERRIDE_QT_VARIANT_PREFIX}")
+
diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in
-index 545b9a3d1e..ebe6644dfe 100644
+index 0d02edb41c..9da1361c95 100644
--- a/src/corelib/Qt5CoreConfigExtras.cmake.in
+++ b/src/corelib/Qt5CoreConfigExtras.cmake.in
-@@ -1,4 +1,6 @@
+@@ -2,6 +2,8 @@ if(NOT DEFINED QT_DEFAULT_MAJOR_VERSION)
+ set(QT_DEFAULT_MAJOR_VERSION 5)
+ endif()
+set(IMPORTED_TARGET_NAME ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME})
+
if (NOT TARGET Qt5::qmake)
add_executable(Qt5::qmake IMPORTED)
-@@ -50,9 +52,9 @@ set(Qt5Core_QMAKE_EXECUTABLE Qt5::qmake)
+@@ -55,12 +57,12 @@ set(Qt5Core_QMAKE_EXECUTABLE Qt5::qmake)
set(Qt5Core_MOC_EXECUTABLE Qt5::moc)
set(Qt5Core_RCC_EXECUTABLE Qt5::rcc)
-set_property(TARGET Qt5::Core PROPERTY INTERFACE_QT_MAJOR_VERSION 5)
-set_property(TARGET Qt5::Core PROPERTY INTERFACE_QT_COORD_TYPE $$QT_COORD_TYPE)
--set_property(TARGET Qt5::Core APPEND PROPERTY
+set_property(TARGET ${IMPORTED_TARGET_NAME} PROPERTY INTERFACE_QT_MAJOR_VERSION 5)
+set_property(TARGET ${IMPORTED_TARGET_NAME} PROPERTY INTERFACE_QT_COORD_TYPE $$QT_COORD_TYPE)
+ !!IF !isEmpty(CMAKE_MIN_DARWIN_DEPLOYMENT_TARGET)
+-set_property(TARGET Qt5::Core PROPERTY QT_DARWIN_MIN_DEPLOYMENT_TARGET \"$$CMAKE_MIN_DARWIN_DEPLOYMENT_TARGET\")
++set_property(TARGET ${IMPORTED_TARGET_NAME} PROPERTY QT_DARWIN_MIN_DEPLOYMENT_TARGET \"$$CMAKE_MIN_DARWIN_DEPLOYMENT_TARGET\")
+ !!ENDIF
+-set_property(TARGET Qt5::Core APPEND PROPERTY
+set_property(TARGET ${IMPORTED_TARGET_NAME} APPEND PROPERTY
COMPATIBLE_INTERFACE_STRING QT_MAJOR_VERSION QT_COORD_TYPE
)
-@@ -63,7 +65,7 @@ foreach(_dir ${_qt5_corelib_extra_includes})
+@@ -71,7 +73,7 @@ foreach(_dir ${_qt5_corelib_extra_includes})
endforeach()
list(APPEND Qt5Core_INCLUDE_DIRS ${_qt5_corelib_extra_includes})
@@ -902,19 +999,16 @@ index 545b9a3d1e..ebe6644dfe 100644
set(_qt5_corelib_extra_includes)
# Targets using Qt need to use the POSITION_INDEPENDENT_CODE property. The
-@@ -81,9 +83,9 @@ set(Qt5_POSITION_INDEPENDENT_CODE True)
- if (CMAKE_VERSION VERSION_LESS 2.8.12
- AND (NOT CMAKE_CXX_COMPILER_ID STREQUAL \"GNU\"
- OR CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0))
-- set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_POSITION_INDEPENDENT_CODE \"ON\")
-+ set_property(TARGET ${IMPORTED_TARGET_NAME} APPEND PROPERTY INTERFACE_POSITION_INDEPENDENT_CODE \"ON\")
- else()
-- set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_COMPILE_OPTIONS $$QMAKE_CXXFLAGS_APP)
-+ set_property(TARGET ${IMPORTED_TARGET_NAME} APPEND PROPERTY INTERFACE_COMPILE_OPTIONS $$QMAKE_CXXFLAGS_APP)
- endif()
-
- # Applications using qmake or cmake >= 2.8.12 as their build system will
-@@ -103,7 +105,7 @@ endif()
+@@ -86,7 +88,7 @@ set(Qt5_POSITION_INDEPENDENT_CODE True)
+ # Applications now need to be compiled with the -fPIC option if the Qt option
+ # \"reduce relocations\" is active. For backward compatibility only, Qt accepts
+ # the use of -fPIE for GCC 4.x versions.
+-set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_COMPILE_OPTIONS $$QMAKE_CXXFLAGS_APP)
++set_property(TARGET ${IMPORTED_TARGET_NAME} APPEND PROPERTY INTERFACE_COMPILE_OPTIONS $$QMAKE_CXXFLAGS_APP)
+
+ # TODO Qt6: Remove
+ set(Qt5Core_EXECUTABLE_COMPILE_FLAGS \"\")
+@@ -94,7 +96,7 @@ set(Qt5Core_EXECUTABLE_COMPILE_FLAGS \"\")
!!IF !isEmpty(QT_NAMESPACE)
list(APPEND Qt5Core_DEFINITIONS -DQT_NAMESPACE=$$QT_NAMESPACE)
list(APPEND Qt5Core_COMPILE_DEFINITIONS QT_NAMESPACE=$$QT_NAMESPACE)
@@ -923,7 +1017,7 @@ index 545b9a3d1e..ebe6644dfe 100644
!!ENDIF
!!IF !isEmpty(CMAKE_DISABLED_FEATURES)
-@@ -112,9 +114,9 @@ set(Qt5_DISABLED_FEATURES
+@@ -103,9 +105,9 @@ set(Qt5_DISABLED_FEATURES
)
!!ENDIF
@@ -935,7 +1029,7 @@ index 545b9a3d1e..ebe6644dfe 100644
!!IF qtConfig(reduce_exports)
set(QT_VISIBILITY_AVAILABLE \"True\")
-@@ -162,14 +164,14 @@ if (NOT TARGET Qt5::WinMain)
+@@ -153,14 +155,14 @@ if (NOT TARGET Qt5::WinMain)
set(_isWin32 $<BOOL:$<TARGET_PROPERTY:WIN32_EXECUTABLE>>)
set(_isNotExcluded $<NOT:$<BOOL:$<TARGET_PROPERTY:Qt5_NO_LINK_QTMAIN>>>)
set(_isPolicyNEW $<TARGET_POLICY:CMP0020>)
@@ -954,7 +1048,7 @@ index 545b9a3d1e..ebe6644dfe 100644
$<$<AND:${_isExe},${_isWin32},${_isNotExcluded},${_isPolicyNEW}>:Qt5::WinMain>
)
diff --git a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in
-index 2e32911a64..6b02a12944 100644
+index 84dbbfebd4..31fa875b6c 100644
--- a/src/gui/Qt5GuiConfigExtras.cmake.in
+++ b/src/gui/Qt5GuiConfigExtras.cmake.in
@@ -1,4 +1,6 @@
@@ -973,7 +1067,7 @@ index 2e32911a64..6b02a12944 100644
unset(_qt5gui_OPENGL_INCLUDE_DIR CACHE)
-@@ -170,9 +172,9 @@ _qt5gui_find_extra_libs(OPENGL \"$$CMAKE_OPENGL_LIBS\" \"$$CMAKE_OPENGL_LIBDIR\"
+@@ -183,9 +185,9 @@ _qt5gui_find_extra_libs(OPENGL \"$$CMAKE_OPENGL_LIBS\" \"$$CMAKE_OPENGL_LIBDIR\"
set(Qt5Gui_OPENGL_IMPLEMENTATION $$CMAKE_QT_OPENGL_IMPLEMENTATION)
@@ -997,5 +1091,5 @@ index 2a575958ae..ca0e3be3b5 100644
INTERFACE_COMPILE_DEFINITIONS QT_TESTCASE_BUILDDIR=\\\"\${CMAKE_BINARY_DIR}\\\"
)
--
-2.15.1
+2.28.0
diff --git a/0021-Use-.dll.a-as-import-lib-extension.patch b/0021-Use-.dll.a-as-import-lib-extension.patch
deleted file mode 100644
index c5c359273919..000000000000
--- a/0021-Use-.dll.a-as-import-lib-extension.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From 4798537f28bb206f5dc4469d67dfe18f05614506 Mon Sep 17 00:00:00 2001
-From: Martchus <martchus@gmx.net>
-Date: Sun, 18 Sep 2016 18:26:18 +0200
-Subject: [PATCH 21/34] Use *.dll.a as import lib extension
-
-The variables used here are provided by
-mingw-w64 specific mkspec
----
- mkspecs/features/create_cmake.prf | 5 +++--
- qmake/generators/win32/winmakefile.cpp | 17 ++++++++++++-----
- 2 files changed, 15 insertions(+), 7 deletions(-)
-
-diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
-index 146e83ae67..15fc070008 100644
---- a/mkspecs/features/create_cmake.prf
-+++ b/mkspecs/features/create_cmake.prf
-@@ -236,8 +236,9 @@ mac {
- CMAKE_PRL_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.prl
- CMAKE_PRL_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.prl
- } else {
-- CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.a
-- CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a
-+ isEmpty(QMAKE_EXTENSION_IMPORTLIB): QMAKE_EXTENSION_IMPORTLIB = a
-+ CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.$${QMAKE_EXTENSION_IMPORTLIB}
-+ CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.$${QMAKE_EXTENSION_IMPORTLIB}
- }
- } else {
- CMAKE_WINMAIN_FILE_LOCATION_DEBUG = qtmain$${QT_LIBINFIX}d.lib
-diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
-index 737f3abc3a..2e6d5d94a9 100644
---- a/qmake/generators/win32/winmakefile.cpp
-+++ b/qmake/generators/win32/winmakefile.cpp
-@@ -80,10 +80,14 @@ Win32MakefileGenerator::parseLibFlag(const ProString &flag, ProString *arg)
- bool
- Win32MakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags)
- {
-- ProStringList impexts = project->values("QMAKE_LIB_EXTENSIONS");
-- if (impexts.isEmpty())
-- impexts = project->values("QMAKE_EXTENSION_STATICLIB");
-- QList<QMakeLocalFileName> dirs;
-+ ProStringList impexts;
-+ if (project->isActiveConfig("staticlib")) {
-+ impexts.append(project->values("QMAKE_EXTENSION_STATICLIB"));
-+ } else {
-+ impexts.append(project->values("QMAKE_EXTENSION_IMPORTLIB"));
-+ impexts.append(project->values("QMAKE_EXTENSION_STATICLIB"));
-+ }
-+ QList<QMakeLocalFileName> dirs;
- static const char * const lflags[] = { "QMAKE_LIBS", "QMAKE_LIBS_PRIVATE", 0 };
- for (int i = 0; lflags[i]; i++) {
- ProStringList &l = project->values(lflags[i]);
-@@ -234,9 +238,12 @@ void Win32MakefileGenerator::fixTargetExt()
- if (!project->values("QMAKE_APP_FLAG").isEmpty()) {
- project->values("TARGET_EXT").append(".exe");
- } else if (project->isActiveConfig("shared")) {
-+ ProString impext = project->first("QMAKE_EXTENSION_IMPORTLIB");
-+ if (impext.isEmpty())
-+ impext = project->first("QMAKE_PREFIX_STATICLIB");
- project->values("LIB_TARGET").prepend(project->first("QMAKE_PREFIX_STATICLIB")
- + project->first("TARGET") + project->first("TARGET_VERSION_EXT")
-- + '.' + project->first("QMAKE_EXTENSION_STATICLIB"));
-+ + '.' + impext);
- project->values("TARGET_EXT").append(project->first("TARGET_VERSION_EXT") + "."
- + project->first("QMAKE_EXTENSION_SHLIB"));
- project->values("TARGET").first() = project->first("QMAKE_PREFIX_SHLIB") + project->first("TARGET");
---
-2.15.1
-
diff --git a/0025-Adjust-linker-flags-for-static-build-with-cmake-ming.patch b/0022-Adjust-linker-flags-for-static-build-with-cmake-ming.patch
index 263cb9a92d11..1931672ccaf6 100644
--- a/0025-Adjust-linker-flags-for-static-build-with-cmake-ming.patch
+++ b/0022-Adjust-linker-flags-for-static-build-with-cmake-ming.patch
@@ -1,29 +1,31 @@
-From a256ac2a8e64c8cc404f5c3842e9a1abc76dd840 Mon Sep 17 00:00:00 2001
+From 340f5dd2ffd05d07d7bf66b5092eca5c99cb4737 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Fri, 2 Jun 2017 16:42:07 +0200
-Subject: [PATCH 25/34] Adjust linker flags for static build with
+Subject: [PATCH 22/31] Adjust linker flags for static build with
cmake/mingw-w64
-Change-Id: I33b88976d8f5ce87ce431a6f422fe87785bf5b8d
+It is not clear anymore where I picked that change up and for
+what reason. Never touch a running system so let's keep it.
+
+Change-Id: Iad665f18da5b4540f0899829a0165e1d3aa4ea60
---
- src/corelib/Qt5CoreConfigExtras.cmake.in | 7 +++++++
- 1 file changed, 7 insertions(+)
+ src/corelib/Qt5CoreConfigExtras.cmake.in | 6 ++++++
+ 1 file changed, 6 insertions(+)
diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in
-index ebe6644dfe..687d611b3f 100644
+index 9da1361c95..5e802dea4c 100644
--- a/src/corelib/Qt5CoreConfigExtras.cmake.in
+++ b/src/corelib/Qt5CoreConfigExtras.cmake.in
-@@ -190,3 +190,10 @@ get_filename_component(_Qt5CoreConfigDir ${CMAKE_CURRENT_LIST_FILE} PATH)
- set(_Qt5CTestMacros \"${_Qt5CoreConfigDir}/Qt5CTestMacros.cmake\")
-
- _qt5_Core_check_file_exists(${_Qt5CTestMacros})
+@@ -206,3 +206,9 @@ if(NOT \"${QT_NO_CREATE_VERSIONLESS_TARGETS}\" AND NOT TARGET Qt::WinMain)
+ )
+ endif()
+ !!ENDIF
+
+!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
+set(_isExe $<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>)
+# INTERFACE_LINK_LIBRARIES is used to pass a linker flag '-static' and library ws2_32
+set_target_properties(${IMPORTED_TARGET_NAME} PROPERTIES \"INTERFACE_LINK_LIBRARIES\" \"$<${_isExe}:-static;ws2_32>\")
+unset(_isExe)
-+!!ENDIF
--
-2.15.1
+2.28.0
diff --git a/0022-Merge-shared-and-static-library-trees.patch b/0022-Merge-shared-and-static-library-trees.patch
deleted file mode 100644
index e6708dca94f7..000000000000
--- a/0022-Merge-shared-and-static-library-trees.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-From 190e710701a41341a07e3a00e5e35429d81053f1 Mon Sep 17 00:00:00 2001
-From: Martchus <martchus@gmx.net>
-Date: Sun, 18 Sep 2016 18:45:08 +0200
-Subject: [PATCH 22/34] Merge shared and static library trees
-
-Allow installation of shared and static build in the same prefix
----
- configure.pri | 9 +++++++++
- mkspecs/features/default_post.prf | 11 +++++++++++
- mkspecs/features/qt.prf | 15 +++++++++++++++
- mkspecs/features/spec_pre.prf | 11 ++++++++---
- qmake/generators/makefile.cpp | 9 ++++++---
- 5 files changed, 49 insertions(+), 6 deletions(-)
-
-diff --git a/configure.pri b/configure.pri
-index 83c0dee141..a05c3d98e6 100644
---- a/configure.pri
-+++ b/configure.pri
-@@ -1212,3 +1212,12 @@ defineTest(createConfigStatus) {
-
- QMAKE_POST_CONFIGURE += \
- "createConfigStatus()"
-+
-+# merge shared and static library trees
-+contains(CONFIG, static) {
-+ CONFIG -= shared
-+ QT_CONFIG += static jpeg gif
-+ QT_CONFIG -= shared
-+ # prevent smart library merge from messing cyclic dependency between freetype2 and harfbuzz
-+ CONFIG += no_smart_library_merge
-+}
-diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf
-index 7e027325bd..ad0db62b78 100644
---- a/mkspecs/features/default_post.prf
-+++ b/mkspecs/features/default_post.prf
-@@ -1,5 +1,16 @@
- # This file is loaded by qmake right after loading the actual project file.
-
-+win32:contains(CONFIG, static) {
-+ # Ensure defines are set correctly for static build
-+ DEFINES -= QT_SHARED
-+ DEFINES *= QT_STATIC QT_DESIGNER_STATIC
-+ contains(QT_CONFIG, angle): DEFINES *= QT_OPENGL_ES_2_ANGLE_STATIC
-+ # Ensure we link against all dependencies statically
-+ QMAKE_LFLAGS += -static -static-libstdc++ -static-libgcc
-+ # Prevent qmake from finding the prl file for shared libs
-+ QMAKE_EXT_PRL = .static.prl
-+}
-+
- contains(TEMPLATE, ".*(lib|app)"):CONFIG += have_target
-
- !have_target:!force_qt: CONFIG -= qt
-diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf
-index 3ccbbe7061..afaac3dbc4 100644
---- a/mkspecs/features/qt.prf
-+++ b/mkspecs/features/qt.prf
-@@ -255,6 +255,21 @@ for(ever) {
- !isEmpty(MODULE_WINRT_CAPABILITIES_DEVICE): \
- WINRT_MANIFEST.capabilities_device_default += $$MODULE_WINRT_CAPABILITIES_DEVICE
- }
-+
-+ # Ensure linking against all required static libraries as defined in mingw-w64-g++ mkspec
-+ win32:contains(CONFIG, static) {
-+ isEqual(MODULE_NAME, QtCore) {
-+ LIBS$$var_sfx += $$QMAKE_LIBS_CORE
-+ } else:isEqual(MODULE_NAME, QtGui) {
-+ LIBS$$var_sfx += $$QMAKE_LIBS_GUI
-+ } else:isEqual(MODULE_NAME, QtNetwork) {
-+ LIBS$$var_sfx += $$QMAKE_LIBS_NETWORK_STATIC $$QMAKE_LIBS_NETWORK
-+ } else:isEqual(MODULE_NAME, QtDBus) {
-+ LIBS$$var_sfx += $$QMAKE_LIBS_DBUS
-+ } else:isEqual(MODULE_NAME, QtOpenGL) {
-+ LIBS$$var_sfx += $$QMAKE_LIBS_OPENGL
-+ }
-+ }
- }
- !isEmpty(BAD_QT):error("Unknown module(s) in QT$$var_sfx: $$replace(BAD_QT, _private$, -private)")
-
-diff --git a/mkspecs/features/spec_pre.prf b/mkspecs/features/spec_pre.prf
-index 51ea3a8321..275e080ae4 100644
---- a/mkspecs/features/spec_pre.prf
-+++ b/mkspecs/features/spec_pre.prf
-@@ -14,9 +14,14 @@ QMAKE_EXT_H = .h .hpp .hh .hxx
- QMAKE_EXT_H_MOC = .cpp
- QMAKE_EXT_JS = .js
- QMAKE_EXT_LEX = .l
--QMAKE_EXT_LIBTOOL = .la
--QMAKE_EXT_PKGCONFIG = .pc
--QMAKE_EXT_PRL = .prl
-+QMAKE_EXT_PKGCONFIG = .pc
-+contains(CONFIG, static) {
-+ QMAKE_EXT_LIBTOOL = .static.la
-+ QMAKE_EXT_PRL = .static.prl
-+} else {
-+ QMAKE_EXT_LIBTOOL = .la
-+ QMAKE_EXT_PRL = .prl
-+}
- QMAKE_EXT_UI = .ui
- QMAKE_EXT_YACC = .y
-
-diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
-index 0d07d6c333..5e84628e72 100644
---- a/qmake/generators/makefile.cpp
-+++ b/qmake/generators/makefile.cpp
-@@ -3163,6 +3163,9 @@ MakefileGenerator::pkgConfigFileName(bool fixify, bool onlyPrependDestdir)
- if (project->isActiveConfig("debug")) {
- ret += "d";
- }
-+ if (project->isActiveConfig("staticlib")) {
-+ ret.insert(0, QStringLiteral("Static"));
-+ }
- ret += Option::pkgcfg_ext;
- QString subdir = project->first("QMAKE_PKGCONFIG_DESTDIR").toQString();
- if(!subdir.isEmpty()) {
-@@ -3336,9 +3339,9 @@ MakefileGenerator::writePkgConfigFile()
- t << endl;
-
- // requires
-- const QString requires = project->values("QMAKE_PKGCONFIG_REQUIRES").join(' ');
-- if (!requires.isEmpty()) {
-- t << "Requires: " << requires << endl;
-+ t << "Requires:";
-+ for (const auto &required : project->values("QMAKE_PKGCONFIG_REQUIRES")) {
-+ t << (project->isActiveConfig("staticlib") ? QStringLiteral(" Static") : QStringLiteral(" ")) << required.toQString();
- }
-
- t << endl;
---
-2.15.1
-
diff --git a/0023-Pull-dependencies-of-static-libraries-in-CMake-modul.patch b/0023-Pull-dependencies-of-static-libraries-in-CMake-modul.patch
deleted file mode 100644
index 0c629a18b5a7..000000000000
--- a/0023-Pull-dependencies-of-static-libraries-in-CMake-modul.patch
+++ /dev/null
@@ -1,273 +0,0 @@
-From 787ef35985d51e5ce1f48fae320c8998b29654b7 Mon Sep 17 00:00:00 2001
-From: Martchus <martchus@gmx.net>
-Date: Sun, 18 Sep 2016 18:32:00 +0200
-Subject: [PATCH 23/34] Pull dependencies of static libraries in CMake modules
-
-When doing a static build of Qt, the dependencies of the Qt
-libraries and plugins itself must be specified when linking
-the final application.
----
- .../features/data/cmake/Qt5BasicConfig.cmake.in | 148 ++++++++++++++++-----
- .../features/data/cmake/Qt5PluginTarget.cmake.in | 11 +-
- qmake/generators/makefile.cpp | 7 +
- 3 files changed, 128 insertions(+), 38 deletions(-)
-
-diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
-index 55c74aad66..b401db5ac2 100644
---- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
-+++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
-@@ -55,35 +55,52 @@ but not all the files it references.
- endmacro()
-
- !!IF !equals(TEMPLATE, aux)
--macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATION IMPLIB_LOCATION)
-- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
-+macro(_populate_$${CMAKE_MODULE_NAME}_target_properties TARGET_CONFIG LIB_LOCATION IMPLIB_LOCATION)
-+ set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${TARGET_CONFIG})
-
- !!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
- set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
- !!ELSE
- set(imported_location \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
- !!ENDIF
-+
- _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location})
-+
-+!!IF !isEmpty(CMAKE_STATIC_TYPE)
-+ if (_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES)
-+ set(_list_sep \";\")
-+ endif()
-+ set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
-+ \"INTERFACE_LINK_LIBRARIES_${TARGET_CONFIG}\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}${_list_sep}${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${TARGET_CONFIG}_LIB_DEPENDENCIES}\"
-+ \"IMPORTED_LOCATION_${TARGET_CONFIG}\" ${imported_location}
-+!!IF !isEmpty(CMAKE_LIB_SONAME)
-+ \"IMPORTED_SONAME_${TARGET_CONFIG}\" \"$${CMAKE_LIB_SONAME}\"
-+!!ENDIF
-+ # For backward compatibility with CMake < 2.8.12
-+ \"IMPORTED_LINK_INTERFACE_LIBRARIES_${TARGET_CONFIG}\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}${_list_sep}${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${TARGET_CONFIG}_LIB_DEPENDENCIES}\"
-+ )
-+!!ELSE
- set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
-- \"INTERFACE_LINK_LIBRARIES\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}\"
-- \"IMPORTED_LOCATION_${Configuration}\" ${imported_location}
-+ \"INTERFACE_LINK_LIBRARIES_${TARGET_CONFIG}\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}\"
-+ \"IMPORTED_LOCATION_${TARGET_CONFIG}\" ${imported_location}
- !!IF !isEmpty(CMAKE_LIB_SONAME)
-- \"IMPORTED_SONAME_${Configuration}\" \"$${CMAKE_LIB_SONAME}\"
-+ \"IMPORTED_SONAME_${TARGET_CONFIG}\" \"$${CMAKE_LIB_SONAME}\"
- !!ENDIF
- # For backward compatibility with CMake < 2.8.12
-- \"IMPORTED_LINK_INTERFACE_LIBRARIES_${Configuration}\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}\"
-+ \"IMPORTED_LINK_INTERFACE_LIBRARIES_${TARGET_CONFIG}\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}\"
- )
-+!!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}\")
- !!ELSE
-- set(imported_implib \"IMPORTED_IMPLIB_${Configuration}\" \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
-+ set(imported_implib \"IMPORTED_IMPLIB_${TARGET_CONFIG}\" \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
- !!ENDIF
- _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_implib})
- if(NOT \"${IMPLIB_LOCATION}\" STREQUAL \"\")
- set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
-- \"IMPORTED_IMPLIB_${Configuration}\" ${imported_implib}
-+ \"IMPORTED_IMPLIB_${TARGET_CONFIG}\" ${imported_implib}
- )
- endif()
- !!ENDIF
-@@ -227,13 +244,47 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
- !!IF !isEmpty(CMAKE_STATIC_TYPE)
- add_library(Qt5::$${CMAKE_MODULE_NAME} STATIC IMPORTED)
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY IMPORTED_LINK_INTERFACE_LANGUAGES "CXX")
-+ macro(_process_prl_file PRL_FILE_LOCATION CONFIGURATION)
-+ if (EXISTS \"${PRL_FILE_LOCATION}\")
-+ file(STRINGS \"${PRL_FILE_LOCATION}\" prl_strings REGEX \"QMAKE_PRL_LIBS_FOR_CMAKE\")
-+ string(REGEX REPLACE \"QMAKE_PRL_LIBS_FOR_CMAKE *= *([^\\n]*)\" \"\\\\1\" static_depends ${prl_strings})
-+ string(REGEX REPLACE \"\\\\$\\\\$\\\\[QT_INSTALL_LIBS\\\\]\" \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/lib\" static_depends \"${static_depends}\")
-+ string(REPLACE \"-framework;\" \"-framework \" static_depends \"${static_depends}\")
-+ if (_Qt5$${CMAKE_MODULE_NAME}_STATIC_${CONFIGURATION}_LIB_DEPENDENCIES)
-+ set(_list_sep \";\")
-+ endif()
-+ set(_Qt5$${CMAKE_MODULE_NAME}_STATIC_${CONFIGURATION}_LIB_DEPENDENCIES \"${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${CONFIGURATION}_LIB_DEPENDENCIES}${_list_sep}${static_depends}\")
-+ endif()
-+ endmacro()
-+
-+ macro(_populate_plugin_target_dependencies_from_prl_file PLUGIN_TARGET_NAME PRL_FILE_LOCATION CONFIGURATION LIB_DIRECTORY LIB_LOCATION)
-+ file(STRINGS "${PRL_FILE_LOCATION}" prl_strings REGEX "QMAKE_PRL_LIBS_FOR_CMAKE")
-+ string(REGEX REPLACE \"QMAKE_PRL_LIBS_FOR_CMAKE *= *([^\n]*)\" \"\\\\1\" static_depends ${prl_strings})
-+ string(REGEX REPLACE \"\\\\$\\\\$\\\\[QT_INSTALL_LIBS\\\\]\" \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/lib\" static_depends \"${static_depends}\")
-+ set_property(TARGET ${PLUGIN_TARGET_NAME} PROPERTY
-+ INTERFACE_LINK_LIBRARIES ${static_depends}
-+ )
-+ endmacro()
-+
-+!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
-+ _process_prl_file(\"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG)
- !!ELSE
-+ _process_prl_file(\"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG)
-+!!ENDIF
-+!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
-+ _process_prl_file(\"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE)
-+!!ELSE
-+ _process_prl_file(\"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE)
-+!!ENDIF
-+
-+!!ELSE // !isEmpty(CMAKE_STATIC_TYPE)
- !!IF equals(TEMPLATE, aux)
- add_library(Qt5::$${CMAKE_MODULE_NAME} INTERFACE IMPORTED)
- !!ELSE
- add_library(Qt5::$${CMAKE_MODULE_NAME} SHARED IMPORTED)
- !!ENDIF
--!!ENDIF
-+!!ENDIF // !isEmpty(CMAKE_STATIC_TYPE)
-+
- !!IF !equals(TEMPLATE, aux)
- !!IF !isEmpty(CMAKE_BUILD_IS_FRAMEWORK)
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY FRAMEWORK 1)
-@@ -245,6 +296,56 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY
- INTERFACE_COMPILE_DEFINITIONS $${MODULE_DEFINES})
-
-+ # Find plugin targets
-+ file(GLOB pluginTargetsMaybe \"${CMAKE_CURRENT_LIST_DIR}/*Qt5$${CMAKE_MODULE_NAME}_*.cmake\")
-+ unset(pluginTargets)
-+ if(pluginTargetsMaybe)
-+ foreach(pluginTarget ${pluginTargetsMaybe})
-+ file(STRINGS ${pluginTarget} matched REGEX Qt5$${CMAKE_MODULE_NAME}_PLUGINS)
-+ if(matched)
-+ list(APPEND pluginTargets ${pluginTarget})
-+ endif()
-+ endforeach()
-+ endif()
-+
-+ macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties TARGET_NAME PLUGIN_TARGET_NAME PLUGIN_NAME CONFIG PLUGIN_LOCATION)
-+ set_property(TARGET ${PLUGIN_TARGET_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${CONFIG})
-+
-+!!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE)
-+ set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
-+!!ELSE
-+ set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
-+!!ENDIF
-+ _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location})
-+ set_target_properties(${PLUGIN_TARGET_NAME} PROPERTIES
-+ \"IMPORTED_LOCATION_${CONFIG}\" ${imported_location}
-+ )
-+!!IF !isEmpty(CMAKE_STATIC_TYPE)
-+ set_property(TARGET ${TARGET_NAME} APPEND PROPERTY STATIC_PLUGINS ${PLUGIN_NAME})
-+ get_filename_component(_PLUGIN_DIR ${PLUGIN_LOCATION} PATH)
-+ get_filename_component(_PLUGIN_DIR_NAME ${_PLUGIN_DIR} NAME)
-+ get_filename_component(_PLUGIN_NAME ${PLUGIN_LOCATION} NAME)
-+ string(REGEX REPLACE \"^lib(.*)\\\\.a\" \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/lib/qt/plugins/${_PLUGIN_DIR_NAME}/\\\\1.static.prl\" PLUGIN_PRL_FILE_LOCATION ${_PLUGIN_NAME})
-+ if(NOT EXISTS ${PLUGIN_PRL_FILE_LOCATION})
-+ string(REGEX REPLACE \"^lib(.*)\\\\.a\" \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/lib/qt/plugins/${_PLUGIN_DIR_NAME}/\\\\1.prl\" PLUGIN_PRL_FILE_LOCATION ${_PLUGIN_NAME})
-+ endif()
-+ if(NOT EXISTS ${PLUGIN_PRL_FILE_LOCATION})
-+ string(REGEX REPLACE \"^lib(.*)\\\\.a\" \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/lib/qt/plugins/${_PLUGIN_DIR_NAME}/lib\\\\1.prl\" PLUGIN_PRL_FILE_LOCATION ${_PLUGIN_NAME})
-+ endif()
-+ if(NOT EXISTS ${PLUGIN_PRL_FILE_LOCATION})
-+ message(FATAL_ERROR "The prl file containing dependencies of static plugin ${PLUGIN_TARGET_NAME} of ${TARGET_NAME} could not be found.")
-+ endif()
-+ _populate_plugin_target_dependencies_from_prl_file(${PLUGIN_TARGET_NAME} ${PLUGIN_PRL_FILE_LOCATION} ${CONFIG} \"lib/qt/plugins\" ${PLUGIN_LOCATION})
-+!!ENDIF
-+
-+ endmacro()
-+
-+ if(pluginTargets)
-+ foreach(pluginTarget ${pluginTargets})
-+ include(${pluginTarget})
-+ endforeach()
-+ endif()
-+
- set(_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIRS_EXIST TRUE)
- foreach (_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIR ${Qt5$${CMAKE_MODULE_NAME}_OWN_PRIVATE_INCLUDE_DIRS})
- if (NOT EXISTS ${_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIR})
-@@ -336,9 +437,11 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
- !!ELSE
- \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
- !!ENDIF
-- _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
--!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
-+ _populate_$${CMAKE_MODULE_NAME}_target_properties(Qt5::$${CMAKE_MODULE_NAME} RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
- endif()
-+!!ENDIF // CMAKE_STATIC_TYPE
-+
-+
- !!ENDIF // CMAKE_RELEASE_TYPE
- !!ENDIF // CMAKE_FIND_OTHER_LIBRARY_BUILD
-
-@@ -349,29 +452,6 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
- )
- !!ENDIF // TEMPLATE != aux
-
-- file(GLOB pluginTargets \"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}_*Plugin.cmake\")
--
-- macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION)
-- 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}\")
--!!ELSE
-- set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
--!!ENDIF
-- _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location})
-- set_target_properties(Qt5::${Plugin} PROPERTIES
-- \"IMPORTED_LOCATION_${Configuration}\" ${imported_location}
-- )
-- endmacro()
--
-- if (pluginTargets)
-- foreach(pluginTarget ${pluginTargets})
-- include(${pluginTarget})
-- endforeach()
-- endif()
--
--
- !!IF !isEmpty(CMAKE_MODULE_EXTRAS)
- include(\"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}ConfigExtras.cmake\")
- !!ENDIF
-diff --git a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
-index 5baf0fdb10..ec5f3cc437 100644
---- a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
-+++ b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
-@@ -1,11 +1,14 @@
--
--add_library(Qt5::$$CMAKE_PLUGIN_NAME MODULE IMPORTED)
-+# Some Qt modules also load plugin target in extra config, so check whether the target already exists
-+if(NOT TARGET Qt5::$$CMAKE_PLUGIN_NAME)
-+ add_library(Qt5::$$CMAKE_PLUGIN_NAME MODULE IMPORTED)
-
- !!IF !isEmpty(CMAKE_RELEASE_TYPE)
--_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE}\")
-+ _populate_$${CMAKE_MODULE_NAME}_plugin_properties(Qt5::$$CMAKE_MODULE_NAME Qt5::$$CMAKE_PLUGIN_NAME $$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE}\")
- !!ENDIF
- !!IF !isEmpty(CMAKE_DEBUG_TYPE)
--_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG}\")
-+ _populate_$${CMAKE_MODULE_NAME}_plugin_properties(Qt5::$$CMAKE_MODULE_NAME Qt5::$$CMAKE_PLUGIN_NAME $$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG}\")
- !!ENDIF
-
- list(APPEND Qt5$${CMAKE_MODULE_NAME}_PLUGINS Qt5::$$CMAKE_PLUGIN_NAME)
-+
-+endif()
-diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
-index 5e84628e72..c853d52b27 100644
---- a/qmake/generators/makefile.cpp
-+++ b/qmake/generators/makefile.cpp
-@@ -998,6 +998,13 @@ MakefileGenerator::writePrlFile(QTextStream &t)
- for (ProStringList::Iterator it = libs.begin(); it != libs.end(); ++it)
- t << qv(project->values((*it).toKey()));
- t << endl;
-+ t << "QMAKE_PRL_LIBS_FOR_CMAKE = ";
-+ QString sep;
-+ for (ProStringList::Iterator it = libs.begin(); it != libs.end(); ++it) {
-+ t << sep << project->values((*it).toKey()).join(';').replace('\\', "\\\\");
-+ sep = ';';
-+ }
-+ t << endl;
- }
- }
-
---
-2.15.1
-
diff --git a/0026-Use-correct-pkg-config-static-flag.patch b/0023-Use-correct-pkg-config-static-flag.patch
index 416943aa9e61..e4988af9ef44 100644
--- a/0026-Use-correct-pkg-config-static-flag.patch
+++ b/0023-Use-correct-pkg-config-static-flag.patch
@@ -1,17 +1,17 @@
-From 1a11849c5f8ba28bb0e492df01228d57f63974ff Mon Sep 17 00:00:00 2001
+From 5654cdfaf7565e7410e6a005e9083053aa6882b6 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 18:50:21 +0200
-Subject: [PATCH 26/34] Use correct pkg-config --static flag
+Subject: [PATCH 23/31] Use correct pkg-config --static flag
---
configure.pri | 3 +++
1 file changed, 3 insertions(+)
diff --git a/configure.pri b/configure.pri
-index a05c3d98e6..8dc874a74d 100644
+index 89938dfc32..121064e1f8 100644
--- a/configure.pri
+++ b/configure.pri
-@@ -311,6 +311,9 @@ defineTest(qtConfTest_detectPkgConfig) {
+@@ -351,6 +351,9 @@ defineTest(qtConfTest_detectPkgConfig) {
qtLog("Found pkg-config from path: $$pkgConfig")
}
}
@@ -22,5 +22,5 @@ index a05c3d98e6..8dc874a74d 100644
$$qtConfEvaluate("features.cross_compile") {
# cross compiling, check that pkg-config is set up sanely
--
-2.15.1
+2.28.0
diff --git a/0027-Fix-macro-invoking-moc-rcc-and-uic.patch b/0024-Fix-macro-invoking-moc-rcc-and-uic.patch
index 11f25e842ea0..64053e971269 100644
--- a/0027-Fix-macro-invoking-moc-rcc-and-uic.patch
+++ b/0024-Fix-macro-invoking-moc-rcc-and-uic.patch
@@ -1,7 +1,7 @@
-From d585e369c2274af65dc82c53f2ec6ad16c9a124b Mon Sep 17 00:00:00 2001
+From 8394e428ad059d5ba5c647969b6f0e66178ddb53 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 4 Dec 2016 20:35:47 +0100
-Subject: [PATCH 27/34] Fix macro invoking moc, rcc and uic
+Subject: [PATCH 24/31] Fix macro invoking moc, rcc and uic
* Otherwise the arguments aren't passed correctly leading to errors like
```
@@ -18,10 +18,10 @@ Change-Id: I6fde86d0a3ade37b4376604a1eb6d5723eda8b4c
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/corelib/Qt5CoreMacros.cmake b/src/corelib/Qt5CoreMacros.cmake
-index 489bc75511..c980f4220d 100644
+index f5766f8775..2403717802 100644
--- a/src/corelib/Qt5CoreMacros.cmake
+++ b/src/corelib/Qt5CoreMacros.cmake
-@@ -132,8 +132,9 @@ function(QT5_CREATE_MOC_COMMAND infile outfile moc_flags moc_options moc_target
+@@ -153,8 +153,9 @@ function(qt5_create_moc_command infile outfile moc_flags moc_options moc_target
endif()
set(_moc_extra_parameters_file @${_moc_parameters_file})
@@ -32,7 +32,7 @@ index 489bc75511..c980f4220d 100644
DEPENDS ${infile} ${moc_depends}
${_moc_working_dir}
VERBATIM)
-@@ -251,8 +252,9 @@ function(QT5_ADD_BINARY_RESOURCES target )
+@@ -295,8 +296,9 @@ function(qt5_add_binary_resources target)
set(rc_depends ${rc_depends} ${_rc_depends})
endforeach()
@@ -41,11 +41,11 @@ index 489bc75511..c980f4220d 100644
- COMMAND ${Qt5Core_RCC_EXECUTABLE}
+ COMMAND ${RCC_LOC}
ARGS ${rcc_options} --binary --name ${target} --output ${rcc_destination} ${infiles}
- DEPENDS ${rc_depends} ${out_depends} VERBATIM)
-
-@@ -284,8 +286,9 @@ function(QT5_ADD_RESOURCES outfiles )
-
- _QT5_PARSE_QRC_FILE(${infile} _out_depends _rc_depends)
+ DEPENDS ${rc_depends} ${out_depends} ${infiles} VERBATIM)
+ add_custom_target(${target} ALL DEPENDS ${rcc_destination})
+@@ -339,8 +341,9 @@ function(qt5_add_resources outfiles)
+ _qt5_parse_qrc_file(${infile} _out_depends _rc_depends)
+ set_source_files_properties(${infile} PROPERTIES SKIP_AUTORCC ON)
+ get_target_property(MOC_LOC ${Qt5Core_RCC_EXECUTABLE} IMPORTED_LOCATION)
add_custom_command(OUTPUT ${outfile}
@@ -53,12 +53,12 @@ index 489bc75511..c980f4220d 100644
+ COMMAND ${MOC_LOC}
ARGS ${rcc_options} --name ${outfilename} --output ${outfile} ${infile}
MAIN_DEPENDENCY ${infile}
- DEPENDS ${_rc_depends} "${out_depends}" VERBATIM)
+ DEPENDS ${_rc_depends} "${_out_depends}" VERBATIM)
diff --git a/src/widgets/Qt5WidgetsMacros.cmake b/src/widgets/Qt5WidgetsMacros.cmake
-index f5e7b7f050..18d120f0c7 100644
+index 35d2a2dc54..99f061f1b8 100644
--- a/src/widgets/Qt5WidgetsMacros.cmake
+++ b/src/widgets/Qt5WidgetsMacros.cmake
-@@ -55,8 +55,9 @@ function(QT5_WRAP_UI outfiles )
+@@ -55,8 +55,9 @@ function(qt5_wrap_ui outfiles )
get_filename_component(outfile ${it} NAME_WE)
get_filename_component(infile ${it} ABSOLUTE)
set(outfile ${CMAKE_CURRENT_BINARY_DIR}/ui_${outfile}.h)
@@ -68,7 +68,7 @@ index f5e7b7f050..18d120f0c7 100644
+ COMMAND ${UIC_LOC}
ARGS ${ui_options} -o ${outfile} ${infile}
MAIN_DEPENDENCY ${infile} VERBATIM)
- list(APPEND ${outfiles} ${outfile})
+ set_source_files_properties(${infile} PROPERTIES SKIP_AUTOUIC ON)
--
-2.15.1
+2.28.0
diff --git a/0028-Ignore-errors-about-missing-feature-static.patch b/0025-Ignore-errors-about-missing-feature-static.patch
index 82a4e0311a7b..e1fed849db61 100644
--- a/0028-Ignore-errors-about-missing-feature-static.patch
+++ b/0025-Ignore-errors-about-missing-feature-static.patch
@@ -1,7 +1,7 @@
-From b605147e73b0b0c36bfd21b94920310b7279898f Mon Sep 17 00:00:00 2001
+From ab4f998fa0c472b0f1c3b6ec84e505cfe2b8a94d Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Wed, 25 Jan 2017 20:59:54 +0100
-Subject: [PATCH 28/34] Ignore errors about missing feature static
+Subject: [PATCH 25/31] Ignore errors about missing feature static
Not sure why this error occurs, let's hope for the best
---
@@ -10,10 +10,10 @@ Not sure why this error occurs, let's hope for the best
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/mkspecs/features/qt_build_config.prf b/mkspecs/features/qt_build_config.prf
-index 76e1d15319..9a1c5cd8b6 100644
+index 511b158b91..39760d5ce4 100644
--- a/mkspecs/features/qt_build_config.prf
+++ b/mkspecs/features/qt_build_config.prf
-@@ -138,5 +138,5 @@ defineTest(qtConfig) {
+@@ -153,5 +153,5 @@ defineTest(qtConfig) {
contains(QT.$${module}.disabled_features, $$1): \
return(false)
}
@@ -21,10 +21,10 @@ index 76e1d15319..9a1c5cd8b6 100644
+ !equals($$1, "static"): error("Could not find feature $${1}.")
}
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
-index 1903e509c8..1fcb597fa3 100644
+index 7777e615bd..5f30366660 100644
--- a/mkspecs/features/qt_functions.prf
+++ b/mkspecs/features/qt_functions.prf
-@@ -348,5 +348,5 @@ defineTest(qtConfig) {
+@@ -370,5 +370,5 @@ defineTest(qtConfig) {
contains(QT.$${module}.disabled_features, $$1): \
return(false)
}
@@ -32,5 +32,5 @@ index 1903e509c8..1fcb597fa3 100644
+ !equals($$1, "static"): error("Could not find feature $${1}.")
}
--
-2.15.1
+2.28.0
diff --git a/0029-Enable-and-fix-use-of-iconv.patch b/0026-Enable-and-fix-use-of-iconv.patch
index b7847ff8168c..95407e467026 100644
--- a/0029-Enable-and-fix-use-of-iconv.patch
+++ b/0026-Enable-and-fix-use-of-iconv.patch
@@ -1,33 +1,19 @@
-From 8be581dab1e7b0ebba897ccd5d3c71a7e4c9b74b Mon Sep 17 00:00:00 2001
+From 6a90a8a3b0d86865419cdd9f6e1a9a581cd8fc9c Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Wed, 25 Jan 2017 21:08:20 +0100
-Subject: [PATCH 29/34] Enable and fix use of iconv
+Subject: [PATCH 26/31] Enable and fix use of iconv
Change-Id: I5f0ab27afca0800dec11c7af74d196190820ae5c
---
- config.tests/gnu-libiconv/gnu-libiconv.cpp | 2 +-
- src/corelib/codecs/qiconvcodec.cpp | 7 +++----
- src/corelib/configure.json | 4 ++--
- 3 files changed, 6 insertions(+), 7 deletions(-)
+ src/corelib/codecs/qiconvcodec.cpp | 7 +++----
+ src/corelib/configure.json | 6 +++---
+ 2 files changed, 6 insertions(+), 7 deletions(-)
-diff --git a/config.tests/gnu-libiconv/gnu-libiconv.cpp b/config.tests/gnu-libiconv/gnu-libiconv.cpp
-index fe4b87b923..be4236436f 100644
---- a/config.tests/gnu-libiconv/gnu-libiconv.cpp
-+++ b/config.tests/gnu-libiconv/gnu-libiconv.cpp
-@@ -43,7 +43,7 @@ int main(int, char **)
- {
- iconv_t x = iconv_open("", "");
-
-- const char *inp;
-+ char *inp;
- char *outp;
- size_t inbytes, outbytes;
- iconv(x, &inp, &inbytes, &outp, &outbytes);
diff --git a/src/corelib/codecs/qiconvcodec.cpp b/src/corelib/codecs/qiconvcodec.cpp
-index d6362b6fbc..4da4546a24 100644
+index 9c39727946..cc14036b25 100644
--- a/src/corelib/codecs/qiconvcodec.cpp
+++ b/src/corelib/codecs/qiconvcodec.cpp
-@@ -49,7 +49,6 @@ QT_REQUIRE_CONFIG(iconv);
+@@ -47,7 +47,6 @@
#include <errno.h>
#include <locale.h>
#include <stdio.h>
@@ -35,7 +21,7 @@ index d6362b6fbc..4da4546a24 100644
// unistd.h is needed for the _XOPEN_UNIX macro
#include <unistd.h>
-@@ -182,7 +181,7 @@ QString QIconvCodec::convertToUnicode(const char* chars, int len, ConverterState
+@@ -180,7 +179,7 @@ QString QIconvCodec::convertToUnicode(const char* chars, int len, ConverterState
IconvState *state = *pstate;
size_t inBytesLeft = len;
// best case assumption, each byte is converted into one UTF-16 character, plus 2 bytes for the BOM
@@ -44,7 +30,7 @@ index d6362b6fbc..4da4546a24 100644
// GNU doesn't disagree with POSIX :/
const char *inBytes = chars;
#else
-@@ -281,7 +280,7 @@ static bool setByteOrder(iconv_t cd)
+@@ -279,7 +278,7 @@ static bool setByteOrder(iconv_t cd)
size_t outBytesLeft = sizeof buf;
size_t inBytesLeft = sizeof bom;
@@ -53,7 +39,7 @@ index d6362b6fbc..4da4546a24 100644
const char **inBytesPtr = const_cast<const char **>(&inBytes);
#else
char **inBytesPtr = &inBytes;
-@@ -303,7 +302,7 @@ QByteArray QIconvCodec::convertFromUnicode(const QChar *uc, int len, ConverterSt
+@@ -301,7 +300,7 @@ QByteArray QIconvCodec::convertFromUnicode(const QChar *uc, int len, ConverterSt
char *outBytes;
size_t inBytesLeft;
@@ -63,10 +49,19 @@ index d6362b6fbc..4da4546a24 100644
#else
char **inBytesPtr = &inBytes;
diff --git a/src/corelib/configure.json b/src/corelib/configure.json
-index bf44f2649d..90f0450902 100644
+index c5e0423273..0b12e22351 100644
--- a/src/corelib/configure.json
+++ b/src/corelib/configure.json
-@@ -521,9 +521,9 @@
+@@ -72,7 +72,7 @@
+ "test": {
+ "main": [
+ "iconv_t x = iconv_open(\"\", \"\");",
+- "const char *inp;",
++ "char *inp;",
+ "char *outp;",
+ "size_t inbytes, outbytes;",
+ "iconv(x, &inp, &inbytes, &outp, &outbytes);",
+@@ -673,9 +673,9 @@
},
"gnu-libiconv": {
"label": "GNU iconv",
@@ -79,5 +74,5 @@ index bf44f2649d..90f0450902 100644
},
"icu": {
--
-2.15.1
+2.28.0
diff --git a/0030-Ignore-failing-pkg-config-test.patch b/0027-Ignore-failing-pkg-config-test.patch
index 7919bf47487e..a47da0c5b0a1 100644
--- a/0030-Ignore-failing-pkg-config-test.patch
+++ b/0027-Ignore-failing-pkg-config-test.patch
@@ -1,7 +1,7 @@
-From 69ce42a2cc5631a99b78c0468d0a4e8f2cb856f4 Mon Sep 17 00:00:00 2001
+From ba1da244bc63546bf22b7f4be8164c8c63917510 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Wed, 25 Jan 2017 21:08:48 +0100
-Subject: [PATCH 30/34] Ignore failing pkg-config test
+Subject: [PATCH 27/31] Ignore failing pkg-config test
Didn't investigate why it fails, let's hope for the best
---
@@ -9,10 +9,10 @@ Didn't investigate why it fails, let's hope for the best
1 file changed, 1 deletion(-)
diff --git a/configure.json b/configure.json
-index d668ce0c98..2d36a60cd3 100644
+index bde226843b..653ed122d9 100644
--- a/configure.json
+++ b/configure.json
-@@ -725,7 +725,6 @@
+@@ -770,7 +770,6 @@
"pkg-config": {
"label": "Using pkg-config",
"autoDetect": "!config.darwin && !config.win32",
@@ -21,5 +21,5 @@ index d668ce0c98..2d36a60cd3 100644
"publicFeature",
{ "type": "publicQtConfig", "negative": true },
--
-2.15.1
+2.28.0
diff --git a/0031-Prevent-qmake-from-messing-static-lib-dependencies.patch b/0028-Prevent-qmake-from-messing-static-lib-dependencies.patch
index 99e6033303b4..819fb97a7b25 100644
--- a/0031-Prevent-qmake-from-messing-static-lib-dependencies.patch
+++ b/0028-Prevent-qmake-from-messing-static-lib-dependencies.patch
@@ -1,43 +1,45 @@
-From 51684a7002b3da41428107ca80b8c360ce00c0b8 Mon Sep 17 00:00:00 2001
+From c5a084e56a5c766909c6513e673ec5fbb2fde4c6 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Tue, 7 Feb 2017 18:25:28 +0100
-Subject: [PATCH 31/34] Prevent qmake from messing static lib dependencies
+Subject: [PATCH 28/31] Prevent qmake from messing static lib dependencies
In particular, it messes resolving cyclic dependency between
static freetype2 and harfbuzz
+
+Change-Id: Ie5a4e2ad96bd613ae4c26486edb30c74929459b0
---
qmake/generators/unix/unixmake.cpp | 3 +++
qmake/generators/win32/winmakefile.cpp | 3 +++
2 files changed, 6 insertions(+)
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp
-index 30f99174f8..154edd67d4 100644
+index f7bd6dc663..b76c444012 100644
--- a/qmake/generators/unix/unixmake.cpp
+++ b/qmake/generators/unix/unixmake.cpp
-@@ -414,6 +414,9 @@ UnixMakefileGenerator::fixLibFlag(const ProString &lib)
+@@ -391,6 +391,9 @@ UnixMakefileGenerator::fixLibFlag(const ProString &lib)
bool
UnixMakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags)
{
+ if(project->isActiveConfig("staticlib")) {
+ return false; // prevent qmake from messing static lib dependencies
+ }
- QList<QMakeLocalFileName> libdirs, frameworkdirs;
+ QVector<QMakeLocalFileName> libdirs, frameworkdirs;
int libidx = 0, fwidx = 0;
for (const ProString &dlib : project->values("QMAKE_DEFAULT_LIBDIRS"))
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
-index 2e6d5d94a9..a8320bae09 100644
+index 03732df4a8..602f7609f5 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
-@@ -87,6 +87,9 @@ Win32MakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags)
- impexts.append(project->values("QMAKE_EXTENSION_IMPORTLIB"));
- impexts.append(project->values("QMAKE_EXTENSION_STATICLIB"));
- }
-+ if(project->isActiveConfig("staticlib")) {
-+ return false; // prevent qmake from messing static lib dependencies
-+ }
- QList<QMakeLocalFileName> dirs;
- static const char * const lflags[] = { "QMAKE_LIBS", "QMAKE_LIBS_PRIVATE", 0 };
- for (int i = 0; lflags[i]; i++) {
+@@ -106,6 +106,9 @@ Win32MakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags)
+ impexts.append(project->values("QMAKE_EXTENSION_IMPORTLIB"));
+ impexts.append(project->values("QMAKE_EXTENSION_STATICLIB"));
+ }
++ if(project->isActiveConfig("staticlib")) {
++ return false; // prevent qmake from messing static lib dependencies
++ }
+ QVector<LibrarySearchPath> dirs;
+ int libidx = 0;
+ for (const ProString &dlib : project->values("QMAKE_DEFAULT_LIBDIRS"))
--
-2.15.1
+2.28.0
diff --git a/0029-Hardcode-linker-flags-for-platform-plugins.patch b/0029-Hardcode-linker-flags-for-platform-plugins.patch
new file mode 100644
index 000000000000..54d6ba0404ab
--- /dev/null
+++ b/0029-Hardcode-linker-flags-for-platform-plugins.patch
@@ -0,0 +1,176 @@
+From 29c9cbb846b7c55894d95ceeffea80ce1485f03e Mon Sep 17 00:00:00 2001
+From: Martchus <martchus@gmx.net>
+Date: Wed, 25 Jan 2017 23:42:30 +0100
+Subject: [PATCH 29/31] Hardcode linker flags for platform plugins
+
+Otherwise incorrect order of libs leads to errors
+when building libqminimal.dll, libqoffscreen.dll,
+libqwindows.dll and libqdirect2d.dll
+
+Change-Id: Ibff901ecce864ae8d5ca2adbe37bcec28e5912f3
+---
+ src/plugins/platforms/direct2d/direct2d.pro | 39 +++++++++++++++---
+ src/plugins/platforms/minimal/minimal.pro | 17 +++++++-
+ src/plugins/platforms/offscreen/offscreen.pro | 16 +++++++-
+ src/plugins/platforms/windows/windows.pro | 40 ++++++++++++++-----
+ 4 files changed, 93 insertions(+), 19 deletions(-)
+
+diff --git a/src/plugins/platforms/direct2d/direct2d.pro b/src/plugins/platforms/direct2d/direct2d.pro
+index 6e73bd14f9..0829c75bd2 100644
+--- a/src/plugins/platforms/direct2d/direct2d.pro
++++ b/src/plugins/platforms/direct2d/direct2d.pro
+@@ -1,12 +1,41 @@
+ TARGET = qdirect2d
+
+ QT += \
+- core-private gui-private \
+- eventdispatcher_support-private \
+- fontdatabase_support-private theme_support-private
++ core-private gui-private
+
+-qtConfig(accessibility): QT += accessibility_support-private
+-qtConfig(vulkan): QT += vulkan_support-private
++# Fix linker error when building libqdirect2d.dll by specifying linker flags for
++# required modules manually (otherwise order is messed)
++LIBS += \
++ $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5EventDispatcherSupport.$${QMAKE_EXTENSION_STATICLIB} \
++ $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5FontDatabaseSupport.$${QMAKE_EXTENSION_STATICLIB} \
++ $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5ThemeSupport.$${QMAKE_EXTENSION_STATICLIB} \
++ -lfreetype -lole32 -lgdi32 -luuid
++# However, this workaround leads to the necessity of specifying include dirs manually
++INCLUDEPATH += \
++ $$QT_SOURCE_TREE/include/QtEventDispatcherSupport/$${QT_VERSION}/QtEventDispatcherSupport \
++ $$QT_SOURCE_TREE/include/QtEventDispatcherSupport/$${QT_VERSION} \
++ $$QT_SOURCE_TREE/include/QtFontDatabaseSupport/$${QT_VERSION}/QtFontDatabaseSupport \
++ $$QT_SOURCE_TREE/include/QtFontDatabaseSupport/$${QT_VERSION} \
++ $$QT_SOURCE_TREE/include/QtThemeSupport/$${QT_VERSION}/QtThemeSupport \
++ $$QT_SOURCE_TREE/include/QtThemeSupport/$${QT_VERSION}
++# Same for private support libs for accessibility and vulkan, if those are enabled
++qtConfig(accessibility) {
++ LIBS += $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5AccessibilitySupport.$${QMAKE_EXTENSION_STATICLIB}
++ INCLUDEPATH += \
++ $$QT_SOURCE_TREE/include/QtAccessibilitySupport/$${QT_VERSION}/Qt5AccessibilitySupport \
++ $$QT_SOURCE_TREE/include/QtAccessibilitySupport/$${QT_VERSION}
++}
++qtConfig(vulkan) {
++ LIBS += $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5VulkanSupport.$${QMAKE_EXTENSION_STATICLIB}
++ INCLUDEPATH += \
++ $$QT_SOURCE_TREE/include/QtVulkanSupport/$${QT_VERSION}/Qt5VulkanSupport \
++ $$QT_SOURCE_TREE/include/QtVulkanSupport/$${QT_VERSION}
++}
++# Also add Qt5WindowsUIAutomationSupport - it seems to link against it
++LIBS += $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5WindowsUIAutomationSupport.$${QMAKE_EXTENSION_STATICLIB}
++INCLUDEPATH += \
++ $$QT_SOURCE_TREE/include/Qt5WindowsUIAutomationSupport/$${QT_VERSION}/Qt5WindowsUIAutomationSupport \
++ $$QT_SOURCE_TREE/include/Qt5WindowsUIAutomationSupport/$${QT_VERSION}
+
+ LIBS += -ldwmapi -lversion
+ QMAKE_USE_PRIVATE += gdi32 dwrite_1 d2d1_1 d3d11_1 dxgi1_2
+diff --git a/src/plugins/platforms/minimal/minimal.pro b/src/plugins/platforms/minimal/minimal.pro
+index a1a2da547b..74ced58662 100644
+--- a/src/plugins/platforms/minimal/minimal.pro
++++ b/src/plugins/platforms/minimal/minimal.pro
+@@ -1,8 +1,21 @@
+ TARGET = qminimal
+
+ QT += \
+- core-private gui-private \
+- eventdispatcher_support-private fontdatabase_support-private
++ core-private gui-private
++
++# Fix linker error when building libqminimal.dll by specifying linker flags for
++# required modules manually (otherwise order is messed)
++LIBS += \
++ $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5EventDispatcherSupport.$${QMAKE_EXTENSION_STATICLIB} \
++ $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5FontDatabaseSupport.$${QMAKE_EXTENSION_STATICLIB} \
++ -lfreetype -lole32 -lgdi32 -luuid
++# However, this workaround leads to the necessity of specifying include dirs manually
++INCLUDEPATH += \
++ $$QT_SOURCE_TREE/include/QtEventDispatcherSupport/$${QT_VERSION}/QtEventDispatcherSupport \
++ $$QT_SOURCE_TREE/include/QtEventDispatcherSupport/$${QT_VERSION} \
++ $$QT_SOURCE_TREE/include/QtFontDatabaseSupport/$${QT_VERSION}/QtFontDatabaseSupport \
++ $$QT_SOURCE_TREE/include/QtFontDatabaseSupport/$${QT_VERSION}
++
+
+ DEFINES += QT_NO_FOREACH
+
+diff --git a/src/plugins/platforms/offscreen/offscreen.pro b/src/plugins/platforms/offscreen/offscreen.pro
+index f226132592..cac8a007b8 100644
+--- a/src/plugins/platforms/offscreen/offscreen.pro
++++ b/src/plugins/platforms/offscreen/offscreen.pro
+@@ -1,8 +1,20 @@
+ TARGET = qoffscreen
+
+ QT += \
+- core-private gui-private \
+- eventdispatcher_support-private fontdatabase_support-private
++ core-private gui-private
++
++# Fix linker error when building libqoffscreen.dll by specifying linker flags for
++# required modules manually (otherwise order is messed)
++LIBS += \
++ $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5EventDispatcherSupport.$${QMAKE_EXTENSION_STATICLIB} \
++ $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5FontDatabaseSupport.$${QMAKE_EXTENSION_STATICLIB} \
++ -lfreetype -lole32 -lgdi32 -luuid
++# However, this workaround leads to the necessity of specifying include dirs manually
++INCLUDEPATH += \
++ $$QT_SOURCE_TREE/include/QtEventDispatcherSupport/$${QT_VERSION}/QtEventDispatcherSupport \
++ $$QT_SOURCE_TREE/include/QtEventDispatcherSupport/$${QT_VERSION} \
++ $$QT_SOURCE_TREE/include/QtFontDatabaseSupport/$${QT_VERSION}/QtFontDatabaseSupport \
++ $$QT_SOURCE_TREE/include/QtFontDatabaseSupport/$${QT_VERSION}
+
+ DEFINES += QT_NO_FOREACH
+
+diff --git a/src/plugins/platforms/windows/windows.pro b/src/plugins/platforms/windows/windows.pro
+index 50a3bb41a9..53c011642f 100644
+--- a/src/plugins/platforms/windows/windows.pro
++++ b/src/plugins/platforms/windows/windows.pro
+@@ -1,15 +1,35 @@
+ TARGET = qwindows
+
+-QT += \
+- core-private gui-private \
+- eventdispatcher_support-private \
+- fontdatabase_support-private theme_support-private
+-
+-qtConfig(accessibility): QT += accessibility_support-private
+-qtConfig(vulkan): QT += vulkan_support-private
+-
+-LIBS += -ldwmapi
+-QMAKE_USE_PRIVATE += gdi32
++QT += core-private gui-private
++
++# Fix linker error when building libqwindows.dll by specifying linker flags for
++# required modules manually (otherwise order is messed)
++LIBS += \
++ $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5EventDispatcherSupport.$${QMAKE_EXTENSION_STATICLIB} \
++ $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5FontDatabaseSupport.$${QMAKE_EXTENSION_STATICLIB} \
++ $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5ThemeSupport.$${QMAKE_EXTENSION_STATICLIB} \
++ -lfreetype -lole32 -lgdi32 -ldwmapi
++# However, this workaround leads to the necessity of specifying include dirs manually
++INCLUDEPATH += \
++ $$QT_SOURCE_TREE/include/QtEventDispatcherSupport/$${QT_VERSION}/QtEventDispatcherSupport \
++ $$QT_SOURCE_TREE/include/QtEventDispatcherSupport/$${QT_VERSION} \
++ $$QT_SOURCE_TREE/include/QtFontDatabaseSupport/$${QT_VERSION}/QtFontDatabaseSupport \
++ $$QT_SOURCE_TREE/include/QtFontDatabaseSupport/$${QT_VERSION} \
++ $$QT_SOURCE_TREE/include/QtThemeSupport/$${QT_VERSION}/QtThemeSupport \
++ $$QT_SOURCE_TREE/include/QtThemeSupport/$${QT_VERSION}
++# Same for private support libs for accessibility and vulkan, if those are enabled
++qtConfig(accessibility) {
++ LIBS += $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5AccessibilitySupport.$${QMAKE_EXTENSION_STATICLIB}
++ INCLUDEPATH += \
++ $$QT_SOURCE_TREE/include/QtAccessibilitySupport/$${QT_VERSION}/Qt5AccessibilitySupport \
++ $$QT_SOURCE_TREE/include/QtAccessibilitySupport/$${QT_VERSION}
++}
++qtConfig(vulkan) {
++ LIBS += $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5VulkanSupport.$${QMAKE_EXTENSION_STATICLIB}
++ INCLUDEPATH += \
++ $$QT_SOURCE_TREE/include/QtVulkanSupport/$${QT_VERSION}/Qt5VulkanSupport \
++ $$QT_SOURCE_TREE/include/QtVulkanSupport/$${QT_VERSION}
++}
+
+ include(windows.pri)
+
+--
+2.28.0
+
diff --git a/0033-Fix-linking-against-static-plugins-with-qmake.patch b/0030-Fix-linking-against-static-plugins-with-qmake.patch
index f8bc05fe408f..88595eea8e03 100644
--- a/0033-Fix-linking-against-static-plugins-with-qmake.patch
+++ b/0030-Fix-linking-against-static-plugins-with-qmake.patch
@@ -1,7 +1,7 @@
-From ba94765c0830e114e7b1cd269a04e8abac1ecd6a Mon Sep 17 00:00:00 2001
+From ed933add3678150e845c63523cee9c09f02538fd Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Fri, 25 Aug 2017 17:07:17 +0200
-Subject: [PATCH 33/34] Fix linking against static plugins with qmake
+Subject: [PATCH 30/31] Fix linking against static plugins with qmake
Required because qtConfig(static) does not work
with 'Merge shared and static library trees'
@@ -11,10 +11,10 @@ approach
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf
-index afaac3dbc4..82b02b5113 100644
+index b79b324b88..6a03b7a74b 100644
--- a/mkspecs/features/qt.prf
+++ b/mkspecs/features/qt.prf
-@@ -65,7 +65,7 @@ all_qt_module_deps = $$resolve_depends(qt_module_deps, "QT.", ".depends" ".run_d
+@@ -69,7 +69,7 @@ all_qt_module_deps = $$resolve_depends(qt_module_deps, "QT.", ".depends" ".run_d
QTPLUGIN = $$unique($$list($$lower($$QTPLUGIN)))
@@ -23,7 +23,7 @@ index afaac3dbc4..82b02b5113 100644
manualplugs = $$QTPLUGIN # User may specify plugins. Mostly legacy.
autoplugs = # Auto-added plugins.
# First round: explicitly specified modules.
-@@ -135,7 +135,7 @@ import_plugins:qtConfig(static) {
+@@ -142,7 +142,7 @@ import_plugins:qtConfig(static) {
}
# Only link against plugins in static builds
@@ -33,5 +33,5 @@ index afaac3dbc4..82b02b5113 100644
# Check if the plugin is known to Qt. We can use this to determine
# the plugin path. Unknown plugins must rely on the default link path.
--
-2.15.1
+2.28.0
diff --git a/0031-Prevent-Cannot-find-feature-windows_vulkan_sdk.patch b/0031-Prevent-Cannot-find-feature-windows_vulkan_sdk.patch
new file mode 100644
index 000000000000..6e3084dd75a3
--- /dev/null
+++ b/0031-Prevent-Cannot-find-feature-windows_vulkan_sdk.patch
@@ -0,0 +1,37 @@
+From e6dce973da0d16d725107c4c8b78ec3f4134b056 Mon Sep 17 00:00:00 2001
+From: Martchus <martchus@gmx.net>
+Date: Mon, 24 Jun 2019 13:51:02 +0200
+Subject: [PATCH 31/31] Prevent 'Cannot find feature windows_vulkan_sdk'
+
+See https://bugreports.qt.io/browse/QTBUG-76660
+---
+ mkspecs/common/windows-vulkan.conf | 2 +-
+ mkspecs/features/qmake_use.prf | 4 +++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/mkspecs/common/windows-vulkan.conf b/mkspecs/common/windows-vulkan.conf
+index da061422dc..a5a8ec68d2 100644
+--- a/mkspecs/common/windows-vulkan.conf
++++ b/mkspecs/common/windows-vulkan.conf
+@@ -1,2 +1,2 @@
+-load(windows_vulkan_sdk)
++load(win32/windows_vulkan_sdk)
+ QMAKE_LIBS_VULKAN =
+diff --git a/mkspecs/features/qmake_use.prf b/mkspecs/features/qmake_use.prf
+index 8475e4111a..c0eb8faa17 100644
+--- a/mkspecs/features/qmake_use.prf
++++ b/mkspecs/features/qmake_use.prf
+@@ -15,7 +15,9 @@ for(ever) {
+ error("Library '$$lower($$replace(nu, _, -))' is not defined.")
+
+ DEFINES += $$eval(QMAKE_DEFINES_$${nu})
+- INCLUDEPATH += $$eval(QMAKE_INCDIR_$${nu})
++ incdir = $$eval(QMAKE_INCDIR_$${nu})
++ !contains(QMAKE_DEFAULT_INCDIRS, $$incdir): \
++ INCLUDEPATH += $$incdir
+ }
+ LD_USES = $$resolve_depends(LD_USES, QMAKE_DEPENDS_, _LD)
+ for (nu, LD_USES) {
+--
+2.28.0
+
diff --git a/0032-Hardcode-linker-flags-for-platform-plugins.patch b/0032-Hardcode-linker-flags-for-platform-plugins.patch
deleted file mode 100644
index 55c83356db49..000000000000
--- a/0032-Hardcode-linker-flags-for-platform-plugins.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-From dd8af708953214aee7128b6448a98fdbea123cd1 Mon Sep 17 00:00:00 2001
-From: Martchus <martchus@gmx.net>
-Date: Wed, 25 Jan 2017 23:42:30 +0100
-Subject: [PATCH 32/34] Hardcode linker flags for platform plugins
-
-Otherwise incorrect order of libs leads to errors
-when building libqminimal.dll, libqoffscreen.dll
-and libqwindows.dll
----
- src/plugins/platforms/minimal/minimal.pro | 15 +++++++++++--
- src/plugins/platforms/offscreen/offscreen.pro | 14 ++++++++++--
- src/plugins/platforms/windows/windows.pro | 32 +++++++++++++++++++--------
- 3 files changed, 48 insertions(+), 13 deletions(-)
-
-diff --git a/src/plugins/platforms/minimal/minimal.pro b/src/plugins/platforms/minimal/minimal.pro
-index 8cfb68824e..46834a71fc 100644
---- a/src/plugins/platforms/minimal/minimal.pro
-+++ b/src/plugins/platforms/minimal/minimal.pro
-@@ -1,8 +1,19 @@
- TARGET = qminimal
-
- QT += \
-- core-private gui-private \
-- eventdispatcher_support-private fontdatabase_support-private
-+ core-private gui-private
-+
-+# Fix linker error when building libqminimal.dll by specifying linker flags for
-+# required modules manually (otherwise order is messed)
-+LIBS += \
-+ -lQt5EventDispatcherSupport \
-+ -lQt5FontDatabaseSupport \
-+ -lfreetype -lole32 -lgdi32 -luuid
-+# However, this workaround leads to the necessity of specifying include dirs manually
-+INCLUDEPATH += \
-+ $$QT_SOURCE_TREE/include/QtEventDispatcherSupport/$${QT_VERSION} \
-+ $$QT_SOURCE_TREE/include/QtFontDatabaseSupport/$${QT_VERSION}
-+
-
- DEFINES += QT_NO_FOREACH
-
-diff --git a/src/plugins/platforms/offscreen/offscreen.pro b/src/plugins/platforms/offscreen/offscreen.pro
-index 6652cefd86..a322b17cc5 100644
---- a/src/plugins/platforms/offscreen/offscreen.pro
-+++ b/src/plugins/platforms/offscreen/offscreen.pro
-@@ -1,8 +1,18 @@
- TARGET = qoffscreen
-
- QT += \
-- core-private gui-private \
-- eventdispatcher_support-private fontdatabase_support-private
-+ core-private gui-private
-+
-+# Fix linker error when building libqoffscreen.dll by specifying linker flags for
-+# required modules manually (otherwise order is messed)
-+LIBS += \
-+ -lQt5EventDispatcherSupport \
-+ -lQt5FontDatabaseSupport \
-+ -lfreetype -lole32 -lgdi32 -luuid
-+# However, this workaround leads to the necessity of specifying include dirs manually
-+INCLUDEPATH += \
-+ $$QT_SOURCE_TREE/include/QtEventDispatcherSupport/$${QT_VERSION} \
-+ $$QT_SOURCE_TREE/include/QtFontDatabaseSupport/$${QT_VERSION}
-
- DEFINES += QT_NO_FOREACH
-
-diff --git a/src/plugins/platforms/windows/windows.pro b/src/plugins/platforms/windows/windows.pro
-index 174bc7b609..e66488e364 100644
---- a/src/plugins/platforms/windows/windows.pro
-+++ b/src/plugins/platforms/windows/windows.pro
-@@ -1,14 +1,28 @@
- TARGET = qwindows
-
--QT += \
-- core-private gui-private \
-- eventdispatcher_support-private \
-- fontdatabase_support-private theme_support-private
--
--qtConfig(accessibility): QT += accessibility_support-private
--qtConfig(vulkan): QT += vulkan_support-private
--
--LIBS += -lgdi32 -ldwmapi
-+QT += core-private gui-private
-+
-+# Fix linker error when building libqwindows.dll by specifying linker flags for
-+# required modules manually (otherwise order is messed)
-+LIBS += \
-+ -lQt5EventDispatcherSupport \
-+ -lQt5FontDatabaseSupport \
-+ -lQt5ThemeSupport \
-+ -lfreetype -lole32 -lgdi32 -ldwmapi
-+# However, this workaround leads to the necessity of specifying include dirs manually
-+INCLUDEPATH += \
-+ $$QT_SOURCE_TREE/include/QtEventDispatcherSupport/$${QT_VERSION} \
-+ $$QT_SOURCE_TREE/include/QtFontDatabaseSupport/$${QT_VERSION} \
-+ $$QT_SOURCE_TREE/include/QtThemeSupport/$${QT_VERSION}
-+# Same for private support libs for accessibility and vulkan, if those are enabled
-+qtConfig(accessibility) {
-+ LIBS += -lQt5AccessibilitySupport
-+ INCLUDEPATH += $$QT_SOURCE_TREE/include/QtAccessibilitySupport/$${QT_VERSION}
-+}
-+qtConfig(vulkan) {
-+ LIBS += -lQt5VulkanSupport
-+ INCLUDEPATH += $$QT_SOURCE_TREE/include/QtVulkanSupport/$${QT_VERSION}
-+}
-
- include(windows.pri)
-
---
-2.15.1
-
diff --git a/0034-Don-t-use-the-statx-syscall.patch b/0034-Don-t-use-the-statx-syscall.patch
deleted file mode 100644
index bbb8ef8179c7..000000000000
--- a/0034-Don-t-use-the-statx-syscall.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 06c69dbc4aa16012b8ab05b586fb2e261405a037 Mon Sep 17 00:00:00 2001
-From: Martchus <martchus@gmx.net>
-Date: Sat, 9 Dec 2017 00:36:56 +0100
-Subject: [PATCH 34/34] Don't use the statx syscall
-
-Otherwise Qt can not be built in a systemd
-container
----
- src/corelib/io/qfilesystemengine_unix.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp
-index 77d154c6b4..6036bae4f1 100644
---- a/src/corelib/io/qfilesystemengine_unix.cpp
-+++ b/src/corelib/io/qfilesystemengine_unix.cpp
-@@ -95,7 +95,7 @@ static int renameat2(int oldfd, const char *oldpath, int newfd, const char *newp
- { return syscall(SYS_renameat2, oldfd, oldpath, newfd, newpath, flags); }
- # endif
-
--# if !QT_CONFIG(statx) && defined(SYS_statx) && QT_HAS_INCLUDE(<linux/stat.h>)
-+# if 0
- # include <linux/stat.h>
- static int statx(int dirfd, const char *pathname, int flag, unsigned mask, struct statx *statxbuf)
- { return syscall(SYS_statx, dirfd, pathname, flag, mask, statxbuf); }
---
-2.15.1
-
diff --git a/PKGBUILD b/PKGBUILD
index 22ca21881756..cf0ae969071b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,246 +3,144 @@
# Contributor: Filip Brcic <brcha@gna.org>
# Contributor: jellysheep <max.mail@dameweb.de>
+# BEFORE COMMENTING OR REPORING ISSUES, PLEASE READ THE FILE `README.md` IN THIS REPOSITORY.
+# ALSO HAVE A LOOK AT THE COMMENTS IN THE AUR.
+
+# DOES NOT WORK YET, see comment in build() function
+
# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where
# you also find the URL of a binary repository.
-# All patches are managed at https://github.com/Martchus/qtbase
+# This file is created from PKGBUILD.sh.ep contained by the mentioned repository.
+# Do not edit it manually! See README.md in the repository's root directory
+# for more information.
-# There are different variants of the package which can be selected by simply adjusting pkgname:
-# - mingw-w64-qt5-base or mingw-w64-qt5-base-opengl: using native OpenGL
-# - mingw-w64-qt5-base-angle: using ANGLE rather than native OpenGL
-# - mingw-w64-qt5-base-dynamic: allows choosing between ANGLE and native OpenGL dynamically at runtime
-# - mingw-w64-qt5-base-noopenql: no OpenGL support
-# The variants are conflicting (and hence can not be installed at the same time).
-# See also: http://doc.qt.io/qt-5/windows-requirements.html#dynamically-loading-graphics-drivers
-
-# The variants listed above only contain dynamic libraries. For building static libraries
-# just append '-static' to the package name, eg. mingw-w64-qt5-base-static or mingw-w64-qt5-base-angle-static.
-# The static variants rely on the corresponding dynamic variant for headers and tools.
-# I only tested the static variant using native OpenGL so far (mingw-w64-qt5-base-static).
-# Note that ANGLE will still be loaded as dynamic library in mingw-w64-qt5-base-dynamic-static.
-
-# By default CMake and qmake will link against the dynamic Qt libraries.
-
-# To use the static Qt libraries with CMake prepend the Qt module name with Static:
-# eg. find_package(Qt5Core) becomes find_package(StaticQt5Core)
-# To use a static module, add the corresponding imported target, eg.
-# target_link_libraries(target ... StaticQt5::Core)
-# and using
-# This approach allows installing dynamic and static Qt in the same prefix
-# and using both variants in the same CMake project.
-
-# To use a static plugin, add the corresponding imported target, eg.
-# target_link_libraries(target ... StaticQt5::QWindowsIntegrationPlugin)
-# Automatically importing static plugins is currently not possible, though. Hence it is required to use Q_IMPORT_PLUGIN, eg.
-# #include<QtPlugin>
-# Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)
-
-# It is also possible to use static Qt libraries with CMake by setting the
-# variable USE_STATIC_QT_BY_DEFAULT: set(USE_STATIC_QT_BY_DEFAULT ON)
-# In this case the regular imported targets (eg. Qt5::Core) will be static.
-# This approach does *not* allow to use dynamic and static Qt in the same
-# CMake project.
-
-# To use the static Qt libraries with qmake add 'static' to the project config (either inside the *.pro file or as qmake argument):
-# CONFIG+=static
-
-# Further Qt modules (those not found in the base repository and hence not included in this package) include by default
-# static and dynamic libraries; if only one version is requried, just set NO_STATIC_LIBS or NO_SHARED_LIBS when building
-# the package, eg. by adding 'NO_STATIC_LIBS=1' to /etc/makepkg.conf.
-
-# By default, executables will not be removed because I find them useful when testing. To remove executables
-# set NO_EXECUTABLES (or NO_STATIC_EXECUTABLES to remove statically linked executables only) when building the package.
-# If Qt modules containing tools are built as static and as dynamic library only the dynamically linked tools will be present
-# in the package.
-
-# Qt packages can be built in the following order (for example):
-# qt5-base qt5-base-static qt5-declarative qt5-tools qt5-xmlpatterns qt5-script qt5-location qt5-multimedia qt5-sensors qt5-webchannel qt5-3d qt5-imageformats qt5-quickcontrols qt5-quickcontrols2 qt5-translations qt5-svg qt5-websockets qt5-winextras qt5-serialport qt5-canvas3d qt5-connectivity qt5-charts qt5-gamepad qt5-scxml qt5-datavis3s qt5-virtualkeyboard qt5-activeqt qt5-webkit
-
-# Helper functions for the split builds
-isDefault() {
- [[ $pkgname = 'mingw-w64-qt5-base' ]] || [[ $pkgname = 'mingw-w64-qt5-base-static' ]]
-}
-isStatic() {
- [ "${pkgname##*-}" = 'static' ]
-}
-isOpenGL() {
- # Currently use native OpenGL by default
- isDefault || \
- [[ $pkgname = 'mingw-w64-qt5-base-opengl' ]] || [[ $pkgname = 'mingw-w64-qt5-base-opengl-static' ]]
-}
-isANGLE() {
- [[ $pkgname = 'mingw-w64-qt5-base-angle' ]] || [[ $pkgname = 'mingw-w64-qt5-base-angle-static' ]] || \
- [[ $pkgname = 'mingw-w64-qt5-base-dynamic' ]] || [[ $pkgname = 'mingw-w64-qt5-base-dynamic-static' ]]
- # Treat dynamic version like ANGLE version, correct?
-}
-isDynamic() {
- [[ $pkgname = 'mingw-w64-qt5-base-dynamic' ]] || [[ $pkgname = 'mingw-w64-qt5-base-dynamic-static' ]]
-}
-isNoOpenGL() {
- [[ $pkgname = 'mingw-w64-qt5-base-noopengl' ]] || [[ $pkgname = 'mingw-w64-qt5-base-noopengl-static' ]]
-}
+# All patches are managed at https://github.com/Martchus/qtbase
+_qt_module=qtbase
pkgname=mingw-w64-qt5-base-angle
-pkgver=5.10.0
-pkgrel=2
-pkgdesc='A cross-platform application and UI framework (mingw-w64)'
-# The static variant doesn't contain any executables which need to be executed on the build machine
-isStatic && arch=('any') || arch=('i686' 'x86_64')
+pkgver=5.15.1
+pkgrel=1
+pkgdesc='A cross-platform application and UI framework, ANGLE OpenGL backend (mingw-w64)'
+arch=('i686' 'x86_64')
url='https://www.qt.io/'
license=('GPL3' 'LGPL3' 'FDL' 'custom')
depends=('mingw-w64-crt' 'mingw-w64-zlib' 'mingw-w64-libjpeg-turbo' 'mingw-w64-sqlite'
'mingw-w64-libpng' 'mingw-w64-openssl' 'mingw-w64-dbus' 'mingw-w64-harfbuzz'
'mingw-w64-pcre2')
+optdepends=('mingw-w64-mesa: use LLVMpipe software rasterizer for Qt Quick'
+ 'mingw-w64-postgresql: PostgreSQL support'
+ 'mingw-w64-mariadb-connector-c: MySQL support')
+makedepends=('mingw-w64-gcc' 'mingw-w64-postgresql' 'mingw-w64-mariadb-connector-c'
+ 'mingw-w64-vulkan-headers' 'mingw-w64-pkg-config' 'mingw-w64-environment')
+# makedepends+=('mingw-w64-wine') # the dynamic/ANGLE version needs to run fxc.exe (not implemented yet)
groups=('mingw-w64-qt5')
-optdepends=('mingw-w64-postgresql: PostgreSQL support' 'mingw-w64-mariadb-connector-c: MySQL support')
-makedepends=('mingw-w64-gcc' 'mingw-w64-postgresql' 'mingw-w64-mariadb-connector-c' 'mingw-w64-pkg-config')
+provides+=('mingw-w64-qt5-base')
+conflicts+=('mingw-w64-qt5-base' 'mingw-w64-qt5-base-angle' 'mingw-w64-qt5-base-noopengl'
+ 'mingw-w64-qt5-base-dynamic' 'mingw-w64-qt5-base-openql')
options=('!strip' '!buildflags' 'staticlibs' '!emptydirs')
-_pkgfqn="qtbase-everywhere-src-${pkgver}"
+_pkgfqn="${_qt_module}-everywhere-src-${pkgver}"
source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz"
- '0001-Add-profile-for-cross-compilation-with-mingw-w64.patch'
+ '0001-Adjust-win32-g-profile-for-cross-compilation-with-mi.patch'
'0002-Ensure-GLdouble-is-defined-when-using-dynamic-OpenGL.patch'
- '0003-Use-external-ANGLE-library.patch'
- '0004-Fix-too-many-sections-assemler-error-in-OpenGL-facto.patch'
- '0005-Make-sure-.pc-files-are-installed-correctly.patch'
- '0006-Don-t-add-resource-files-to-LIBS-parameter.patch'
- '0007-Prevent-debug-library-names-in-pkg-config-files.patch'
- '0008-Fix-linking-against-shared-static-libpng.patch'
- '0009-Fix-linking-against-static-D-Bus.patch'
- '0010-Don-t-try-to-use-debug-version-of-D-Bus-library.patch'
- '0011-Fix-linking-against-static-freetype2.patch'
- '0012-Fix-linking-against-static-harfbuzz.patch'
- '0013-Fix-linking-against-static-pcre.patch'
- '0014-Fix-linking-against-shared-static-MariaDB.patch'
- '0015-Fix-linking-against-shared-static-PostgreSQL.patch'
- '0016-Rename-qtmain-to-qt5main.patch'
- '0017-Build-dynamic-host-libraries.patch'
- '0018-Enable-rpath-for-build-tools.patch'
- '0019-Use-system-zlib-for-build-tools.patch'
- '0020-Disable-determing-default-include-and-lib-dirs-at-qm.patch'
- '0021-Use-.dll.a-as-import-lib-extension.patch'
- '0022-Merge-shared-and-static-library-trees.patch'
- '0023-Pull-dependencies-of-static-libraries-in-CMake-modul.patch'
- '0024-Allow-usage-of-static-version-with-CMake.patch'
- '0025-Adjust-linker-flags-for-static-build-with-cmake-ming.patch'
- '0026-Use-correct-pkg-config-static-flag.patch'
- '0027-Fix-macro-invoking-moc-rcc-and-uic.patch'
- '0028-Ignore-errors-about-missing-feature-static.patch'
- '0029-Enable-and-fix-use-of-iconv.patch'
- '0030-Ignore-failing-pkg-config-test.patch'
- '0031-Prevent-qmake-from-messing-static-lib-dependencies.patch'
- '0032-Hardcode-linker-flags-for-platform-plugins.patch'
- '0033-Fix-linking-against-static-plugins-with-qmake.patch'
- '0034-Don-t-use-the-statx-syscall.patch')
-sha256sums=('fd5578cd320a13617c12cf2b19439386b203d6d45548e855f94e07be9829f762'
- 'd10d56c65b632d881f79eda8c0caeffb1a53a4829ac886e80038cdc8929b1669'
- '524883f46945ab2ce023e9de1144a7eebafdba936ea8c61e035006deff48fa5b'
- 'cea0e73f831348e50285ab87149803d4dfb5650c4c96037844b98b3dc1c65159'
- 'e333d61821a42710a00f9bd4d003d376f513ba6ca41a3739bfcd414c99b8e7dd'
- 'e8b0bdcc39458105dd0e5c569c98ef53a84d2fe4e9e200e1b1c1b7b749e8e758'
- 'e14860d560886b600373f639e89e9a60d77de9a536587633ea71e1fd907df3fb'
- '447c27f0e87d5cdcbe9883f6d3aac0daefef28e09bd8afe8d07a650375ca8362'
- 'e2f98037b93aa2970014c1d185912b49d4ab5506c24fa2410cb0e93d4e0a1f54'
- '507537c73995715fa1a4e9e0f1ecfdf4afe409b5397366f551d06c6c406e088b'
- '760093a185cd77bacec0d85c0c077370d6044b89a4d6f03944524d1aa2b82dfa'
- '6052446a675be39dd663ef69ee5339ab67c2805b29ff4ef19bacf0f677a95182'
- '60a6e236334d3950b40dbb0501cc733bc7a672b0c7fbf6e4792c0058bf20a859'
- 'f58391f9407742a1543702fe0234a134883046ff99584c1cfa468893264bf5e9'
- '9e406b466c2b447da5d44ea37cafe2b3c3caebfa54936eb71e816e60b186c47d'
- '870ed7adb78d4f5b396fa9106777aaeefc2a8af406e1aa1655dfe3405974a1ce'
- 'b51a2d707a09cce340ca10e4a93c18a0872881889a97dc3ea2aafe73d80dfd46'
- 'ed206eef70d57cd1aeb31c9e65ceb46fe926bee462c9b6507d22b6daf9b03aff'
- '00ea2ef2f2d8868351d857716e60e8e78ed90a294132cd1fbd8039aae50e7344'
- 'f80e166e5a358cc3d0dca5f0a543b30271a1c536ff9ef73105f1e432b10d3afe'
- '12c4ce015c5641376dea7a232f0fc9f8feb10ddee06c65f87e0f00ea2574ab15'
- 'a3a6a12f94ed4a79b3910623e3a8a11859d7a6a72b4634ff8bd6d1269af615bd'
- '6f1f96ec05f049a107f4b5b3fba05e088d47f1c4751fd21851ed48d5f1b5a274'
- '2926f77fbab219cb2fe9bb630274b06594a72c9047d374209d96591e481015fd'
- 'b36b7fce8e101444d17026002f8052be41de887ccd263188a64faeae31cc1c89'
- '7bcfe130f6dc47c9fb4d3db6fe9634596ab2c01e421bfc9a0967463487b4b7f0'
- '83f6a3fc2489da2686f035563542478fd01e2849e18ea02478d7850bd68f16be'
- '7254445b4cea5e1d7efc25b923e755ab3b19856ee8bce2ebe2900b9bf4717841'
- 'd03a3cc5dab9d9a843e73f241fee2778deffe9ee727e493a0052e62b2266923e'
- 'd6dc468d67e782b64fbe9ba64dfc3fdf423c5d06205f4a87a0561bb53b35d7fc'
- '43c367e31c1560178a1471a80a9e90391c7c93f8dfece8c4c9dfafea4a3ce180'
- '2e89aca862a62cbf535faf4b01c00dfed40ad6ccb52ac998913e9e96801491a3'
- '8b1402c8ac78c0870af19ccdd8b2603e164cf2ef4fd4446fd03ea40b68a35643'
- '81d279b24a508656597fec9bf94bade25cf0d600607febcd35f7fd27d09970eb'
- '95a8cd9553ef18e200a85ff6dc5c718525d71be92d4fa49b8cdceae73696e037')
+ '0003-Fix-too-many-sections-assemler-error-in-OpenGL-facto.patch'
+ '0004-Make-sure-.pc-files-are-installed-correctly.patch'
+ '0005-Don-t-add-resource-files-to-LIBS-parameter.patch'
+ '0006-Prevent-debug-library-names-in-pkg-config-files.patch'
+ '0007-Fix-linking-against-shared-static-libpng.patch'
+ '0008-Fix-linking-against-static-D-Bus.patch'
+ '0009-Don-t-try-to-use-debug-version-of-D-Bus-library.patch'
+ '0010-Fix-linking-against-static-freetype2.patch'
+ '0011-Fix-linking-against-static-harfbuzz.patch'
+ '0012-Fix-linking-against-static-pcre.patch'
+ '0013-Fix-linking-against-shared-static-MariaDB.patch'
+ '0014-Fix-linking-against-shared-static-PostgreSQL.patch'
+ '0015-Rename-qtmain-to-qt5main.patch'
+ '0016-Enable-rpath-for-build-tools.patch'
+ '0017-Use-system-zlib-for-build-tools.patch'
+ '0018-Merge-shared-and-static-library-trees.patch'
+ '0019-Use-.dll.a-as-import-lib-extension.patch'
+ '0020-Pull-dependencies-of-static-libraries-in-CMake-modul.patch'
+ '0021-Allow-usage-of-static-version-with-CMake.patch'
+ '0022-Adjust-linker-flags-for-static-build-with-cmake-ming.patch'
+ '0023-Use-correct-pkg-config-static-flag.patch'
+ '0024-Fix-macro-invoking-moc-rcc-and-uic.patch'
+ '0025-Ignore-errors-about-missing-feature-static.patch'
+ '0026-Enable-and-fix-use-of-iconv.patch'
+ '0027-Ignore-failing-pkg-config-test.patch'
+ '0028-Prevent-qmake-from-messing-static-lib-dependencies.patch'
+ '0029-Hardcode-linker-flags-for-platform-plugins.patch'
+ '0030-Fix-linking-against-static-plugins-with-qmake.patch'
+ '0031-Prevent-Cannot-find-feature-windows_vulkan_sdk.patch')
+sha256sums=('48b9e79220941665a9dd827548c6428f7aa3052ccba8f4f7e039a94aa1d2b28a'
+ 'fec4ca039859f9cc9685b34a7bd2da9e0fe24b5b1f85d7cd12665631fa797b44'
+ 'a0ea35e6eef4fed06360efa05e11b898f6033d893e1f1657a240cc03e43f076e'
+ 'cda13b2856fafe92b1369d6f2d01bd4d9bbdb0ec96c25e91e48ba25267c74c6c'
+ 'e13cd18ad781512862b5d288a53ebd09dc0e8bcc6fd3c4e833d0c593f28edd3a'
+ '273af9db2954c1d62e29d2a8328bbfa918bae617456aff6645df4bfb72796e0d'
+ '84a801d904fe308a56a9112af9aa73656eacf36ed7684449363281bfe4108543'
+ '190795aa778ae4e7bd8a74ce56504c697435129b73d2f0418511a4a230f68bc5'
+ '3fff6151dcf76bed12864dba51e4d04d39f8b3969c502a71ed547b527b310d7a'
+ '56240f509157a04ba1f1a23b0e058c2212d66e34aca68a688c15f5d8804bf174'
+ '02ca3a112f3e35749c141ed9c7e87a1fd0e82aa852541024b85f40a99d24d9fc'
+ '3b4dcce669d359953603257e621e6ebc30fb88f0f1c48b35ec443c574f2b05e8'
+ 'ba302124391aea5438e82195dd276edd8942f04cff7c6b85a9f0a5279749566b'
+ '68b5f9e0535c8d030161e67a0e8ee8bec2a80a9c8f69c09a4ad25fe98eb9dfd2'
+ 'ab46b53eb6272185a05d11820317db421be6e4440166967911e7d59d4f0a03d4'
+ 'c11a14a02e48e39e8212097915aed2347825a33022d367f322e34f3aaaf33f90'
+ '6d7c8fd7a162174355dd12399bd8f47f470557751dc117271c02e2e7b385d424'
+ '3c28f5658e0f960091c1991586167ee06bcecd8d843123fbf37ab78a1f5f30f0'
+ 'f9545474bd73be049dbf84fc2ff455e924e6fb29bb807809c384bf56a0227ad6'
+ '2998069e3a427c940f496d75df4cea05acb10d3e82c333a5c957e37f0543a0e8'
+ 'a301ddcd46b9b2fb58d592af88ac6acf81b2dbd328fb8c4c3ef49abffe343267'
+ '3d1257390ff151365d7fa29cde5f9c118310fe727243fb6f50ad30ab117c3384'
+ '19534087d5fc4b434859d68476ebd0647fdc04bf78f24943b7ab88cccf09b08a'
+ '5a57c66303d4a898dd5cccd9c639f367b50b508256fdf9c00ba5179bb00d701c'
+ '84b9e41b7320834a73edf1d192e511801feb51cd2de60ecc28e46982cd572df4'
+ '85bba2428090518dca878ca117299b065913f125c00cede57b31d37a02d0b787'
+ 'f0429a442805c2e0181e8b3b7814259586fdcba000bf324c0e367858c351f6b1'
+ 'c8479468cfb4a70fe65a1317f3fbacd40dcdc7a8bafc88648160509ee8b216e8'
+ 'a2eb9e683b12efe7fbb365749bdd5373e0fbf6438fe5342effab93f3a262d808'
+ '4c097460c443ec0ca47a41ea1ad6fdaa08e394b7a883d54da69bf9557ccbea31'
+ 'e1f2b8bfe9f3cdacceb6d9b73573ad39ea73ac0fce74448c7df0262b34b703bb'
+ '553c15e8cf230c3d3f3fa4c4a7a5a46d18027a4d6c7493f3eab56ca97bd906d9')
_architectures='i686-w64-mingw32 x86_64-w64-mingw32'
-isStatic && depends+=(${pkgname%-static})
-if isANGLE; then
- if isDynamic; then
- makedepends+=('mingw-w64-angleproject')
- optdepends+=('mingw-w64-angleproject: use ANGLE instead of native OpenGL')
- else
- depends+=('mingw-w64-angleproject')
- fi
-fi
-if ! isDefault; then
- if isStatic; then
- provides+=('mingw-w64-qt5-base-static')
- conflicts+=('mingw-w64-qt5-base-static' 'mingw-w64-qt5-base-angle-static' 'mingw-w64-qt5-base-noopengl-static'
- 'mingw-w64-qt5-base-dynamic-static' 'mingw-w64-qt5-base-openql-static')
- else
- provides+=('mingw-w64-qt5-base')
- conflicts+=('mingw-w64-qt5-base' 'mingw-w64-qt5-base-angle' 'mingw-w64-qt5-base-noopengl'
- 'mingw-w64-qt5-base-dynamic' 'mingw-w64-qt5-base-openql')
- fi
-fi
-
-patch() {
- local input_found=
- local patch_file=
- for arg in $@; do
- if [[ $input_found ]]; then
- patch_file="$arg"
- break
- fi
- [[ $arg == -i ]] && input_found=1
- done
- msg2 "Applying patch $patch_file"
- /usr/bin/patch $@
-}
-
prepare() {
cd "${srcdir}/${_pkgfqn}"
- # Apply patches; further descriptions can be found in patch files itself
+ # apply patches; further descriptions can be found in patch files itself
for patch in "$srcdir/"*.patch; do
+ msg2 "Applying patch $patch"
patch -p1 -i "$patch"
done
- # Make sure the Qt5 build system uses our external ANGLE library
- rm -rf src/3rdparty/angle include/QtANGLE/{EGL,GLES2,GLES3,KHR}
-
- # As well as our external PCRE library and zlib
+ # make sure the Qt 5 build system uses our external PCRE library and zlib
rm -rf src/3rdparty/{pcre,zlib}
+
+ # clear buildflags ('!buildflags' only effects build() but not prepare())
+ unset CPPFLAGS CFLAGS CXXFLAGS LDFLAGS PKG_CONFIG_PATH
+
+ # build qmake using mingw-w64 {C,CXX,LD}FLAGS
+ # * This also sets default {C,CXX,LD}FLAGS for projects built using qmake.
+ source mingw-env
+ sed -i -e "s|^\(QMAKE_CFLAGS_RELEASE.*=\).*$|\1 ${CFLAGS}|" \
+ -e "s|^\(QMAKE_CXXFLAGS_RELEASE.*=\).*$|\1 ${CXXFLAGS}|" \
+ -e "s|^\(QMAKE_LFLAGS_RELEASE.*=\).*$|\1 ${LDFLAGS}|" \
+ mkspecs/common/gcc-base.conf \
+ mkspecs/common/g++-win32.conf
+ sed -i -e "s|^\(QMAKE_LFLAGS_RELEASE.*=\).*$|\1|" \
+ mkspecs/common/g++-unix.conf
}
build() {
cd "${srcdir}/${_pkgfqn}"
- # Do not set any flags here, flags are configured via mkspec
- # Setting flags here is not appropriate as it does not allow to
- # distinguish between flags for native compiler and cross compiler
- unset CFLAGS
- unset CXXFLAGS
- unset LDFLAGS
- unset PKG_CONFIG_PATH
-
for _arch in ${_architectures}; do
- # To prevent conflicts with the mingw-w64-qt4 package we have
- # to put tools in a dedicated folder
-
- # The last device option allows using ccache though the use of
- # pre-compile header
- # (sloppiness must be set to pch_defines,time_macros in ccache config)
-
+ # define general configure arguments
local qt_configure_args="\
- -xplatform mingw-w64-g++ \
+ -xplatform win32-g++ \
-optimized-qmake \
-verbose \
-opensource \
@@ -281,61 +179,53 @@ build() {
-sysconfdir /usr/${_arch}/etc \
-translationdir /usr/${_arch}/share/qt/translations \
-device-option CROSS_COMPILE=${_arch}- \
- -device-option CROSS_COMPILE_PREFIX=/usr/${_arch} \
- -device-option CROSS_COMPILE_CFLAGS=-fpch-preprocess"
+ -device-option CROSS_COMPILE_PREFIX=/usr/${_arch}"
+
+ # allows using ccache despite the use of pre-compile header (sloppiness must be set to pch_defines,time_macros in ccache config for this)
+ qt_configure_args+=' -device-option CROSS_COMPILE_CFLAGS=-fpch-preprocess'
+ qt_configure_args+=' -device-option CROSS_COMPILE_CXXFLAGS=-fpch-preprocess'
- # Fix include directory of freetype2 and dbus
- qt_configure_args+=" $(${_arch}-pkg-config --cflags-only-I freetype2 dbus-1)"
+ # add include directory of freetype2 and dbus manually (pkg-config detection in qmake doesn't work which is currently ignored via a patch)
+ qt_configure_args+=" $(${_arch}-pkg-config --cflags-only-I freetype2 dbus-1 | sed -e "s/-I\/usr\/${_arch}\/include //g")"
+ # note: The sed is required to prevent -isystem /usr/${_arch}/include (qmake will turn -I into -isystem) which would lead to
+ # the same issue as here: https://github.com/Martchus/tageditor/issues/22#issuecomment-330899141
- # Enable debug build if MINGW_W64_QT_DEBUG_BUILD is set (in /etc/makepkg.config)
+ # enable debug build if MINGW_W64_QT_DEBUG_BUILD is set (could be set in eg. /etc/makepkg.config if debug build is wanted)
[[ $MINGW_W64_QT_DEBUG_BUILD ]] \
&& qt_configure_args+=' -debug-and-release' \
|| qt_configure_args+=' -release'
- # Configure usage of ANGLE/OpenGL
- if isOpenGL; then
- msg2 'Using native OpenGL backend'
- qt_configure_args+=' -opengl desktop'
- elif isNoOpenGL; then
- msg2 'Building without OpenGL support'
- qt_configure_args+=' -no-opengl'
- elif isANGLE; then
- if isDynamic; then
- msg2 'Using dynamic OpenGL backend'
- qt_configure_args+=' -opengl dynamic'
- else
- msg2 'Using ANGLE as OpenGL backend'
- qt_configure_args+=' -angle'
- fi
- # GL_GLEXT_PROTOTYPES must be defined to enable declarations of GLES functions
- qt_configure_args+=' -DGL_GLEXT_PROTOTYPES'
- fi
+ # configure usage of ANGLE/OpenGL
+ # FIXME: This is broken because we needed to invoke fxc.exe (Direct3D Shader Compiler)
+ # during the build. Maybe start it with WINE?
+ msg2 'Using ANGLE as OpenGL backend'
+ qt_configure_args+=' -angle'
+ # enable declarations of GLES functions
+ # FIXME: Still required?
+ qt_configure_args+=' -DGL_GLEXT_PROTOTYPES'
- # Fix MariaDB
+ # add include directory of MariaDB
qt_configure_args+=" -I/usr/${_arch}/include/mariadb"
+ # add include directory for Vulkan
+ export VULKAN_SDK=/usr/${_arch}
+
msg2 'Configure and build qmake'
mkdir -p ../build-${_arch} && pushd ../build-${_arch}
- if isStatic; then
- export OPENSSL_LIBS="/usr/${_arch}/lib/libssl.a /usr/${_arch}/lib/libcrypto.a -lws2_32 -lgdi32 -lcrypt32"
- ../${_pkgfqn}/configure \
- $qt_configure_args \
- -static \
- -openssl-linked
- msg2 'Build static Qt libraries'
- make
- else
- # The LD_LIBRARY_PATH override is needed because libQt5Bootstrap* are shared
- # libraries which various compiled tools (like moc) use. As the libQt5Bootstrap*
- # libraries aren't installed at this point yet, we have to workaround this
- ../${_pkgfqn}/configure \
- $qt_configure_args \
- -shared \
- -openssl-runtime \
- -device-option 'CROSS_COMPILE_CUSTOM_CONFIG=actually_a_shared_build'
- msg2 'Build shared Qt libraries'
- LD_LIBRARY_PATH="$PWD/lib" LDFLAGS="-L$PWD/lib" make
- fi
+ qt_configure_args+=' -shared'
+
+ # configure shared version to load OpenSSL dynamically
+ qt_configure_args+=' -openssl-runtime'
+
+ qt_configure_args+=' -device-option CROSS_COMPILE_CUSTOM_CONFIG=actually_a_shared_build'
+
+ # override LD_LIBRARY_PATH so libraries for native build tools like libQt5Bootstrap.so are found
+ #export LD_LIBRARY_PATH="$PWD/lib"
+ #export LDFLAGS="-L$PWD/lib"
+
+ msg2 'Build qmake and configure' && ../${_pkgfqn}/configure $qt_configure_args
+ msg2 'Build Qt libraries' && make
+
popd
done
}
@@ -345,84 +235,60 @@ package() {
cd "$srcdir/${_pkgfqn}"
make install -C ../build-${_arch} INSTALL_ROOT="${pkgdir}"
- if isStatic; then
- # The static release contains only the static libs itself but relies on the
- # shared release for Qt5Bootstrap library and tools (qmake, uic, ...)
-
- # Drop Qt5Bootstrap and libraries which are only provided as static lib
- # and are hence already present in shared build (such as Qt5OpenGLExtensions)
- rm -f \
- "${pkgdir}/usr/${_arch}/lib/"{lib,}qt5main* \
- "${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5AccessibilitySupport* \
- "${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5DeviceDiscoverySupport* \
- "${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5EdidSupport* \
- "${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5EventDispatcherSupport* \
- "${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5FbSupport* \
- "${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5FontDatabaseSupport* \
- "${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5PlatformCompositorSupport* \
- "${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5ThemeSupport* \
- "${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5OpenGLExtensions* \
- "${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5PlatformSupport* \
- "${pkgdir}/usr/${_arch}/lib/"libQt5Bootstrap* \
-
- # Also ensure config files don't conflict with shared version
- pushd "${pkgdir}/usr/${_arch}/lib/cmake"
- for cmake_dir in $(find . ! -path . -type d ! -name 'Static*'); do
- mkdir -p "./Static${cmake_dir:2}";
- mv "${cmake_dir}/"* "./Static${cmake_dir:2}";
- rm -r "${cmake_dir}"
- done
- rm -r "./StaticQt5OpenGLExtensions"
- popd
- rm "${pkgdir}/usr/${_arch}/lib/pkgconfig/StaticQt5OpenGLExtensions.pc"
+ # use prl files from build directory since installed prl files seem to have incorrect QMAKE_PRL_LIBS_FOR_CMAKE
+ pushd "$srcdir/build-${_arch}/lib"
+ find -iname '*.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib" --parents {} +
+ popd
+ pushd "$srcdir/build-${_arch}/plugins"
+ find -iname '*.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib/qt/plugins" --parents {} +
+ popd
- # Keep various Qt 5 plugins to be used in static builds
- pushd "${pkgdir}/usr/${_arch}/lib/" && ln -s "./qt/plugins/"*/*.a . && popd
+ # remove DLLs from libdir (DLLs are installed in both bindir and libdir, one copy is sufficient)
+ find "${pkgdir}/usr/${_arch}/lib" -maxdepth 1 -name "*.dll" -exec rm {} \;
- # Keep a couple pri files not found in base
- mv "${pkgdir}/usr/${_arch}/lib/qt/mkspecs/modules/qt_plugin_"*.pri "${pkgdir}/usr/${_arch}"
+ # install missing libQt5BootstrapDBus.a manually
+ cp --target-directory "${pkgdir}/usr/${_arch}/lib" "$srcdir/build-${_arch}/lib/libQt5BootstrapDBus.a"
- # Delete duplicate files that are in the base package
- rm -fR "${pkgdir}/usr/${_arch}/"{include,share}
- rm -fR "${pkgdir}/usr/${_arch}/lib/"{qt/bin,qt/mkspecs}
+ # create symlinks for tools
+ mkdir -p "${pkgdir}/usr/bin"
+ for tool in qmake moc rcc uic qdbuscpp2xml qdbusxml2cpp qdoc syncqt.pl; do
+ ln -s "../${_arch}/lib/qt/bin/${tool}" "${pkgdir}/usr/bin/${_arch}-${tool}-qt5"
+ done
- # Move pri files back
- mkdir -p "${pkgdir}/usr/${_arch}/lib/qt/mkspecs/modules"
- mv "${pkgdir}/usr/${_arch}/"*.pri "${pkgdir}/usr/${_arch}/lib/qt/mkspecs/modules"
+ # create qt.conf containing plugin path, see https://github.com/Martchus/PKGBUILDs/issues/109
+ echo "[Paths]
+Plugins = /usr/${_arch}/lib/qt/plugins" > "${pkgdir}/usr/${_arch}/bin/qt.conf"
- else # Shared release
- # The .dll's are installed in both bindir and libdir, one copy of the .dll's is sufficient
- find "${pkgdir}/usr/${_arch}/lib" -maxdepth 1 -name "*.dll" -exec rm {} \;
+ # drop QMAKE_PRL_BUILD_DIR because reference the build dir
+ find "${pkgdir}/usr/${_arch}/lib" -type f -name '*.prl' -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;
- # The Qt5OpenGLExtensions module is only available as static library and hence part of the
- # shared build
+ # remove doc
+ rm -rf "${pkgdir}/usr/${_arch}/share/doc"
- # Create symlinks for tools
- mkdir -p "${pkgdir}/usr/bin"
- for tool in qmake moc rcc uic qdbuscpp2xml qdbusxml2cpp qdoc syncqt.pl; do
- ln -s "../${_arch}/lib/qt/bin/${tool}" "${pkgdir}/usr/bin/${_arch}-${tool}-qt5"
+ # remove prl files for debug version
+ if ! [[ $MINGW_W64_QT_DEBUG_BUILD ]]; then
+ for file in $(find "${pkgdir}/usr/${_arch}" -name '*d.prl' -o -name '*d.static.prl'); do
+ [ -f "${file%d*}${file##*d}" ] && rm "${file}";
done
fi
- # Remove doc
- rm -rf "${pkgdir}/usr/${_arch}/share/doc"
+ # remove '.static.prl' files
+ find "${pkgdir}/usr/${_arch}" -name '.static.prl' -delete
- # Strip the binaries
- if ! isStatic; then
- strip --strip-all "${pkgdir}/usr/${_arch}/lib/qt/bin/"*[!.pl]
- strip --strip-unneeded "${pkgdir}/usr/${_arch}/lib/libQt5Bootstrap"{,DBus}.so.${pkgver}
- fi
+ # replace library path in *.prl files so it points to the installed location and not the build directory
+ find "${pkgdir}/usr/${_arch}/lib" \( -type f -name '*.prl' -o -name '*.pc' \) -exec sed -i -e "s:${PWD%/*}/build-${_arch}/lib:/usr/${_arch}/lib:g" {} \;
- # Applications might be useful as well; keeping them by default will not hurt anybody I suppose
- if isStatic || [[ $NO_EXECUTABLES ]]; then
- find "${pkgdir}/usr/${_arch}" -name "*.exe" -exec rm {} \;
+ # strip binaries, remove unuseful files
+ strip --strip-all "${pkgdir}/usr/${_arch}/lib/qt/bin/"*[!.pl]
+ strip --strip-debug "${pkgdir}/usr/${_arch}/lib/libQt5Bootstrap"*.a
+ if [[ $NO_EXECUTABLES ]]; then
+ find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete
else
- find "${pkgdir}/usr/${_arch}" -name "*.exe" -exec ${_arch}-strip --strip-all {} \;
+ find "${pkgdir}/usr/${_arch}" -name '*.exe' -exec ${_arch}-strip --strip-all {} \;
fi
- # No use for these files though
- find "${pkgdir}/usr/${_arch}" \( -name "*.bat" -o -name "*.def" -o -name "*.exp" \) -exec rm {} \;
- # Strip binaries
- find "${pkgdir}/usr/${_arch}" -name "*.dll" -exec ${_arch}-strip --strip-unneeded {} \;
- find "${pkgdir}/usr/${_arch}" -name "*.a" -exec ${_arch}-strip -g {} \;
+
+ find "${pkgdir}/usr/${_arch}" \( -name '*.bat' -o -name '*.def' -o -name '*.exp' \) -delete
+ find "${pkgdir}/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \;
+ find "${pkgdir}/usr/${_arch}" \( -name '*.a' -not -name 'libQt5QmlDevTools.a' -not -name 'libQt5Bootstrap.a' \) -exec ${_arch}-strip -g {} \;
done
}
diff --git a/PKGBUILD.sh.ep b/PKGBUILD.sh.ep
new file mode 100644
index 000000000000..e6870c2683cf
--- /dev/null
+++ b/PKGBUILD.sh.ep
@@ -0,0 +1 @@
+% layout 'mingw-w64-qt5-base';
diff --git a/README.md b/README.md
new file mode 100644
index 000000000000..9e27bdb10341
--- /dev/null
+++ b/README.md
@@ -0,0 +1,91 @@
+# README for Qt 5 mingw-w64 packages
+## Development, building, issues
+* All PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where you also find the URL of a binary repository.
+* Issues are tracks there as well.
+* All patches are managed at https://github.com/Martchus/qtbase, https://github.com/Martchus/qttools, ...
+
+### Build order
+Qt packages can be built in the following order (for example):
+```
+qt5-base qt5-base-static qt5-svg qt5-declarative qt5-tools qt5-xmlpatterns qt5-script qt5-imageformats qt5-location qt5-multimedia qt5-sensors qt5-webchannel qt5-3d qt5-quickcontrols qt5-quickcontrols2 qt5-translations qt5-websockets qt5-winextras qt5-serialport qt5-canvas3d qt5-connectivity qt5-charts qt5-graphicaleffects qt5-gamepad qt5-scxml qt5-datavis3d qt5-virtualkeyboard qt5-activeqt qt5-speech qt5-remoteobjects qt5-networkauth qt5-webkit
+```
+
+### Executables
+By default, executables will be present in the package because I find them useful for testing. To remove executables,
+set NO_EXECUTABLES (or NO_STATIC_EXECUTABLES to remove statically linked executables only) when building the package.
+If Qt modules containing tools are built as static and as dynamic library only the dynamically linked tools will be present
+in the package.
+
+## Variants
+There are different variants of the package which can be selected by simply adjusting pkgname:
+
+| Package name | Customization |
+| ------------------------------------------------------- | -----------------------------------------------------------------------|
+| mingw-w64-qt5-base-dynamic, mingw-w64-qt5-base-dynamic | allows choosing between ANGLE and native OpenGL dynamically at runtime |
+| mingw-w64-qt5-base-opengl | using native OpenGL |
+| mingw-w64-qt5-base-angle | using ANGLE rather than native OpenGL |
+| mingw-w64-qt5-base-noopenql | no OpenGL support |
+
+* The variants are conflicting (and hence can not be installed at the same time).
+* It is also possible to use the software rasterizer provided by mingw-w64-mesa as a drop-in replacement for the regular OpenGL libraries.
+* See also: http://doc.qt.io/qt-5/windows-requirements.html#dynamically-loading-graphics-drivers
+
+## Static libraries
+The variants listed above only contain dynamic libraries. For building static libraries
+just append `-static` to the package name, eg. `mingw-w64-qt5-base-static` or `mingw-w64-qt5-base-angle-static`.
+
+The static variants rely on the corresponding dynamic variant for headers and tools.
+I only tested the static variant using native OpenGL so far (`mingw-w64-qt5-base-static`).
+Note that ANGLE will still be loaded as dynamic library in `mingw-w64-qt5-base-dynamic-static`.
+
+Further Qt modules (those not found in the base repository) include by default static and dynamic libraries; if only one
+version is requried, just set `NO_STATIC_LIBS` or `NO_SHARED_LIBS` when building the package, eg. by adding `NO_STATIC_LIBS=1`
+to `/etc/makepkg.conf`.
+
+### Using static libraries
+By default, CMake and qmake will link against the dynamic Qt libraries.
+
+#### CMake
+To use the static Qt libraries with CMake prepend the Qt module name with Static, eg.:
+```
+find_package(Qt5Core) becomes find_package(StaticQt5Core)
+```
+
+To use a static module, add the corresponding imported target, eg.:
+```
+target_link_libraries(target ... StaticQt5::Core)
+```
+
+This approach allows installing dynamic and static Qt in the same prefix
+and using both variants in the same CMake project.
+
+To use a static plugin, add the corresponding imported target, eg.:
+```
+target_link_libraries(target ... StaticQt5::QWindowsIntegrationPlugin)
+```
+
+Automatically importing static plugins is currently not possible, though.
+Hence it is required to use Q_IMPORT_PLUGIN, eg.:
+```
+#include<QtPlugin>
+Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)
+```
+
+It is also possible to use static Qt libraries with CMake by setting the
+variable `USE_STATIC_QT_BY_DEFAULT`: `set(USE_STATIC_QT_BY_DEFAULT ON)`
+
+In this case the regular imported targets (eg. `Qt5::Core`) will be static.
+This approach does *not* allow to use dynamic and static Qt in the same
+CMake project.
+
+#### qmake
+To use the static Qt libraries with qmake add 'static' to the project config (either inside the *.pro file or as qmake argument):
+```
+CONFIG+=static
+```
+
+Currently qmake is messing with linker flags for cyclic dependencies and static MariaDB is unavailable due to clashing symbols.
+To workaround these issues, use the following arguments:
+```
+CONFIG+=no_smart_library_merge QTPLUGIN.sqldrivers=qsqlite QTPLUGIN.sqldrivers+=qsqlpsql QTPLUGIN.sqldrivers+=qsqlodbc
+```
diff --git a/qtbase-sha256.txt b/qtbase-sha256.txt
new file mode 100644
index 000000000000..4b5ee578d566
--- /dev/null
+++ b/qtbase-sha256.txt
@@ -0,0 +1 @@
+48b9e79220941665a9dd827548c6428f7aa3052ccba8f4f7e039a94aa1d2b28a