aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO80
-rw-r--r--0001-Adjust-win32-g-profile-for-cross-compilation-with-mi.patch31
-rw-r--r--0002-Ensure-GLdouble-is-defined-when-using-dynamic-OpenGL.patch6
-rw-r--r--0003-Fix-too-many-sections-assemler-error-in-OpenGL-facto.patch6
-rw-r--r--0004-Make-sure-.pc-files-are-installed-correctly.patch18
-rw-r--r--0005-Don-t-add-resource-files-to-LIBS-parameter.patch8
-rw-r--r--0006-Prevent-debug-library-names-in-pkg-config-files.patch8
-rw-r--r--0007-Fix-linking-against-shared-static-libpng.patch8
-rw-r--r--0008-Fix-linking-against-static-D-Bus.patch10
-rw-r--r--0009-Don-t-try-to-use-debug-version-of-D-Bus-library.patch8
-rw-r--r--0010-Fix-linking-against-static-freetype2.patch15
-rw-r--r--0011-Fix-linking-against-static-harfbuzz.patch10
-rw-r--r--0012-Fix-linking-against-static-pcre.patch18
-rw-r--r--0013-Fix-linking-against-shared-static-MariaDB.patch8
-rw-r--r--0014-Fix-linking-against-shared-static-PostgreSQL.patch10
-rw-r--r--0015-Rename-qtmain-to-qt5main.patch38
-rw-r--r--0016-Enable-rpath-for-build-tools.patch6
-rw-r--r--0017-Use-system-zlib-for-build-tools.patch8
-rw-r--r--0018-Merge-shared-and-static-library-trees.patch38
-rw-r--r--0019-Use-.dll.a-as-import-lib-extension.patch82
-rw-r--r--0020-Pull-dependencies-of-static-libraries-in-CMake-modul.patch265
-rw-r--r--0021-Allow-usage-of-static-version-with-CMake.patch381
-rw-r--r--0022-Adjust-linker-flags-for-static-build-with-cmake-ming.patch24
-rw-r--r--0023-Use-correct-pkg-config-static-flag.patch8
-rw-r--r--0024-Fix-macro-invoking-moc-rcc-and-uic.patch18
-rw-r--r--0025-Ignore-errors-about-missing-feature-static.patch12
-rw-r--r--0026-Enable-and-fix-use-of-iconv.patch10
-rw-r--r--0027-Ignore-failing-pkg-config-test.patch8
-rw-r--r--0028-Prevent-qmake-from-messing-static-lib-dependencies.patch18
-rw-r--r--0029-Hardcode-linker-flags-for-platform-plugins.patch93
-rw-r--r--0030-Fix-linking-against-static-plugins-with-qmake.patch8
-rw-r--r--0031-Prevent-Cannot-find-feature-windows_vulkan_sdk.patch (renamed from 0032-Prevent-Cannot-find-feature-windows_vulkan_sdk.patch)10
-rw-r--r--0031-Prevent-static-build-to-prefer-dynamic-libraries.patch37
-rw-r--r--0032-Fix-crashes-in-rasterization-code-using-setjmp.patch248
-rw-r--r--PKGBUILD375
-rw-r--r--PKGBUILD.sh.ep1
-rw-r--r--qtbase-sha256.txt1
37 files changed, 1173 insertions, 760 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5a38f54f37dd..41fcc9505f6f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = mingw-w64-qt5-base-static
- pkgdesc = A cross-platform application and UI framework (mingw-w64)
- pkgver = 5.13.2
+ pkgdesc = A cross-platform application and UI framework, native OpenGL backend (mingw-w64)
+ pkgver = 5.15.13+kde+r138
pkgrel = 1
url = https://www.qt.io/
arch = any
@@ -14,6 +14,8 @@ pkgbase = mingw-w64-qt5-base-static
makedepends = mingw-w64-mariadb-connector-c
makedepends = mingw-w64-vulkan-headers
makedepends = mingw-w64-pkg-config
+ makedepends = mingw-w64-environment
+ makedepends = git
depends = mingw-w64-crt
depends = mingw-w64-zlib
depends = mingw-w64-libjpeg-turbo
@@ -23,6 +25,7 @@ pkgbase = mingw-w64-qt5-base-static
depends = mingw-w64-dbus
depends = mingw-w64-harfbuzz
depends = mingw-w64-pcre2
+ depends = mingw-w64-zstd
depends = mingw-w64-qt5-base
optdepends = mingw-w64-mesa: use LLVMpipe software rasterizer for Qt Quick
optdepends = mingw-w64-postgresql: PostgreSQL support
@@ -31,7 +34,7 @@ pkgbase = mingw-w64-qt5-base-static
options = !buildflags
options = staticlibs
options = !emptydirs
- source = https://download.qt.io/official_releases/qt/5.13/5.13.2/submodules/qtbase-everywhere-src-5.13.2.tar.xz
+ source = git+https://invent.kde.org/qt/qt/qtbase#commit=b9906b5233a80cab372c95ac4dd68b25bdca0646
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-Fix-too-many-sections-assemler-error-in-OpenGL-facto.patch
@@ -62,41 +65,40 @@ pkgbase = mingw-w64-qt5-base-static
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-static-build-to-prefer-dynamic-libraries.patch
- source = 0032-Prevent-Cannot-find-feature-windows_vulkan_sdk.patch
- sha256sums = 26b6b686d66a7ad28eaca349e55e2894e5a735f3831e45f2049e93b1daa92121
- sha256sums = 35196184205cb58bdb1ade09c02bfc660679ed4af6dc1d807a24f1c52999545e
- sha256sums = 4c66ecd2e2e215afb7f53382139b5a3a9cc87bfec2dd75af3ab8111ce3556378
- sha256sums = dcc5acb3e160b99101b967bd696dd48a099c65754b3908c16b46c1703f134e08
- sha256sums = 586bea4aa870423778eb497df48479819aa50de8d07977327eb1a0f84565813a
- sha256sums = b5363b325198c3cfaba6437d21cc2cde6c5843d33475fc559f9eae4b20e0c867
- sha256sums = 9f835025a78ab4d7dd08b1a2cb5d499790b8e01a3039741f50c93bc6722f3c71
- sha256sums = 5217bae23859289898060a05769cc6088852f09206d7fc681cdcb492353be219
- sha256sums = 39d32e743984904c878616afb8ffd16ad5421bc2e67606831a4245b9ef924c7b
- sha256sums = f5fc4b36f288bb59d662c58b49a15de84f60be05d13e89719342893138f9a903
- sha256sums = 48f5efe578913656ab79a35f899e15bd09fde58cc10adf8f7f5dbdc0a5022b7d
- sha256sums = f89779100c07431fee063e0f40bcb0006662794afa522e9c5a57ac1eca24f621
- sha256sums = f5ea9cc35754556045dd2dc07745bca89f677ade9b8566539c717d35f4ae0bd1
- sha256sums = 212aeb8f2f287108d2d884c17c2f55177b8f3c39e10357e36c2f1ef2e582a12a
- sha256sums = 2e7145b8a8fca349ce5838d4241d29059dd421c8722260cda5d063b75ffe3b5f
- sha256sums = c0eff682bbc11e2258c5c40591d0222e88af0d2c136b3cede8e4792a7efba2d3
- sha256sums = 8d3879a05e0fe574671bb8952393a4e7ca44183e8116053dbf01776b2d6ad4cf
- sha256sums = 8b06afd5adab795a47520f1dfdb8827507f8d451eb98a02dbf1b57ede08fa6e2
- sha256sums = 21f7e13919ec7d6ae88835ce34185f7d3ff3c541a1a7bad25e4354fac0201723
- sha256sums = 5e08c43b1a4bfc1dfe93330119cfb85d5de873b8642cbf920d4cfbdad05a7ce5
- sha256sums = ee0412e276bac12f57f1019807f678818cc3b166afaa2523e6d3cfbcc6baf5bf
- sha256sums = f5f57e3b1e6314203bb3a98d7ad47c46b4894651b7d4e74749df6b7f0f7548f5
- sha256sums = 22bdbef1d761426c0388a5335c2b80be52aa75e83c75f1d134eba70091de59ed
- sha256sums = fd37d3c487790922e6dede40964d6a8abab9908d674413748c37672863374a65
- sha256sums = 1c4b6e6bbc985b742e4d2124b7be002948b2cb43be4524b8b713253f2afebe96
- sha256sums = 94de3861dedd76133bd3e42793f3db3a1e8b52a921095ff853038cb5b4064a5f
- sha256sums = cd4c07f83cad7b8b1fb2995a398a3ac2ed9b4606efc0154231821db7f793676c
- sha256sums = b15f3a0d0dd1c14c5728444ad449f2753f6c668e73e6e2ad0477fab405c338e9
- sha256sums = 45af95f6f2e228f04ee3e39756cf752a04a0e58da5ed445ab79dbac0c8c7472f
- sha256sums = 29ded7cd3b82e31660d4559f0d2cefde8e18af8c4cea34fd816096946ad72189
- sha256sums = 13aa6ba82a4a28099c0219060deab3d3023424a8c5dcf8df6b105f3831a9a184
- sha256sums = 095a39a517844a3c3ce9282a44f39478dc6d5661b6be7f5b8517f195f0fe1b14
- sha256sums = f8aa4f1a129d0fd98f71e9a108513ff9ca78b3d86a80554e830cf6f1ba5edb00
+ source = 0031-Prevent-Cannot-find-feature-windows_vulkan_sdk.patch
+ source = 0032-Fix-crashes-in-rasterization-code-using-setjmp.patch
+ sha256sums = 06e49a14145574834d4d04f73e6baf662ee5e72e78973e1d7d0fe614472a80a4
+ sha256sums = 11c2b54df2b5ea031c2103366d0b27d0786c3420b29cca391cc0015fd35264d7
+ sha256sums = 2b00e98c8c8acb1a453191be77a2f7a9188e030480864e58ac39b517bb63ffb5
+ sha256sums = 5131dff4db6f63e36ea364ce59b2fdb047fbb6d55e6543316054f6ebcd76711b
+ sha256sums = 3147a21ccad3026a06d8b622db96949d51f32b6a1d25c8aae5fe5a95c3e95625
+ sha256sums = 4bd74cc1d78da412faac71b5357fd86fea3f1781d0b554f8f7fd3684c833e8ce
+ sha256sums = e566e5cdd5bc077c35054be1465148acd5ee209e609690c670b78df88cc9295b
+ sha256sums = 7fe1dc6c1251c16c4236924cb5a03ac55d1dca051bd9d99fbf7b35f91454fda3
+ sha256sums = c054851c46036710ff6f025a48d4b5b2d6e5d5d54c74b73c2cb81b00bdfa029a
+ sha256sums = a2702d6ca3f696ca3c77b00df7bb512f5f3430fce109048c62c97d294758efd8
+ sha256sums = 395339c3dde4115283db948899980e536a355422190bc90850efdc3438c527d8
+ sha256sums = c386790a879e68b9d00bfe9f14afa67d8a374de57bdea164a5252499ec34cbcb
+ sha256sums = 576177950e99f62d05bee487dd5ae1b731fe4acf438553c74e7c48631dd8789b
+ sha256sums = 02bc0ce27d7835829d4e84580fb0a0b864b36b14331a166dba88f1942a6414a3
+ sha256sums = 736de6cd28c8efb1729f926c1fa42c963c7f1d3a9e4b56b098906b570473320f
+ sha256sums = 294f3ab13a546a1bfeae472cf7342e2bce6c058a6867d19038ba1c194fb33b8d
+ sha256sums = 8f202adf905ebce78dd2942d17c0d935f0de7014ffa75840310edc0bd790ff03
+ sha256sums = 129b4667c5e3cfe68040cbae2fce487e2d016bcbe2380a5ba410b225279f71b9
+ sha256sums = fbd8cd4680e10074f90bf79d9d08ad787b483cf7c21250d1db1c8a5c829a1d83
+ sha256sums = 05a29084b9bc3324beefb9ae6d00ea68c3b3c51a0b4595c024300949c906d7fd
+ sha256sums = 7843f5be44b9b367cb81c143c6d670e6a5be40510848c09a1448d921c3437639
+ sha256sums = 7002db8f819bf34cafda04dc4d288fef58aec9e409230dc68fcb542cb48f09bb
+ sha256sums = 57607c662e6d68f2ca856617c8d7cfaa05ba8332ea70b67ab628a8f0cf2ca032
+ sha256sums = 5910c4567348101d0a87197b2e52e59673467247ca4ffc89cba5701d98373435
+ sha256sums = 0181986547b7c70bf2bc8de31198240f99a92e4cfdb1db81c7b99b849c416c1f
+ sha256sums = 9e692f956dffa5c936a2911d8418746b19197962111b4f0f45b33972ed3890f2
+ sha256sums = 1d5e09034c9c903653d10c3983e4dcb710ebe8f08694e5e55199a3e4acb8f629
+ sha256sums = 5379cea6fd54a16e7f67b617bf3582c08f8934ae8d699e85ad21f20dcf192424
+ sha256sums = 82d1db9d4536350fe2549c400487018a8477a15da83a568240a013a6d82dfe92
+ sha256sums = 01413344603a8e99f7b0280e7f297de4ea415e0c5011b1dac116eaf25082220b
+ sha256sums = 4f88801a586c35515fd982f8e465fb4546ef38765c6a2abe1e8ca69e3700d799
+ sha256sums = b4dad74bbe2731aaa8711408fe509344e7e6049def897389f7e2a86423f3377e
+ sha256sums = 17f251d456713c920c6581659c54b9c372e1a329081b2ed9d9826e9e0ddd317a
pkgname = mingw-w64-qt5-base-static
-
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
index bddf956c8255..eb7f5cf67103 100644
--- a/0001-Adjust-win32-g-profile-for-cross-compilation-with-mi.patch
+++ b/0001-Adjust-win32-g-profile-for-cross-compilation-with-mi.patch
@@ -1,25 +1,27 @@
-From e04f26325dae3daefcdfcb8f744e262faee0c508 Mon Sep 17 00:00:00 2001
+From c134da249ee5459358292e1665b69aede5035c5b Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Fri, 3 Feb 2017 18:30:51 +0100
Subject: [PATCH 01/32] 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
+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: I94f5a6c44c112bd44a84f802712077bc14782b4c
---
- mkspecs/common/g++-win32.conf | 52 ++++++++++++++++++++----------
+ mkspecs/common/g++-win32.conf | 51 ++++++++++++++++++++----------
mkspecs/win32-clang-g++/qmake.conf | 4 +--
mkspecs/win32-g++/qmake.conf | 4 +--
- 3 files changed, 39 insertions(+), 21 deletions(-)
+ 3 files changed, 38 insertions(+), 21 deletions(-)
diff --git a/mkspecs/common/g++-win32.conf b/mkspecs/common/g++-win32.conf
-index c3a1f3a373..5208d22bd6 100644
+index c3a1f3a3732..0cc6e93c93e 100644
--- a/mkspecs/common/g++-win32.conf
+++ b/mkspecs/common/g++-win32.conf
@@ -8,18 +8,24 @@
@@ -58,7 +60,7 @@ index c3a1f3a373..5208d22bd6 100644
QMAKE_INCDIR =
-@@ -41,40 +48,51 @@ QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src
+@@ -41,40 +48,50 @@ QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src
QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads
@@ -91,12 +93,11 @@ index c3a1f3a373..5208d22bd6 100644
-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 = -lopengl32 -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luuid -luser32 -ladvapi32 -ljpeg -lpng \
-+ $$system($${QMAKE_PKG_CONFIG} --libs harfbuzz) \
-+ $$system($${QMAKE_PKG_CONFIG} --libs freetype2)
-+QMAKE_LIBS_GUI_STATIC = -lopengl32 -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_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)
@@ -125,7 +126,7 @@ index c3a1f3a373..5208d22bd6 100644
-include(angle.conf)
-include(windows-vulkan.conf)
diff --git a/mkspecs/win32-clang-g++/qmake.conf b/mkspecs/win32-clang-g++/qmake.conf
-index 4630ec4602..3f9fdc72b1 100644
+index 59d42176f03..f8cb9859f28 100644
--- a/mkspecs/win32-clang-g++/qmake.conf
+++ b/mkspecs/win32-clang-g++/qmake.conf
@@ -14,11 +14,11 @@ include(../common/g++-win32.conf)
@@ -143,7 +144,7 @@ index 4630ec4602..3f9fdc72b1 100644
QMAKE_LINK = $${CROSS_COMPILE}clang++
diff --git a/mkspecs/win32-g++/qmake.conf b/mkspecs/win32-g++/qmake.conf
-index 5de482f23b..3c3d22c699 100644
+index 5de482f23b5..3c3d22c6993 100644
--- a/mkspecs/win32-g++/qmake.conf
+++ b/mkspecs/win32-g++/qmake.conf
@@ -13,11 +13,11 @@ include(../common/windows-desktop.conf)
@@ -161,5 +162,5 @@ index 5de482f23b..3c3d22c699 100644
QMAKE_LINK = $${CROSS_COMPILE}g++
--
-2.24.0
+2.44.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 d5e043920d0b..8d45fa0b914a 100644
--- a/0002-Ensure-GLdouble-is-defined-when-using-dynamic-OpenGL.patch
+++ b/0002-Ensure-GLdouble-is-defined-when-using-dynamic-OpenGL.patch
@@ -1,4 +1,4 @@
-From 66aaead6f7f57adf266115ac9764c21839c8505c Mon Sep 17 00:00:00 2001
+From acadba49c80804a908477f9a367c645fdf4300cc Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 13:36:53 +0200
Subject: [PATCH 02/32] Ensure GLdouble is defined when using dynamic OpenGL
@@ -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 4554291bbd..23d55bddeb 100644
+index 4554291bbd9..23d55bddebd 100644
--- a/src/gui/opengl/qopenglfunctions.h
+++ b/src/gui/opengl/qopenglfunctions.h
@@ -56,9 +56,7 @@
@@ -23,5 +23,5 @@ index 4554291bbd..23d55bddeb 100644
#ifdef Q_ENABLE_OPENGL_FUNCTIONS_DEBUG
#include <stdio.h>
--
-2.24.0
+2.44.0
diff --git a/0003-Fix-too-many-sections-assemler-error-in-OpenGL-facto.patch b/0003-Fix-too-many-sections-assemler-error-in-OpenGL-facto.patch
index 4e63f417299b..c860bc808f61 100644
--- a/0003-Fix-too-many-sections-assemler-error-in-OpenGL-facto.patch
+++ b/0003-Fix-too-many-sections-assemler-error-in-OpenGL-facto.patch
@@ -1,4 +1,4 @@
-From 493c7f41180718b024b773cca1c23a4b0c7a8213 Mon Sep 17 00:00:00 2001
+From d3cb4d3b96c01f151e15dc1017f2687f7d8102c3 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 13:48:51 +0200
Subject: [PATCH 03/32] Fix too many sections assemler error in OpenGL factory
@@ -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 24758afdeb..aa04b4a672 100644
+index 24758afdeb3..aa04b4a672e 100644
--- a/src/gui/opengl/opengl.pri
+++ b/src/gui/opengl/opengl.pri
@@ -3,7 +3,8 @@
@@ -25,5 +25,5 @@ index 24758afdeb..aa04b4a672 100644
HEADERS += opengl/qopengl.h \
opengl/qopengl_p.h \
--
-2.24.0
+2.44.0
diff --git a/0004-Make-sure-.pc-files-are-installed-correctly.patch b/0004-Make-sure-.pc-files-are-installed-correctly.patch
index 572c8a08dc10..ab7ade7f8599 100644
--- a/0004-Make-sure-.pc-files-are-installed-correctly.patch
+++ b/0004-Make-sure-.pc-files-are-installed-correctly.patch
@@ -1,4 +1,4 @@
-From f72528e215897c6064ec0ae1132b6b103efaf69b Mon Sep 17 00:00:00 2001
+From ed34f597de640c8ef123db60931353894564aa8d Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 13:54:12 +0200
Subject: [PATCH 04/32] Make sure *.pc files are installed correctly
@@ -10,10 +10,10 @@ Subject: [PATCH 04/32] 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 22ac7bf534..003ad2baf2 100644
+index 7ff921549da..fc996663d8d 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
-@@ -3245,7 +3245,7 @@ MakefileGenerator::openOutput(QFile &file, const QString &build) const
+@@ -3242,7 +3242,7 @@ MakefileGenerator::openOutput(QFile &file, const QString &build) const
}
QString
@@ -22,7 +22,7 @@ index 22ac7bf534..003ad2baf2 100644
{
QString ret = project->first("QMAKE_PKGCONFIG_FILE").toQString();
if (ret.isEmpty()) {
-@@ -3270,7 +3270,11 @@ MakefileGenerator::pkgConfigFileName(bool fixify)
+@@ -3267,7 +3267,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 22ac7bf534..003ad2baf2 100644
return ret;
}
diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h
-index 350ebd377a..d0c234b864 100644
+index 106069c454b..5252a7eaa12 100644
--- a/qmake/generators/makefile.h
+++ b/qmake/generators/makefile.h
-@@ -92,7 +92,7 @@ protected:
+@@ -96,7 +96,7 @@ protected:
virtual void writeDefaultVariables(QTextStream &t);
QString pkgConfigPrefix() const;
@@ -49,10 +49,10 @@ index 350ebd377a..d0c234b864 100644
void writePkgConfigFile(); // for pkg-config
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
-index 266bae7e64..8222854cfc 100644
+index 5e446bd7e2b..183cef29089 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
-@@ -753,7 +753,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 266bae7e64..8222854cfc 100644
uninst.append("\n\t");
uninst.append("-$(DEL_FILE) " + escapeFilePath(dst_pc));
--
-2.24.0
+2.44.0
diff --git a/0005-Don-t-add-resource-files-to-LIBS-parameter.patch b/0005-Don-t-add-resource-files-to-LIBS-parameter.patch
index 76170a237096..8d3fb47348ce 100644
--- a/0005-Don-t-add-resource-files-to-LIBS-parameter.patch
+++ b/0005-Don-t-add-resource-files-to-LIBS-parameter.patch
@@ -1,4 +1,4 @@
-From e9a7328ecd61bf62730661b4af1e4bf9548cbc08 Mon Sep 17 00:00:00 2001
+From a99587c177203e31c8cfbc825be56866c5a4f747 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 13:58:28 +0200
Subject: [PATCH 05/32] Don't add resource files to LIBS parameter
@@ -11,10 +11,10 @@ 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 2175841264..c565d44e67 100644
+index ee9a41838bc..8d1dcae85bb 100644
--- a/qmake/generators/win32/mingw_make.cpp
+++ b/qmake/generators/win32/mingw_make.cpp
-@@ -192,7 +192,7 @@ void MingwMakefileGenerator::init()
+@@ -147,7 +147,7 @@ void MingwMakefileGenerator::init()
processVars();
@@ -24,5 +24,5 @@ index 2175841264..c565d44e67 100644
if (project->isActiveConfig("dll")) {
QString destDir = "";
--
-2.24.0
+2.44.0
diff --git a/0006-Prevent-debug-library-names-in-pkg-config-files.patch b/0006-Prevent-debug-library-names-in-pkg-config-files.patch
index 20206734640e..b49319e68781 100644
--- a/0006-Prevent-debug-library-names-in-pkg-config-files.patch
+++ b/0006-Prevent-debug-library-names-in-pkg-config-files.patch
@@ -1,4 +1,4 @@
-From 1bef9ba7bb4cab5b5b1c245eca79f1cbfdfb55a1 Mon Sep 17 00:00:00 2001
+From 6456e33a0b4797be08898dce2ce4ccce1c07bef8 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 14:01:14 +0200
Subject: [PATCH 06/32] Prevent debug library names in pkg-config files
@@ -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 003ad2baf2..5c6e7e1281 100644
+index fc996663d8d..23ac736fc06 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
-@@ -3259,6 +3259,9 @@ MakefileGenerator::pkgConfigFileName(bool fixify, bool onlyPrependDestdir)
+@@ -3256,6 +3256,9 @@ MakefileGenerator::pkgConfigFileName(bool fixify, bool onlyPrependDestdir)
if (dot != -1)
ret = ret.left(dot);
}
@@ -29,5 +29,5 @@ index 003ad2baf2..5c6e7e1281 100644
QString subdir = project->first("QMAKE_PKGCONFIG_DESTDIR").toQString();
if(!subdir.isEmpty()) {
--
-2.24.0
+2.44.0
diff --git a/0007-Fix-linking-against-shared-static-libpng.patch b/0007-Fix-linking-against-shared-static-libpng.patch
index c3e6ef8af005..87bcd9bf43c5 100644
--- a/0007-Fix-linking-against-shared-static-libpng.patch
+++ b/0007-Fix-linking-against-shared-static-libpng.patch
@@ -1,4 +1,4 @@
-From f2c9c83b1eea3e85bb03b2b2f8fde9d0376e041f Mon Sep 17 00:00:00 2001
+From 6979ca5c02d202597cf516cab889babbb9f74acc Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Thu, 26 Jan 2017 17:51:31 +0100
Subject: [PATCH 07/32] Fix linking against shared/static libpng
@@ -9,10 +9,10 @@ Change-Id: Ic7a0ec9544059b8e647a5d0186f1b88c00911dcf
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/gui/configure.json b/src/gui/configure.json
-index 6280b4dfa2..36325920cd 100644
+index 95e8955b510..bc3eae90872 100644
--- a/src/gui/configure.json
+++ b/src/gui/configure.json
-@@ -387,8 +387,10 @@
+@@ -399,8 +399,10 @@
{ "type": "pkgConfig", "args": "libpng" },
{ "libs": "-llibpng16", "condition": "config.msvc" },
{ "libs": "-llibpng", "condition": "config.msvc" },
@@ -26,5 +26,5 @@ index 6280b4dfa2..36325920cd 100644
],
"use": [
--
-2.24.0
+2.44.0
diff --git a/0008-Fix-linking-against-static-D-Bus.patch b/0008-Fix-linking-against-static-D-Bus.patch
index 4cdbb7ef4291..27e30094ad7d 100644
--- a/0008-Fix-linking-against-static-D-Bus.patch
+++ b/0008-Fix-linking-against-static-D-Bus.patch
@@ -1,4 +1,4 @@
-From edebe4b52babc03509ff5d2037bcf59f48da21c5 Mon Sep 17 00:00:00 2001
+From a1cd8b87b57eee2b9724d64a2c3b2c949981c544 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Fri, 3 Feb 2017 19:36:25 +0100
Subject: [PATCH 08/32] Fix linking against static D-Bus
@@ -9,10 +9,10 @@ Subject: [PATCH 08/32] Fix linking against static D-Bus
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/configure.json b/configure.json
-index af55bb6fd2..370c27af5b 100644
+index 4763ff645f0..e97969ab25c 100644
--- a/configure.json
+++ b/configure.json
-@@ -187,18 +187,23 @@
+@@ -190,18 +190,23 @@
"dbus": {
"label": "D-Bus >= 1.2",
"test": {
@@ -39,7 +39,7 @@ index af55bb6fd2..370c27af5b 100644
{ "libs": "-ldbus-1", "condition": "!config.win32" }
]
diff --git a/src/dbus/qdbus_symbols_p.h b/src/dbus/qdbus_symbols_p.h
-index 7cce0d71aa..4d3d774d45 100644
+index accaa4f5ed5..4b11c74caa7 100644
--- a/src/dbus/qdbus_symbols_p.h
+++ b/src/dbus/qdbus_symbols_p.h
@@ -57,6 +57,10 @@
@@ -54,5 +54,5 @@ index 7cce0d71aa..4d3d774d45 100644
# include <dbus/dbus.h>
#else
--
-2.24.0
+2.44.0
diff --git a/0009-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 28af89b7240c..4f2deb073fcc 100644
--- a/0009-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,4 +1,4 @@
-From 8961310da06333af92430ce142dc588d11be9773 Mon Sep 17 00:00:00 2001
+From 33ff3ba65c06a02136208b80567a0ba0c8db844a Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Fri, 2 Jun 2017 18:28:10 +0200
Subject: [PATCH 09/32] Don't try to use debug version of D-Bus library
@@ -12,10 +12,10 @@ Change-Id: Ic34e1025fda55f9659e065f5bbe9d51f55420adb
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.json b/configure.json
-index 370c27af5b..36545a593b 100644
+index e97969ab25c..b75f8a8033c 100644
--- a/configure.json
+++ b/configure.json
-@@ -200,7 +200,7 @@
+@@ -203,7 +203,7 @@
{
"libs": "",
"builds": {
@@ -25,5 +25,5 @@ index 370c27af5b..36545a593b 100644
},
"condition": "config.win32 && features.shared"
--
-2.24.0
+2.44.0
diff --git a/0010-Fix-linking-against-static-freetype2.patch b/0010-Fix-linking-against-static-freetype2.patch
index c564452c640c..df45a37bd830 100644
--- a/0010-Fix-linking-against-static-freetype2.patch
+++ b/0010-Fix-linking-against-static-freetype2.patch
@@ -1,30 +1,29 @@
-From b093b965b4f245488c6c6cb4ac97125e65a4ec63 Mon Sep 17 00:00:00 2001
+From c1019300eed7fabb7c2c73d5510e5a83e06a89b2 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Fri, 3 Feb 2017 20:51:19 +0100
Subject: [PATCH 10/32] Fix linking against static freetype2
---
- src/gui/configure.json | 7 +++++--
- 1 file changed, 5 insertions(+), 2 deletions(-)
+ 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 36325920cd..972f9914ea 100644
+index bc3eae90872..d9b540ce428 100644
--- a/src/gui/configure.json
+++ b/src/gui/configure.json
-@@ -238,8 +238,11 @@
+@@ -238,8 +238,10 @@
},
"headers": "ft2build.h",
"sources": [
- { "type": "pkgConfig", "args": "freetype2" },
- { "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 && !config.wasm" },
++ { "libs": "-lfreetype -lharfbuzz -lfreetype -lbrotlidec -lbrotlicommon -lglib-2.0 -lintl -lws2_32 -lole32 -lwinmm -lshlwapi -lpcre2-8 -lintl -lpcre2-8 -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.24.0
+2.44.0
diff --git a/0011-Fix-linking-against-static-harfbuzz.patch b/0011-Fix-linking-against-static-harfbuzz.patch
index 5f31b0691e2a..a3fc79e0754b 100644
--- a/0011-Fix-linking-against-static-harfbuzz.patch
+++ b/0011-Fix-linking-against-static-harfbuzz.patch
@@ -1,4 +1,4 @@
-From 9249ae7ad76508798e6af05cb1bf8cc1915afd82 Mon Sep 17 00:00:00 2001
+From d5ca57cecd935d1475d5b5677391e703a9733989 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 14:22:56 +0200
Subject: [PATCH 11/32] Fix linking against static harfbuzz
@@ -8,22 +8,22 @@ Subject: [PATCH 11/32] Fix linking against static harfbuzz
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/gui/configure.json b/src/gui/configure.json
-index 972f9914ea..894c10259d 100644
+index d9b540ce428..69cb564e868 100644
--- a/src/gui/configure.json
+++ b/src/gui/configure.json
-@@ -306,7 +306,11 @@
+@@ -305,7 +305,11 @@
},
"headers": "harfbuzz/hb.h",
"sources": [
- "-lharfbuzz"
+ { "type": "pkgConfig", "args": "--static --libs harfbuzz", "condition": "!features.shared" },
+ { "type": "pkgConfig", "args": "--libs harfbuzz", "condition": "features.shared" },
-+ { "libs": "-lharfbuzz -lfreetype -lharfbuzz -lglib-2.0 -lintl -lws2_32 -lole32 -lwinmm -lshlwapi -lpcre -lintl -lpcre -lintl -liconv -lgraphite2 -lbz2", "condition": "!features.shared" },
++ { "libs": "-lharfbuzz -lfreetype -lharfbuzz -lglib-2.0 -lintl -lws2_32 -lole32 -lwinmm -lshlwapi -lpcre2-8 -lintl -lpcre2-8 -lintl -liconv -lgraphite2 -lbz2", "condition": "!features.shared" },
+ { "libs": "-Wl,-Bdynamic -lharfbuzz -Wl,-Bstatic", "condition": "!features.shared" },
+ { "libs": "-lharfbuzz", "condition": "features.shared" }
]
},
"imf": {
--
-2.24.0
+2.44.0
diff --git a/0012-Fix-linking-against-static-pcre.patch b/0012-Fix-linking-against-static-pcre.patch
index 8f3a71f31324..0be57cdea0e2 100644
--- a/0012-Fix-linking-against-static-pcre.patch
+++ b/0012-Fix-linking-against-static-pcre.patch
@@ -1,19 +1,19 @@
-From 31912a713ce6b8dfc4c19ce46137e2b62d368a72 Mon Sep 17 00:00:00 2001
+From 2189baae3ddff3bdba3f8d8480fa313e50432093 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 14:24:01 +0200
Subject: [PATCH 12/32] Fix linking against static pcre
Change-Id: I3225c6e82dc4d17aef37d4289c16eb7a5ea3c5a1
---
- src/corelib/tools/qregularexpression.cpp | 4 ++++
+ src/corelib/text/qregularexpression.cpp | 4 ++++
1 file changed, 4 insertions(+)
-diff --git a/src/corelib/tools/qregularexpression.cpp b/src/corelib/tools/qregularexpression.cpp
-index bdaa2d3243..90f8250c03 100644
---- a/src/corelib/tools/qregularexpression.cpp
-+++ b/src/corelib/tools/qregularexpression.cpp
-@@ -53,6 +53,10 @@
- #include <QtCore/qdatastream.h>
+diff --git a/src/corelib/text/qregularexpression.cpp b/src/corelib/text/qregularexpression.cpp
+index 1f10150435d..6a97b47773e 100644
+--- a/src/corelib/text/qregularexpression.cpp
++++ b/src/corelib/text/qregularexpression.cpp
+@@ -57,6 +57,10 @@
+ #endif
#define PCRE2_CODE_UNIT_WIDTH 16
+#ifdef QT_STATIC
@@ -24,5 +24,5 @@ index bdaa2d3243..90f8250c03 100644
#include <pcre2.h>
--
-2.24.0
+2.44.0
diff --git a/0013-Fix-linking-against-shared-static-MariaDB.patch b/0013-Fix-linking-against-shared-static-MariaDB.patch
index d79bc4383ace..62a25589aaf6 100644
--- a/0013-Fix-linking-against-shared-static-MariaDB.patch
+++ b/0013-Fix-linking-against-shared-static-MariaDB.patch
@@ -1,4 +1,4 @@
-From f20041cf701ce3b8918ddb4bc00d89fbc223eabf Mon Sep 17 00:00:00 2001
+From 5cdbce5a33f7881eee348250b1b9867c64ea686d Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 18:56:55 +0200
Subject: [PATCH 13/32] Fix linking against shared/static MariaDB
@@ -9,18 +9,18 @@ Change-Id: I9722c154d845f288a2d4d1ab14a014066b28819b
1 file changed, 2 insertions(+)
diff --git a/src/plugins/sqldrivers/configure.json b/src/plugins/sqldrivers/configure.json
-index cd20eef1df..babd0465ce 100644
+index 28ccbeadcde..a5e3001bf60 100644
--- a/src/plugins/sqldrivers/configure.json
+++ b/src/plugins/sqldrivers/configure.json
@@ -67,6 +67,8 @@
},
"headers": "mysql.h",
"sources": [
-+ { "libs": "-lmariadbclient -lssl -lcrypto -lgdi32 -lws2_32 -lpthread -lz -lm", "condition": "config.win32 && !features.shared" },
++ { "libs": "-lmariadbclient -lssl -lcrypto -lcrypt32 -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.24.0
+2.44.0
diff --git a/0014-Fix-linking-against-shared-static-PostgreSQL.patch b/0014-Fix-linking-against-shared-static-PostgreSQL.patch
index 86c604c5b7b0..2cce773a6550 100644
--- a/0014-Fix-linking-against-shared-static-PostgreSQL.patch
+++ b/0014-Fix-linking-against-shared-static-PostgreSQL.patch
@@ -1,4 +1,4 @@
-From 1df4822044b7883c15f2daffe0f31785fffdeda1 Mon Sep 17 00:00:00 2001
+From d95435227c24ef2b1be37561a55751e8ff3cfd0e Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 18:58:25 +0200
Subject: [PATCH 14/32] Fix linking against shared/static PostgreSQL
@@ -8,21 +8,21 @@ Subject: [PATCH 14/32] Fix linking against shared/static PostgreSQL
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/plugins/sqldrivers/configure.json b/src/plugins/sqldrivers/configure.json
-index babd0465ce..b4b3bdec6b 100644
+index a5e3001bf60..5768d3b9a97 100644
--- a/src/plugins/sqldrivers/configure.json
+++ b/src/plugins/sqldrivers/configure.json
-@@ -88,9 +88,9 @@
+@@ -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 -liconv", "condition": "config.win32 && !features.shared" },
++ { "type": "psqlEnv", "libs": "-lpq -lpgcommon -lpgport -lintl -lssl -lcrypto -lcrypt32 -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.24.0
+2.44.0
diff --git a/0015-Rename-qtmain-to-qt5main.patch b/0015-Rename-qtmain-to-qt5main.patch
index 98ed6d98b21b..08a71116e005 100644
--- a/0015-Rename-qtmain-to-qt5main.patch
+++ b/0015-Rename-qtmain-to-qt5main.patch
@@ -1,4 +1,4 @@
-From 6d78391d7d88a4726926383c1fcadd85a85131c8 Mon Sep 17 00:00:00 2001
+From 41e6e4c93cc8cbe45305458bc87573ad5a630601 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 14:25:40 +0200
Subject: [PATCH 15/32] Rename qtmain to qt5main
@@ -6,16 +6,16 @@ Subject: [PATCH 15/32] Rename qtmain to qt5main
Prevents conflict with mingw-w64-qt4 package
---
mkspecs/common/g++-win32.conf | 2 +-
- mkspecs/features/create_cmake.prf | 4 ++--
+ mkspecs/features/create_cmake.prf | 8 ++++----
mkspecs/features/win32/windows.prf | 4 ++--
src/winmain/winmain.pro | 2 +-
- 4 files changed, 6 insertions(+), 6 deletions(-)
+ 4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/mkspecs/common/g++-win32.conf b/mkspecs/common/g++-win32.conf
-index 5208d22bd6..1a058b787f 100644
+index 0cc6e93c93e..c2882d0b2c4 100644
--- a/mkspecs/common/g++-win32.conf
+++ b/mkspecs/common/g++-win32.conf
-@@ -84,7 +84,7 @@ QMAKE_LIBS_OPENGL = -lglu32 -lopengl32 -lgdi32 -luser32
+@@ -83,7 +83,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
@@ -25,22 +25,30 @@ index 5208d22bd6..1a058b787f 100644
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 314cd5cc67..a3cb474b67 100644
+index 64639f177df..6cd94f8058a 100644
--- a/mkspecs/features/create_cmake.prf
+++ b/mkspecs/features/create_cmake.prf
-@@ -271,8 +271,8 @@ mac {
- CMAKE_LIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.dll
+@@ -336,14 +336,14 @@ mac {
+ }
mingw {
-- CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqtmain$${QT_LIBINFIX}d.a
+- 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}.a
++ CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqt5main$${QT_LIBINFIX}$${debug_suffix}.a
+ CMAKE_WINMAIN_FILE_LOCATION_RELEASE = libqt5main$${QT_LIBINFIX}.a
- !isEmpty(CMAKE_STATIC_TYPE) {
- CMAKE_STATIC_WINDOWS_BUILD = "true"
+ 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
+index 272170d4280..17f3ef9c2dd 100644
--- a/mkspecs/features/win32/windows.prf
+++ b/mkspecs/features/win32/windows.prf
@@ -5,8 +5,8 @@ contains(TEMPLATE, ".*app") {
@@ -55,7 +63,7 @@ index 272170d428..17f3ef9c2d 100644
QMAKE_LIBS += $$lib
} else {
diff --git a/src/winmain/winmain.pro b/src/winmain/winmain.pro
-index 9cb6ab0c59..4327ba365e 100644
+index 1f54c846eca..162e7a4b1b4 100644
--- a/src/winmain/winmain.pro
+++ b/src/winmain/winmain.pro
@@ -2,7 +2,7 @@
@@ -68,5 +76,5 @@ index 9cb6ab0c59..4327ba365e 100644
CONFIG += static
--
-2.24.0
+2.44.0
diff --git a/0016-Enable-rpath-for-build-tools.patch b/0016-Enable-rpath-for-build-tools.patch
index f78249bba3c5..5919447ebb08 100644
--- a/0016-Enable-rpath-for-build-tools.patch
+++ b/0016-Enable-rpath-for-build-tools.patch
@@ -1,4 +1,4 @@
-From ee81a9edd185e6b452a93de51fc5963a6dfce71f Mon Sep 17 00:00:00 2001
+From 0dc529641264921bd859fabdf4a6d082b253fcdc Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 17:59:27 +0200
Subject: [PATCH 16/32] Enable rpath for build tools
@@ -13,7 +13,7 @@ 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 8354f30eea..30e8cf18c5 100644
+index 8354f30eea2..30e8cf18c51 100644
--- a/mkspecs/features/qt_app.prf
+++ b/mkspecs/features/qt_app.prf
@@ -21,6 +21,7 @@ isEmpty(QMAKE_TARGET_DESCRIPTION): \
@@ -33,5 +33,5 @@ index 8354f30eea..30e8cf18c5 100644
INSTALLS += target
--
-2.24.0
+2.44.0
diff --git a/0017-Use-system-zlib-for-build-tools.patch b/0017-Use-system-zlib-for-build-tools.patch
index 28a2fc1fd2ca..3e8814e569ca 100644
--- a/0017-Use-system-zlib-for-build-tools.patch
+++ b/0017-Use-system-zlib-for-build-tools.patch
@@ -1,4 +1,4 @@
-From 7819e3f236674e2bfb22f07bd91eaef0e0c7926e Mon Sep 17 00:00:00 2001
+From c8b4c96da58bf20d982f5142ac0f218a2abeeb90 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 18:04:42 +0200
Subject: [PATCH 17/32] Use system zlib for build tools
@@ -8,10 +8,10 @@ Subject: [PATCH 17/32] Use system zlib for build tools
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro
-index 83e44ff9a4..4734623936 100644
+index 24862a07dbc..698e6cfb95d 100644
--- a/src/tools/bootstrap/bootstrap.pro
+++ b/src/tools/bootstrap/bootstrap.pro
-@@ -135,7 +135,9 @@ macx {
+@@ -158,7 +158,9 @@ macx {
../../corelib/io/qstandardpaths_win.cpp
}
@@ -23,5 +23,5 @@ index 83e44ff9a4..4734623936 100644
} else {
CONFIG += no_core_dep
--
-2.24.0
+2.44.0
diff --git a/0018-Merge-shared-and-static-library-trees.patch b/0018-Merge-shared-and-static-library-trees.patch
index 1f2db1e84177..7e35a741d883 100644
--- a/0018-Merge-shared-and-static-library-trees.patch
+++ b/0018-Merge-shared-and-static-library-trees.patch
@@ -1,9 +1,11 @@
-From fbda1fcb3f3bd84852a594f2bf8805db93e27294 Mon Sep 17 00:00:00 2001
+From 2029f79155af8b3fdff3b9a66ee25b7ff274c327 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 18:45:08 +0200
Subject: [PATCH 18/32] 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 +++++++++++
@@ -15,10 +17,10 @@ Allow installation of shared and static build in the same prefix
7 files changed, 74 insertions(+), 11 deletions(-)
diff --git a/configure.pri b/configure.pri
-index 3778ece180..c108b2843c 100644
+index 365a16403eb..85acb3757aa 100644
--- a/configure.pri
+++ b/configure.pri
-@@ -652,7 +652,12 @@ defineTest(qtConfOutput_machineTuple) {
+@@ -668,7 +668,12 @@ defineTest(qtConfOutput_machineTuple) {
defineTest(qtConfOutput_commitOptions) {
# qdevice.pri needs to be written early, because the compile tests require it.
@@ -31,8 +33,8 @@ index 3778ece180..c108b2843c 100644
+ write_file($$QT_BUILD_TREE/mkspecs/qdevice$$DEVICE_PRI_SUFFIX, $${currentConfig}.output.devicePro)|error()
}
- # type (empty or 'host'), option name, default value
-@@ -1342,3 +1347,12 @@ defineTest(createConfigStatus) {
+ # Output is written after configuring each Qt module,
+@@ -1430,3 +1435,12 @@ defineTest(createConfigStatus) {
QMAKE_POST_CONFIGURE += \
"createConfigStatus()"
@@ -46,7 +48,7 @@ index 3778ece180..c108b2843c 100644
+ CONFIG += no_smart_library_merge
+}
diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf
-index 0e41b825ec..4c4b6dd12a 100644
+index ac799047ab8..60b63922670 100644
--- a/mkspecs/features/default_post.prf
+++ b/mkspecs/features/default_post.prf
@@ -1,5 +1,16 @@
@@ -67,7 +69,7 @@ index 0e41b825ec..4c4b6dd12a 100644
!have_target:!force_qt: CONFIG -= qt
diff --git a/mkspecs/features/device_config.prf b/mkspecs/features/device_config.prf
-index c15559e174..dd09ac749d 100644
+index c15559e1740..dd09ac749d8 100644
--- a/mkspecs/features/device_config.prf
+++ b/mkspecs/features/device_config.prf
@@ -4,7 +4,14 @@
@@ -87,10 +89,10 @@ index c15559e174..dd09ac749d 100644
unset(DEVICE_PRI)
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf
-index 3a71376029..bbada46c29 100644
+index da1f44a88a1..8096d01c341 100644
--- a/mkspecs/features/qt.prf
+++ b/mkspecs/features/qt.prf
-@@ -232,6 +232,23 @@ for(ever) {
+@@ -254,6 +254,23 @@ for(ever) {
!isEmpty(MODULE_WINRT_CAPABILITIES_DEVICE): \
WINRT_MANIFEST.capabilities_device_default += $$MODULE_WINRT_CAPABILITIES_DEVICE
}
@@ -115,7 +117,7 @@ index 3a71376029..bbada46c29 100644
!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
+index 51ea3a8321a..275e080ae4e 100644
--- a/mkspecs/features/spec_pre.prf
+++ b/mkspecs/features/spec_pre.prf
@@ -14,9 +14,14 @@ QMAKE_EXT_H = .h .hpp .hh .hxx
@@ -137,10 +139,10 @@ index 51ea3a8321..275e080ae4 100644
QMAKE_EXT_YACC = .y
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
-index 5c6e7e1281..0eeeb5fb5e 100644
+index 23ac736fc06..16531d556e0 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
-@@ -3262,6 +3262,9 @@ MakefileGenerator::pkgConfigFileName(bool fixify, bool onlyPrependDestdir)
+@@ -3259,6 +3259,9 @@ MakefileGenerator::pkgConfigFileName(bool fixify, bool onlyPrependDestdir)
if (project->isActiveConfig("debug")) {
ret += "d";
}
@@ -150,24 +152,24 @@ index 5c6e7e1281..0eeeb5fb5e 100644
ret += Option::pkgcfg_ext;
QString subdir = project->first("QMAKE_PKGCONFIG_DESTDIR").toQString();
if(!subdir.isEmpty()) {
-@@ -3438,11 +3441,11 @@ MakefileGenerator::writePkgConfigFile()
- t << endl;
+@@ -3435,11 +3438,11 @@ MakefileGenerator::writePkgConfigFile()
+ t << Qt::endl;
// requires
- const QString requiresString = project->values("QMAKE_PKGCONFIG_REQUIRES").join(' ');
- if (!requiresString.isEmpty()) {
-- t << "Requires: " << requiresString << endl;
+- 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 << endl;
+ t << Qt::endl;
}
diff --git a/qtbase.pro b/qtbase.pro
-index c0ce0972ef..5a2deaf31d 100644
+index c0ce0972ef4..5a2deaf31d2 100644
--- a/qtbase.pro
+++ b/qtbase.pro
@@ -20,6 +20,12 @@ CLEAN_DEPS += qmake-clean
@@ -202,5 +204,5 @@ index c0ce0972ef..5a2deaf31d 100644
mkspecs.files -= $$PWD/mkspecs/modules $$PWD/mkspecs/modules-inst
INSTALLS += mkspecs
--
-2.24.0
+2.44.0
diff --git a/0019-Use-.dll.a-as-import-lib-extension.patch b/0019-Use-.dll.a-as-import-lib-extension.patch
index 3ecfa27f6af7..cc8f99287b11 100644
--- a/0019-Use-.dll.a-as-import-lib-extension.patch
+++ b/0019-Use-.dll.a-as-import-lib-extension.patch
@@ -1,47 +1,66 @@
-From ddbf905975bdeb1e34a6e59262ad154562ccaf9a Mon Sep 17 00:00:00 2001
+From d5bbf09f6dd16ada912feae0a1a63cf22ecd5f71 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 18:26:18 +0200
Subject: [PATCH 19/32] Use *.dll.a as import lib extension
The variables used here are provided by
g++-win32.conf
+
+Change-Id: Ic8915ea40b4db3d9f60533d21daf8ff1ec1bd803
---
- mkspecs/features/create_cmake.prf | 5 +++--
- mkspecs/features/qt.prf | 15 ++++++++++++---
- qmake/generators/win32/winmakefile.cpp | 15 +++++++++++----
- 3 files changed, 26 insertions(+), 9 deletions(-)
+ mkspecs/features/create_cmake.prf | 5 ++--
+ mkspecs/features/qt.prf | 38 ++++++++++----------------
+ qmake/generators/win32/winmakefile.cpp | 15 +++++++---
+ 3 files changed, 28 insertions(+), 30 deletions(-)
diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
-index a3cb474b67..8539bd928f 100644
+index 6cd94f8058a..ac089a2f9f0 100644
--- a/mkspecs/features/create_cmake.prf
+++ b/mkspecs/features/create_cmake.prf
-@@ -282,8 +282,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}
- }
+@@ -339,8 +339,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 = qtmain$${QT_LIBINFIX}d.lib
+ 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 bbada46c29..d6299d8eed 100644
+index 8096d01c341..b79b324b887 100644
--- a/mkspecs/features/qt.prf
+++ b/mkspecs/features/qt.prf
-@@ -213,12 +213,21 @@ for(ever) {
+@@ -215,32 +215,22 @@ for(ever) {
+ # Linking frameworks by absolute path does not work.
LIBS$$var_sfx += -framework $$framework
} else {
- lib = $$MODULE_MODULE$$qtPlatformTargetSuffix()
+- candidates = $$MODULE_MODULE$$qtPlatformTargetSuffix()
+- darwin: candidates *= $$MODULE_MODULE
- win32|contains(MODULE_CONFIG, staticlib) {
+- lib_prefix = $$MODULE_LIBS/$$QMAKE_PREFIX_STATICLIB
+- lib_suffix = $$QMAKE_EXTENSION_STATICLIB
+- add_lib_to_pretargetdeps = true
++ lib = $$MODULE_MODULE$$qtPlatformTargetSuffix()
+ contains(MODULE_CONFIG, staticlib) {
- lib = $$MODULE_LIBS/$$QMAKE_PREFIX_STATICLIB$${lib}.$$QMAKE_EXTENSION_STATICLIB
- PRE_TARGETDEPS += $$lib
++ lib = $$MODULE_LIBS/$$QMAKE_PREFIX_STATICLIB$${lib}.$$QMAKE_EXTENSION_STATICLIB
++ PRE_TARGETDEPS += $$lib
} else {
-- lib = $$MODULE_LIBS/$$QMAKE_PREFIX_SHLIB$${lib}.$$QMAKE_EXTENSION_SHLIB
+- lib_prefix = $$MODULE_LIBS/$$QMAKE_PREFIX_SHLIB
+- lib_suffix = $$QMAKE_EXTENSION_SHLIB
+- add_lib_to_pretargetdeps = false
- }
+- lib_missing = true
+- lib_fallback =
+- for(lib_base, candidates) {
+- lib = $${lib_prefix}$${lib_base}.$${lib_suffix}
+- isEmpty(lib_fallback): \
+- lib_fallback = $$lib
+- exists($$lib) {
+- lib_missing = false
+- break()
+ win32 {
+ shared|actually_a_shared_build {
+ lib = $$MODULE_LIBS/$$QMAKE_PREFIX_STATICLIB$${lib}.$$QMAKE_EXTENSION_IMPORTLIB
@@ -51,16 +70,21 @@ index bbada46c29..d6299d8eed 100644
+ PRE_TARGETDEPS += $$lib
+ } else {
+ lib = $$MODULE_LIBS/$$QMAKE_PREFIX_SHLIB$${lib}.$$QMAKE_EXTENSION_SHLIB
-+ }
+ }
+- }
+- $$lib_missing: \
+- lib = $$lib_fallback
+- $$add_lib_to_pretargetdeps: \
+- PRE_TARGETDEPS += $$lib
+ }
LIBS$$var_sfx += $$lib
}
}
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
-index 8222854cfc..17592c2492 100644
+index 183cef29089..03732df4a84 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
-@@ -80,9 +80,13 @@ Win32MakefileGenerator::parseLibFlag(const ProString &flag, ProString *arg)
+@@ -99,9 +99,13 @@ private:
bool
Win32MakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags)
{
@@ -74,10 +98,10 @@ index 8222854cfc..17592c2492 100644
+ impexts.append(project->values("QMAKE_EXTENSION_IMPORTLIB"));
+ impexts.append(project->values("QMAKE_EXTENSION_STATICLIB"));
+ }
- QList<QMakeLocalFileName> dirs;
+ QVector<LibrarySearchPath> dirs;
int libidx = 0;
for (const ProString &dlib : project->values("QMAKE_DEFAULT_LIBDIRS"))
-@@ -257,9 +261,12 @@ void Win32MakefileGenerator::fixTargetExt()
+@@ -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")) {
@@ -92,5 +116,5 @@ index 8222854cfc..17592c2492 100644
+ project->first("QMAKE_EXTENSION_SHLIB"));
project->values("TARGET").first() = project->first("QMAKE_PREFIX_SHLIB") + project->first("TARGET");
--
-2.24.0
+2.44.0
diff --git a/0020-Pull-dependencies-of-static-libraries-in-CMake-modul.patch b/0020-Pull-dependencies-of-static-libraries-in-CMake-modul.patch
index a74087dc2409..2fe1a55d86a5 100644
--- a/0020-Pull-dependencies-of-static-libraries-in-CMake-modul.patch
+++ b/0020-Pull-dependencies-of-static-libraries-in-CMake-modul.patch
@@ -1,4 +1,4 @@
-From bf63f766c525dfb28c26f981397ad4fdfb171900 Mon Sep 17 00:00:00 2001
+From 8d7db460bee900348d29fb86784de1a79312bc19 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 18:32:00 +0200
Subject: [PATCH 20/32] Pull dependencies of static libraries in CMake modules
@@ -13,25 +13,32 @@ patch provides:
1. Take dependencies of static plugins into account as well
2. Create imported targets for the dependencies to prevent
- problems with -Wl,-Bstatic and -Wl,-Bdynamic
+ CMake from adding wrong `-Wl,-Bstatic` and `-Wl,-Bdynamic`
+ linker flags
-Note that this patch has been harmonized with official changes,
-e.g. to use QMAKE_PRL_LIBS instead of QMAKE_PRL_LIBS_FOR_CMAKE.
+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.
-Change-Id: Id818ed54ff2bfb86bfefee6e39ebc791e8343d3a
+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: I9a1a384aeb39f9185342e3581ab98feb8ad103a0
---
- .../data/cmake/Qt5BasicConfig.cmake.in | 192 ++++++++++++------
- .../data/cmake/Qt5PluginTarget.cmake.in | 11 +-
- 2 files changed, 136 insertions(+), 67 deletions(-)
+ .../data/cmake/Qt5BasicConfig.cmake.in | 242 +++++++++---------
+ .../data/cmake/Qt5PluginTarget.cmake.in | 92 +------
+ 2 files changed, 133 insertions(+), 201 deletions(-)
diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
-index f4a34d6e48..88ea04ce2c 100644
+index db18dbece64..5a5bc4d61d6 100644
--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
+++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
-@@ -53,6 +53,10 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura
+@@ -52,6 +52,10 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura
set(_lib_deps)
set(_link_flags)
@@ -42,7 +49,7 @@ index f4a34d6e48..88ea04ce2c 100644
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
set(_qt5_install_libs \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}\")
!!ELSE
-@@ -61,6 +65,10 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura
+@@ -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]*=\")
@@ -53,16 +60,16 @@ index f4a34d6e48..88ea04ce2c 100644
# 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
-@@ -79,7 +87,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()
-@@ -120,6 +128,37 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura
+@@ -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()
@@ -100,11 +107,8 @@ index f4a34d6e48..88ea04ce2c 100644
!!ENDIF
!!IF !equals(TEMPLATE, aux)
-@@ -133,52 +172,39 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI
- set(imported_location \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
- !!ENDIF
+@@ -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}
- )
@@ -124,10 +128,10 @@ index f4a34d6e48..88ea04ce2c 100644
!!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}")
@@ -144,20 +148,29 @@ index f4a34d6e48..88ea04ce2c 100644
- set(_static_deps_genex \"$<${_genex_condition}:${_static_deps}>\")
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY INTERFACE_LINK_LIBRARIES
- \"${_static_deps_genex}\"
-- )
-- endif()
--
-- set(_static_link_flags \"${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LINK_FLAGS}\")
-- if(NOT CMAKE_VERSION VERSION_LESS \"3.13\" AND _static_link_flags)
-- set(_static_link_flags_genex \"$<${_genex_condition}:${_static_link_flags}>\")
-- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY INTERFACE_LINK_OPTIONS
-- \"${_static_link_flags_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}\"
@@ -171,7 +184,7 @@ index f4a34d6e48..88ea04ce2c 100644
!!ENDIF
!!IF !isEmpty(CMAKE_WINDOWS_BUILD)
-@@ -195,6 +221,15 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI
+@@ -222,6 +238,15 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI
endif()
!!ENDIF
endmacro()
@@ -187,10 +200,10 @@ index f4a34d6e48..88ea04ce2c 100644
!!ENDIF
if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
-@@ -364,13 +399,15 @@ 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)
@@ -201,13 +214,12 @@ index f4a34d6e48..88ea04ce2c 100644
!!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)
-@@ -385,6 +422,56 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
- 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, ";"))
+@@ -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\")
@@ -262,7 +274,7 @@ index f4a34d6e48..88ea04ce2c 100644
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})
-@@ -403,9 +490,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+@@ -467,6 +543,9 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
list(APPEND _Qt5$${CMAKE_MODULE_NAME}_PRIVATEDEPS ${dep}Private)
endif()
endforeach()
@@ -272,11 +284,15 @@ index f4a34d6e48..88ea04ce2c 100644
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)
-@@ -475,9 +566,11 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+@@ -547,9 +627,11 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
!!ELSE
\"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
!!ENDIF
@@ -290,15 +306,21 @@ index f4a34d6e48..88ea04ce2c 100644
!!ENDIF // CMAKE_RELEASE_TYPE
!!ENDIF // CMAKE_FIND_OTHER_LIBRARY_BUILD
-@@ -488,33 +581,6 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+@@ -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()
-
-- file(GLOB pluginTargets \"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}_*Plugin.cmake\")
--
-- macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION)
+- 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)
@@ -310,6 +332,45 @@ index f4a34d6e48..88ea04ce2c 100644
- 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)
@@ -317,36 +378,126 @@ index f4a34d6e48..88ea04ce2c 100644
- 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 5baf0fdb10..ec5f3cc437 100644
+index b465a7fa898..eaf9011c3d9 100644
--- a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
+++ b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
-@@ -1,11 +1,14 @@
+@@ -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,98 +17,17 @@ foreach(_module_dep ${_Qt5$${CMAKE_PLUGIN_NAME}_MODULE_DEPENDENCIES})
+ endforeach()
+
!!IF !isEmpty(CMAKE_RELEASE_TYPE)
--_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE}\")
+-!!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)
--_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG}\")
+-!!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 one of the modules
+- # listed in the plugin\'s PLUGIN_EXTEND qmake variable
+- # 3) the user hasn\'t explicitly excluded the plugin.
+- # TODO: Note that the current implementation of (2) is not entirely correct QTBUG-93501
+- \"$<AND:\"
+- \"$<STREQUAL:${_plugin_type_genex},>,\"
+- \"$<OR:\"
+- $${CMAKE_PLUGIN_EXTENDS_GENEX_CHECK}
+- \"$<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()
--
-2.24.0
+2.44.0
diff --git a/0021-Allow-usage-of-static-version-with-CMake.patch b/0021-Allow-usage-of-static-version-with-CMake.patch
index 4249ddf7b16a..96c32ae865da 100644
--- a/0021-Allow-usage-of-static-version-with-CMake.patch
+++ b/0021-Allow-usage-of-static-version-with-CMake.patch
@@ -1,4 +1,4 @@
-From 2ded2c5cfa1619460df020409ab4328f38de31cd Mon Sep 17 00:00:00 2001
+From a32c64f42900b052b017795255511cf5d1ea019d Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sat, 5 Aug 2017 21:14:26 +0200
Subject: [PATCH 21/32] Allow usage of static version with CMake
@@ -10,22 +10,24 @@ 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: I410d22d1bee9dd66b90e07461c85fdb74ef621c1
---
- mkspecs/features/create_cmake.prf | 103 +++---
- .../data/cmake/Qt5BasicConfig.cmake.in | 297 ++++++++++++------
- .../data/cmake/Qt5PluginTarget.cmake.in | 18 +-
+ mkspecs/features/create_cmake.prf | 96 ++++--
+ .../data/cmake/Qt5BasicConfig.cmake.in | 311 +++++++++++-------
+ .../data/cmake/Qt5PluginTarget.cmake.in | 30 +-
.../cmake/Qt5StaticOnlyRedirection.cmake.in | 11 +
- src/corelib/Qt5CoreConfigExtras.cmake.in | 24 +-
+ src/corelib/Qt5CoreConfigExtras.cmake.in | 26 +-
src/gui/Qt5GuiConfigExtras.cmake.in | 8 +-
src/testlib/Qt5TestConfigExtras.cmake.in | 2 +-
- 7 files changed, 310 insertions(+), 153 deletions(-)
+ 7 files changed, 318 insertions(+), 166 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 8539bd928f..f8b37533a3 100644
+index ac089a2f9f0..ceae7c1f8c6 100644
--- a/mkspecs/features/create_cmake.prf
+++ b/mkspecs/features/create_cmake.prf
-@@ -65,7 +65,7 @@ split_incpath {
+@@ -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
@@ -34,7 +36,7 @@ index 8539bd928f..f8b37533a3 100644
!build_pass:QMAKE_SUBSTITUTES += \
cmake_extra_source_includes
-@@ -115,6 +115,8 @@ win32:!static:!staticlib {
+@@ -118,6 +118,8 @@ win32:!static:!staticlib {
}
static|staticlib:CMAKE_STATIC_TYPE = true
@@ -43,47 +45,61 @@ index 8539bd928f..f8b37533a3 100644
internal_module {
CMAKE_INTERNAL_MODULE = true
-@@ -182,17 +184,19 @@ contains(CONFIG, plugin) {
- CMAKE_PLUGIN_NAME = $$PLUGIN_CLASS_NAME
-
+@@ -221,20 +223,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
-@@ -208,13 +212,13 @@ contains(CONFIG, plugin) {
+ isEmpty(CMAKE_STATIC_TYPE): CMAKE_PLUGIN_EXT = .dylib
+ else: CMAKE_PLUGIN_EXT = .a
+@@ -254,9 +261,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
+@@ -265,7 +272,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()
-@@ -227,25 +231,34 @@ mod_deps =
+@@ -278,30 +285,38 @@ mod_deps =
lib_deps =
aux_mod_deps =
aux_lib_deps =
@@ -113,63 +129,57 @@ index 8539bd928f..f8b37533a3 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, ";")
-+
+
+ # 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
-@@ -274,35 +287,33 @@ mac {
- CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqt5main$${QT_LIBINFIX}.a
- CMAKE_WINMAIN_FILE_LOCATION_RELEASE = libqt5main$${QT_LIBINFIX}.a
+@@ -328,13 +343,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
+@@ -342,14 +350,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 {
@@ -177,7 +187,7 @@ index 8539bd928f..f8b37533a3 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
-@@ -322,12 +333,12 @@ mac {
+@@ -369,12 +393,12 @@ mac {
INSTALLS += cmake_qt5_module_files
cmake_config_file.input = $$PWD/data/cmake/Qt5BasicConfig.cmake.in
@@ -192,7 +202,7 @@ index 8539bd928f..f8b37533a3 100644
!build_pass:QMAKE_SUBSTITUTES += \
cmake_config_file \
-@@ -337,11 +348,29 @@ cmake_qt5_module_files.files = \
+@@ -384,11 +408,29 @@ cmake_qt5_module_files.files = \
$$cmake_config_file.output \
$$cmake_config_version_file.output
@@ -223,7 +233,7 @@ index 8539bd928f..f8b37533a3 100644
!build_pass:QMAKE_SUBSTITUTES += cmake_extras_file
-@@ -353,7 +382,7 @@ cmake_macros_file.input = $$_PRO_FILE_PWD_/Qt5$${CMAKE_MODULE_NAME}Macros.cmake
+@@ -400,7 +442,7 @@ cmake_macros_file.input = $$_PRO_FILE_PWD_/Qt5$${CMAKE_MODULE_NAME}Macros.cmake
exists($$cmake_macros_file.input) {
CMAKE_MODULE_MACROS = "true"
@@ -232,7 +242,7 @@ index 8539bd928f..f8b37533a3 100644
cmake_macros_file.CONFIG = verbatim
!build_pass:QMAKE_SUBSTITUTES += cmake_macros_file
-@@ -361,7 +390,7 @@ exists($$cmake_macros_file.input) {
+@@ -408,7 +450,7 @@ exists($$cmake_macros_file.input) {
cmake_qt5_module_files.files += $$cmake_macros_file.output
}
@@ -242,10 +252,10 @@ index 8539bd928f..f8b37533a3 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 88ea04ce2c..316a87aa85 100644
+index 5a5bc4d61d6..97150fb2448 100644
--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
+++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
-@@ -3,6 +3,33 @@ if (CMAKE_VERSION VERSION_LESS 3.1.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()
@@ -279,7 +289,7 @@ index 88ea04ce2c..316a87aa85 100644
!!IF !isEmpty(CMAKE_USR_MOVE_WORKAROUND)
!!IF !isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\")
-@@ -29,15 +56,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.
@@ -305,7 +315,7 @@ index 88ea04ce2c..316a87aa85 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.
-@@ -159,19 +190,50 @@ if(NOT COMMAND _qt5_add_dependencies)
+@@ -177,12 +208,24 @@ if(NOT COMMAND _qt5_add_dependencies)
endif()
endfunction()
endif()
@@ -322,43 +332,17 @@ index 88ea04ce2c..316a87aa85 100644
-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 Configuration LIB_LOCATION IMPLIB_LOCATION
- IsDebugAndRelease)
-- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
++ IsDebugAndRelease)
+!!ELSE
+macro(_populate_$${CMAKE_MODULE_NAME}_target_properties TARGET_NAME Configuration LIB_LOCATION IMPLIB_LOCATION
-+ IsDebugAndRelease)
+ IsDebugAndRelease)
+- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
+!!ENDIF
+ 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
- _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location})
-+!!ENDIF
-
- set(_deps
- ${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}
-@@ -183,15 +245,15 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI
+@@ -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)
@@ -377,7 +361,13 @@ index 88ea04ce2c..316a87aa85 100644
\"INTERFACE_LINK_OPTIONS\" \"${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LINK_FLAGS}\"
)
endif()
-@@ -213,9 +275,13 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI
+ !!ELSE
+- set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
++ set_target_properties(\"${TARGET_NAME}\" PROPERTIES
+ \"INTERFACE_LINK_LIBRARIES_${Configuration}\" \"${_deps}\"
+ \"IMPORTED_LOCATION_${Configuration}\" ${imported_location}
+ !!IF !isEmpty(CMAKE_LIB_SONAME)
+@@ -230,9 +273,13 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI
!!ELSE
set(imported_implib \"IMPORTED_IMPLIB_${Configuration}\" \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
!!ENDIF
@@ -392,7 +382,7 @@ index 88ea04ce2c..316a87aa85 100644
\"IMPORTED_IMPLIB_${Configuration}\" ${imported_implib}
)
endif()
-@@ -232,8 +298,7 @@ macro(_populate_$${CMAKE_MODULE_NAME}_plugin_target_dependencies_from_prl_file P
+@@ -249,8 +296,7 @@ macro(_populate_$${CMAKE_MODULE_NAME}_plugin_target_dependencies_from_prl_file P
endmacro()
!!ENDIF
@@ -402,7 +392,7 @@ index 88ea04ce2c..316a87aa85 100644
!!IF !no_module_headers
!!IF !isEmpty(CMAKE_BUILD_IS_FRAMEWORK)
set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS
-@@ -241,46 +306,50 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+@@ -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)
@@ -467,7 +457,7 @@ index 88ea04ce2c..316a87aa85 100644
endforeach()
!!IF isEmpty(CMAKE_BUILD_IS_FRAMEWORK)
-@@ -289,16 +358,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})
@@ -491,7 +481,7 @@ index 88ea04ce2c..316a87aa85 100644
!!ENDIF // TEMPLATE != aux
set(_Qt5$${CMAKE_MODULE_NAME}_MODULE_DEPENDENCIES \"$${CMAKE_MODULE_DEPS}\")
-@@ -306,10 +379,10 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+@@ -323,10 +377,10 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
list(APPEND _Qt5$${CMAKE_MODULE_NAME}_MODULE_DEPENDENCIES \"$${CMAKE_INTERFACE_MODULE_DEPS}\")
!!ENDIF
@@ -504,7 +494,7 @@ index 88ea04ce2c..316a87aa85 100644
set(_Qt5$${CMAKE_MODULE_NAME}_FIND_DEPENDENCIES_REQUIRED REQUIRED)
endif()
set(_Qt5$${CMAKE_MODULE_NAME}_FIND_DEPENDENCIES_QUIET)
-@@ -317,17 +390,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)
@@ -526,7 +516,7 @@ index 88ea04ce2c..316a87aa85 100644
$$VERSION ${_Qt5$${CMAKE_MODULE_NAME}_FIND_VERSION_EXACT}
${_Qt5$${CMAKE_MODULE_NAME}_DEPENDENCIES_FIND_QUIET}
${_Qt5$${CMAKE_MODULE_NAME}_FIND_DEPENDENCIES_REQUIRED}
-@@ -335,28 +408,32 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+@@ -352,25 +406,25 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
)
endif()
@@ -563,6 +553,17 @@ index 88ea04ce2c..316a87aa85 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
@@ -571,7 +572,7 @@ index 88ea04ce2c..316a87aa85 100644
!!IF !isEmpty(CMAKE_INTERFACE_QT5_MODULE_DEPS)
list(APPEND _Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES \"$${CMAKE_INTERFACE_QT5_MODULE_DEPS}\")
-@@ -367,13 +444,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+@@ -400,13 +459,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
!!IF !isEmpty(CMAKE_DEBUG_TYPE)
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
_qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
@@ -587,7 +588,7 @@ index 88ea04ce2c..316a87aa85 100644
_Qt5$${CMAKE_MODULE_NAME}_STATIC_DEBUG_LIB_DEPENDENCIES
_Qt5$${CMAKE_MODULE_NAME}_STATIC_DEBUG_LINK_FLAGS
)
-@@ -383,13 +460,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+@@ -416,13 +475,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
!!IF !isEmpty(CMAKE_RELEASE_TYPE)
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
_qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
@@ -603,17 +604,18 @@ index 88ea04ce2c..316a87aa85 100644
_Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LIB_DEPENDENCIES
_Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LINK_FLAGS
)
-@@ -397,30 +474,44 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
- !!ENDIF
+@@ -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")
-+!!ENDIF
-+ set(TARGET_NAME ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME})
-+!!IF !isEmpty(CMAKE_STATIC_TYPE)
+ 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)
@@ -656,9 +658,30 @@ index 88ea04ce2c..316a87aa85 100644
+ 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\")
-@@ -434,7 +525,11 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+@@ -487,7 +557,11 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
endforeach()
endif()
@@ -670,7 +693,7 @@ index 88ea04ce2c..316a87aa85 100644
set_property(TARGET ${PLUGIN_TARGET_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${CONFIG})
!!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE)
-@@ -442,7 +537,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
@@ -682,12 +705,16 @@ index 88ea04ce2c..316a87aa85 100644
set_target_properties(${PLUGIN_TARGET_NAME} PROPERTIES
\"IMPORTED_LOCATION_${CONFIG}\" ${imported_location}
)
-@@ -473,16 +572,16 @@ 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()
@@ -699,11 +726,11 @@ index 88ea04ce2c..316a87aa85 100644
- INTERFACE_INCLUDE_DIRECTORIES ${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 ${${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_OWN_PRIVATE_INCLUDE_DIRS}
++ INTERFACE_INCLUDE_DIRECTORIES ${${TARGET_NAME}_OWN_PRIVATE_INCLUDE_DIRS}
)
set(_Qt5$${CMAKE_MODULE_NAME}_PRIVATEDEPS)
foreach(dep ${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES})
-@@ -491,69 +590,72 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+@@ -544,17 +625,18 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
endif()
endforeach()
!!IF !isEmpty(CMAKE_STATIC_TYPE)
@@ -716,8 +743,20 @@ index 88ea04ce2c..316a87aa85 100644
+ set_property(TARGET ${TARGET_NAME}Private PROPERTY
+ INTERFACE_LINK_LIBRARIES ${TARGET_NAME} ${_Qt5$${CMAKE_MODULE_NAME}_PRIVATEDEPS}
)
+
+ # 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
- endif()
+@@ -562,59 +644,61 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
!!IF !equals(TEMPLATE, aux)
!!IF !isEmpty(CMAKE_RELEASE_TYPE)
@@ -799,7 +838,7 @@ index 88ea04ce2c..316a87aa85 100644
if (EXISTS
!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
\"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_RELEASE}\"
-@@ -566,7 +668,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
@@ -808,7 +847,7 @@ index 88ea04ce2c..316a87aa85 100644
endif()
!!ENDIF // CMAKE_STATIC_TYPE
-@@ -576,19 +678,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
@@ -828,33 +867,62 @@ index 88ea04ce2c..316a87aa85 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 eaf9011c3d9..de09c85b90f 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}
+@@ -15,19 +15,27 @@ foreach(_module_dep ${_Qt5$${CMAKE_PLUGIN_NAME}_MODULE_DEPENDENCIES})
+ )
+ endif()
+ endforeach()
++!!ENDIF
+
!!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)
+ _populate_$${CMAKE_MODULE_NAME}_plugin_properties_static(${QT_VARIANT_PREFIX}Qt5::$$CMAKE_MODULE_NAME ${QT_VARIANT_PREFIX}Qt5::$$CMAKE_PLUGIN_NAME $$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE_STATIC}\")
+!!ELSE
+ _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)
@@ -865,12 +933,19 @@ 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\")
+list(APPEND ${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_PLUGINS ${QT_VARIANT_PREFIX}Qt5::$$CMAKE_PLUGIN_NAME)
-
++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
+index 00000000000..0091940fd26
--- /dev/null
+++ b/mkspecs/features/data/cmake/Qt5StaticOnlyRedirection.cmake.in
@@ -0,0 +1,11 @@
@@ -886,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 e0652fdcf9..f0add757bb 100644
+index 0d02edb41c3..9da1361c95a 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})
@@ -918,7 +999,7 @@ index e0652fdcf9..f0add757bb 100644
set(_qt5_corelib_extra_includes)
# Targets using Qt need to use the POSITION_INDEPENDENT_CODE property. The
-@@ -78,7 +80,7 @@ set(Qt5_POSITION_INDEPENDENT_CODE True)
+@@ -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.
@@ -927,7 +1008,7 @@ index e0652fdcf9..f0add757bb 100644
# TODO Qt6: Remove
set(Qt5Core_EXECUTABLE_COMPILE_FLAGS \"\")
-@@ -86,7 +88,7 @@ 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)
@@ -936,7 +1017,7 @@ index e0652fdcf9..f0add757bb 100644
!!ENDIF
!!IF !isEmpty(CMAKE_DISABLED_FEATURES)
-@@ -95,9 +97,9 @@ set(Qt5_DISABLED_FEATURES
+@@ -103,9 +105,9 @@ set(Qt5_DISABLED_FEATURES
)
!!ENDIF
@@ -948,7 +1029,7 @@ index e0652fdcf9..f0add757bb 100644
!!IF qtConfig(reduce_exports)
set(QT_VISIBILITY_AVAILABLE \"True\")
-@@ -145,14 +147,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>)
@@ -967,7 +1048,7 @@ index e0652fdcf9..f0add757bb 100644
$<$<AND:${_isExe},${_isWin32},${_isNotExcluded},${_isPolicyNEW}>:Qt5::WinMain>
)
diff --git a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in
-index 84dbbfebd4..31fa875b6c 100644
+index 84dbbfebd47..31fa875b6c7 100644
--- a/src/gui/Qt5GuiConfigExtras.cmake.in
+++ b/src/gui/Qt5GuiConfigExtras.cmake.in
@@ -1,4 +1,6 @@
@@ -999,7 +1080,7 @@ index 84dbbfebd4..31fa875b6c 100644
${Qt5Gui_EGL_LIBRARIES} ${Qt5Gui_OPENGL_LIBRARIES}
)
diff --git a/src/testlib/Qt5TestConfigExtras.cmake.in b/src/testlib/Qt5TestConfigExtras.cmake.in
-index 2a575958ae..ca0e3be3b5 100644
+index 2a575958ae4..ca0e3be3b56 100644
--- a/src/testlib/Qt5TestConfigExtras.cmake.in
+++ b/src/testlib/Qt5TestConfigExtras.cmake.in
@@ -1,5 +1,5 @@
@@ -1010,5 +1091,5 @@ index 2a575958ae..ca0e3be3b5 100644
INTERFACE_COMPILE_DEFINITIONS QT_TESTCASE_BUILDDIR=\\\"\${CMAKE_BINARY_DIR}\\\"
)
--
-2.24.0
+2.44.0
diff --git a/0022-Adjust-linker-flags-for-static-build-with-cmake-ming.patch b/0022-Adjust-linker-flags-for-static-build-with-cmake-ming.patch
index e5bdc2cc3a57..83810470c590 100644
--- a/0022-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 afef15710db64b5892939103c7b95076b926703f Mon Sep 17 00:00:00 2001
+From 1e0190cb9b33cd6aaef745da13d8e4de85a50775 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Fri, 2 Jun 2017 16:42:07 +0200
Subject: [PATCH 22/32] 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 f0add757bb..5328da2e80 100644
+index 9da1361c95a..5e802dea4c5 100644
--- a/src/corelib/Qt5CoreConfigExtras.cmake.in
+++ b/src/corelib/Qt5CoreConfigExtras.cmake.in
-@@ -173,3 +173,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.24.0
+2.44.0
diff --git a/0023-Use-correct-pkg-config-static-flag.patch b/0023-Use-correct-pkg-config-static-flag.patch
index 64106dcb6749..39a8e626d249 100644
--- a/0023-Use-correct-pkg-config-static-flag.patch
+++ b/0023-Use-correct-pkg-config-static-flag.patch
@@ -1,4 +1,4 @@
-From a618febf21e6118164eac2d0548e278bc2992941 Mon Sep 17 00:00:00 2001
+From 4d24aaff9e4e144e320a964c2c21060b41c3039f Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 18:50:21 +0200
Subject: [PATCH 23/32] Use correct pkg-config --static flag
@@ -8,10 +8,10 @@ Subject: [PATCH 23/32] Use correct pkg-config --static flag
1 file changed, 3 insertions(+)
diff --git a/configure.pri b/configure.pri
-index c108b2843c..9525dd6336 100644
+index 85acb3757aa..0a4db10dfca 100644
--- a/configure.pri
+++ b/configure.pri
-@@ -345,6 +345,9 @@ defineTest(qtConfTest_detectPkgConfig) {
+@@ -360,6 +360,9 @@ defineTest(qtConfTest_detectPkgConfig) {
qtLog("Found pkg-config from path: $$pkgConfig")
}
}
@@ -22,5 +22,5 @@ index c108b2843c..9525dd6336 100644
$$qtConfEvaluate("features.cross_compile") {
# cross compiling, check that pkg-config is set up sanely
--
-2.24.0
+2.44.0
diff --git a/0024-Fix-macro-invoking-moc-rcc-and-uic.patch b/0024-Fix-macro-invoking-moc-rcc-and-uic.patch
index 99cf9aea76cf..ccb734bcded2 100644
--- a/0024-Fix-macro-invoking-moc-rcc-and-uic.patch
+++ b/0024-Fix-macro-invoking-moc-rcc-and-uic.patch
@@ -1,4 +1,4 @@
-From 66b806863d218a367f67b8d0a75610b614ff13b3 Mon Sep 17 00:00:00 2001
+From bfe19d4efc3d2102f6132231a3d41b4940ba2ecf Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 4 Dec 2016 20:35:47 +0100
Subject: [PATCH 24/32] Fix macro invoking moc, rcc and uic
@@ -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 0f006fe1e3..1db4bed272 100644
+index d91873f1bc9..8f1fb177225 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 0f006fe1e3..1db4bed272 100644
DEPENDS ${infile} ${moc_depends}
${_moc_working_dir}
VERBATIM)
-@@ -248,8 +249,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()
@@ -43,8 +43,8 @@ index 0f006fe1e3..1db4bed272 100644
ARGS ${rcc_options} --binary --name ${target} --output ${rcc_destination} ${infiles}
DEPENDS ${rc_depends} ${out_depends} ${infiles} VERBATIM)
add_custom_target(${target} ALL DEPENDS ${rcc_destination})
-@@ -281,8 +283,9 @@ function(QT5_ADD_RESOURCES outfiles )
- _QT5_PARSE_QRC_FILE(${infile} _out_depends _rc_depends)
+@@ -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)
@@ -55,10 +55,10 @@ index 0f006fe1e3..1db4bed272 100644
MAIN_DEPENDENCY ${infile}
DEPENDS ${_rc_depends} "${_out_depends}" VERBATIM)
diff --git a/src/widgets/Qt5WidgetsMacros.cmake b/src/widgets/Qt5WidgetsMacros.cmake
-index 737371a5ad..d103278cdf 100644
+index 35d2a2dc546..99f061f1b82 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)
@@ -70,5 +70,5 @@ index 737371a5ad..d103278cdf 100644
MAIN_DEPENDENCY ${infile} VERBATIM)
set_source_files_properties(${infile} PROPERTIES SKIP_AUTOUIC ON)
--
-2.24.0
+2.44.0
diff --git a/0025-Ignore-errors-about-missing-feature-static.patch b/0025-Ignore-errors-about-missing-feature-static.patch
index 8cfe19d0b2f6..f28e1c84689c 100644
--- a/0025-Ignore-errors-about-missing-feature-static.patch
+++ b/0025-Ignore-errors-about-missing-feature-static.patch
@@ -1,4 +1,4 @@
-From b5fccc2c7f1da12f76fa55d15f32f2c0d80f820c Mon Sep 17 00:00:00 2001
+From b4037f482107b0bde253b487487501b8bc82db55 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Wed, 25 Jan 2017 20:59:54 +0100
Subject: [PATCH 25/32] Ignore errors about missing feature static
@@ -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 8a7c9c28d3..003a694f44 100644
+index 511b158b917..39760d5ce44 100644
--- a/mkspecs/features/qt_build_config.prf
+++ b/mkspecs/features/qt_build_config.prf
-@@ -143,5 +143,5 @@ defineTest(qtConfig) {
+@@ -153,5 +153,5 @@ defineTest(qtConfig) {
contains(QT.$${module}.disabled_features, $$1): \
return(false)
}
@@ -21,10 +21,10 @@ index 8a7c9c28d3..003a694f44 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 7777e615bda..5f30366660b 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.24.0
+2.44.0
diff --git a/0026-Enable-and-fix-use-of-iconv.patch b/0026-Enable-and-fix-use-of-iconv.patch
index ab235be98f67..2bf44dfba747 100644
--- a/0026-Enable-and-fix-use-of-iconv.patch
+++ b/0026-Enable-and-fix-use-of-iconv.patch
@@ -1,4 +1,4 @@
-From 302e9b9cc7d031079f174d4cede3f9407a254b29 Mon Sep 17 00:00:00 2001
+From 5f1d71631402760aa75df7b0ea8c9be7608f51a2 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Wed, 25 Jan 2017 21:08:20 +0100
Subject: [PATCH 26/32] Enable and fix use of iconv
@@ -10,7 +10,7 @@ Change-Id: I5f0ab27afca0800dec11c7af74d196190820ae5c
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/src/corelib/codecs/qiconvcodec.cpp b/src/corelib/codecs/qiconvcodec.cpp
-index 9c39727946..cc14036b25 100644
+index 9c39727946c..cc14036b254 100644
--- a/src/corelib/codecs/qiconvcodec.cpp
+++ b/src/corelib/codecs/qiconvcodec.cpp
@@ -47,7 +47,6 @@
@@ -49,7 +49,7 @@ index 9c39727946..cc14036b25 100644
#else
char **inBytesPtr = &inBytes;
diff --git a/src/corelib/configure.json b/src/corelib/configure.json
-index 1b01b2b817..4247c10b03 100644
+index a9025a2dd29..ffb6f50fbe1 100644
--- a/src/corelib/configure.json
+++ b/src/corelib/configure.json
@@ -72,7 +72,7 @@
@@ -61,7 +61,7 @@ index 1b01b2b817..4247c10b03 100644
"char *outp;",
"size_t inbytes, outbytes;",
"iconv(x, &inp, &inbytes, &outp, &outbytes);",
-@@ -632,9 +632,9 @@
+@@ -673,9 +673,9 @@
},
"gnu-libiconv": {
"label": "GNU iconv",
@@ -74,5 +74,5 @@ index 1b01b2b817..4247c10b03 100644
},
"icu": {
--
-2.24.0
+2.44.0
diff --git a/0027-Ignore-failing-pkg-config-test.patch b/0027-Ignore-failing-pkg-config-test.patch
index 0988bde57ec8..ca55df914ba3 100644
--- a/0027-Ignore-failing-pkg-config-test.patch
+++ b/0027-Ignore-failing-pkg-config-test.patch
@@ -1,4 +1,4 @@
-From 548b80f87af82a5ce41400748c0492769821657d Mon Sep 17 00:00:00 2001
+From 341d9fb7080be076b2dbeb5d1b714eff08060327 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Wed, 25 Jan 2017 21:08:48 +0100
Subject: [PATCH 27/32] Ignore failing pkg-config test
@@ -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 36545a593b..087c2f6419 100644
+index b75f8a8033c..72a963a6793 100644
--- a/configure.json
+++ b/configure.json
-@@ -728,7 +728,6 @@
+@@ -793,7 +793,6 @@
"pkg-config": {
"label": "Using pkg-config",
"autoDetect": "!config.darwin && !config.win32",
@@ -21,5 +21,5 @@ index 36545a593b..087c2f6419 100644
"publicFeature",
{ "type": "publicQtConfig", "negative": true },
--
-2.24.0
+2.44.0
diff --git a/0028-Prevent-qmake-from-messing-static-lib-dependencies.patch b/0028-Prevent-qmake-from-messing-static-lib-dependencies.patch
index 91cf089e3721..9776e1a11cbc 100644
--- a/0028-Prevent-qmake-from-messing-static-lib-dependencies.patch
+++ b/0028-Prevent-qmake-from-messing-static-lib-dependencies.patch
@@ -1,43 +1,45 @@
-From 27693312f0cd1911215e23fd6d20ed1022b247e3 Mon Sep 17 00:00:00 2001
+From 2095dda5640e16c678173355a2d39910701d8fc3 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Tue, 7 Feb 2017 18:25:28 +0100
Subject: [PATCH 28/32] 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 d7c9413290..3026318a70 100644
+index f7bd6dc6634..b76c444012c 100644
--- a/qmake/generators/unix/unixmake.cpp
+++ b/qmake/generators/unix/unixmake.cpp
-@@ -393,6 +393,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 17592c2492..26f3f5cd82 100644
+index 03732df4a84..602f7609f58 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
-@@ -87,6 +87,9 @@ Win32MakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags)
+@@ -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
+ }
- QList<QMakeLocalFileName> dirs;
+ QVector<LibrarySearchPath> dirs;
int libidx = 0;
for (const ProString &dlib : project->values("QMAKE_DEFAULT_LIBDIRS"))
--
-2.24.0
+2.44.0
diff --git a/0029-Hardcode-linker-flags-for-platform-plugins.patch b/0029-Hardcode-linker-flags-for-platform-plugins.patch
index 8754a4dbd98b..e1a952761d31 100644
--- a/0029-Hardcode-linker-flags-for-platform-plugins.patch
+++ b/0029-Hardcode-linker-flags-for-platform-plugins.patch
@@ -1,23 +1,27 @@
-From 4956ef34ebadffb50a27e5d81762d7e349be5339 Mon Sep 17 00:00:00 2001
+From c08a720e1cd51c0015ec02143cd65b17e5e69b64 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Wed, 25 Jan 2017 23:42:30 +0100
Subject: [PATCH 29/32] 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
+libqwindows.dll and libqdirect2d.dll. Unfortunately
+this workaround leads to hardcoding include flags
+as well.
+
+Change-Id: I1863d184cff744d2c02e15875e1d108d32ea7861
---
- src/plugins/platforms/direct2d/direct2d.pro | 30 ++++++++++++++---
- src/plugins/platforms/minimal/minimal.pro | 15 +++++++--
- src/plugins/platforms/offscreen/offscreen.pro | 14 ++++++--
- src/plugins/platforms/windows/windows.pro | 32 +++++++++++++------
- 4 files changed, 73 insertions(+), 18 deletions(-)
+ 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 9764272632..25994da1da 100644
+index 6e73bd14f9d..8046e73d61d 100644
--- a/src/plugins/platforms/direct2d/direct2d.pro
+++ b/src/plugins/platforms/direct2d/direct2d.pro
-@@ -1,12 +1,32 @@
+@@ -1,12 +1,41 @@
TARGET = qdirect2d
QT += \
@@ -37,29 +41,38 @@ index 9764272632..25994da1da 100644
+ -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} \
-+ $$QT_SOURCE_TREE/include/QtThemeSupport/$${QT_VERSION}
++ $$QT_BUILD_TREE/include/QtEventDispatcherSupport/$${QT_VERSION}/QtEventDispatcherSupport \
++ $$QT_BUILD_TREE/include/QtEventDispatcherSupport/$${QT_VERSION} \
++ $$QT_BUILD_TREE/include/QtFontDatabaseSupport/$${QT_VERSION}/QtFontDatabaseSupport \
++ $$QT_BUILD_TREE/include/QtFontDatabaseSupport/$${QT_VERSION} \
++ $$QT_BUILD_TREE/include/QtThemeSupport/$${QT_VERSION}/QtThemeSupport \
++ $$QT_BUILD_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}
++ INCLUDEPATH += \
++ $$QT_BUILD_TREE/include/QtAccessibilitySupport/$${QT_VERSION}/Qt5AccessibilitySupport \
++ $$QT_BUILD_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}
++ INCLUDEPATH += \
++ $$QT_BUILD_TREE/include/QtVulkanSupport/$${QT_VERSION}/Qt5VulkanSupport \
++ $$QT_BUILD_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}
++INCLUDEPATH += \
++ $$QT_BUILD_TREE/include/Qt5WindowsUIAutomationSupport/$${QT_VERSION}/Qt5WindowsUIAutomationSupport \
++ $$QT_BUILD_TREE/include/Qt5WindowsUIAutomationSupport/$${QT_VERSION}
- LIBS += -ldwmapi -lversion -lgdi32
- QMAKE_USE_PRIVATE += dwrite_1 d2d1_1 d3d11_1 dxgi1_2
+ 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..e32225d9b9 100644
+index a1a2da547b3..9fd5c4fca2f 100644
--- a/src/plugins/platforms/minimal/minimal.pro
+++ b/src/plugins/platforms/minimal/minimal.pro
-@@ -1,8 +1,19 @@
+@@ -1,8 +1,21 @@
TARGET = qminimal
QT += \
@@ -75,17 +88,19 @@ index a1a2da547b..e32225d9b9 100644
+ -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}
++ $$QT_BUILD_TREE/include/QtEventDispatcherSupport/$${QT_VERSION}/QtEventDispatcherSupport \
++ $$QT_BUILD_TREE/include/QtEventDispatcherSupport/$${QT_VERSION} \
++ $$QT_BUILD_TREE/include/QtFontDatabaseSupport/$${QT_VERSION}/QtFontDatabaseSupport \
++ $$QT_BUILD_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..d8ab86b322 100644
+index f226132592d..592fa7406f0 100644
--- a/src/plugins/platforms/offscreen/offscreen.pro
+++ b/src/plugins/platforms/offscreen/offscreen.pro
-@@ -1,8 +1,18 @@
+@@ -1,8 +1,20 @@
TARGET = qoffscreen
QT += \
@@ -101,16 +116,18 @@ index f226132592..d8ab86b322 100644
+ -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}
++ $$QT_BUILD_TREE/include/QtEventDispatcherSupport/$${QT_VERSION}/QtEventDispatcherSupport \
++ $$QT_BUILD_TREE/include/QtEventDispatcherSupport/$${QT_VERSION} \
++ $$QT_BUILD_TREE/include/QtFontDatabaseSupport/$${QT_VERSION}/QtFontDatabaseSupport \
++ $$QT_BUILD_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..285d90c6d3 100644
+index 50a3bb41a92..02f74650a9b 100644
--- a/src/plugins/platforms/windows/windows.pro
+++ b/src/plugins/platforms/windows/windows.pro
-@@ -1,14 +1,28 @@
+@@ -1,15 +1,35 @@
TARGET = qwindows
-QT += \
@@ -121,7 +138,8 @@ index 174bc7b609..285d90c6d3 100644
-qtConfig(accessibility): QT += accessibility_support-private
-qtConfig(vulkan): QT += vulkan_support-private
-
--LIBS += -lgdi32 -ldwmapi
+-LIBS += -ldwmapi
+-QMAKE_USE_PRIVATE += gdi32
+QT += core-private gui-private
+
+# Fix linker error when building libqwindows.dll by specifying linker flags for
@@ -133,21 +151,28 @@ index 174bc7b609..285d90c6d3 100644
+ -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}
++ $$QT_BUILD_TREE/include/QtEventDispatcherSupport/$${QT_VERSION}/QtEventDispatcherSupport \
++ $$QT_BUILD_TREE/include/QtEventDispatcherSupport/$${QT_VERSION} \
++ $$QT_BUILD_TREE/include/QtFontDatabaseSupport/$${QT_VERSION}/QtFontDatabaseSupport \
++ $$QT_BUILD_TREE/include/QtFontDatabaseSupport/$${QT_VERSION} \
++ $$QT_BUILD_TREE/include/QtThemeSupport/$${QT_VERSION}/QtThemeSupport \
++ $$QT_BUILD_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}
++ INCLUDEPATH += \
++ $$QT_BUILD_TREE/include/QtAccessibilitySupport/$${QT_VERSION}/Qt5AccessibilitySupport \
++ $$QT_BUILD_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}
++ INCLUDEPATH += \
++ $$QT_BUILD_TREE/include/QtVulkanSupport/$${QT_VERSION}/Qt5VulkanSupport \
++ $$QT_BUILD_TREE/include/QtVulkanSupport/$${QT_VERSION}
+}
include(windows.pri)
--
-2.24.0
+2.44.0
diff --git a/0030-Fix-linking-against-static-plugins-with-qmake.patch b/0030-Fix-linking-against-static-plugins-with-qmake.patch
index 540405268dc0..576bc94d219b 100644
--- a/0030-Fix-linking-against-static-plugins-with-qmake.patch
+++ b/0030-Fix-linking-against-static-plugins-with-qmake.patch
@@ -1,4 +1,4 @@
-From ef72bc6a1e58813a89587ca11bb27e039cba2fc5 Mon Sep 17 00:00:00 2001
+From bd80f6a8310a4e9d3d91d4fc242cccc3718977b1 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Fri, 25 Aug 2017 17:07:17 +0200
Subject: [PATCH 30/32] Fix linking against static plugins with qmake
@@ -11,7 +11,7 @@ approach
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf
-index d6299d8eed..5311748953 100644
+index b79b324b887..6a03b7a74bf 100644
--- a/mkspecs/features/qt.prf
+++ b/mkspecs/features/qt.prf
@@ -69,7 +69,7 @@ all_qt_module_deps = $$resolve_depends(qt_module_deps, "QT.", ".depends" ".run_d
@@ -23,7 +23,7 @@ index d6299d8eed..5311748953 100644
manualplugs = $$QTPLUGIN # User may specify plugins. Mostly legacy.
autoplugs = # Auto-added plugins.
# First round: explicitly specified modules.
-@@ -139,7 +139,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 d6299d8eed..5311748953 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.24.0
+2.44.0
diff --git a/0032-Prevent-Cannot-find-feature-windows_vulkan_sdk.patch b/0031-Prevent-Cannot-find-feature-windows_vulkan_sdk.patch
index 8c18ed6c0b9a..5fc03ed8d76e 100644
--- a/0032-Prevent-Cannot-find-feature-windows_vulkan_sdk.patch
+++ b/0031-Prevent-Cannot-find-feature-windows_vulkan_sdk.patch
@@ -1,7 +1,7 @@
-From 371d6eafd848635479a988a20e16d05d0a72db77 Mon Sep 17 00:00:00 2001
+From 5a1f5a3b43cfc29cd8ec1ce8791ef4029f5e2f96 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Mon, 24 Jun 2019 13:51:02 +0200
-Subject: [PATCH 32/32] Prevent 'Cannot find feature windows_vulkan_sdk'
+Subject: [PATCH 31/32] Prevent 'Cannot find feature windows_vulkan_sdk'
See https://bugreports.qt.io/browse/QTBUG-76660
---
@@ -10,7 +10,7 @@ See https://bugreports.qt.io/browse/QTBUG-76660
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
+index da061422dca..a5a8ec68d2f 100644
--- a/mkspecs/common/windows-vulkan.conf
+++ b/mkspecs/common/windows-vulkan.conf
@@ -1,2 +1,2 @@
@@ -18,7 +18,7 @@ index da061422dc..a5a8ec68d2 100644
+load(win32/windows_vulkan_sdk)
QMAKE_LIBS_VULKAN =
diff --git a/mkspecs/features/qmake_use.prf b/mkspecs/features/qmake_use.prf
-index 64faa4f215..f899792e4e 100644
+index 8475e4111a7..c0eb8faa17d 100644
--- a/mkspecs/features/qmake_use.prf
+++ b/mkspecs/features/qmake_use.prf
@@ -15,7 +15,9 @@ for(ever) {
@@ -33,5 +33,5 @@ index 64faa4f215..f899792e4e 100644
LD_USES = $$resolve_depends(LD_USES, QMAKE_DEPENDS_, _LD)
for (nu, LD_USES) {
--
-2.24.0
+2.44.0
diff --git a/0031-Prevent-static-build-to-prefer-dynamic-libraries.patch b/0031-Prevent-static-build-to-prefer-dynamic-libraries.patch
deleted file mode 100644
index 6b262a3f648a..000000000000
--- a/0031-Prevent-static-build-to-prefer-dynamic-libraries.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 51a0ac0ff3a726f88af9e8cd472779b33117d304 Mon Sep 17 00:00:00 2001
-From: Martchus <martchus@gmx.net>
-Date: Sun, 3 Feb 2019 14:34:42 +0100
-Subject: [PATCH 31/32] Prevent static build to prefer dynamic libraries
-
-The static build should not attempt to link against dynamic libraries
-in order to get a fully statically linked binary in the end.
----
- mkspecs/features/qt_configure.prf | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf
-index 81110e9f6d..61f7cf27d1 100644
---- a/mkspecs/features/qt_configure.prf
-+++ b/mkspecs/features/qt_configure.prf
-@@ -577,12 +577,12 @@ defineTest(qtConfResolveLibs) {
- # Under Windows, we look only for static libraries, as even for DLLs
- # one actually links against a static import library.
- mingw {
-- lcan += \
-- # MinGW supports UNIX-style library naming in addition to
-- # the MSVC style.
-- lib$${lib}.dll.a lib$${lib}.a \
-- # Fun fact: prefix-less libraries are also supported.
-- $${lib}.dll.a $${lib}.a
-+ # prefer (import) libraries for dynamic linking unless we're doing a
-+ # static build where we solely rely on presence of static libraries
-+ shared {
-+ lcan += $${QMAKE_PREFIX_STATICLIB}$${lib}.$${QMAKE_EXTENSION_IMPORTLIB} $${lib}.$${QMAKE_EXTENSION_IMPORTLIB}
-+ }
-+ lcan += $${QMAKE_PREFIX_STATICLIB}$${lib}.$${QMAKE_EXTENSION_STATICLIB} $${lib}.$${QMAKE_EXTENSION_STATICLIB}
- }
- lcan += $${lib}.lib
- }
---
-2.24.0
-
diff --git a/0032-Fix-crashes-in-rasterization-code-using-setjmp.patch b/0032-Fix-crashes-in-rasterization-code-using-setjmp.patch
new file mode 100644
index 000000000000..c5673e401b3f
--- /dev/null
+++ b/0032-Fix-crashes-in-rasterization-code-using-setjmp.patch
@@ -0,0 +1,248 @@
+From 1690bb85bf77a77a80abf2d369b6ec17b87ab4f8 Mon Sep 17 00:00:00 2001
+From: Martchus <martchus@gmx.net>
+Date: Sat, 26 Jun 2021 22:24:12 +0200
+Subject: [PATCH 32/32] Fix crashes in rasterization code using setjmp
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+* Use C++ exceptions instead of setjmp to workaround crashes
+* The setjmp/longjmp code crashes when compiling for x86_64-w64-mingw32
+ with GCC 11 and optimizations enabled¹. It crashes when jumping back
+ to handle the case of insufficient memory. This change uses C++
+ exceptions instead (turning the compile unit into a C++ unit instead
+ of just using C) which should behave identical but don't seem to
+ crash.
+* Fix rendering certain SVGs and possibly other graphics
+
+Change-Id: I01937d13569dd01ab4cb1f608020544c93bc343c
+
+---
+
+¹ See https://bugreports.qt.io/browse/QTBUG-94692 for details.
+---
+ src/gui/painting/painting.pri | 4 +-
+ .../{qgrayraster.c => qgrayraster.cpp} | 41 ++++++++-----------
+ src/gui/painting/qt_attribution.json | 2 +-
+ 3 files changed, 21 insertions(+), 26 deletions(-)
+ rename src/gui/painting/{qgrayraster.c => qgrayraster.cpp} (98%)
+
+diff --git a/src/gui/painting/painting.pri b/src/gui/painting/painting.pri
+index bb0fc0ffbae..72decdefbf2 100644
+--- a/src/gui/painting/painting.pri
++++ b/src/gui/painting/painting.pri
+@@ -1,5 +1,7 @@
+ # Qt gui library, paint module
+
++CONFIG += exceptions
++
+ HEADERS += \
+ painting/qbackingstore.h \
+ painting/qbezier_p.h \
+@@ -80,7 +82,7 @@ SOURCES += \
+ painting/qcosmeticstroker.cpp \
+ painting/qdrawhelper.cpp \
+ painting/qemulationpaintengine.cpp \
+- painting/qgrayraster.c \
++ painting/qgrayraster.cpp \
+ painting/qicc.cpp \
+ painting/qimagescale.cpp \
+ painting/qmatrix.cpp \
+diff --git a/src/gui/painting/qgrayraster.c b/src/gui/painting/qgrayraster.cpp
+similarity index 98%
+rename from src/gui/painting/qgrayraster.c
+rename to src/gui/painting/qgrayraster.cpp
+index 0143e9b6027..803a676e1af 100644
+--- a/src/gui/painting/qgrayraster.c
++++ b/src/gui/painting/qgrayraster.cpp
+@@ -39,7 +39,7 @@
+
+ /***************************************************************************/
+ /* */
+-/* qgrayraster.c, derived from ftgrays.c */
++/* qgrayraster.cpp, derived from ftgrays.c */
+ /* */
+ /* A new `perfect' anti-aliasing renderer (body). */
+ /* */
+@@ -157,17 +157,12 @@
+ # include <vxWorksCommon.h> /* needed for setjmp.h */
+ #endif
+ #include <string.h> /* for qt_ft_memcpy() */
+-#include <setjmp.h>
+ #include <limits.h>
+
+ #define QT_FT_UINT_MAX UINT_MAX
+
+ #define qt_ft_memset memset
+
+-#define qt_ft_setjmp setjmp
+-#define qt_ft_longjmp longjmp
+-#define qt_ft_jmp_buf jmp_buf
+-
+ #include <stddef.h>
+ typedef ptrdiff_t QT_FT_PtrDist;
+
+@@ -177,6 +172,8 @@ typedef ptrdiff_t QT_FT_PtrDist;
+ #define ErrRaster_Memory_Overflow -4
+ #define ErrRaster_OutOfMemory -6
+
++struct RasterMemoryOverflow {};
++
+ #define QT_FT_BEGIN_HEADER
+ #define QT_FT_END_HEADER
+
+@@ -312,8 +309,6 @@ QT_FT_END_STMNT
+ int band_size;
+ int band_shoot;
+
+- qt_ft_jmp_buf jump_buffer;
+-
+ void* buffer;
+ long buffer_size;
+
+@@ -335,12 +330,14 @@ QT_FT_END_STMNT
+
+ } TRaster, *PRaster;
+
++ extern "C" {
+ int q_gray_rendered_spans(TRaster *raster)
+ {
+ if ( raster && raster->worker )
+ return raster->worker->skip_spans > 0 ? 0 : -raster->worker->skip_spans;
+ return 0;
+ }
++ }
+
+ /*************************************************************************/
+ /* */
+@@ -406,7 +403,6 @@ QT_FT_END_STMNT
+ ras.max_ey = ( ras.max_ey + 63 ) >> 6;
+ }
+
+-
+ /*************************************************************************/
+ /* */
+ /* Record the current cell in the table. */
+@@ -435,7 +431,7 @@ QT_FT_END_STMNT
+ }
+
+ if ( ras.num_cells >= ras.max_cells )
+- qt_ft_longjmp( ras.jump_buffer, 1 );
++ throw RasterMemoryOverflow();
+
+ cell = ras.cells + ras.num_cells++;
+ cell->x = x;
+@@ -1507,7 +1503,7 @@ QT_FT_END_STMNT
+
+ QT_FT_TRACE5(( " move to (%.2f, %.2f)\n",
+ v_start.x / 64.0, v_start.y / 64.0 ));
+- error = gray_move_to( &v_start, user );
++ error = gray_move_to( &v_start, static_cast<PWorker>(user) );
+ if ( error )
+ goto Exit;
+
+@@ -1529,7 +1525,7 @@ QT_FT_END_STMNT
+
+ QT_FT_TRACE5(( " line to (%.2f, %.2f)\n",
+ vec.x / 64.0, vec.y / 64.0 ));
+- gray_render_line(user, UPSCALE(vec.x), UPSCALE(vec.y));
++ gray_render_line(static_cast<PWorker>(user), UPSCALE(vec.x), UPSCALE(vec.y));
+ continue;
+ }
+
+@@ -1558,7 +1554,7 @@ QT_FT_END_STMNT
+ " with control (%.2f, %.2f)\n",
+ vec.x / 64.0, vec.y / 64.0,
+ v_control.x / 64.0, v_control.y / 64.0 ));
+- gray_render_conic(user, &v_control, &vec);
++ gray_render_conic(static_cast<PWorker>(user), &v_control, &vec);
+ continue;
+ }
+
+@@ -1572,7 +1568,7 @@ QT_FT_END_STMNT
+ " with control (%.2f, %.2f)\n",
+ v_middle.x / 64.0, v_middle.y / 64.0,
+ v_control.x / 64.0, v_control.y / 64.0 ));
+- gray_render_conic(user, &v_control, &v_middle);
++ gray_render_conic(static_cast<PWorker>(user), &v_control, &v_middle);
+
+ v_control = vec;
+ goto Do_Conic;
+@@ -1582,7 +1578,7 @@ QT_FT_END_STMNT
+ " with control (%.2f, %.2f)\n",
+ v_start.x / 64.0, v_start.y / 64.0,
+ v_control.x / 64.0, v_control.y / 64.0 ));
+- gray_render_conic(user, &v_control, &v_start);
++ gray_render_conic(static_cast<PWorker>(user), &v_control, &v_start);
+ goto Close;
+ }
+
+@@ -1617,7 +1613,7 @@ QT_FT_END_STMNT
+ vec.x / 64.0, vec.y / 64.0,
+ vec1.x / 64.0, vec1.y / 64.0,
+ vec2.x / 64.0, vec2.y / 64.0 ));
+- gray_render_cubic(user, &vec1, &vec2, &vec);
++ gray_render_cubic(static_cast<PWorker>(user), &vec1, &vec2, &vec);
+ continue;
+ }
+
+@@ -1626,7 +1622,7 @@ QT_FT_END_STMNT
+ v_start.x / 64.0, v_start.y / 64.0,
+ vec1.x / 64.0, vec1.y / 64.0,
+ vec2.x / 64.0, vec2.y / 64.0 ));
+- gray_render_cubic(user, &vec1, &vec2, &v_start);
++ gray_render_cubic(static_cast<PWorker>(user), &vec1, &vec2, &v_start);
+ goto Close;
+ }
+ }
+@@ -1635,7 +1631,7 @@ QT_FT_END_STMNT
+ /* close the contour with a line segment */
+ QT_FT_TRACE5(( " line to (%.2f, %.2f)\n",
+ v_start.x / 64.0, v_start.y / 64.0 ));
+- gray_render_line(user, UPSCALE(v_start.x), UPSCALE(v_start.y));
++ gray_render_line(static_cast<PWorker>(user), UPSCALE(v_start.x), UPSCALE(v_start.y));
+
+ Close:
+ first = last + 1;
+@@ -1663,14 +1659,11 @@ QT_FT_END_STMNT
+ {
+ volatile int error = 0;
+
+- if ( qt_ft_setjmp( ras.jump_buffer ) == 0 )
+- {
++ try {
+ error = QT_FT_Outline_Decompose( &ras.outline, &ras );
+ if ( !ras.invalid )
+ gray_record_cell( RAS_VAR );
+- }
+- else
+- {
++ } catch (const RasterMemoryOverflow &) {
+ error = ErrRaster_Memory_Overflow;
+ }
+
+@@ -1932,7 +1925,7 @@ QT_FT_END_STMNT
+ static int
+ gray_raster_new( QT_FT_Raster* araster )
+ {
+- *araster = malloc(sizeof(TRaster));
++ *araster = static_cast<TRaster *>(malloc(sizeof(TRaster)));
+ if (!*araster) {
+ *araster = 0;
+ return ErrRaster_Memory_Overflow;
+diff --git a/src/gui/painting/qt_attribution.json b/src/gui/painting/qt_attribution.json
+index 1a2b907606a..746a41efa8e 100644
+--- a/src/gui/painting/qt_attribution.json
++++ b/src/gui/painting/qt_attribution.json
+@@ -4,7 +4,7 @@
+ "Name": "Anti-aliasing rasterizer from FreeType 2",
+ "QDocModule": "qtgui",
+ "QtUsage": "Used in Qt GUI.",
+- "Path": "qgrayraster.c",
++ "Path": "qgrayraster.cpp",
+
+ "Description": "FreeType is a freely available software library to render fonts.",
+ "Homepage": "http://www.freetype.org",
+--
+2.44.0
+
diff --git a/PKGBUILD b/PKGBUILD
index a4c6713efd70..30ca233484ff 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,52 +9,35 @@
# 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.
-# define helper functions for the split builds
-isDefault() {
- [[ $pkgname = 'mingw-w64-qt5-base' ]] || [[ $pkgname = 'mingw-w64-qt5-base-static' ]]
-}
-isStatic() {
- [ "${pkgname##*-}" = 'static' ]
-}
-isOpenGL() {
- 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' ]]
-}
-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-static
-pkgver=5.13.2
+pkgver=5.15.13+kde+r138
pkgrel=1
-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')
+_basever=${pkgver%%+*}
+_commit=b9906b5233a80cab372c95ac4dd68b25bdca0646
+pkgdesc='A cross-platform application and UI framework, native OpenGL backend (mingw-w64)'
+arch=('any')
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')
-groups=('mingw-w64-qt5')
+ 'mingw-w64-pcre2' 'mingw-w64-zstd')
+depends+=(${pkgname%-static}) # the static version relies on the shared version for build tools and headers
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')
-# For running fxc.exe WINE coulde be used:
-#if isANGLE || isDynamic; then
-# makedepends+=('mingw-w64-wine')
-#fi
+ 'mingw-w64-vulkan-headers' 'mingw-w64-pkg-config' 'mingw-w64-environment' 'git')
+groups=('mingw-w64-qt5')
options=('!strip' '!buildflags' 'staticlibs' '!emptydirs')
-_pkgfqn="qtbase-everywhere-src-${pkgver}"
-source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz"
+_pkgfqn=${_qt_module}
+source=(git+https://invent.kde.org/qt/qt/$_pkgfqn#commit=$_commit
'0001-Adjust-win32-g-profile-for-cross-compilation-with-mi.patch'
'0002-Ensure-GLdouble-is-defined-when-using-dynamic-OpenGL.patch'
'0003-Fix-too-many-sections-assemler-error-in-OpenGL-facto.patch'
@@ -85,57 +68,48 @@ source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/subm
'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-static-build-to-prefer-dynamic-libraries.patch'
- '0032-Prevent-Cannot-find-feature-windows_vulkan_sdk.patch')
-sha256sums=('26b6b686d66a7ad28eaca349e55e2894e5a735f3831e45f2049e93b1daa92121'
- '35196184205cb58bdb1ade09c02bfc660679ed4af6dc1d807a24f1c52999545e'
- '4c66ecd2e2e215afb7f53382139b5a3a9cc87bfec2dd75af3ab8111ce3556378'
- 'dcc5acb3e160b99101b967bd696dd48a099c65754b3908c16b46c1703f134e08'
- '586bea4aa870423778eb497df48479819aa50de8d07977327eb1a0f84565813a'
- 'b5363b325198c3cfaba6437d21cc2cde6c5843d33475fc559f9eae4b20e0c867'
- '9f835025a78ab4d7dd08b1a2cb5d499790b8e01a3039741f50c93bc6722f3c71'
- '5217bae23859289898060a05769cc6088852f09206d7fc681cdcb492353be219'
- '39d32e743984904c878616afb8ffd16ad5421bc2e67606831a4245b9ef924c7b'
- 'f5fc4b36f288bb59d662c58b49a15de84f60be05d13e89719342893138f9a903'
- '48f5efe578913656ab79a35f899e15bd09fde58cc10adf8f7f5dbdc0a5022b7d'
- 'f89779100c07431fee063e0f40bcb0006662794afa522e9c5a57ac1eca24f621'
- 'f5ea9cc35754556045dd2dc07745bca89f677ade9b8566539c717d35f4ae0bd1'
- '212aeb8f2f287108d2d884c17c2f55177b8f3c39e10357e36c2f1ef2e582a12a'
- '2e7145b8a8fca349ce5838d4241d29059dd421c8722260cda5d063b75ffe3b5f'
- 'c0eff682bbc11e2258c5c40591d0222e88af0d2c136b3cede8e4792a7efba2d3'
- '8d3879a05e0fe574671bb8952393a4e7ca44183e8116053dbf01776b2d6ad4cf'
- '8b06afd5adab795a47520f1dfdb8827507f8d451eb98a02dbf1b57ede08fa6e2'
- '21f7e13919ec7d6ae88835ce34185f7d3ff3c541a1a7bad25e4354fac0201723'
- '5e08c43b1a4bfc1dfe93330119cfb85d5de873b8642cbf920d4cfbdad05a7ce5'
- 'ee0412e276bac12f57f1019807f678818cc3b166afaa2523e6d3cfbcc6baf5bf'
- 'f5f57e3b1e6314203bb3a98d7ad47c46b4894651b7d4e74749df6b7f0f7548f5'
- '22bdbef1d761426c0388a5335c2b80be52aa75e83c75f1d134eba70091de59ed'
- 'fd37d3c487790922e6dede40964d6a8abab9908d674413748c37672863374a65'
- '1c4b6e6bbc985b742e4d2124b7be002948b2cb43be4524b8b713253f2afebe96'
- '94de3861dedd76133bd3e42793f3db3a1e8b52a921095ff853038cb5b4064a5f'
- 'cd4c07f83cad7b8b1fb2995a398a3ac2ed9b4606efc0154231821db7f793676c'
- 'b15f3a0d0dd1c14c5728444ad449f2753f6c668e73e6e2ad0477fab405c338e9'
- '45af95f6f2e228f04ee3e39756cf752a04a0e58da5ed445ab79dbac0c8c7472f'
- '29ded7cd3b82e31660d4559f0d2cefde8e18af8c4cea34fd816096946ad72189'
- '13aa6ba82a4a28099c0219060deab3d3023424a8c5dcf8df6b105f3831a9a184'
- '095a39a517844a3c3ce9282a44f39478dc6d5661b6be7f5b8517f195f0fe1b14'
- 'f8aa4f1a129d0fd98f71e9a108513ff9ca78b3d86a80554e830cf6f1ba5edb00')
+ '0031-Prevent-Cannot-find-feature-windows_vulkan_sdk.patch'
+ '0032-Fix-crashes-in-rasterization-code-using-setjmp.patch')
+sha256sums=('06e49a14145574834d4d04f73e6baf662ee5e72e78973e1d7d0fe614472a80a4'
+ '11c2b54df2b5ea031c2103366d0b27d0786c3420b29cca391cc0015fd35264d7'
+ '2b00e98c8c8acb1a453191be77a2f7a9188e030480864e58ac39b517bb63ffb5'
+ '5131dff4db6f63e36ea364ce59b2fdb047fbb6d55e6543316054f6ebcd76711b'
+ '3147a21ccad3026a06d8b622db96949d51f32b6a1d25c8aae5fe5a95c3e95625'
+ '4bd74cc1d78da412faac71b5357fd86fea3f1781d0b554f8f7fd3684c833e8ce'
+ 'e566e5cdd5bc077c35054be1465148acd5ee209e609690c670b78df88cc9295b'
+ '7fe1dc6c1251c16c4236924cb5a03ac55d1dca051bd9d99fbf7b35f91454fda3'
+ 'c054851c46036710ff6f025a48d4b5b2d6e5d5d54c74b73c2cb81b00bdfa029a'
+ 'a2702d6ca3f696ca3c77b00df7bb512f5f3430fce109048c62c97d294758efd8'
+ '395339c3dde4115283db948899980e536a355422190bc90850efdc3438c527d8'
+ 'c386790a879e68b9d00bfe9f14afa67d8a374de57bdea164a5252499ec34cbcb'
+ '576177950e99f62d05bee487dd5ae1b731fe4acf438553c74e7c48631dd8789b'
+ '02bc0ce27d7835829d4e84580fb0a0b864b36b14331a166dba88f1942a6414a3'
+ '736de6cd28c8efb1729f926c1fa42c963c7f1d3a9e4b56b098906b570473320f'
+ '294f3ab13a546a1bfeae472cf7342e2bce6c058a6867d19038ba1c194fb33b8d'
+ '8f202adf905ebce78dd2942d17c0d935f0de7014ffa75840310edc0bd790ff03'
+ '129b4667c5e3cfe68040cbae2fce487e2d016bcbe2380a5ba410b225279f71b9'
+ 'fbd8cd4680e10074f90bf79d9d08ad787b483cf7c21250d1db1c8a5c829a1d83'
+ '05a29084b9bc3324beefb9ae6d00ea68c3b3c51a0b4595c024300949c906d7fd'
+ '7843f5be44b9b367cb81c143c6d670e6a5be40510848c09a1448d921c3437639'
+ '7002db8f819bf34cafda04dc4d288fef58aec9e409230dc68fcb542cb48f09bb'
+ '57607c662e6d68f2ca856617c8d7cfaa05ba8332ea70b67ab628a8f0cf2ca032'
+ '5910c4567348101d0a87197b2e52e59673467247ca4ffc89cba5701d98373435'
+ '0181986547b7c70bf2bc8de31198240f99a92e4cfdb1db81c7b99b849c416c1f'
+ '9e692f956dffa5c936a2911d8418746b19197962111b4f0f45b33972ed3890f2'
+ '1d5e09034c9c903653d10c3983e4dcb710ebe8f08694e5e55199a3e4acb8f629'
+ '5379cea6fd54a16e7f67b617bf3582c08f8934ae8d699e85ad21f20dcf192424'
+ '82d1db9d4536350fe2549c400487018a8477a15da83a568240a013a6d82dfe92'
+ '01413344603a8e99f7b0280e7f297de4ea415e0c5011b1dac116eaf25082220b'
+ '4f88801a586c35515fd982f8e465fb4546ef38765c6a2abe1e8ca69e3700d799'
+ 'b4dad74bbe2731aaa8711408fe509344e7e6049def897389f7e2a86423f3377e'
+ '17f251d456713c920c6581659c54b9c372e1a329081b2ed9d9826e9e0ddd317a')
_architectures='i686-w64-mingw32 x86_64-w64-mingw32'
-isStatic && depends+=(${pkgname%-static})
-
-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
+pkgver() {
+ cd $_pkgfqn
+ echo "$_basever+kde+r"`git rev-list --count v$_basever-lts-lgpl..$_commit`
+}
prepare() {
cd "${srcdir}/${_pkgfqn}"
@@ -146,22 +120,17 @@ prepare() {
patch -p1 -i "$patch"
done
- # make sure the Qt 5 build system uses our external ANGLE library
- #rm -rf src/3rdparty/angle include/QtANGLE/{EGL,GLES2,GLES3,KHR}
+ # clear buildflags ('!buildflags' only effects build() but not prepare())
+ unset CPPFLAGS CFLAGS CXXFLAGS LDFLAGS PKG_CONFIG_PATH
- # make sure the Qt 5 build system uses our external PCRE library and zlib
- rm -rf src/3rdparty/{pcre,zlib}
-
- # build qmake using mingw-w64 {C,LD}FLAGS
- # This also sets default {C,CXX,LD}FLAGS for projects built using qmake
- CPPFLAGS="${MINGW_CPPFLAGS:--D_FORTIFY_SOURCE=2}"
- CFLAGS="${MINGW_CFLAGS:-$CPPFLAGS -O2 -pipe -fno-plt -fexceptions --param=ssp-buffer-size=4}"
- CXXFLAGS="${MINGW_CXXFLAGS:-$CPPFLAGS -O2 -pipe -fno-plt -fexceptions --param=ssp-buffer-size=4}"
- LDFLAGS="${MINGW_LDFLAGS:--Wl,-O1,--sort-common,--as-needed}"
+ # 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/gcc-base.conf \
+ mkspecs/common/g++-win32.conf
sed -i -e "s|^\(QMAKE_LFLAGS_RELEASE.*=\).*$|\1|" \
mkspecs/common/g++-unix.conf
}
@@ -169,15 +138,6 @@ prepare() {
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.
- # See prepare() function.)
- unset CFLAGS
- unset CXXFLAGS
- unset LDFLAGS
- unset PKG_CONFIG_PATH
-
for _arch in ${_architectures}; do
# define general configure arguments
local qt_configure_args="\
@@ -237,30 +197,8 @@ build() {
|| 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
- # 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'
- elif isDynamic; then
- # FIXME: This is broken because is requires enabling the (bundled) ANGLE which is
- # broken (see comment under isANGLE).
- msg2 'Using dynamic OpenGL backend'
- qt_configure_args+=' -opengl dynamic'
- qt_configure_args+=' -angle'
- # enable declarations of GLES functions
- # FIXME: Still required?
- qt_configure_args+=' -DGL_GLEXT_PROTOTYPES'
- fi
+ msg2 'Using native OpenGL backend'
+ qt_configure_args+=' -opengl desktop'
# add include directory of MariaDB
qt_configure_args+=" -I/usr/${_arch}/include/mariadb"
@@ -270,28 +208,14 @@ build() {
msg2 'Configure and build qmake'
mkdir -p ../build-${_arch} && pushd ../build-${_arch}
- if isStatic; then
- qt_configure_args+=' -static'
-
- # configure static version to use linked OpenSSL
- qt_configure_args+=' -openssl-linked'
- export OPENSSL_LIBS="/usr/${_arch}/lib/libssl.a /usr/${_arch}/lib/libcrypto.a -lws2_32 -lgdi32 -lcrypt32 -ldnsapi -liphlpapi"
+ qt_configure_args+=' -static'
- else
- 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"
- fi
+ # configure static version to use linked OpenSSL
+ qt_configure_args+=' -openssl-linked'
+ export OPENSSL_LIBS="/usr/${_arch}/lib/libssl.a /usr/${_arch}/lib/libcrypto.a -lws2_32 -lgdi32 -lcrypt32 -ldnsapi -liphlpapi"
msg2 'Build qmake and configure' && ../${_pkgfqn}/configure $qt_configure_args
- msg2 'Build Qt libraries' && make
+ msg2 'Build Qt libraries' && make -j$(nproc)
popd
done
@@ -300,7 +224,7 @@ build() {
package() {
for _arch in ${_architectures}; do
cd "$srcdir/${_pkgfqn}"
- make install -C ../build-${_arch} INSTALL_ROOT="${pkgdir}"
+ make install -j$(nproc) -C ../build-${_arch} INSTALL_ROOT="${pkgdir}"
# use prl files from build directory since installed prl files seem to have incorrect QMAKE_PRL_LIBS_FOR_CMAKE
pushd "$srcdir/build-${_arch}/lib"
@@ -310,86 +234,73 @@ package() {
find -iname '*.prl' -exec cp --target-directory "${pkgdir}/usr/${_arch}/lib/qt/plugins" --parents {} +
popd
- 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 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/"{lib,}Qt5WindowsUIAutomationSupport* \
- "${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5VulkanSupport* \
- "${pkgdir}/usr/${_arch}/lib/"libQt5Bootstrap* \
- rm -r \
- "${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5AccessibilitySupport" \
- "${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5DeviceDiscoverySupport" \
- "${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5EdidSupport" \
- "${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5EventDispatcherSupport" \
- "${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5FbSupport" \
- "${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5FontDatabaseSupport" \
- "${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5PlatformCompositorSupport" \
- "${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5ThemeSupport" \
- "${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5WindowsUIAutomationSupport" \
- "${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5VulkanSupport" \
- "${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5Bootstrap" \
- "${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5BootstrapDBus"
-
- # 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"
-
- # create links to static plugins in lib directory
- pushd "${pkgdir}/usr/${_arch}/lib/" && ln -s "./qt/plugins/"*/*.a . && popd
-
- # keep a couple pri files not found in base
- mv "${pkgdir}/usr/${_arch}/lib/qt/mkspecs/qdevice.static.pri" "${pkgdir}/usr/${_arch}"
- mv "${pkgdir}/usr/${_arch}/lib/qt/mkspecs/modules/qt_plugin_"*.pri "${pkgdir}/usr/${_arch}"
-
- # fix bad library order for static CMake builds caused by Qt5Gui.static.prl
- sed -i -e "s|-lfreetype;|-lfreetype;-lharfbuzz;-lfreetype;-lbz2;|" \
- -e "s| -lz;| |" \
- "${pkgdir}/usr/${_arch}/lib/Qt5Gui.static.prl"
-
- # 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}
-
- # move pri files back
- mkdir -p "${pkgdir}/usr/${_arch}/lib/qt/mkspecs/modules"
- mv "${pkgdir}/usr/${_arch}/qdevice.static.pri" "${pkgdir}/usr/${_arch}/lib/qt/mkspecs"
- mv "${pkgdir}/usr/${_arch}/"*.pri "${pkgdir}/usr/${_arch}/lib/qt/mkspecs/modules"
-
- else # shared version
- # 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 {} \;
-
- # install missing libQt5BootstrapDBus.a manually
- cp --target-directory "${pkgdir}/usr/${_arch}/lib" "$srcdir/build-${_arch}/lib/libQt5BootstrapDBus.a"
-
- # 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
- fi
+ # The static release contains only the static libs itself but relies on the
+ # shared release for the bootstrap library and tools (qmake, uic, ...).
+
+ # drop Qt5Bootstrap and libraries which are only provided as static lib
+ # and 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/"{lib,}Qt5WindowsUIAutomationSupport* \
+ "${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5VulkanSupport* \
+ "${pkgdir}/usr/${_arch}/lib/"libQt5Bootstrap* \
+ rm -r \
+ "${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5AccessibilitySupport" \
+ "${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5DeviceDiscoverySupport" \
+ "${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5EdidSupport" \
+ "${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5EventDispatcherSupport" \
+ "${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5FbSupport" \
+ "${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5FontDatabaseSupport" \
+ "${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5PlatformCompositorSupport" \
+ "${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5ThemeSupport" \
+ "${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5OpenGLExtensions*" \
+ "${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5WindowsUIAutomationSupport" \
+ "${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5VulkanSupport" \
+ "${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5Bootstrap" \
+ "${pkgdir}/usr/${_arch}/lib/cmake/StaticQt5BootstrapDBus"
+
+ # 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"
+ rm "${pkgdir}/usr/${_arch}/lib/metatypes/"*
+
+ # create links to static plugins in lib directory
+ pushd "${pkgdir}/usr/${_arch}/lib/" && ln -s "./qt/plugins/"*/*.a . && popd
+
+ # keep a couple pri files not found in base
+ mv "${pkgdir}/usr/${_arch}/lib/qt/mkspecs/qdevice.static.pri" "${pkgdir}/usr/${_arch}"
+ mv "${pkgdir}/usr/${_arch}/lib/qt/mkspecs/modules/qt_plugin_"*.pri "${pkgdir}/usr/${_arch}"
+
+ # fix bad library order for static CMake builds caused by Qt5Gui.static.prl
+ sed -i -e "s|-lfreetype;|-lfreetype;-lharfbuzz;-lfreetype;-lbz2;|" \
+ -e "s| -lz;| |" \
+ "${pkgdir}/usr/${_arch}/lib/Qt5Gui.static.prl"
+
+ # 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}
+
+ # move pri files back
+ mkdir -p "${pkgdir}/usr/${_arch}/lib/qt/mkspecs/modules"
+ mv "${pkgdir}/usr/${_arch}/qdevice.static.pri" "${pkgdir}/usr/${_arch}/lib/qt/mkspecs"
+ mv "${pkgdir}/usr/${_arch}/"*.pri "${pkgdir}/usr/${_arch}/lib/qt/mkspecs/modules"
# 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' {} \;
@@ -411,16 +322,8 @@ package() {
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" {} \;
# strip binaries, remove unuseful files
- if ! isStatic; then
- strip --strip-all "${pkgdir}/usr/${_arch}/lib/qt/bin/"*[!.pl]
- strip --strip-debug "${pkgdir}/usr/${_arch}/lib/libQt5Bootstrap"*.a
- #strip --strip-unneeded "${pkgdir}/usr/${_arch}/lib/libQt5Bootstrap"{,DBus}.so.${pkgver}
- fi
- if isStatic || [[ $NO_EXECUTABLES ]]; then
- find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete
- else
- find "${pkgdir}/usr/${_arch}" -name '*.exe' -exec ${_arch}-strip --strip-all {} \;
- fi
+ find "${pkgdir}/usr/${_arch}" -name '*.exe' -delete
+
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 {} \;
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/qtbase-sha256.txt b/qtbase-sha256.txt
new file mode 100644
index 000000000000..2bf4062ff4af
--- /dev/null
+++ b/qtbase-sha256.txt
@@ -0,0 +1 @@
+06e49a14145574834d4d04f73e6baf662ee5e72e78973e1d7d0fe614472a80a4