summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartchus2017-07-06 23:12:06 +0200
committerMartchus2017-07-06 23:12:06 +0200
commit94def18b2668f9650f74ffec756e176ccc4c4fb3 (patch)
tree2a7162956b1d4db0110b473d82413354264934ea
parent3df6482af8c916f5105111d1dcf6711e01a56c47 (diff)
downloadaur-94def18b2668f9650f74ffec756e176ccc4c4fb3.tar.gz
Update to 5.9.1
-rw-r--r--.SRCINFO70
-rw-r--r--0001-Add-profile-for-cross-compilation-with-mingw-w64.patch197
-rw-r--r--0002-Ensure-GLdouble-is-defined-when-using-dynamic-OpenGL.patch4
-rw-r--r--0003-Use-external-ANGLE-library.patch6
-rw-r--r--0004-Fix-too-many-sections-assemler-error-in-OpenGL-facto.patch4
-rw-r--r--0005-Make-sure-.pc-files-are-installed-correctly.patch14
-rw-r--r--0006-Don-t-add-resource-files-to-LIBS-parameter.patch8
-rw-r--r--0007-Prevent-debug-library-names-in-pkg-config-files.patch8
-rw-r--r--0008-Fix-linking-against-shared-static-libpng.patch8
-rw-r--r--0009-Fix-linking-against-static-D-Bus.patch6
-rw-r--r--0010-Don-t-try-to-use-debug-version-of-D-Bus-library.patch6
-rw-r--r--0011-Fix-linking-against-static-freetype2.patch8
-rw-r--r--0012-Fix-linking-against-static-harfbuzz.patch8
-rw-r--r--0013-Fix-linking-against-static-pcre.patch4
-rw-r--r--0014-Fix-linking-against-shared-static-MariaDB.patch14
-rw-r--r--0015-Fix-linking-against-shared-static-PostgreSQL.patch14
-rw-r--r--0016-Rename-qtmain-to-qt5main.patch4
-rw-r--r--0017-Build-dynamic-host-libraries.patch4
-rw-r--r--0018-Enable-rpath-for-build-tools.patch4
-rw-r--r--0019-Use-system-zlib-for-build-tools.patch4
-rw-r--r--0020-Disable-determing-default-include-and-lib-dirs-at-qm.patch6
-rw-r--r--0021-Use-.dll.a-as-import-lib-extension.patch8
-rw-r--r--0022-Merge-shared-and-static-library-trees.patch22
-rw-r--r--0023-Allow-usage-of-static-version-with-CMake.patch412
-rw-r--r--0024-Adjust-linker-flags-for-static-build-with-cmake-ming.patch8
-rw-r--r--0025-Use-correct-pkg-config-static-flag.patch6
-rw-r--r--0026-Fix-macro-invoking-moc-rcc-and-uic.patch4
-rw-r--r--0027-Ignore-errors-about-missing-feature-static.patch4
-rw-r--r--0028-Enable-and-fix-use-of-iconv.patch8
-rw-r--r--0029-Ignore-failing-pkg-config-test.patch6
-rw-r--r--0030-Prevent-qmake-from-messing-static-lib-dependencies.patch10
-rw-r--r--0031-Hardcode-linker-flags-for-platform-plugins.patch26
-rw-r--r--PKGBUILD119
33 files changed, 552 insertions, 482 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 14574d02c64..4666e3a262a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
# Generated by mksrcinfo v8
-# Thu Jun 8 19:33:54 UTC 2017
+# Thu Jul 6 21:12:06 UTC 2017
pkgbase = mingw-w64-qt5-base
pkgdesc = A cross-platform application and UI framework (mingw-w64)
- pkgver = 5.9.0
+ pkgver = 5.9.1
pkgrel = 1
url = https://www.qt.io/
arch = i686
@@ -31,7 +31,7 @@ pkgbase = mingw-w64-qt5-base
options = !buildflags
options = staticlibs
options = !emptydirs
- source = https://download.qt.io/official_releases/qt/5.9/5.9.0/submodules/qtbase-opensource-src-5.9.0.tar.xz
+ source = https://download.qt.io/official_releases/qt/5.9/5.9.1/submodules/qtbase-opensource-src-5.9.1.tar.xz
source = 0001-Add-profile-for-cross-compilation-with-mingw-w64.patch
source = 0002-Ensure-GLdouble-is-defined-when-using-dynamic-OpenGL.patch
source = 0003-Use-external-ANGLE-library.patch
@@ -63,38 +63,38 @@ pkgbase = mingw-w64-qt5-base
source = 0029-Ignore-failing-pkg-config-test.patch
source = 0030-Prevent-qmake-from-messing-static-lib-dependencies.patch
source = 0031-Hardcode-linker-flags-for-platform-plugins.patch
- sha256sums = 267eb2af1a203c087f2113f43b08014d0e2d2cb269295b8602d869a2fad5296c
- sha256sums = b4406bba39ee7c8cf74c3b8a98b936b46772ca1798ef6884b7b1574ece80fbdc
- sha256sums = 86cf470f1694abf6973f7b0f8e6cb75dd8a58e9335bab075b25229d26064adab
- sha256sums = 670b6cd7a6ee49f12ccf4121e997055daec887d080baf0269793b1d0243d1d89
- sha256sums = 878c08a1e9d0c8d639ddbdbc944ac8647ff204e9f078ddd9337737b2b929c2ed
- sha256sums = 38533dba16df99074e8c3f5d52bc15fabdbaffe0a56dbed79683c47f08342587
- sha256sums = 5ef3a569f4c53e848750ff655342e92a103abe78495905a5ef47afea9da8d1fb
- sha256sums = d21ebc9465a19e01912ebccb365b4f7ecfd3a95787c1de2640f29bdbc161983c
- sha256sums = 0622a2e606d9edbea23d3a5724ea9d4ed3958e60296b85134176c3980d590a41
- sha256sums = 90f1347e5c41b9e447c0339715d19e0434a0b58c36fd8405e850190fe17369dc
- sha256sums = 6b6ebfdf598658172680e4e83d2c3de24dcbc93233b0f48d5ccbf760d8f59a5c
- sha256sums = 11ce05f79174440406d84b38023d81c1fa87034119360fa2f0bd3887429fa694
- sha256sums = c30c558ea413c986aec2ffe86e34dd8e99f96cbc615e3963f711ec1628888114
- sha256sums = b9fbfc213089e3b44ed888f4e628030e78dd84c8030ba7a2a9f79fbf31312934
- sha256sums = 94ebedf699ebc0a5c6fed307eecd3dfabf9f864c696f3cf17bd8462789c1fae2
- sha256sums = df05b0f65dcafede1f83ce190895e6c6f4a22feecb1c5b1a0ba03f4948e56220
- sha256sums = 0acae3adb542d6ea0b405a947adf087826b4971df133b984d9166a9872e5cc98
- sha256sums = bb825226ca1e97cb49c3ac3a0c03a7db9f3e1eca632628d344201fcf9816376d
- sha256sums = e74fb8219bf599fbe5fbd1b08ff89d717089f1fa4d9e488a60e6097b212b7391
- sha256sums = cf3f90b69feb98e42ede770828db4538a3dd31dd02b2b15f55ea1743db5868ad
- sha256sums = 813cd1c22e3211133337231e1df754b5560159eecf1cf3eef0408d335e186190
- sha256sums = a0feb7b5a9747d6a88058360fc34f8ac8fb3cdeb2b343a5a2b28a88fdabb45b3
- sha256sums = 82f8f1eba6ac63c9a8749e20eb57fad80e92ddd5a58912a60a8c2fad9e83d6eb
- sha256sums = 34652aec17d7511815db59b438b0597e52b7f43c19d068e7e417325897a72254
- sha256sums = dcfe2103ace81898960316dd691fae38d05b2b6a79dc0ae0f245ae402f1101a8
- sha256sums = 0682dcc62b44717fa850700cec183cd856ce7335f26884ab15d4d0e7d3543bfe
- sha256sums = cecf5ff2916d95ffdbcf60ba3e18297a6107e17e9766a5e4d8b9ae748d99ba52
- sha256sums = 79bc920bb539fc68001b5def07eea3e45eb3d2c6aa3f2a949823236adf8e4633
- sha256sums = 80757f614fe02bfb85d00292d4f84c9f2ab2c39a512c21e956df135f3fbfdd81
- sha256sums = cc46ffc3a2183539aba923fb256045464eaae37a666034172138f4689a5c9bd3
- sha256sums = f0e63e022d1e52b82a7622828b568c57d1422f9726e116902cd2be81fec45da4
- sha256sums = 28b11e63f570891212073b3739a20489304d3c7205ae38471cbd6b15c651fabc
+ sha256sums = bc9a21e9f6fff9629019fdf9f989f064751d5073c3a28dc596def92f4d4275c6
+ sha256sums = f52c581e355a7da69c96c0b31dd42f13b298f11bb616945e6215804fef06866b
+ sha256sums = e540286f502a72dc55649006d671c9bcca5eef174ad4c275087a88f56bc40bfd
+ sha256sums = dc6d77dfa426aabcebbbda7e05f0bf8746a1700519a9bcbc4bf590b47af51eee
+ sha256sums = cb799952f673b18ab9e81528f31b0748adc9313335eccc2a8a3b30cb202d458f
+ sha256sums = 79634ff2647f5c7c93462ea97e9fca5b2be386450a2c9b27c26ec6f6cfc1f0ee
+ sha256sums = c447040e2fbaae9aae2bda5c8ed21e71cf2f83f9aa57ceba9cce6e1d1386ed12
+ sha256sums = 99735144a8437b8bc03141e998c5f750b6b5f82490cca5e31c67c013ec7f5b36
+ sha256sums = 7866105da64a96722a2676318e90951d2ac3e7bbe5793557af2ea5a73d0f321a
+ sha256sums = 37397374c1e373c74a69c4608834dc642832b51ef5532baad5313889ad477fc4
+ sha256sums = d67c33f9b990ebbd486ad38f5d5907a0f2d4989e5c2c5057ff017ee06e6493b1
+ sha256sums = 1a4f497ca54cecbb055303d4dd25eb63f5b2261d32d0b045eea4ae8f4e3bbbe5
+ sha256sums = 11e329848dbfe42abda9c9531370437ee5a0d69483c333766655e847d2b05a62
+ sha256sums = d3b395a536afb2986a0fc4aabaddc9c5ac465b4f7eb7a58a30c9918be07f2f62
+ sha256sums = 864ba163f331620ecc4df00132dc7fd9b85427038a8209571ddf7b43e5bb2ecd
+ sha256sums = 68220dc824e0294e604512cec9e6d40e55184d86bf7577dcb5b1af6462da9c66
+ sha256sums = 1ba5e6862f81456c94e3f57cc37a303d67912269661028357c716de8bf21aeb9
+ sha256sums = a4c60391632d84a085896db61aa4e94f1742be34448c23a97a1aa0910cd2e29a
+ sha256sums = 3db5c1fe5f6957cecdaef9ce767f27e4d5fdd4d9d775d527dba6c093808f371d
+ sha256sums = d3e0d6d4daea62fd710416f4549c943f601b7c0e5e84c5cc8c524fabb1dd402b
+ sha256sums = 569a2f1d7e07d439c82754703b1b007ce6907b12743211b10138a394965258c4
+ sha256sums = 589955c161c1e975536ee6e21ab1470cf6f8d3a5c50f170ba9ee9d855e347c59
+ sha256sums = b1b43064960ca3eb35eb3baed7abf28b00f606d32baeb38d53ffbf96c21dc716
+ sha256sums = cbfbb01f52c17cd37d6724e5fad0708d8337d4ba11b87f59dbbe108863aca7dd
+ sha256sums = f9b1e01c870a1640865d2d57cb756a9c754c047c66ef78f8cadc6e609677ede0
+ sha256sums = 25138daad7bfc00cb6f6556da53e6efb2ad0c7b09743cfc3633c86b46ad538cc
+ sha256sums = 19809d59b5b1fd9ffea8bee6afeca0a3992170f362d0cb99d9f20b2148b859a4
+ sha256sums = e0841bd69b6037303bfba1de3072bd55a31ca12c57b8d4e01c28d4ef447b1bed
+ sha256sums = 4d9204b4e4d634391704954ba152651ccfdd0a00efaabc892c62c710fc6068b4
+ sha256sums = b0e505ceef8cf052a9ceef9a508c9c1f5e4c1b4d49e08f954bcb42e4c1aed79e
+ sha256sums = 389bee66acc6aa9d36f6ab206d217e43b0aca8ba290dc7b1d170c98b79d64cf2
+ sha256sums = e2dde7f878d8b5176d5aa925aedeaf60e7b3bf14f98a55327af5f7adcff2eb8c
pkgname = mingw-w64-qt5-base
diff --git a/0001-Add-profile-for-cross-compilation-with-mingw-w64.patch b/0001-Add-profile-for-cross-compilation-with-mingw-w64.patch
index 7de494e8ab7..aaad1e4810b 100644
--- a/0001-Add-profile-for-cross-compilation-with-mingw-w64.patch
+++ b/0001-Add-profile-for-cross-compilation-with-mingw-w64.patch
@@ -1,21 +1,21 @@
-From 9e46af21edffe2c27d2239ae2133c5a442cd7b43 Mon Sep 17 00:00:00 2001
+From 519d5f635192522a5dd273a19446071fd4c6970a Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Fri, 3 Feb 2017 18:30:51 +0100
Subject: [PATCH 01/31] Add profile for cross compilation with mingw-w64
---
- mkspecs/mingw-w64-g++/qmake.conf | 125 +++++++++++++++++++++++++++
+ mkspecs/mingw-w64-g++/qmake.conf | 126 +++++++++++++++++++++++++++
mkspecs/mingw-w64-g++/qplatformdefs.h | 155 ++++++++++++++++++++++++++++++++++
- 2 files changed, 280 insertions(+)
+ 2 files changed, 281 insertions(+)
create mode 100644 mkspecs/mingw-w64-g++/qmake.conf
create mode 100644 mkspecs/mingw-w64-g++/qplatformdefs.h
diff --git a/mkspecs/mingw-w64-g++/qmake.conf b/mkspecs/mingw-w64-g++/qmake.conf
new file mode 100644
-index 0000000000..3908c1a7e2
+index 0000000000..c929483fcd
--- /dev/null
+++ b/mkspecs/mingw-w64-g++/qmake.conf
-@@ -0,0 +1,125 @@
+@@ -0,0 +1,126 @@
+#
+# qmake configuration for i686-w64-mingw32-g++ and x86_64-w64-mingw32-g++
+#
@@ -28,117 +28,118 @@ index 0000000000..3908c1a7e2
+load(device_config)
+include(../common/angle.conf)
+
-+MAKEFILE_GENERATOR = MINGW
-+QMAKE_PLATFORM = win32 win32-g++ mingw
-+CONFIG += debug_and_release debug_and_release_target precompile_header
-+DEFINES += UNICODE
-+QMAKE_COMPILER_DEFINES += __GNUC__ WIN32
++MAKEFILE_GENERATOR = MINGW
++QMAKE_PLATFORM = win32 win32-g++ mingw
++CONFIG += debug_and_release debug_and_release_target precompile_header $${CROSS_COMPILE_CUSTOM_CONFIG}
++DEFINES += UNICODE
++QMAKE_COMPILER_DEFINES += __GNUC__ WIN32
+
-+QMAKE_EXT_OBJ = .o
-+QMAKE_EXT_RES = _res.o
++QMAKE_EXT_OBJ = .o
++QMAKE_EXT_RES = _res.o
+
-+QMAKE_COMPILER = gcc
++QMAKE_COMPILER = gcc
+
-+QMAKE_CC = $${CROSS_COMPILE}gcc
-+QMAKE_LEX = flex
-+QMAKE_LEXFLAGS =
-+QMAKE_YACC = bison -y
-+QMAKE_YACCFLAGS = -d
-+QMAKE_CFLAGS = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -fno-keep-inline-dllexport $${CROSS_COMPILE_CFLAGS}
-+QMAKE_CFLAGS_DEPS = -M
-+QMAKE_CFLAGS_WARN_ON = -Wall -Wextra
-+QMAKE_CFLAGS_WARN_OFF = -w
-+QMAKE_CFLAGS_RELEASE = -O2
++QMAKE_CC = $${CROSS_COMPILE}gcc
++QMAKE_LEX = flex
++QMAKE_LEXFLAGS =
++QMAKE_YACC = bison -y
++QMAKE_YACCFLAGS = -d
++QMAKE_CFLAGS = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -fno-keep-inline-dllexport $${CROSS_COMPILE_CFLAGS}
++QMAKE_CFLAGS_DEPS = -M
++QMAKE_CFLAGS_WARN_ON = -Wall -Wextra
++QMAKE_CFLAGS_WARN_OFF = -w
++QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO = -O2 -g
-+QMAKE_CFLAGS_DEBUG = -g
-+QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
++QMAKE_CFLAGS_DEBUG = -g
++QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
+QMAKE_CFLAGS_SPLIT_SECTIONS = -ffunction-sections
-+QMAKE_CFLAGS_SSE2 = -msse2 -mstackrealign
-+QMAKE_CFLAGS_SSE3 = -msse3
-+QMAKE_CFLAGS_SSSE3 = -mssse3
-+QMAKE_CFLAGS_SSE4_1 = -msse4.1
-+QMAKE_CFLAGS_SSE4_2 = -msse4.2
-+QMAKE_CFLAGS_AVX = -mavx
-+QMAKE_CFLAGS_AVX2 = -mavx2
-+QMAKE_CFLAGS_NEON = -mfpu=neon
++QMAKE_CFLAGS_SSE2 = -msse2 -mstackrealign
++QMAKE_CFLAGS_SSE3 = -msse3
++QMAKE_CFLAGS_SSSE3 = -mssse3
++QMAKE_CFLAGS_SSE4_1 = -msse4.1
++QMAKE_CFLAGS_SSE4_2 = -msse4.2
++QMAKE_CFLAGS_AVX = -mavx
++QMAKE_CFLAGS_AVX2 = -mavx2
++QMAKE_CFLAGS_NEON = -mfpu=neon
+
-+QMAKE_CXX = $${CROSS_COMPILE}g++
-+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
-+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
-+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
-+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
-+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
++QMAKE_CXX = $${CROSS_COMPILE}g++
++QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
++QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
++QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
++QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
++QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO = $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO
-+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
-+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
-+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
-+QMAKE_CXXFLAGS_RTTI_ON = -frtti
-+QMAKE_CXXFLAGS_RTTI_OFF = -fno-rtti
++QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
++QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
++QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
++QMAKE_CXXFLAGS_RTTI_ON = -frtti
++QMAKE_CXXFLAGS_RTTI_OFF = -fno-rtti
+QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions -mthreads
+QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -fno-exceptions
-+QMAKE_CXXFLAGS_CXX11 = -std=c++11
-+QMAKE_CXXFLAGS_CXX14 = -std=c++1y
-+QMAKE_CXXFLAGS_CXX1Z = -std=c++1z
-+QMAKE_CXXFLAGS_GNUCXX11 = -std=gnu++11
-+QMAKE_CXXFLAGS_GNUCXX14 = -std=gnu++1y
-+QMAKE_CXXFLAGS_GNUCXX1Z = -std=gnu++1z
++QMAKE_CXXFLAGS_CXX11 = -std=c++11
++QMAKE_CXXFLAGS_CXX14 = -std=c++1y
++QMAKE_CXXFLAGS_CXX1Z = -std=c++1z
++QMAKE_CXXFLAGS_GNUCXX11 = -std=gnu++11
++QMAKE_CXXFLAGS_GNUCXX14 = -std=gnu++1y
++QMAKE_CXXFLAGS_GNUCXX1Z = -std=gnu++1z
+QMAKE_CXXFLAGS_SPLIT_SECTIONS = $$QMAKE_CFLAGS_SPLIT_SECTIONS
+
-+QMAKE_INCDIR =
++QMAKE_INCDIR =
+
-+QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -o $obj $src
-+QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
-+QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src
-+QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
++QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -o $obj $src
++QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
++QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src
++QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
+
-+QMAKE_LINK = $${CROSS_COMPILE}g++
-+QMAKE_LINK_C = $${CROSS_COMPILE}gcc
-+QMAKE_LFLAGS = -g
-+QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads
++QMAKE_LINK = $${CROSS_COMPILE}g++
++QMAKE_LINK_C = $${CROSS_COMPILE}gcc
++QMAKE_LFLAGS = -g
++QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads
+QMAKE_LFLAGS_EXCEPTIONS_OFF =
-+QMAKE_LFLAGS_RELEASE =
-+QMAKE_LFLAGS_DEBUG =
-+QMAKE_LFLAGS_CONSOLE = -Wl,-subsystem,console
-+QMAKE_LFLAGS_WINDOWS = -Wl,-subsystem,windows
-+QMAKE_LFLAGS_DLL = -shared
-+QMAKE_LFLAGS_CXX11 =
-+QMAKE_LFLAGS_CXX14 =
-+QMAKE_LFLAGS_CXX1Z =
-+QMAKE_LFLAGS_GCSECTIONS = -Wl,--gc-sections
-+QMAKE_LINK_OBJECT_MAX = 10
-+QMAKE_LINK_OBJECT_SCRIPT = object_script
-+QMAKE_PREFIX_SHLIB =
-+QMAKE_EXTENSION_SHLIB = dll
-+QMAKE_PREFIX_STATICLIB = lib
-+QMAKE_EXTENSION_STATICLIB = a
-+QMAKE_EXTENSION_IMPORTLIB = dll.a
++QMAKE_LFLAGS_RELEASE =
++QMAKE_LFLAGS_DEBUG =
++QMAKE_LFLAGS_CONSOLE = -Wl,-subsystem,console
++QMAKE_LFLAGS_WINDOWS = -Wl,-subsystem,windows
++QMAKE_LFLAGS_DLL = -shared
++QMAKE_LFLAGS_CXX11 =
++QMAKE_LFLAGS_CXX14 =
++QMAKE_LFLAGS_CXX1Z =
++QMAKE_LFLAGS_GCSECTIONS = -Wl,--gc-sections
++QMAKE_LINK_OBJECT_MAX = 10
++QMAKE_LINK_OBJECT_SCRIPT = object_script
++QMAKE_PREFIX_SHLIB =
++QMAKE_EXTENSION_SHLIB = dll
++QMAKE_PREFIX_STATICLIB = lib
++QMAKE_EXTENSION_STATICLIB = a
++QMAKE_EXTENSION_IMPORTLIB = dll.a
+
-+QMAKE_IDL = $${CROSS_COMPILE}widl
-+QMAKE_LIB = $${CROSS_COMPILE}ar -rc
-+QMAKE_RC = $${CROSS_COMPILE}windres
-+QMAKE_DLLTOOL = $${CROSS_COMPILE}dlltool
-+QMAKE_LRELEASE = $${CROSS_COMPILE}lrelease-qt5
++QMAKE_IDL = $${CROSS_COMPILE}widl
++QMAKE_LIB = $${CROSS_COMPILE}ar -rc
++QMAKE_RC = $${CROSS_COMPILE}windres
++QMAKE_DLLTOOL = $${CROSS_COMPILE}dlltool
++QMAKE_LRELEASE = $${CROSS_COMPILE}lrelease-qt5
+
-+QMAKE_STRIP = $${CROSS_COMPILE}strip
-+QMAKE_STRIPFLAGS_LIB += --strip-unneeded
-+QMAKE_OBJCOPY = $${CROSS_COMPILE}objcopy
-+QMAKE_NM = $${CROSS_COMPILE}nm -P
++QMAKE_STRIP = $${CROSS_COMPILE}strip
++QMAKE_STRIPFLAGS_LIB += --strip-unneeded
++QMAKE_OBJCOPY = $${CROSS_COMPILE}objcopy
++QMAKE_NM = $${CROSS_COMPILE}nm -P
+
-+PKG_CONFIG = $${CROSS_COMPILE}pkg-config
-+QMAKE_PKG_CONFIG = $${CROSS_COMPILE}pkg-config
++PKG_CONFIG = $${CROSS_COMPILE}pkg-config
++QMAKE_PKG_CONFIG = $${CROSS_COMPILE}pkg-config
+
-+QMAKE_LIBS =
-+QMAKE_LIBS_CORE = -lz -lpcre2-16 -lversion -lole32 -luuid -lwinmm -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32
-+QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luuid -luser32 -ladvapi32 -ljpeg -lpng \
-+ $$system($${QMAKE_PKG_CONFIG} --static --libs harfbuzz) \
-+ $$system($${QMAKE_PKG_CONFIG} --static --libs freetype2)
-+QMAKE_LIBS_NETWORK = -lws2_32 -lcrypt32 -ldnsapi
-+QMAKE_LIBS_DBUS = $$system($${QMAKE_PKG_CONFIG} --static --libs dbus-1)
-+QMAKE_LIBS_OPENGL = -lglu32 -lopengl32 -lgdi32 -luser32
-+QMAKE_LIBS_OPENGL_ES2 = -l$${LIBEGL_NAME} -l$${LIBGLESV2_NAME} -ld3d9 -ldxguid -lgdi32 -luser32
++QMAKE_LIBS =
++QMAKE_LIBS_CORE = -lz -lpcre2-16 -lversion -lole32 -luuid -lwinmm -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32
++QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luuid -luser32 -ladvapi32 -ljpeg -lpng \
++ $$system($${QMAKE_PKG_CONFIG} --static --libs harfbuzz) \
++ $$system($${QMAKE_PKG_CONFIG} --static --libs freetype2)
++QMAKE_LIBS_NETWORK = -lws2_32 -lcrypt32 -ldnsapi
++QMAKE_LIBS_NETWORK_STATIC = $${CROSS_COMPILE_PREFIX}/lib/openssl-1.0/libssl.a $${CROSS_COMPILE_PREFIX}/lib/openssl-1.0/libcrypto.a -lgdi32
++QMAKE_LIBS_DBUS = $$system($${QMAKE_PKG_CONFIG} --static --libs dbus-1)
++QMAKE_LIBS_OPENGL = -lglu32 -lopengl32 -lgdi32 -luser32
++QMAKE_LIBS_OPENGL_ES2 = -l$${LIBEGL_NAME} -l$${LIBGLESV2_NAME} -ld3d9 -ldxguid -lgdi32 -luser32
+QMAKE_LIBS_OPENGL_ES2_DEBUG = -l$${LIBEGL_NAME} -l$${LIBGLESV2_NAME} -ld3d9 -ldxguid -lgdi32 -luser32
-+QMAKE_LIBS_COMPAT = -ladvapi32 -lshell32 -lcomdlg32 -luser32 -lgdi32 -lws2_32
-+QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqt5main
++QMAKE_LIBS_COMPAT = -ladvapi32 -lshell32 -lcomdlg32 -luser32 -lgdi32 -lws2_32
++QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqt5main
+
+load(qt_config)
diff --git a/mkspecs/mingw-w64-g++/qplatformdefs.h b/mkspecs/mingw-w64-g++/qplatformdefs.h
@@ -303,5 +304,5 @@ index 0000000000..c5a70b1445
+
+#endif // QPLATFORMDEFS_H
--
-2.13.0
+2.13.2
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 36cb845b638..5a619c4d7c1 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 b8a768c9d6b67c09515e927344dc750880fe5150 Mon Sep 17 00:00:00 2001
+From 916435c7d9d9732ce2076c16492ae71aabc38904 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 13:36:53 +0200
Subject: [PATCH 02/31] Ensure GLdouble is defined when using dynamic OpenGL
@@ -23,5 +23,5 @@ index 0a5de2c9af..35798a2a28 100644
#ifdef Q_ENABLE_OPENGL_FUNCTIONS_DEBUG
#include <stdio.h>
--
-2.13.0
+2.13.2
diff --git a/0003-Use-external-ANGLE-library.patch b/0003-Use-external-ANGLE-library.patch
index 6f350811099..6a889d76800 100644
--- a/0003-Use-external-ANGLE-library.patch
+++ b/0003-Use-external-ANGLE-library.patch
@@ -1,4 +1,4 @@
-From 7a6384756287b07c0e3a6e18ed07414a7672feee Mon Sep 17 00:00:00 2001
+From 76a624154113a86a11459b3c331e23a14ec5b255 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 13:41:38 +0200
Subject: [PATCH 03/31] Use external ANGLE library
@@ -66,7 +66,7 @@ index 718a886809..89965709ed 100644
HEADERS += qgl.h \
qgl_p.h \
diff --git a/src/plugins/platforms/windows/windows.pri b/src/plugins/platforms/windows/windows.pri
-index 73677311f5..05a1dc2e6e 100644
+index 6d01d05fcc..181ac2cb3b 100644
--- a/src/plugins/platforms/windows/windows.pri
+++ b/src/plugins/platforms/windows/windows.pri
@@ -4,6 +4,7 @@ LIBS += -lole32 -luser32 -lwinspool -limm32 -lwinmm -loleaut32
@@ -93,5 +93,5 @@ index 43fc06f2e5..4188d4ea6b 100644
SUBDIRS += src_3rdparty_libpng
src_3rdparty_freetype.depends += src_3rdparty_libpng
--
-2.13.0
+2.13.2
diff --git a/0004-Fix-too-many-sections-assemler-error-in-OpenGL-facto.patch b/0004-Fix-too-many-sections-assemler-error-in-OpenGL-facto.patch
index 763a40571bb..fef86f9c862 100644
--- a/0004-Fix-too-many-sections-assemler-error-in-OpenGL-facto.patch
+++ b/0004-Fix-too-many-sections-assemler-error-in-OpenGL-facto.patch
@@ -1,4 +1,4 @@
-From c815500b1cbe99d31d10fa416d391ebe9f6db56e Mon Sep 17 00:00:00 2001
+From 7e740ad2c4de0297b0414acff0e51193dc7a0748 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 13:48:51 +0200
Subject: [PATCH 04/31] Fix too many sections assemler error in OpenGL factory
@@ -25,5 +25,5 @@ index 4c778b184e..1dd1755d7f 100644
HEADERS += opengl/qopengl.h \
opengl/qopengl_p.h \
--
-2.13.0
+2.13.2
diff --git a/0005-Make-sure-.pc-files-are-installed-correctly.patch b/0005-Make-sure-.pc-files-are-installed-correctly.patch
index ae67fc62c39..3e510a596d3 100644
--- a/0005-Make-sure-.pc-files-are-installed-correctly.patch
+++ b/0005-Make-sure-.pc-files-are-installed-correctly.patch
@@ -1,4 +1,4 @@
-From ca3aca842c36f8d69320f5629071d29563b91081 Mon Sep 17 00:00:00 2001
+From 6c77b092c06551fbbed5df56e674f7ce0370a02a Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 13:54:12 +0200
Subject: [PATCH 05/31] Make sure *.pc files are installed correctly
@@ -10,10 +10,10 @@ Subject: [PATCH 05/31] 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 c76708285a..fb886e00d2 100644
+index a1f3352aa3..0be4b1ef01 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
-@@ -3152,7 +3152,7 @@ MakefileGenerator::openOutput(QFile &file, const QString &build) const
+@@ -3146,7 +3146,7 @@ MakefileGenerator::openOutput(QFile &file, const QString &build) const
}
QString
@@ -22,7 +22,7 @@ index c76708285a..fb886e00d2 100644
{
QString ret = project->first("QMAKE_PKGCONFIG_FILE").toQString();
if (ret.isEmpty()) {
-@@ -3177,7 +3177,11 @@ MakefileGenerator::pkgConfigFileName(bool fixify)
+@@ -3171,7 +3171,11 @@ MakefileGenerator::pkgConfigFileName(bool fixify)
if(fixify) {
if(QDir::isRelativePath(ret) && !project->isEmpty("DESTDIR"))
ret.prepend(project->first("DESTDIR").toQString());
@@ -49,10 +49,10 @@ index 4ced3bd121..f7cc3b9e9b 100644
void writePkgConfigFile(); // for pkg-config
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
-index 2013698c99..b6b8dda397 100644
+index 75bb5d236d..737f3abc3a 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
-@@ -724,7 +724,7 @@ QString Win32MakefileGenerator::defaultInstall(const QString &t)
+@@ -726,7 +726,7 @@ QString Win32MakefileGenerator::defaultInstall(const QString &t)
}
if(!ret.isEmpty())
ret += "\n\t";
@@ -62,5 +62,5 @@ index 2013698c99..b6b8dda397 100644
uninst.append("\n\t");
uninst.append("-$(DEL_FILE) " + escapeFilePath(dst_pc));
--
-2.13.0
+2.13.2
diff --git a/0006-Don-t-add-resource-files-to-LIBS-parameter.patch b/0006-Don-t-add-resource-files-to-LIBS-parameter.patch
index 70c17f763d0..82cc017729e 100644
--- a/0006-Don-t-add-resource-files-to-LIBS-parameter.patch
+++ b/0006-Don-t-add-resource-files-to-LIBS-parameter.patch
@@ -1,4 +1,4 @@
-From a0b4f7192c90214a2950382679b259e143dfc4bc Mon Sep 17 00:00:00 2001
+From ec5bc4a14e14c982902366f4345cb34e40f6ce1d Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 13:58:28 +0200
Subject: [PATCH 06/31] 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 8d5a9a7d0f..d2cf8d9afc 100644
+index b9895fb10d..06211572e8 100644
--- a/qmake/generators/win32/mingw_make.cpp
+++ b/qmake/generators/win32/mingw_make.cpp
-@@ -196,7 +196,7 @@ void MingwMakefileGenerator::init()
+@@ -202,7 +202,7 @@ void MingwMakefileGenerator::init()
processVars();
@@ -24,5 +24,5 @@ index 8d5a9a7d0f..d2cf8d9afc 100644
if (project->isActiveConfig("dll")) {
QString destDir = "";
--
-2.13.0
+2.13.2
diff --git a/0007-Prevent-debug-library-names-in-pkg-config-files.patch b/0007-Prevent-debug-library-names-in-pkg-config-files.patch
index a4fa0df0a98..e3488980829 100644
--- a/0007-Prevent-debug-library-names-in-pkg-config-files.patch
+++ b/0007-Prevent-debug-library-names-in-pkg-config-files.patch
@@ -1,4 +1,4 @@
-From 6656828260372d7e2e6256fa85e37a830b58260c Mon Sep 17 00:00:00 2001
+From 46cd5894bb960c5c67e31f372737ae3268924b67 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 14:01:14 +0200
Subject: [PATCH 07/31] 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 fb886e00d2..55e25d596a 100644
+index 0be4b1ef01..c7e075b5bc 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
-@@ -3166,6 +3166,9 @@ MakefileGenerator::pkgConfigFileName(bool fixify, bool onlyPrependDestdir)
+@@ -3160,6 +3160,9 @@ MakefileGenerator::pkgConfigFileName(bool fixify, bool onlyPrependDestdir)
if (dot != -1)
ret = ret.left(dot);
}
@@ -29,5 +29,5 @@ index fb886e00d2..55e25d596a 100644
QString subdir = project->first("QMAKE_PKGCONFIG_DESTDIR").toQString();
if(!subdir.isEmpty()) {
--
-2.13.0
+2.13.2
diff --git a/0008-Fix-linking-against-shared-static-libpng.patch b/0008-Fix-linking-against-shared-static-libpng.patch
index 465da406093..330b5979cab 100644
--- a/0008-Fix-linking-against-shared-static-libpng.patch
+++ b/0008-Fix-linking-against-shared-static-libpng.patch
@@ -1,4 +1,4 @@
-From 4fb07cf7290b97694586f3f30489165f114ca439 Mon Sep 17 00:00:00 2001
+From dcc3c951ab71f84f0cc32ffd75ac375b56de1e1a Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Thu, 26 Jan 2017 17:51:31 +0100
Subject: [PATCH 08/31] Fix linking against shared/static libpng
@@ -9,10 +9,10 @@ Change-Id: Ic7a0ec9544059b8e647a5d0186f1b88c00911dcf
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/gui/configure.json b/src/gui/configure.json
-index 73e59a7ad9..6dee7d18aa 100644
+index 2fb03a452a..3f07fba4d5 100644
--- a/src/gui/configure.json
+++ b/src/gui/configure.json
-@@ -162,7 +162,8 @@
+@@ -176,7 +176,8 @@
"sources": [
{ "type": "pkgConfig", "args": "libpng" },
{ "libs": "-llibpng", "condition": "config.msvc" },
@@ -23,5 +23,5 @@ index 73e59a7ad9..6dee7d18aa 100644
"use": [
{ "lib": "zlib", "condition": "features.system-zlib" }
--
-2.13.0
+2.13.2
diff --git a/0009-Fix-linking-against-static-D-Bus.patch b/0009-Fix-linking-against-static-D-Bus.patch
index ed0ab4f8b16..6f325993e8c 100644
--- a/0009-Fix-linking-against-static-D-Bus.patch
+++ b/0009-Fix-linking-against-static-D-Bus.patch
@@ -1,4 +1,4 @@
-From c481c20ed0c454b6e32fd37f6abf99c5bb118a83 Mon Sep 17 00:00:00 2001
+From dbbf044c7f0b3b521f90376f87fe94f45d74b795 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Fri, 3 Feb 2017 19:36:25 +0100
Subject: [PATCH 09/31] Fix linking against static D-Bus
@@ -25,7 +25,7 @@ index 295c904400..80d3e9c044 100644
#include <dbus/dbus.h>
diff --git a/configure.json b/configure.json
-index 02d5f1a65e..7f005e99f5 100644
+index b572a3d1f5..cd918abc98 100644
--- a/configure.json
+++ b/configure.json
@@ -159,12 +159,16 @@
@@ -62,5 +62,5 @@ index cfc0e12046..65f1397cd6 100644
# include <dbus/dbus.h>
#else
--
-2.13.0
+2.13.2
diff --git a/0010-Don-t-try-to-use-debug-version-of-D-Bus-library.patch b/0010-Don-t-try-to-use-debug-version-of-D-Bus-library.patch
index 1cca36616b8..dbdd95612eb 100644
--- a/0010-Don-t-try-to-use-debug-version-of-D-Bus-library.patch
+++ b/0010-Don-t-try-to-use-debug-version-of-D-Bus-library.patch
@@ -1,4 +1,4 @@
-From aaf4a548cf6fbe17f0ff11eb370cf7e27ab85221 Mon Sep 17 00:00:00 2001
+From 347aa4cd9a6563d841827eccf73d0f81fc57372d Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Fri, 2 Jun 2017 18:28:10 +0200
Subject: [PATCH 10/31] Don't try to use debug version of D-Bus library
@@ -12,7 +12,7 @@ Change-Id: Ic34e1025fda55f9659e065f5bbe9d51f55420adb
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.json b/configure.json
-index 7f005e99f5..27b1460f93 100644
+index cd918abc98..f5d92d001b 100644
--- a/configure.json
+++ b/configure.json
@@ -165,7 +165,7 @@
@@ -25,5 +25,5 @@ index 7f005e99f5..27b1460f93 100644
},
"condition": "config.win32 && features.shared"
--
-2.13.0
+2.13.2
diff --git a/0011-Fix-linking-against-static-freetype2.patch b/0011-Fix-linking-against-static-freetype2.patch
index bfec7c52398..b8b08fe257c 100644
--- a/0011-Fix-linking-against-static-freetype2.patch
+++ b/0011-Fix-linking-against-static-freetype2.patch
@@ -1,4 +1,4 @@
-From 50aa5c34a1240f86092a90241fba27a332f9003c Mon Sep 17 00:00:00 2001
+From 531643d6b3f73cd23ccd6e8d1229874c306d3057 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Fri, 3 Feb 2017 20:51:19 +0100
Subject: [PATCH 11/31] Fix linking against static freetype2
@@ -8,10 +8,10 @@ Subject: [PATCH 11/31] Fix linking against static freetype2
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/gui/configure.json b/src/gui/configure.json
-index 6dee7d18aa..d6ed20e5c6 100644
+index 3f07fba4d5..b000d00801 100644
--- a/src/gui/configure.json
+++ b/src/gui/configure.json
-@@ -100,8 +100,11 @@
+@@ -107,8 +107,11 @@
"label": "FreeType",
"test": "unix/freetype",
"sources": [
@@ -26,5 +26,5 @@ index 6dee7d18aa..d6ed20e5c6 100644
},
"fontconfig": {
--
-2.13.0
+2.13.2
diff --git a/0012-Fix-linking-against-static-harfbuzz.patch b/0012-Fix-linking-against-static-harfbuzz.patch
index cab1b3067ec..8458a11db58 100644
--- a/0012-Fix-linking-against-static-harfbuzz.patch
+++ b/0012-Fix-linking-against-static-harfbuzz.patch
@@ -1,4 +1,4 @@
-From 9bea663dc73c714d606f5acc65a8f84129f1428e Mon Sep 17 00:00:00 2001
+From 3b6fa1aeceb994d9d845f6de533c6c1517e56ab8 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 14:22:56 +0200
Subject: [PATCH 12/31] Fix linking against static harfbuzz
@@ -8,10 +8,10 @@ Subject: [PATCH 12/31] 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 d6ed20e5c6..8937d38f63 100644
+index b000d00801..5ba7fa26ae 100644
--- a/src/gui/configure.json
+++ b/src/gui/configure.json
-@@ -126,7 +126,11 @@
+@@ -133,7 +133,11 @@
"label": "HarfBuzz",
"test": "unix/harfbuzz",
"sources": [
@@ -25,5 +25,5 @@ index d6ed20e5c6..8937d38f63 100644
},
"imf": {
--
-2.13.0
+2.13.2
diff --git a/0013-Fix-linking-against-static-pcre.patch b/0013-Fix-linking-against-static-pcre.patch
index 4c4997708c1..44beaa9b2b4 100644
--- a/0013-Fix-linking-against-static-pcre.patch
+++ b/0013-Fix-linking-against-static-pcre.patch
@@ -1,4 +1,4 @@
-From 6db4ce18fb06d080cd2384f1c4a8a2197a8b5434 Mon Sep 17 00:00:00 2001
+From d7112cd9c3e2979881cd97b54a75342ec7569a0f Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 14:24:01 +0200
Subject: [PATCH 13/31] Fix linking against static pcre
@@ -24,5 +24,5 @@ index 88b696f53a..afe444027e 100644
#include <pcre2.h>
--
-2.13.0
+2.13.2
diff --git a/0014-Fix-linking-against-shared-static-MariaDB.patch b/0014-Fix-linking-against-shared-static-MariaDB.patch
index 3bfd5ad64fe..d584bc8bf63 100644
--- a/0014-Fix-linking-against-shared-static-MariaDB.patch
+++ b/0014-Fix-linking-against-shared-static-MariaDB.patch
@@ -1,17 +1,17 @@
-From ea1df506321d35a9f8a648ea98642b034b7ace48 Mon Sep 17 00:00:00 2001
+From b4f40814cb08f20a6af9437627afa5f87596072a Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 18:56:55 +0200
Subject: [PATCH 14/31] Fix linking against shared/static MariaDB
Change-Id: I9722c154d845f288a2d4d1ab14a014066b28819b
---
- src/sql/configure.json | 3 +++
+ src/plugins/sqldrivers/configure.json | 3 +++
1 file changed, 3 insertions(+)
-diff --git a/src/sql/configure.json b/src/sql/configure.json
-index 49444c7e5f..d162d7bc09 100644
---- a/src/sql/configure.json
-+++ b/src/sql/configure.json
+diff --git a/src/plugins/sqldrivers/configure.json b/src/plugins/sqldrivers/configure.json
+index 5603ceb37b..ba74280e8c 100644
+--- a/src/plugins/sqldrivers/configure.json
++++ b/src/plugins/sqldrivers/configure.json
@@ -57,6 +57,9 @@
"label": "MySQL",
"test": "unix/mysql",
@@ -23,5 +23,5 @@ index 49444c7e5f..d162d7bc09 100644
{ "type": "mysqlConfig", "query": "--libs", "cleanlibs": true },
{ "type": "mysqlConfig", "query": "--libs_r", "cleanlibs": false },
--
-2.13.0
+2.13.2
diff --git a/0015-Fix-linking-against-shared-static-PostgreSQL.patch b/0015-Fix-linking-against-shared-static-PostgreSQL.patch
index f626887c5e4..d79b96ff74d 100644
--- a/0015-Fix-linking-against-shared-static-PostgreSQL.patch
+++ b/0015-Fix-linking-against-shared-static-PostgreSQL.patch
@@ -1,16 +1,16 @@
-From cb4fbac9533065928a6c839da4675c60cb7fe6c0 Mon Sep 17 00:00:00 2001
+From b40b9c32be9f991b907493b43c42ba94ee29852c Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 18:58:25 +0200
Subject: [PATCH 15/31] Fix linking against shared/static PostgreSQL
---
- src/sql/configure.json | 5 +++--
+ src/plugins/sqldrivers/configure.json | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
-diff --git a/src/sql/configure.json b/src/sql/configure.json
-index d162d7bc09..0f86b23f22 100644
---- a/src/sql/configure.json
-+++ b/src/sql/configure.json
+diff --git a/src/plugins/sqldrivers/configure.json b/src/plugins/sqldrivers/configure.json
+index ba74280e8c..78169f46ca 100644
+--- a/src/plugins/sqldrivers/configure.json
++++ b/src/plugins/sqldrivers/configure.json
@@ -73,9 +73,10 @@
"label": "PostgreSQL",
"test": "unix/psql",
@@ -25,5 +25,5 @@ index d162d7bc09..0f86b23f22 100644
]
},
--
-2.13.0
+2.13.2
diff --git a/0016-Rename-qtmain-to-qt5main.patch b/0016-Rename-qtmain-to-qt5main.patch
index 325b6aa4c86..8db7d578efb 100644
--- a/0016-Rename-qtmain-to-qt5main.patch
+++ b/0016-Rename-qtmain-to-qt5main.patch
@@ -1,4 +1,4 @@
-From f0f623ebdc7e578047212feac62044e08aaf08cb Mon Sep 17 00:00:00 2001
+From c887523c4b788a35d5d90b1de46c3e3acf4ef03c Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 14:25:40 +0200
Subject: [PATCH 16/31] Rename qtmain to qt5main
@@ -52,5 +52,5 @@ index 4140ae48de..9ae73db74b 100644
CONFIG += static
--
-2.13.0
+2.13.2
diff --git a/0017-Build-dynamic-host-libraries.patch b/0017-Build-dynamic-host-libraries.patch
index a3295074cc8..4ca34fb5fec 100644
--- a/0017-Build-dynamic-host-libraries.patch
+++ b/0017-Build-dynamic-host-libraries.patch
@@ -1,4 +1,4 @@
-From bd8345de18a4ad2bdcc17710c69c09ad2f81c83f Mon Sep 17 00:00:00 2001
+From 0ba4160aef8e9d3d9a20a442e51edf7bf40de0aa Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 14:27:28 +0200
Subject: [PATCH 17/31] Build dynamic host libraries
@@ -37,5 +37,5 @@ index c3ed27d979..30d2114aa1 100644
-INSTALLS = lib
+INSTALLS += lib
--
-2.13.0
+2.13.2
diff --git a/0018-Enable-rpath-for-build-tools.patch b/0018-Enable-rpath-for-build-tools.patch
index 375b390777e..67242216532 100644
--- a/0018-Enable-rpath-for-build-tools.patch
+++ b/0018-Enable-rpath-for-build-tools.patch
@@ -1,4 +1,4 @@
-From 905438dce78dd9fb08692b81bfbed4caa30fd23e Mon Sep 17 00:00:00 2001
+From e626efd93b2c7d8b8d41ce37b8686511ceb4c066 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 17:59:27 +0200
Subject: [PATCH 18/31] Enable rpath for build tools
@@ -33,5 +33,5 @@ index cb84ae0da8..8d9471ed0a 100644
INSTALLS += target
--
-2.13.0
+2.13.2
diff --git a/0019-Use-system-zlib-for-build-tools.patch b/0019-Use-system-zlib-for-build-tools.patch
index 5494df70e64..441dbdd513d 100644
--- a/0019-Use-system-zlib-for-build-tools.patch
+++ b/0019-Use-system-zlib-for-build-tools.patch
@@ -1,4 +1,4 @@
-From aa62a2156a564f8125d3dfdac08124673d123016 Mon Sep 17 00:00:00 2001
+From daf956f7f429c85b1a760e7bca8a2e344878ef9b Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 18:04:42 +0200
Subject: [PATCH 19/31] Use system zlib for build tools
@@ -21,5 +21,5 @@ index 521dd5f0f2..eb8cb4770c 100644
} else {
CONFIG += no_core_dep
--
-2.13.0
+2.13.2
diff --git a/0020-Disable-determing-default-include-and-lib-dirs-at-qm.patch b/0020-Disable-determing-default-include-and-lib-dirs-at-qm.patch
index 709f57226f8..448293a1dee 100644
--- a/0020-Disable-determing-default-include-and-lib-dirs-at-qm.patch
+++ b/0020-Disable-determing-default-include-and-lib-dirs-at-qm.patch
@@ -1,4 +1,4 @@
-From 7d3b433e7a103e2f26cf183e1d9910b4d33a97ec Mon Sep 17 00:00:00 2001
+From 8dda97434f6aa975741278347f873f479bf856c0 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 18:20:25 +0200
Subject: [PATCH 20/31] Disable determing default include and lib dirs at qmake
@@ -9,7 +9,7 @@ Subject: [PATCH 20/31] Disable determing default include and lib dirs at qmake
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mkspecs/features/toolchain.prf b/mkspecs/features/toolchain.prf
-index 46a9c5707a..e82383f9ff 100644
+index 34bd8f1d78..9e5f361d16 100644
--- a/mkspecs/features/toolchain.prf
+++ b/mkspecs/features/toolchain.prf
@@ -21,7 +21,7 @@ isEmpty($${target_prefix}.INCDIRS) {
@@ -22,5 +22,5 @@ index 46a9c5707a..e82383f9ff 100644
cmd_prefix = "LC_ALL=C"
cmd_suffix = "</dev/null >/dev/null"
--
-2.13.0
+2.13.2
diff --git a/0021-Use-.dll.a-as-import-lib-extension.patch b/0021-Use-.dll.a-as-import-lib-extension.patch
index 0ac7e1a2e3d..f7969fa4026 100644
--- a/0021-Use-.dll.a-as-import-lib-extension.patch
+++ b/0021-Use-.dll.a-as-import-lib-extension.patch
@@ -1,4 +1,4 @@
-From 7ccfcf6a364c00f5ec0204b4614ae78dd2296c0e Mon Sep 17 00:00:00 2001
+From 049d164d606149cb8b7052dfa8fd67c55e135fa8 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 18:26:18 +0200
Subject: [PATCH 21/31] Use *.dll.a as import lib extension
@@ -27,7 +27,7 @@ index 146e83ae67..15fc070008 100644
} else {
CMAKE_WINMAIN_FILE_LOCATION_DEBUG = qtmain$${QT_LIBINFIX}d.lib
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
-index b6b8dda397..d9388e8518 100644
+index 737f3abc3a..2e6d5d94a9 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
@@ -80,10 +80,14 @@ Win32MakefileGenerator::parseLibFlag(const ProString &flag, ProString *arg)
@@ -49,7 +49,7 @@ index b6b8dda397..d9388e8518 100644
static const char * const lflags[] = { "QMAKE_LIBS", "QMAKE_LIBS_PRIVATE", 0 };
for (int i = 0; lflags[i]; i++) {
ProStringList &l = project->values(lflags[i]);
-@@ -231,9 +235,12 @@ void Win32MakefileGenerator::fixTargetExt()
+@@ -234,9 +238,12 @@ void Win32MakefileGenerator::fixTargetExt()
if (!project->values("QMAKE_APP_FLAG").isEmpty()) {
project->values("TARGET_EXT").append(".exe");
} else if (project->isActiveConfig("shared")) {
@@ -64,5 +64,5 @@ index b6b8dda397..d9388e8518 100644
+ project->first("QMAKE_EXTENSION_SHLIB"));
project->values("TARGET").first() = project->first("QMAKE_PREFIX_SHLIB") + project->first("TARGET");
--
-2.13.0
+2.13.2
diff --git a/0022-Merge-shared-and-static-library-trees.patch b/0022-Merge-shared-and-static-library-trees.patch
index 4133f4b116e..6904e4e61cc 100644
--- a/0022-Merge-shared-and-static-library-trees.patch
+++ b/0022-Merge-shared-and-static-library-trees.patch
@@ -1,11 +1,9 @@
-From 842da3facc0a4e3269d391b57bd1207a796b8628 Mon Sep 17 00:00:00 2001
+From aacc349ec8e9241ff95678d9730d71805289256b Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 18:45:08 +0200
Subject: [PATCH 22/31] Merge shared and static library trees
Allow installation of shared and static build in the same prefix
-
-Change-Id: Ie60ddbe967cb553d5d92d5a706398a1e7385344a
---
configure.pri | 7 +++++++
mkspecs/features/default_post.prf | 11 +++++++++++
@@ -15,10 +13,10 @@ Change-Id: Ie60ddbe967cb553d5d92d5a706398a1e7385344a
5 files changed, 47 insertions(+), 6 deletions(-)
diff --git a/configure.pri b/configure.pri
-index be1b166080..9a5c6cb30d 100644
+index 76bb27e4ae..7dd19be845 100644
--- a/configure.pri
+++ b/configure.pri
-@@ -1181,3 +1181,10 @@ defineTest(createConfigStatus) {
+@@ -1212,3 +1212,10 @@ defineTest(createConfigStatus) {
QMAKE_POST_CONFIGURE += \
"createConfigStatus()"
@@ -30,7 +28,7 @@ index be1b166080..9a5c6cb30d 100644
+ QT_CONFIG -= shared
+}
diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf
-index d6caf870f7..7bff3d32ba 100644
+index 7e027325bd..ad0db62b78 100644
--- a/mkspecs/features/default_post.prf
+++ b/mkspecs/features/default_post.prf
@@ -1,5 +1,16 @@
@@ -51,7 +49,7 @@ index d6caf870f7..7bff3d32ba 100644
!have_target:!force_qt: CONFIG -= qt
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf
-index 3ccbbe7061..20b02d5ca9 100644
+index 3ccbbe7061..afaac3dbc4 100644
--- a/mkspecs/features/qt.prf
+++ b/mkspecs/features/qt.prf
@@ -255,6 +255,21 @@ for(ever) {
@@ -66,7 +64,7 @@ index 3ccbbe7061..20b02d5ca9 100644
+ } else:isEqual(MODULE_NAME, QtGui) {
+ LIBS$$var_sfx += $$QMAKE_LIBS_GUI
+ } else:isEqual(MODULE_NAME, QtNetwork) {
-+ LIBS$$var_sfx += $$QMAKE_LIBS_NETWORK
++ LIBS$$var_sfx += $$QMAKE_LIBS_NETWORK_STATIC $$QMAKE_LIBS_NETWORK
+ } else:isEqual(MODULE_NAME, QtDBus) {
+ LIBS$$var_sfx += $$QMAKE_LIBS_DBUS
+ } else:isEqual(MODULE_NAME, QtOpenGL) {
@@ -99,10 +97,10 @@ index 51ea3a8321..275e080ae4 100644
QMAKE_EXT_YACC = .y
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
-index 55e25d596a..990d10a286 100644
+index c7e075b5bc..d61f7b05e5 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
-@@ -3169,6 +3169,9 @@ MakefileGenerator::pkgConfigFileName(bool fixify, bool onlyPrependDestdir)
+@@ -3163,6 +3163,9 @@ MakefileGenerator::pkgConfigFileName(bool fixify, bool onlyPrependDestdir)
if (project->isActiveConfig("debug")) {
ret += "d";
}
@@ -112,7 +110,7 @@ index 55e25d596a..990d10a286 100644
ret += Option::pkgcfg_ext;
QString subdir = project->first("QMAKE_PKGCONFIG_DESTDIR").toQString();
if(!subdir.isEmpty()) {
-@@ -3342,9 +3345,9 @@ MakefileGenerator::writePkgConfigFile()
+@@ -3336,9 +3339,9 @@ MakefileGenerator::writePkgConfigFile()
t << endl;
// requires
@@ -126,5 +124,5 @@ index 55e25d596a..990d10a286 100644
t << endl;
--
-2.13.0
+2.13.2
diff --git a/0023-Allow-usage-of-static-version-with-CMake.patch b/0023-Allow-usage-of-static-version-with-CMake.patch
index 2f79e89bbd9..b60a2d2d052 100644
--- a/0023-Allow-usage-of-static-version-with-CMake.patch
+++ b/0023-Allow-usage-of-static-version-with-CMake.patch
@@ -1,4 +1,4 @@
-From 884534d5a74833a3666e1d34a30a9ea600a92df4 Mon Sep 17 00:00:00 2001
+From c3a38331998e8007b7c9823306593f07abb72ca4 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 18:32:00 +0200
Subject: [PATCH 23/31] Allow usage of static version with CMake
@@ -8,42 +8,46 @@ Subject: [PATCH 23/31] Allow usage of static version with CMake
installed in the same prefix
- Use eg. find_package(Qt5Core) for dynamic version
- and eg. find_package(StaticQt5Core) for static version
+ - Static targets are prefixed, eg. StaticQt5::Core
+ - Set USE_STATIC_QT_BY_DEFAULT to use static version
+ via regular find_package(Qt5Core)
-Change-Id: Idf2d3ab8e3581910f59d9727ef6b48e105729463
+Change-Id: Ie635de801de7195dddf13b4f9c721c46aecbc8e2
---
- mkspecs/features/create_cmake.prf | 85 +++--
- .../features/data/cmake/Qt5BasicConfig.cmake.in | 372 ++++++++++++++-------
- .../features/data/cmake/Qt5PluginTarget.cmake.in | 30 +-
+ mkspecs/features/create_cmake.prf | 103 ++++--
+ .../features/data/cmake/Qt5BasicConfig.cmake.in | 401 +++++++++++++++------
+ .../features/data/cmake/Qt5PluginTarget.cmake.in | 21 +-
+ .../data/cmake/Qt5StaticOnlyRedirection.cmake.in | 11 +
qmake/generators/makefile.cpp | 7 +
- src/corelib/Qt5CoreConfigExtras.cmake.in | 30 +-
- src/gui/Qt5GuiConfigExtras.cmake.in | 12 +-
- src/testlib/Qt5TestConfigExtras.cmake.in | 4 +
- 7 files changed, 372 insertions(+), 168 deletions(-)
+ src/corelib/Qt5CoreConfigExtras.cmake.in | 26 +-
+ src/gui/Qt5GuiConfigExtras.cmake.in | 8 +-
+ src/testlib/Qt5TestConfigExtras.cmake.in | 2 +-
+ 8 files changed, 405 insertions(+), 174 deletions(-)
+ create mode 100644 mkspecs/features/data/cmake/Qt5StaticOnlyRedirection.cmake.in
diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
-index 15fc070008..0914532f54 100644
+index 15fc070008..13bd362092 100644
--- a/mkspecs/features/create_cmake.prf
+++ b/mkspecs/features/create_cmake.prf
-@@ -38,7 +38,8 @@ split_incpath {
+@@ -38,7 +38,7 @@ split_incpath {
$$QT_MODULE_INCLUDE_BASE/Qt$${CMAKE_MODULE_NAME}/$$eval(QT.$${MODULE}.VERSION)/Qt$${CMAKE_MODULE_NAME})
cmake_extra_source_includes.input = $$PWD/data/cmake/ExtraSourceIncludes.cmake.in
- cmake_extra_source_includes.output = $$CMAKE_OUT_DIR/Qt5$${CMAKE_MODULE_NAME}/ExtraSourceIncludes.cmake
-+ isEmpty(CMAKE_STATIC_TYPE): cmake_extra_source_includes.output = $$CMAKE_OUT_DIR/Qt5$${CMAKE_MODULE_NAME}/ExtraSourceIncludes.cmake
-+ else: cmake_extra_source_includes.output = $$CMAKE_OUT_DIR/StaticQt5$${CMAKE_MODULE_NAME}/ExtraSourceIncludes.cmake
++ cmake_extra_source_includes.output = $$CMAKE_OUT_DIR/$${DEFAULT_QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}/ExtraSourceIncludes.cmake
!build_pass:QMAKE_SUBSTITUTES += \
cmake_extra_source_includes
-@@ -90,6 +91,8 @@ win32:!static:!staticlib {
+@@ -90,6 +90,8 @@ win32:!static:!staticlib {
}
static|staticlib:CMAKE_STATIC_TYPE = true
-+static|staticlib:VAR_PREFIX = "Static"
-+else:VAR_PREFIX = ""
++static|staticlib:DEFAULT_QT_VARIANT_PREFIX = "Static"
++else:DEFAULT_QT_VARIANT_PREFIX = ""
CMAKE_DEBUG_TYPE =
CMAKE_RELEASE_TYPE =
-@@ -135,17 +138,19 @@ contains(CONFIG, plugin) {
+@@ -135,17 +137,19 @@ contains(CONFIG, plugin) {
CMAKE_PLUGIN_NAME = $$PLUGIN_CLASS_NAME
win32 {
@@ -67,25 +71,23 @@ index 15fc070008..0914532f54 100644
mac {
isEmpty(CMAKE_STATIC_TYPE): CMAKE_PlUGIN_EXT = .dylib
else: CMAKE_PlUGIN_EXT = .a
-@@ -161,13 +166,15 @@ contains(CONFIG, plugin) {
+@@ -161,13 +165,13 @@ 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
-+ isEmpty(CMAKE_STATIC_TYPE): cmake_target_file.output = $$CMAKE_OUT_DIR/Qt5$${CMAKE_MODULE_NAME}/Qt5$${CMAKE_MODULE_NAME}_$${PLUGIN_CLASS_NAME}.cmake
-+ else: cmake_target_file.output = $$CMAKE_OUT_DIR/StaticQt5$${CMAKE_MODULE_NAME}/StaticQt5$${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
!build_pass:QMAKE_SUBSTITUTES += \
cmake_target_file
cmake_qt5_plugin_file.files = $$cmake_target_file.output
- cmake_qt5_plugin_file.path = $$[QT_INSTALL_LIBS]/cmake/Qt5$${CMAKE_MODULE_NAME}
-+ isEmpty(CMAKE_STATIC_TYPE): cmake_qt5_plugin_file.path = $$[QT_INSTALL_LIBS]/cmake/Qt5$${CMAKE_MODULE_NAME}
-+ else: cmake_qt5_plugin_file.path = $$[QT_INSTALL_LIBS]/cmake/StaticQt5$${CMAKE_MODULE_NAME}
++ cmake_qt5_plugin_file.path = $$[QT_INSTALL_LIBS]/cmake/$${DEFAULT_QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}
INSTALLS += cmake_qt5_plugin_file
return()
-@@ -180,6 +187,8 @@ mod_deps =
+@@ -180,27 +184,36 @@ mod_deps =
lib_deps =
aux_mod_deps =
aux_lib_deps =
@@ -94,15 +96,20 @@ index 15fc070008..0914532f54 100644
# Until CMake 3.0 is the minimum requirement of Qt 5, we need to filter
# out header-only modules from dependencies. CMake 3.0 provides INTERFACE
# libraries which are equivalent to header-only modules.
-@@ -188,19 +197,26 @@ for (dep, sorted_deps) {
+ for (dep, sorted_deps) {
+ cdep = $$cmakeModuleName($$dep)
!contains(QT.$${dep}.module_config, no_link) {
- mod_deps += $$cdep
- lib_deps += Qt5::$$cdep
-+ lib_deps_static += StaticQt5::$$cdep
+- mod_deps += $$cdep
+- lib_deps += Qt5::$$cdep
++ mod_deps += "$$cdep"
++ lib_deps += "${QT_VARIANT_PREFIX}Qt5::$$cdep"
++ lib_deps_static += "${QT_VARIANT_PREFIX}Qt5::$$cdep"
} else {
- aux_mod_deps += $$cdep
- aux_lib_deps += Qt5::$$cdep
-+ aux_lib_deps_static += StaticQt5::$$cdep
+- aux_mod_deps += $$cdep
+- aux_lib_deps += Qt5::$$cdep
++ aux_mod_deps += "$$cdep"
++ aux_lib_deps += "${QT_VARIANT_PREFIX}Qt5::$$cdep"
++ aux_lib_deps_static += "${QT_VARIANT_PREFIX}Qt5::$$cdep"
}
}
CMAKE_MODULE_DEPS = $$join(mod_deps, ";")
@@ -121,7 +128,7 @@ index 15fc070008..0914532f54 100644
!isEmpty(CMAKE_STATIC_TYPE) {
CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}_debug.a
CMAKE_LIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a
-@@ -228,35 +244,33 @@ mac {
+@@ -228,35 +241,33 @@ mac {
CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqt5main$${QT_LIBINFIX}.a
CMAKE_WINMAIN_FILE_LOCATION_RELEASE = libqt5main$${QT_LIBINFIX}.a
@@ -176,66 +183,116 @@ index 15fc070008..0914532f54 100644
!isEmpty(CMAKE_STATIC_TYPE) {
CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}.a
CMAKE_LIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a
-@@ -276,12 +290,14 @@ mac {
+@@ -276,12 +287,12 @@ mac {
INSTALLS += cmake_qt5_module_files
cmake_config_file.input = $$PWD/data/cmake/Qt5BasicConfig.cmake.in
-cmake_config_file.output = $$CMAKE_OUT_DIR/Qt5$${CMAKE_MODULE_NAME}/Qt5$${CMAKE_MODULE_NAME}Config.cmake
-+isEmpty(CMAKE_STATIC_TYPE): cmake_config_file.output = $$CMAKE_OUT_DIR/Qt5$${CMAKE_MODULE_NAME}/Qt5$${CMAKE_MODULE_NAME}Config.cmake
-+else: cmake_config_file.output = $$CMAKE_OUT_DIR/StaticQt5$${CMAKE_MODULE_NAME}/StaticQt5$${CMAKE_MODULE_NAME}Config.cmake
++cmake_config_file.output = $$CMAKE_OUT_DIR/$${DEFAULT_QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}/$${DEFAULT_QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}Config.cmake
CMAKE_PACKAGE_VERSION = $$eval(QT.$${MODULE}.VERSION)
cmake_config_version_file.input = $$PWD/data/cmake/Qt5ConfigVersion.cmake.in
-cmake_config_version_file.output = $$CMAKE_OUT_DIR/Qt5$${CMAKE_MODULE_NAME}/Qt5$${CMAKE_MODULE_NAME}ConfigVersion.cmake
-+isEmpty(CMAKE_STATIC_TYPE): cmake_config_version_file.output = $$CMAKE_OUT_DIR/Qt5$${CMAKE_MODULE_NAME}/Qt5$${CMAKE_MODULE_NAME}ConfigVersion.cmake
-+else: cmake_config_version_file.output = $$CMAKE_OUT_DIR/StaticQt5$${CMAKE_MODULE_NAME}/StaticQt5$${CMAKE_MODULE_NAME}ConfigVersion.cmake
++cmake_config_version_file.output = $$CMAKE_OUT_DIR/$${DEFAULT_QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}/$${DEFAULT_QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}ConfigVersion.cmake
!build_pass:QMAKE_SUBSTITUTES += \
cmake_config_file \
-@@ -295,7 +311,8 @@ cmake_extras_file.input = $$_PRO_FILE_PWD_/Qt5$${CMAKE_MODULE_NAME}ConfigExtras.
+@@ -291,11 +302,29 @@ cmake_qt5_module_files.files = \
+ $$cmake_config_file.output \
+ $$cmake_config_version_file.output
+
++# add regular CMake package for static-only modules
++static|staticlib:actually_a_shared_build {
++ INSTALLS += cmake_qt5_module_files_shared
++
++ cmake_config_file_shared.input = $$PWD/data/cmake/Qt5StaticOnlyRedirection.cmake.in
++ cmake_config_file_shared.output = $$CMAKE_OUT_DIR/Qt5$${CMAKE_MODULE_NAME}/Qt5$${CMAKE_MODULE_NAME}Config.cmake
++ cmake_config_version_file_shared.input = $$PWD/data/cmake/Qt5ConfigVersion.cmake.in
++ cmake_config_version_file_shared.output = $$CMAKE_OUT_DIR/Qt5$${CMAKE_MODULE_NAME}/Qt5$${CMAKE_MODULE_NAME}ConfigVersion.cmake
++ !build_pass:QMAKE_SUBSTITUTES += \
++ cmake_config_file_shared \
++ cmake_config_version_file_shared
++
++ cmake_qt5_module_files_shared.files = \
++ $$cmake_config_file_shared.output \
++ $$cmake_config_version_file_shared.output
++ cmake_qt5_module_files_shared.path = $$[QT_INSTALL_LIBS]/cmake/Qt5$${CMAKE_MODULE_NAME}
++}
++
+ cmake_extras_file.input = $$_PRO_FILE_PWD_/Qt5$${CMAKE_MODULE_NAME}ConfigExtras.cmake.in
exists($$cmake_extras_file.input) {
CMAKE_MODULE_EXTRAS = "true"
- cmake_extras_file.output = $$CMAKE_OUT_DIR/Qt5$${CMAKE_MODULE_NAME}/Qt5$${CMAKE_MODULE_NAME}ConfigExtras.cmake
-+ isEmpty(CMAKE_STATIC_TYPE): cmake_extras_file.output = $$CMAKE_OUT_DIR/Qt5$${CMAKE_MODULE_NAME}/Qt5$${CMAKE_MODULE_NAME}ConfigExtras.cmake
-+ else: cmake_extras_file.output = $$CMAKE_OUT_DIR/StaticQt5$${CMAKE_MODULE_NAME}/StaticQt5$${CMAKE_MODULE_NAME}ConfigExtras.cmake
++ cmake_extras_file.output = $$CMAKE_OUT_DIR/$${DEFAULT_QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}/$${DEFAULT_QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}ConfigExtras.cmake
!build_pass:QMAKE_SUBSTITUTES += cmake_extras_file
-@@ -307,7 +324,8 @@ cmake_macros_file.input = $$_PRO_FILE_PWD_/Qt5$${CMAKE_MODULE_NAME}Macros.cmake
+@@ -307,7 +336,7 @@ cmake_macros_file.input = $$_PRO_FILE_PWD_/Qt5$${CMAKE_MODULE_NAME}Macros.cmake
exists($$cmake_macros_file.input) {
CMAKE_MODULE_MACROS = "true"
- cmake_macros_file.output = $$CMAKE_OUT_DIR/Qt5$${CMAKE_MODULE_NAME}/Qt5$${CMAKE_MODULE_NAME}Macros.cmake
-+ isEmpty(CMAKE_STATIC_TYPE): cmake_macros_file.output = $$CMAKE_OUT_DIR/Qt5$${CMAKE_MODULE_NAME}/Qt5$${CMAKE_MODULE_NAME}Macros.cmake
-+ else: cmake_macros_file.output = $$CMAKE_OUT_DIR/StaticQt5$${CMAKE_MODULE_NAME}/StaticQt5$${CMAKE_MODULE_NAME}Macros.cmake
++ cmake_macros_file.output = $$CMAKE_OUT_DIR/$${DEFAULT_QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}/$${DEFAULT_QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}Macros.cmake
cmake_macros_file.CONFIG = verbatim
!build_pass:QMAKE_SUBSTITUTES += cmake_macros_file
-@@ -315,7 +333,8 @@ exists($$cmake_macros_file.input) {
+@@ -315,7 +344,7 @@ exists($$cmake_macros_file.input) {
cmake_qt5_module_files.files += $$cmake_macros_file.output
}
-cmake_qt5_module_files.path = $$[QT_INSTALL_LIBS]/cmake/Qt5$${CMAKE_MODULE_NAME}
-+isEmpty(CMAKE_STATIC_TYPE): cmake_qt5_module_files.path = $$[QT_INSTALL_LIBS]/cmake/Qt5$${CMAKE_MODULE_NAME}
-+else: cmake_qt5_module_files.path = $$[QT_INSTALL_LIBS]/cmake/StaticQt5$${CMAKE_MODULE_NAME}
++cmake_qt5_module_files.path = $$[QT_INSTALL_LIBS]/cmake/$${DEFAULT_QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}
# 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 4f342d67d7..908f7f59a7 100644
+index 17da8b979e..ec5e873aa1 100644
--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
+++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
-@@ -35,15 +35,18 @@ set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\")
+@@ -9,6 +9,32 @@ if (CMAKE_VERSION VERSION_LESS 3.0.0)
+ endif()
+ !!ENDIF
+
++!!IF isEmpty(CMAKE_STATIC_TYPE)
++# "redirect" to static package overriding variant prefix so it does not contain "Static" anymore
++if(USE_STATIC_QT_BY_DEFAULT)
++ set(ORIGINAL_OVERRIDE_QT_VARIANT_PREFIX "${OVERRIDE_QT_VARIANT_PREFIX}")
++ if(OVERRIDE_QT_VARIANT_PREFIX)
++ string(REPLACE \"Static\" \"\" OVERRIDE_QT_VARIANT_PREFIX "${OVERRIDE_QT_VARIANT_PREFIX}")
++ endif()
++ if(NOT OVERRIDE_QT_VARIANT_PREFIX)
++ set(OVERRIDE_QT_VARIANT_PREFIX "none")
++ endif()
++ find_package(StaticQt5$${CMAKE_MODULE_NAME})
++ set(OVERRIDE_QT_VARIANT_PREFIX "${ORIGINAL_OVERRIDE_QT_VARIANT_PREFIX}")
++ return()
++endif()
++!!ENDIF
++
++if(OVERRIDE_QT_VARIANT_PREFIX)
++ if(OVERRIDE_QT_VARIANT_PREFIX STREQUAL "none")
++ unset(QT_VARIANT_PREFIX)
++ else()
++ set(QT_VARIANT_PREFIX "${OVERRIDE_QT_VARIANT_PREFIX}")
++ endif()
++else()
++ set(QT_VARIANT_PREFIX \"$${DEFAULT_QT_VARIANT_PREFIX}\")
++endif()
++
+ !!IF !isEmpty(CMAKE_USR_MOVE_WORKAROUND)
+ !!IF !isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
+ set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\")
+@@ -35,15 +61,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.
--set(Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING "$$eval(QT.$${MODULE}.MAJOR_VERSION).$$eval(QT.$${MODULE}.MINOR_VERSION).$$eval(QT.$${MODULE}.PATCH_VERSION)")
--
+-set(Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING "$$eval(QT.$${MODULE}.VERSION)")
++set(${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING "$$eval(QT.$${MODULE}.VERSION)")
+
-set(Qt5$${CMAKE_MODULE_NAME}_LIBRARIES Qt5::$${CMAKE_MODULE_NAME})
-+set($${VAR_PREFIX}Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING "$$eval(QT.$${MODULE}.MAJOR_VERSION).$$eval(QT.$${MODULE}.MINOR_VERSION).$$eval(QT.$${MODULE}.PATCH_VERSION)")
-+set($${VAR_PREFIX}Qt5$${CMAKE_MODULE_NAME}_LIBRARIES $${VAR_PREFIX}Qt5::$${CMAKE_MODULE_NAME})
++set(${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_LIBRARIES ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME})
!!ENDIF // TEMPLATE != aux
-macro(_qt5_$${CMAKE_MODULE_NAME}_check_file_exists file)
@@ -248,12 +305,12 @@ index 4f342d67d7..908f7f59a7 100644
+macro(_qt5_$${CMAKE_MODULE_NAME}_check_file_exists FILE)
+!!ENDIF
+ if(NOT EXISTS \"${FILE}\")
-+ message(FATAL_ERROR \"The imported target \\\"$${VAR_PREFIX}Qt5::$${CMAKE_MODULE_NAME}\\\" references the file
++ message(FATAL_ERROR \"The imported target \\\"${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME}\\\" references the file
+ \\\"${FILE}\\\"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
-@@ -54,44 +57,91 @@ but not all the files it references.
+@@ -54,44 +84,91 @@ but not all the files it references.
endif()
endmacro()
@@ -341,7 +398,7 @@ index 4f342d67d7..908f7f59a7 100644
if(NOT \"${IMPLIB_LOCATION}\" STREQUAL \"\")
- set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
- \"IMPORTED_IMPLIB_${Configuration}\" ${imported_implib}
-+ set_target_properties($${VAR_PREFIX}Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
++ set_target_properties(${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
+ \"IMPORTED_IMPLIB_${TARGET_CONFIG}\" ${imported_implib}
)
endif()
@@ -350,18 +407,18 @@ index 4f342d67d7..908f7f59a7 100644
!!ENDIF
-if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
-+set(TARGET_NAME $${VAR_PREFIX}Qt5::$${CMAKE_MODULE_NAME})
++set(TARGET_NAME ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME})
+if(NOT TARGET ${TARGET_NAME})
!!IF !no_module_headers
!!IF !isEmpty(CMAKE_BUILD_IS_FRAMEWORK)
set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS
-@@ -99,46 +149,50 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+@@ -99,46 +176,50 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
\"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Headers\"
)
!!IF isEmpty(CMAKE_NO_PRIVATE_INCLUDES)
- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
-+ set($${VAR_PREFIX}Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
++ set(${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
\"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/\"
\"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/$${MODULE_INCNAME}\"
)
@@ -370,14 +427,14 @@ index 4f342d67d7..908f7f59a7 100644
-!!ENDIF
-!!ELSE
+!!ELSE // isEmpty(CMAKE_NO_PRIVATE_INCLUDES)
-+ set($${VAR_PREFIX}Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
++ set(${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
+!!ENDIF // isEmpty(CMAKE_NO_PRIVATE_INCLUDES)
+!!ELSE // !isEmpty(CMAKE_BUILD_IS_FRAMEWORK)
!!IF isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE)
set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR\" \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}\")
!!IF isEmpty(CMAKE_NO_PRIVATE_INCLUDES)
- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
-+ set($${VAR_PREFIX}Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
++ set(${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
\"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION\"
\"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION/$${MODULE_INCNAME}\"
)
@@ -386,13 +443,13 @@ index 4f342d67d7..908f7f59a7 100644
-!!ENDIF
-!!ELSE
+!!ELSE // isEmpty(CMAKE_NO_PRIVATE_INCLUDES)
-+ set($${VAR_PREFIX}Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
++ set(${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
+!!ENDIF // isEmpty(CMAKE_NO_PRIVATE_INCLUDES)
+!!ELSE // isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE)
set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR\" \"$${CMAKE_INCLUDE_DIR}Qt$${CMAKE_MODULE_NAME}\")
!!IF isEmpty(CMAKE_NO_PRIVATE_INCLUDES)
- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
-+ set($${VAR_PREFIX}Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
++ set(${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
\"$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION\"
\"$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION/$${MODULE_INCNAME}\"
)
@@ -402,7 +459,7 @@ index 4f342d67d7..908f7f59a7 100644
-!!ENDIF
-!!ENDIF
+!!ELSE // isEmpty(CMAKE_NO_PRIVATE_INCLUDES)
-+ set($${VAR_PREFIX}Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
++ set(${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
+!!ENDIF // isEmpty(CMAKE_NO_PRIVATE_INCLUDES)
+!!ENDIF // isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE)
+!!ENDIF // !isEmpty(CMAKE_BUILD_IS_FRAMEWORK)
@@ -412,7 +469,7 @@ index 4f342d67d7..908f7f59a7 100644
!!ELSE
set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS \"\")
- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
-+ set($${VAR_PREFIX}Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
++ set(${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
!!ENDIF
foreach(_dir ${_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS})
@@ -424,7 +481,7 @@ index 4f342d67d7..908f7f59a7 100644
endforeach()
!!IF isEmpty(CMAKE_BUILD_IS_FRAMEWORK)
-@@ -147,16 +201,20 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+@@ -147,16 +228,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})
@@ -439,58 +496,58 @@ index 4f342d67d7..908f7f59a7 100644
!!IF !equals(TEMPLATE, aux)
- set(Qt5$${CMAKE_MODULE_NAME}_INCLUDE_DIRS ${_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS})
-+ set($${VAR_PREFIX}Qt5$${CMAKE_MODULE_NAME}_INCLUDE_DIRS ${_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS})
++ set(${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_INCLUDE_DIRS ${_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS})
- set(Qt5$${CMAKE_MODULE_NAME}_DEFINITIONS -D$${MODULE_DEFINE})
- set(Qt5$${CMAKE_MODULE_NAME}_COMPILE_DEFINITIONS $${MODULE_DEFINE})
-+ set($${VAR_PREFIX}Qt5$${CMAKE_MODULE_NAME}_DEFINITIONS -D$${MODULE_DEFINE})
-+ set($${VAR_PREFIX}Qt5$${CMAKE_MODULE_NAME}_COMPILE_DEFINITIONS $${MODULE_DEFINE})
++ set(${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_DEFINITIONS -D$${MODULE_DEFINE})
++ set(${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_COMPILE_DEFINITIONS $${MODULE_DEFINE})
!!ENDIF // TEMPLATE != aux
set(_Qt5$${CMAKE_MODULE_NAME}_MODULE_DEPENDENCIES \"$${CMAKE_MODULE_DEPS}\")
-@@ -166,10 +224,10 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+@@ -166,10 +251,10 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
endif()
!!ENDIF
- set(Qt5$${CMAKE_MODULE_NAME}_OWN_PRIVATE_INCLUDE_DIRS ${Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS})
-+ set($${VAR_PREFIX}Qt5$${CMAKE_MODULE_NAME}_OWN_PRIVATE_INCLUDE_DIRS ${Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS})
++ set(${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_OWN_PRIVATE_INCLUDE_DIRS ${Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS})
set(_Qt5$${CMAKE_MODULE_NAME}_FIND_DEPENDENCIES_REQUIRED)
- if (Qt5$${CMAKE_MODULE_NAME}_FIND_REQUIRED)
-+ if ($${VAR_PREFIX}Qt5$${CMAKE_MODULE_NAME}_FIND_REQUIRED)
++ if (${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_FIND_REQUIRED)
set(_Qt5$${CMAKE_MODULE_NAME}_FIND_DEPENDENCIES_REQUIRED REQUIRED)
endif()
set(_Qt5$${CMAKE_MODULE_NAME}_FIND_DEPENDENCIES_QUIET)
-@@ -177,17 +235,17 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+@@ -177,17 +262,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)
- if (Qt5$${CMAKE_MODULE_NAME}_FIND_VERSION_EXACT)
-+ if ($${VAR_PREFIX}Qt5$${CMAKE_MODULE_NAME}_FIND_VERSION_EXACT)
++ if (${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_FIND_VERSION_EXACT)
set(_Qt5$${CMAKE_MODULE_NAME}_FIND_VERSION_EXACT EXACT)
endif()
!!IF !equals(TEMPLATE, aux)
- set(Qt5$${CMAKE_MODULE_NAME}_EXECUTABLE_COMPILE_FLAGS \"\")
-+ set($${VAR_PREFIX}Qt5$${CMAKE_MODULE_NAME}_EXECUTABLE_COMPILE_FLAGS \"\")
++ set(${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_EXECUTABLE_COMPILE_FLAGS \"\")
!!ENDIF // TEMPLATE != aux
foreach(_module_dep ${_Qt5$${CMAKE_MODULE_NAME}_MODULE_DEPENDENCIES})
- if (NOT Qt5${_module_dep}_FOUND)
- find_package(Qt5${_module_dep}
-+ if (NOT $${VAR_PREFIX}Qt5${_module_dep}_FOUND)
-+ find_package($${VAR_PREFIX}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}
-@@ -195,28 +253,32 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+@@ -195,28 +280,32 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
)
endif()
- if (NOT Qt5${_module_dep}_FOUND)
- set(Qt5$${CMAKE_MODULE_NAME}_FOUND False)
-+ if (NOT $${VAR_PREFIX}Qt5${_module_dep}_FOUND)
-+ set($${VAR_PREFIX}Qt5$${CMAKE_MODULE_NAME}_FOUND False)
++ if (NOT ${QT_VARIANT_PREFIX}Qt5${_module_dep}_FOUND)
++ set(${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_FOUND False)
return()
endif()
@@ -500,11 +557,11 @@ index 4f342d67d7..908f7f59a7 100644
- list(APPEND Qt5$${CMAKE_MODULE_NAME}_DEFINITIONS ${Qt5${_module_dep}_DEFINITIONS})
- list(APPEND Qt5$${CMAKE_MODULE_NAME}_COMPILE_DEFINITIONS ${Qt5${_module_dep}_COMPILE_DEFINITIONS})
- list(APPEND Qt5$${CMAKE_MODULE_NAME}_EXECUTABLE_COMPILE_FLAGS ${Qt5${_module_dep}_EXECUTABLE_COMPILE_FLAGS})
-+ list(APPEND $${VAR_PREFIX}Qt5$${CMAKE_MODULE_NAME}_INCLUDE_DIRS \"${Qt5${_module_dep}_INCLUDE_DIRS}\")
-+ list(APPEND $${VAR_PREFIX}Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"${Qt5${_module_dep}_PRIVATE_INCLUDE_DIRS}\")
-+ list(APPEND $${VAR_PREFIX}Qt5$${CMAKE_MODULE_NAME}_DEFINITIONS ${Qt5${_module_dep}_DEFINITIONS})
-+ list(APPEND $${VAR_PREFIX}Qt5$${CMAKE_MODULE_NAME}_COMPILE_DEFINITIONS ${Qt5${_module_dep}_COMPILE_DEFINITIONS})
-+ list(APPEND $${VAR_PREFIX}Qt5$${CMAKE_MODULE_NAME}_EXECUTABLE_COMPILE_FLAGS ${Qt5${_module_dep}_EXECUTABLE_COMPILE_FLAGS})
++ list(APPEND ${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_INCLUDE_DIRS \"${Qt5${_module_dep}_INCLUDE_DIRS}\")
++ list(APPEND ${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"${Qt5${_module_dep}_PRIVATE_INCLUDE_DIRS}\")
++ list(APPEND ${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_DEFINITIONS ${Qt5${_module_dep}_DEFINITIONS})
++ list(APPEND ${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_COMPILE_DEFINITIONS ${Qt5${_module_dep}_COMPILE_DEFINITIONS})
++ list(APPEND ${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_EXECUTABLE_COMPILE_FLAGS ${Qt5${_module_dep}_EXECUTABLE_COMPILE_FLAGS})
!!ENDIF // TEMPLATE != aux
endforeach()
!!IF !equals(TEMPLATE, aux)
@@ -513,11 +570,11 @@ index 4f342d67d7..908f7f59a7 100644
- list(REMOVE_DUPLICATES Qt5$${CMAKE_MODULE_NAME}_DEFINITIONS)
- list(REMOVE_DUPLICATES Qt5$${CMAKE_MODULE_NAME}_COMPILE_DEFINITIONS)
- list(REMOVE_DUPLICATES Qt5$${CMAKE_MODULE_NAME}_EXECUTABLE_COMPILE_FLAGS)
-+ list(REMOVE_DUPLICATES $${VAR_PREFIX}Qt5$${CMAKE_MODULE_NAME}_INCLUDE_DIRS)
-+ list(REMOVE_DUPLICATES $${VAR_PREFIX}Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS)
-+ list(REMOVE_DUPLICATES $${VAR_PREFIX}Qt5$${CMAKE_MODULE_NAME}_DEFINITIONS)
-+ list(REMOVE_DUPLICATES $${VAR_PREFIX}Qt5$${CMAKE_MODULE_NAME}_COMPILE_DEFINITIONS)
-+ list(REMOVE_DUPLICATES $${VAR_PREFIX}Qt5$${CMAKE_MODULE_NAME}_EXECUTABLE_COMPILE_FLAGS)
++ list(REMOVE_DUPLICATES ${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_INCLUDE_DIRS)
++ list(REMOVE_DUPLICATES ${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS)
++ list(REMOVE_DUPLICATES ${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_DEFINITIONS)
++ list(REMOVE_DUPLICATES ${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_COMPILE_DEFINITIONS)
++ list(REMOVE_DUPLICATES ${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_EXECUTABLE_COMPILE_FLAGS)
!!ENDIF // TEMPLATE != aux
+!!IF !isEmpty(CMAKE_STATIC_TYPE)
@@ -528,14 +585,14 @@ index 4f342d67d7..908f7f59a7 100644
!!IF !isEmpty(CMAKE_INTERFACE_QT5_MODULE_DEPS)
if (NOT CMAKE_VERSION VERSION_LESS 3.0.0)
-@@ -225,28 +287,124 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+@@ -225,28 +314,124 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
!!ENDIF
!!IF !isEmpty(CMAKE_STATIC_TYPE)
- add_library(Qt5::$${CMAKE_MODULE_NAME} STATIC IMPORTED)
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY IMPORTED_LINK_INTERFACE_LANGUAGES "CXX")
-+ add_library(StaticQt5::$${CMAKE_MODULE_NAME} STATIC IMPORTED)
-+ set_property(TARGET StaticQt5::$${CMAKE_MODULE_NAME} PROPERTY IMPORTED_LINK_INTERFACE_LANGUAGES "CXX")
++ add_library(${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} STATIC IMPORTED)
++ set_property(TARGET ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} PROPERTY IMPORTED_LINK_INTERFACE_LANGUAGES "CXX")
+
+ macro(_process_prl_file PRL_FILE_LOCATION CONFIGURATION)
+ if (EXISTS \"${PRL_FILE_LOCATION}\")
@@ -561,12 +618,12 @@ index 4f342d67d7..908f7f59a7 100644
+
+!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
+ _process_prl_file(\"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG_STATIC}\" DEBUG)
-+!!ELSE
+ !!ELSE
+ _process_prl_file(\"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG_STATIC}\" DEBUG)
+!!ENDIF
+!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
+ _process_prl_file(\"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE_STATIC}\" RELEASE)
- !!ELSE
++!!ELSE
+ _process_prl_file(\"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE_STATIC}\" RELEASE)
+!!ENDIF
+
@@ -578,38 +635,39 @@ index 4f342d67d7..908f7f59a7 100644
!!ENDIF
!!ENDIF
+
++!!IF !equals(TEMPLATE, aux)
++!!IF !isEmpty(CMAKE_BUILD_IS_FRAMEWORK)
++ set_property(TARGET ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} PROPERTY FRAMEWORK 1)
++!!ENDIF
++!!ENDIF // TEMPLATE != aux
++
!!IF !equals(TEMPLATE, aux)
!!IF !isEmpty(CMAKE_BUILD_IS_FRAMEWORK)
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY FRAMEWORK 1)
-+ set_property(TARGET $${VAR_PREFIX}Qt5::$${CMAKE_MODULE_NAME} PROPERTY FRAMEWORK 1)
++ set_property(TARGET ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} PROPERTY FRAMEWORK 1)
!!ENDIF
!!ENDIF // TEMPLATE != aux
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY
-+!!IF !equals(TEMPLATE, aux)
-+!!IF !isEmpty(CMAKE_BUILD_IS_FRAMEWORK)
-+ set_property(TARGET $${VAR_PREFIX}Qt5::$${CMAKE_MODULE_NAME} PROPERTY FRAMEWORK 1)
-+!!ENDIF
-+!!ENDIF // TEMPLATE != aux
-+
-+ set_property(TARGET $${VAR_PREFIX}Qt5::$${CMAKE_MODULE_NAME} PROPERTY
++ set_property(TARGET ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} PROPERTY
INTERFACE_INCLUDE_DIRECTORIES ${_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS})
+- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY
+- INTERFACE_COMPILE_DEFINITIONS $${MODULE_DEFINE})
+ set(interface_compile_definitions $${MODULE_DEFINE})
+!!IF !isEmpty(CMAKE_STATIC_TYPE)
-+ set_property(TARGET StaticQt5::$${CMAKE_MODULE_NAME} PROPERTY
++ set_property(TARGET ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} PROPERTY
+ INTERFACE_COMPILE_DEFINITIONS $${CMAKE_INTERFACE_COMPILE_DEFINITIONS_STATIC} $${MODULE_DEFINE})
-+ file(GLOB pluginTargetsMaybe \"${CMAKE_CURRENT_LIST_DIR}/StaticQt5$${CMAKE_MODULE_NAME}_*.cmake\")
++ file(GLOB pluginTargetsMaybe \"${CMAKE_CURRENT_LIST_DIR}/*Qt5$${CMAKE_MODULE_NAME}_*.cmake\")
+!!ELSE
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY
-- INTERFACE_COMPILE_DEFINITIONS $${MODULE_DEFINE})
++ set_property(TARGET ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} PROPERTY
+ INTERFACE_COMPILE_DEFINITIONS $${MODULE_DEFINE})
-+ file(GLOB pluginTargetsMaybe \"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}_*.cmake\")
++ file(GLOB pluginTargetsMaybe \"${CMAKE_CURRENT_LIST_DIR}/*Qt5$${CMAKE_MODULE_NAME}_*.cmake\")
+!!ENDIF
+
+ unset(pluginTargets)
+ if(pluginTargetsMaybe)
+ foreach(pluginTarget ${pluginTargetsMaybe})
-+ file(STRINGS ${pluginTarget} matched REGEX $${VAR_PREFIX}Qt5$${CMAKE_MODULE_NAME}_PLUGINS)
++ file(STRINGS ${pluginTarget} matched REGEX Qt5$${CMAKE_MODULE_NAME}_PLUGINS)
+ if(matched)
+ list(APPEND pluginTargets ${pluginTarget})
+ endif()
@@ -655,31 +713,31 @@ index 4f342d67d7..908f7f59a7 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})
-+ foreach (_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIR ${$${VAR_PREFIX}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})
if (NOT EXISTS ${_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIR})
set(_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIRS_EXIST FALSE)
endif()
-@@ -254,9 +412,9 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+@@ -254,9 +439,9 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
if (_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIRS_EXIST
AND NOT CMAKE_VERSION VERSION_LESS 3.0.0 )
- add_library(Qt5::$${CMAKE_MODULE_NAME}Private INTERFACE IMPORTED)
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME}Private PROPERTY
- INTERFACE_INCLUDE_DIRECTORIES ${Qt5$${CMAKE_MODULE_NAME}_OWN_PRIVATE_INCLUDE_DIRS}
-+ add_library($${VAR_PREFIX}Qt5::$${CMAKE_MODULE_NAME}Private INTERFACE IMPORTED)
-+ set_property(TARGET $${VAR_PREFIX}Qt5::$${CMAKE_MODULE_NAME}Private PROPERTY
-+ INTERFACE_INCLUDE_DIRECTORIES ${$${VAR_PREFIX}Qt5$${CMAKE_MODULE_NAME}_OWN_PRIVATE_INCLUDE_DIRS}
++ add_library(${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME}Private INTERFACE IMPORTED)
++ set_property(TARGET ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME}Private PROPERTY
++ INTERFACE_INCLUDE_DIRECTORIES ${${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_OWN_PRIVATE_INCLUDE_DIRS}
)
set(_Qt5$${CMAKE_MODULE_NAME}_PRIVATEDEPS)
foreach(dep ${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES})
-@@ -264,66 +422,68 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+@@ -264,66 +449,68 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
list(APPEND _Qt5$${CMAKE_MODULE_NAME}_PRIVATEDEPS ${dep}Private)
endif()
endforeach()
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME}Private PROPERTY
- INTERFACE_LINK_LIBRARIES Qt5::$${CMAKE_MODULE_NAME} ${_Qt5$${CMAKE_MODULE_NAME}_PRIVATEDEPS}
-+ set_property(TARGET $${VAR_PREFIX}Qt5::$${CMAKE_MODULE_NAME}Private PROPERTY
-+ INTERFACE_LINK_LIBRARIES $${VAR_PREFIX}Qt5::$${CMAKE_MODULE_NAME} ${_Qt5$${CMAKE_MODULE_NAME}_PRIVATEDEPS}
++ set_property(TARGET ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME}Private PROPERTY
++ INTERFACE_LINK_LIBRARIES ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} ${_Qt5$${CMAKE_MODULE_NAME}_PRIVATEDEPS}
)
endif()
@@ -688,11 +746,11 @@ index 4f342d67d7..908f7f59a7 100644
-!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
- _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" \"\" )
+!!IF !isEmpty(CMAKE_STATIC_TYPE)
-+ _populate_$${CMAKE_MODULE_NAME}_target_properties_static(StaticQt5::$${CMAKE_MODULE_NAME} RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE_STATIC}\" \"\" )
++ _populate_$${CMAKE_MODULE_NAME}_target_properties_static(${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE_STATIC}\" \"\" )
!!ELSE
- _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
-!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
-+ _populate_$${CMAKE_MODULE_NAME}_target_properties(Qt5::$${CMAKE_MODULE_NAME} RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
++ _populate_$${CMAKE_MODULE_NAME}_target_properties(${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
+!!ENDIF // CMAKE_STATIC_TYPE
+
@@ -708,7 +766,7 @@ index 4f342d67d7..908f7f59a7 100644
!!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE
- _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" \"\" )
-!!ELSE // CMAKE_STATIC_WINDOWS_BUILD
-+ _populate_$${CMAKE_MODULE_NAME}_target_properties_static(StaticQt5::$${CMAKE_MODULE_NAME} DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG_STATIC}\" \"\" )
++ _populate_$${CMAKE_MODULE_NAME}_target_properties_static(${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG_STATIC}\" \"\" )
+ endif()
+!!ELSE // CMAKE_STATIC_TYPE
if (EXISTS
@@ -726,7 +784,7 @@ index 4f342d67d7..908f7f59a7 100644
!!ENDIF
- _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
-!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
-+ _populate_$${CMAKE_MODULE_NAME}_target_properties(Qt5::$${CMAKE_MODULE_NAME} DEBUG \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
++ _populate_$${CMAKE_MODULE_NAME}_target_properties(${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} DEBUG \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
endif()
+!!ENDIF // CMAKE_STATIC_TYPE
!!ENDIF // CMAKE_DEBUG_TYPE
@@ -758,18 +816,18 @@ index 4f342d67d7..908f7f59a7 100644
!!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE
- _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" \"\" )
-!!ELSE // CMAKE_STATIC_WINDOWS_BUILD
-+ _populate_$${CMAKE_MODULE_NAME}_target_properties_static(StaticQt5::$${CMAKE_MODULE_NAME} RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE_STATIC}\" \"\" )
-+!!ELSE
++ _populate_$${CMAKE_MODULE_NAME}_target_properties_static(${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE_STATIC}\" \"\" )
++!!ELSE // CMAKE_STATIC_TYPE
if (EXISTS
!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
\"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_RELEASE}\"
-@@ -336,9 +496,11 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+@@ -336,9 +523,11 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
!!ELSE
\"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
!!ENDIF
- _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
-!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
-+ _populate_$${CMAKE_MODULE_NAME}_target_properties(Qt5::$${CMAKE_MODULE_NAME} RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
++ _populate_$${CMAKE_MODULE_NAME}_target_properties(${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
endif()
+!!ENDIF // CMAKE_STATIC_TYPE
+
@@ -777,7 +835,7 @@ index 4f342d67d7..908f7f59a7 100644
!!ENDIF // CMAKE_RELEASE_TYPE
!!ENDIF // CMAKE_FIND_OTHER_LIBRARY_BUILD
-@@ -349,37 +511,17 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+@@ -349,37 +538,17 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
)
!!ENDIF // TEMPLATE != aux
@@ -806,64 +864,73 @@ index 4f342d67d7..908f7f59a7 100644
-
!!IF !isEmpty(CMAKE_MODULE_EXTRAS)
- include(\"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}ConfigExtras.cmake\")
-+ include(\"${CMAKE_CURRENT_LIST_DIR}/$${VAR_PREFIX}Qt5$${CMAKE_MODULE_NAME}ConfigExtras.cmake\")
++ include(\"${CMAKE_CURRENT_LIST_DIR}/../${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}/${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}ConfigExtras.cmake\")
!!ENDIF
-
!!IF !isEmpty(CMAKE_MODULE_MACROS)
- include(\"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}Macros.cmake\")
-+ include(\"${CMAKE_CURRENT_LIST_DIR}/$${VAR_PREFIX}Qt5$${CMAKE_MODULE_NAME}Macros.cmake\")
++ 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\")
+!!IF !isEmpty(CMAKE_STATIC_TYPE)
-+_qt5_$${CMAKE_MODULE_NAME}_check_file_exists_static(\"${CMAKE_CURRENT_LIST_DIR}/StaticQt5$${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}/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()
diff --git a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
-index 5baf0fdb10..54345e4117 100644
+index 5baf0fdb10..1e4d98086c 100644
--- a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
+++ b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
-@@ -1,11 +1,31 @@
+@@ -1,11 +1,22 @@
-
-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 !isEmpty(CMAKE_STATIC_TYPE)
-+if(NOT TARGET StaticQt5::$$CMAKE_PLUGIN_NAME)
-+ add_library(StaticQt5::$$CMAKE_PLUGIN_NAME MODULE IMPORTED)
-+!!ELSE
-+if(NOT TARGET Qt5::$$CMAKE_PLUGIN_NAME)
-+ add_library(Qt5::$$CMAKE_PLUGIN_NAME MODULE IMPORTED)
-+!!ENDIF
++if(NOT TARGET ${QT_VARIANT_PREFIX}Qt5::$$CMAKE_PLUGIN_NAME)
++ add_library(${QT_VARIANT_PREFIX}Qt5::$$CMAKE_PLUGIN_NAME MODULE IMPORTED)
!!IF !isEmpty(CMAKE_RELEASE_TYPE)
-_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE}\")
+!!IF !isEmpty(CMAKE_STATIC_TYPE)
-+ _populate_$${CMAKE_MODULE_NAME}_plugin_properties_static(StaticQt5::$$CMAKE_MODULE_NAME StaticQt5::$$CMAKE_PLUGIN_NAME $$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE_STATIC}\")
++ _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(Qt5::$$CMAKE_MODULE_NAME Qt5::$$CMAKE_PLUGIN_NAME $$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE}\")
++ _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
!!IF !isEmpty(CMAKE_DEBUG_TYPE)
-_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG}\")
+!!IF !isEmpty(CMAKE_STATIC_TYPE)
-+ _populate_$${CMAKE_MODULE_NAME}_plugin_properties_static(StaticQt5::$$CMAKE_MODULE_NAME StaticQt5::$$CMAKE_PLUGIN_NAME $$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG_STATIC}\")
++ _populate_$${CMAKE_MODULE_NAME}_plugin_properties_static(${QT_VARIANT_PREFIX}Qt5::$$CMAKE_MODULE_NAME ${QT_VARIANT_PREFIX}Qt5::$$CMAKE_PLUGIN_NAME $$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG_STATIC}\")
+!!ELSE
-+ _populate_$${CMAKE_MODULE_NAME}_plugin_properties(Qt5::$$CMAKE_MODULE_NAME Qt5::$$CMAKE_PLUGIN_NAME $$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG}\")
-+!!ENDIF
++ _populate_$${CMAKE_MODULE_NAME}_plugin_properties(${QT_VARIANT_PREFIX}Qt5::$$CMAKE_MODULE_NAME ${QT_VARIANT_PREFIX}Qt5::$$CMAKE_PLUGIN_NAME $$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG}\")
+ !!ENDIF
+!!ENDIF
+
-+!!IF !isEmpty(CMAKE_STATIC_TYPE)
-+ list(APPEND StaticQt5$${CMAKE_MODULE_NAME}_PLUGINS StaticQt5::$$CMAKE_PLUGIN_NAME)
-+!!ELSE
-+ list(APPEND Qt5$${CMAKE_MODULE_NAME}_PLUGINS Qt5::$$CMAKE_PLUGIN_NAME)
- !!ENDIF
++list(APPEND ${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_PLUGINS ${QT_VARIANT_PREFIX}Qt5::$$CMAKE_PLUGIN_NAME)
-list(APPEND Qt5$${CMAKE_MODULE_NAME}_PLUGINS Qt5::$$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
+--- /dev/null
++++ b/mkspecs/features/data/cmake/Qt5StaticOnlyRedirection.cmake.in
+@@ -0,0 +1,11 @@
++# "redirect" to static package overriding variant prefix so it does not contain "Static" anymore
++set(ORIGINAL_OVERRIDE_QT_VARIANT_PREFIX "${OVERRIDE_QT_VARIANT_PREFIX}")
++if(OVERRIDE_QT_VARIANT_PREFIX)
++ string(REPLACE \"Static\" \"\" OVERRIDE_QT_VARIANT_PREFIX "${OVERRIDE_QT_VARIANT_PREFIX}")
++endif()
++if(NOT OVERRIDE_QT_VARIANT_PREFIX)
++ set(OVERRIDE_QT_VARIANT_PREFIX "none")
++endif()
++find_package(StaticQt5$${CMAKE_MODULE_NAME})
++set(OVERRIDE_QT_VARIANT_PREFIX "${ORIGINAL_OVERRIDE_QT_VARIANT_PREFIX}")
++
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
-index 990d10a286..35cb7d927a 100644
+index d61f7b05e5..2dd26bf4dd 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -998,6 +998,13 @@ MakefileGenerator::writePrlFile(QTextStream &t)
@@ -881,21 +948,17 @@ index 990d10a286..35cb7d927a 100644
}
diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in
-index 545b9a3d1e..42a3c557aa 100644
+index 545b9a3d1e..ebe6644dfe 100644
--- a/src/corelib/Qt5CoreConfigExtras.cmake.in
+++ b/src/corelib/Qt5CoreConfigExtras.cmake.in
-@@ -1,4 +1,10 @@
+@@ -1,4 +1,6 @@
-+!!IF !isEmpty(CMAKE_STATIC_TYPE)
-+set(IMPORTED_TARGET_NAME StaticQt5::$${CMAKE_MODULE_NAME})
-+!!ELSE
-+set(IMPORTED_TARGET_NAME Qt5::$${CMAKE_MODULE_NAME})
-+!!ENDIF
++set(IMPORTED_TARGET_NAME ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME})
+
if (NOT TARGET Qt5::qmake)
add_executable(Qt5::qmake IMPORTED)
-@@ -50,9 +56,9 @@ set(Qt5Core_QMAKE_EXECUTABLE Qt5::qmake)
+@@ -50,9 +52,9 @@ set(Qt5Core_QMAKE_EXECUTABLE Qt5::qmake)
set(Qt5Core_MOC_EXECUTABLE Qt5::moc)
set(Qt5Core_RCC_EXECUTABLE Qt5::rcc)
@@ -908,7 +971,7 @@ index 545b9a3d1e..42a3c557aa 100644
COMPATIBLE_INTERFACE_STRING QT_MAJOR_VERSION QT_COORD_TYPE
)
-@@ -63,7 +69,7 @@ foreach(_dir ${_qt5_corelib_extra_includes})
+@@ -63,7 +65,7 @@ foreach(_dir ${_qt5_corelib_extra_includes})
endforeach()
list(APPEND Qt5Core_INCLUDE_DIRS ${_qt5_corelib_extra_includes})
@@ -917,7 +980,7 @@ index 545b9a3d1e..42a3c557aa 100644
set(_qt5_corelib_extra_includes)
# Targets using Qt need to use the POSITION_INDEPENDENT_CODE property. The
-@@ -81,9 +87,9 @@ set(Qt5_POSITION_INDEPENDENT_CODE True)
+@@ -81,9 +83,9 @@ set(Qt5_POSITION_INDEPENDENT_CODE True)
if (CMAKE_VERSION VERSION_LESS 2.8.12
AND (NOT CMAKE_CXX_COMPILER_ID STREQUAL \"GNU\"
OR CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0))
@@ -929,7 +992,7 @@ index 545b9a3d1e..42a3c557aa 100644
endif()
# Applications using qmake or cmake >= 2.8.12 as their build system will
-@@ -103,7 +109,7 @@ endif()
+@@ -103,7 +105,7 @@ endif()
!!IF !isEmpty(QT_NAMESPACE)
list(APPEND Qt5Core_DEFINITIONS -DQT_NAMESPACE=$$QT_NAMESPACE)
list(APPEND Qt5Core_COMPILE_DEFINITIONS QT_NAMESPACE=$$QT_NAMESPACE)
@@ -938,7 +1001,7 @@ index 545b9a3d1e..42a3c557aa 100644
!!ENDIF
!!IF !isEmpty(CMAKE_DISABLED_FEATURES)
-@@ -112,9 +118,9 @@ set(Qt5_DISABLED_FEATURES
+@@ -112,9 +114,9 @@ set(Qt5_DISABLED_FEATURES
)
!!ENDIF
@@ -950,7 +1013,7 @@ index 545b9a3d1e..42a3c557aa 100644
!!IF qtConfig(reduce_exports)
set(QT_VISIBILITY_AVAILABLE \"True\")
-@@ -162,14 +168,14 @@ if (NOT TARGET Qt5::WinMain)
+@@ -162,14 +164,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>)
@@ -969,21 +1032,17 @@ index 545b9a3d1e..42a3c557aa 100644
$<$<AND:${_isExe},${_isWin32},${_isNotExcluded},${_isPolicyNEW}>:Qt5::WinMain>
)
diff --git a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in
-index 2e32911a64..31567d7da2 100644
+index 2e32911a64..6b02a12944 100644
--- a/src/gui/Qt5GuiConfigExtras.cmake.in
+++ b/src/gui/Qt5GuiConfigExtras.cmake.in
-@@ -1,4 +1,10 @@
+@@ -1,4 +1,6 @@
-+!!IF !isEmpty(CMAKE_STATIC_TYPE)
-+set(IMPORTED_TARGET_NAME StaticQt5::$${CMAKE_MODULE_NAME})
-+!!ELSE
-+set(IMPORTED_TARGET_NAME Qt5::$${CMAKE_MODULE_NAME})
-+!!ENDIF
++set(IMPORTED_TARGET_NAME ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME})
+
!!IF !isEmpty(CMAKE_ANGLE_EGL_DLL_RELEASE)
!!IF isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE)
-@@ -67,7 +73,7 @@ unset(_GL_INCDIRS)
+@@ -67,7 +69,7 @@ unset(_GL_INCDIRS)
# optional.
list(APPEND Qt5Gui_INCLUDE_DIRS ${_qt5gui_OPENGL_INCLUDE_DIR})
@@ -992,7 +1051,7 @@ index 2e32911a64..31567d7da2 100644
unset(_qt5gui_OPENGL_INCLUDE_DIR CACHE)
-@@ -170,9 +176,9 @@ _qt5gui_find_extra_libs(OPENGL \"$$CMAKE_OPENGL_LIBS\" \"$$CMAKE_OPENGL_LIBDIR\"
+@@ -170,9 +172,9 @@ _qt5gui_find_extra_libs(OPENGL \"$$CMAKE_OPENGL_LIBS\" \"$$CMAKE_OPENGL_LIBDIR\"
set(Qt5Gui_OPENGL_IMPLEMENTATION $$CMAKE_QT_OPENGL_IMPLEMENTATION)
@@ -1005,19 +1064,16 @@ index 2e32911a64..31567d7da2 100644
${Qt5Gui_EGL_LIBRARIES} ${Qt5Gui_OPENGL_LIBRARIES}
)
diff --git a/src/testlib/Qt5TestConfigExtras.cmake.in b/src/testlib/Qt5TestConfigExtras.cmake.in
-index 2a575958ae..8312c90fd1 100644
+index 2a575958ae..ca0e3be3b5 100644
--- a/src/testlib/Qt5TestConfigExtras.cmake.in
+++ b/src/testlib/Qt5TestConfigExtras.cmake.in
-@@ -1,5 +1,9 @@
+@@ -1,5 +1,5 @@
-+!!IF !isEmpty(CMAKE_STATIC_TYPE)
-+set_property(TARGET StaticQt5::Test
-+!!ELSE
- set_property(TARGET Qt5::Test
-+!!ENDIF
+-set_property(TARGET Qt5::Test
++set_property(TARGET ${QT_VARIANT_PREFIX}Qt5::Test
APPEND PROPERTY
INTERFACE_COMPILE_DEFINITIONS QT_TESTCASE_BUILDDIR=\\\"\${CMAKE_BINARY_DIR}\\\"
)
--
-2.13.0
+2.13.2
diff --git a/0024-Adjust-linker-flags-for-static-build-with-cmake-ming.patch b/0024-Adjust-linker-flags-for-static-build-with-cmake-ming.patch
index d5a1d718ffc..2f8cb9b10b9 100644
--- a/0024-Adjust-linker-flags-for-static-build-with-cmake-ming.patch
+++ b/0024-Adjust-linker-flags-for-static-build-with-cmake-ming.patch
@@ -1,4 +1,4 @@
-From 1f6fc1094a08c20ac78cc75e6667693676d10907 Mon Sep 17 00:00:00 2001
+From ba3345c986d4d9b43f90b44b143ba515e7795bf9 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Fri, 2 Jun 2017 16:42:07 +0200
Subject: [PATCH 24/31] Adjust linker flags for static build with
@@ -10,10 +10,10 @@ Change-Id: I33b88976d8f5ce87ce431a6f422fe87785bf5b8d
1 file changed, 7 insertions(+)
diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in
-index 42a3c557aa..fd5c947b5f 100644
+index ebe6644dfe..687d611b3f 100644
--- a/src/corelib/Qt5CoreConfigExtras.cmake.in
+++ b/src/corelib/Qt5CoreConfigExtras.cmake.in
-@@ -194,3 +194,10 @@ get_filename_component(_Qt5CoreConfigDir ${CMAKE_CURRENT_LIST_FILE} PATH)
+@@ -190,3 +190,10 @@ get_filename_component(_Qt5CoreConfigDir ${CMAKE_CURRENT_LIST_FILE} PATH)
set(_Qt5CTestMacros \"${_Qt5CoreConfigDir}/Qt5CTestMacros.cmake\")
_qt5_Core_check_file_exists(${_Qt5CTestMacros})
@@ -25,5 +25,5 @@ index 42a3c557aa..fd5c947b5f 100644
+unset(_isExe)
+!!ENDIF
--
-2.13.0
+2.13.2
diff --git a/0025-Use-correct-pkg-config-static-flag.patch b/0025-Use-correct-pkg-config-static-flag.patch
index 2e9ea114433..610190bba20 100644
--- a/0025-Use-correct-pkg-config-static-flag.patch
+++ b/0025-Use-correct-pkg-config-static-flag.patch
@@ -1,4 +1,4 @@
-From 8cfdb2fc2573a49866ab98ce66e4473f4512dfb9 Mon Sep 17 00:00:00 2001
+From c213e8a49f6eed5e3b5cbb1a314c0a1b76ed6a39 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 18:50:21 +0200
Subject: [PATCH 25/31] Use correct pkg-config --static flag
@@ -8,7 +8,7 @@ Subject: [PATCH 25/31] Use correct pkg-config --static flag
1 file changed, 3 insertions(+)
diff --git a/configure.pri b/configure.pri
-index 9a5c6cb30d..f8b1e3a1ab 100644
+index 7dd19be845..d8c6d18d71 100644
--- a/configure.pri
+++ b/configure.pri
@@ -311,6 +311,9 @@ defineTest(qtConfTest_detectPkgConfig) {
@@ -22,5 +22,5 @@ index 9a5c6cb30d..f8b1e3a1ab 100644
$$qtConfEvaluate("features.cross_compile") {
# cross compiling, check that pkg-config is set up sanely
--
-2.13.0
+2.13.2
diff --git a/0026-Fix-macro-invoking-moc-rcc-and-uic.patch b/0026-Fix-macro-invoking-moc-rcc-and-uic.patch
index 1d7dd061352..5cf4a46e589 100644
--- a/0026-Fix-macro-invoking-moc-rcc-and-uic.patch
+++ b/0026-Fix-macro-invoking-moc-rcc-and-uic.patch
@@ -1,4 +1,4 @@
-From 27d8249c25041e18ae3168a733d34208b42f436d Mon Sep 17 00:00:00 2001
+From 71b84a64a7f28891ba493d1e8bfd079dfb635bac Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 4 Dec 2016 20:35:47 +0100
Subject: [PATCH 26/31] Fix macro invoking moc, rcc and uic
@@ -70,5 +70,5 @@ index f5e7b7f050..18d120f0c7 100644
MAIN_DEPENDENCY ${infile} VERBATIM)
list(APPEND ${outfiles} ${outfile})
--
-2.13.0
+2.13.2
diff --git a/0027-Ignore-errors-about-missing-feature-static.patch b/0027-Ignore-errors-about-missing-feature-static.patch
index b4614e6123b..e679cc0e2b3 100644
--- a/0027-Ignore-errors-about-missing-feature-static.patch
+++ b/0027-Ignore-errors-about-missing-feature-static.patch
@@ -1,4 +1,4 @@
-From 3d7baa02c957207beffa3e2d4b936a6a6c5cc19b Mon Sep 17 00:00:00 2001
+From c6d3fc2bf5a8f38d89eee48659201da59f832f4f Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Wed, 25 Jan 2017 20:59:54 +0100
Subject: [PATCH 27/31] Ignore errors about missing feature static
@@ -32,5 +32,5 @@ index c00fdb73f8..d4d5599433 100644
+ !equals($$1, "static"): error("Could not find feature $${1}.")
}
--
-2.13.0
+2.13.2
diff --git a/0028-Enable-and-fix-use-of-iconv.patch b/0028-Enable-and-fix-use-of-iconv.patch
index eeada98dcaa..92eddf4c0ba 100644
--- a/0028-Enable-and-fix-use-of-iconv.patch
+++ b/0028-Enable-and-fix-use-of-iconv.patch
@@ -1,4 +1,4 @@
-From 63a1e37e442e61f9d65e340e6602ad732ad26bdf Mon Sep 17 00:00:00 2001
+From 3ad79bbf89bbe62c61680484b4e68c07b5425cfa Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Wed, 25 Jan 2017 21:08:20 +0100
Subject: [PATCH 28/31] Enable and fix use of iconv
@@ -63,10 +63,10 @@ index d6362b6fbc..4da4546a24 100644
#else
char **inBytesPtr = &inBytes;
diff --git a/src/corelib/configure.json b/src/corelib/configure.json
-index c6c5c93ddb..62c75f37ab 100644
+index deb7a544ef..2e1a4ee59f 100644
--- a/src/corelib/configure.json
+++ b/src/corelib/configure.json
-@@ -256,9 +256,9 @@
+@@ -260,9 +260,9 @@
},
"gnu-libiconv": {
"label": "GNU iconv",
@@ -79,5 +79,5 @@ index c6c5c93ddb..62c75f37ab 100644
},
"icu": {
--
-2.13.0
+2.13.2
diff --git a/0029-Ignore-failing-pkg-config-test.patch b/0029-Ignore-failing-pkg-config-test.patch
index 9b3cafb839b..86a98b32450 100644
--- a/0029-Ignore-failing-pkg-config-test.patch
+++ b/0029-Ignore-failing-pkg-config-test.patch
@@ -1,4 +1,4 @@
-From e738cb4ecf057ce65d86e861de11df919227d421 Mon Sep 17 00:00:00 2001
+From a9c4ffe5b4f62df0bfc0a70b7851624025dbe33f Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Wed, 25 Jan 2017 21:08:48 +0100
Subject: [PATCH 29/31] Ignore failing pkg-config test
@@ -9,7 +9,7 @@ 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 27b1460f93..7fca07351e 100644
+index f5d92d001b..9b42d06529 100644
--- a/configure.json
+++ b/configure.json
@@ -515,7 +515,6 @@
@@ -21,5 +21,5 @@ index 27b1460f93..7fca07351e 100644
"publicFeature",
{ "type": "publicQtConfig", "negative": true },
--
-2.13.0
+2.13.2
diff --git a/0030-Prevent-qmake-from-messing-static-lib-dependencies.patch b/0030-Prevent-qmake-from-messing-static-lib-dependencies.patch
index 2509ae16306..c2b7f2157ec 100644
--- a/0030-Prevent-qmake-from-messing-static-lib-dependencies.patch
+++ b/0030-Prevent-qmake-from-messing-static-lib-dependencies.patch
@@ -1,4 +1,4 @@
-From 9ef6d62307288a6a1656aee01835b4c368678e55 Mon Sep 17 00:00:00 2001
+From a24b99d6679a8ca39fdaa90e35a4fd4c4e3d60c8 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Tue, 7 Feb 2017 18:25:28 +0100
Subject: [PATCH 30/31] Prevent qmake from messing static lib dependencies
@@ -11,10 +11,10 @@ static freetype2 and harfbuzz
2 files changed, 6 insertions(+)
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp
-index 20318f120c..d113216f55 100644
+index 30f99174f8..154edd67d4 100644
--- a/qmake/generators/unix/unixmake.cpp
+++ b/qmake/generators/unix/unixmake.cpp
-@@ -410,6 +410,9 @@ UnixMakefileGenerator::fixLibFlag(const ProString &lib)
+@@ -414,6 +414,9 @@ UnixMakefileGenerator::fixLibFlag(const ProString &lib)
bool
UnixMakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags)
{
@@ -25,7 +25,7 @@ index 20318f120c..d113216f55 100644
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 d9388e8518..090c576bc6 100644
+index 2e6d5d94a9..a8320bae09 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
@@ -87,6 +87,9 @@ Win32MakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags)
@@ -39,5 +39,5 @@ index d9388e8518..090c576bc6 100644
static const char * const lflags[] = { "QMAKE_LIBS", "QMAKE_LIBS_PRIVATE", 0 };
for (int i = 0; lflags[i]; i++) {
--
-2.13.0
+2.13.2
diff --git a/0031-Hardcode-linker-flags-for-platform-plugins.patch b/0031-Hardcode-linker-flags-for-platform-plugins.patch
index 612dc4d7a55..f345dfe4ed8 100644
--- a/0031-Hardcode-linker-flags-for-platform-plugins.patch
+++ b/0031-Hardcode-linker-flags-for-platform-plugins.patch
@@ -1,4 +1,4 @@
-From 7f5e0ffbc26a67ba4bc3c0868fdd492641846a23 Mon Sep 17 00:00:00 2001
+From 738bee43dfef8244cd811c293a90c43b58c2ab20 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Wed, 25 Jan 2017 23:42:30 +0100
Subject: [PATCH 31/31] Hardcode linker flags for platform plugins
@@ -15,7 +15,7 @@ Change-Id: I594ddcc15599c63bb8ac5e998f59c4561a18eb26
3 files changed, 40 insertions(+), 8 deletions(-)
diff --git a/src/plugins/platforms/minimal/minimal.pro b/src/plugins/platforms/minimal/minimal.pro
-index 8cfb68824e..c3fd4c73f2 100644
+index 8cfb68824e..46834a71fc 100644
--- a/src/plugins/platforms/minimal/minimal.pro
+++ b/src/plugins/platforms/minimal/minimal.pro
@@ -1,8 +1,19 @@
@@ -34,14 +34,14 @@ index 8cfb68824e..c3fd4c73f2 100644
+ -lfreetype -lole32 -lgdi32 -luuid
+# However, this workaround leads to the necessity of specifying include dirs manually
+INCLUDEPATH += \
-+ $$QT_SOURCE_TREE/include/QtEventDispatcherSupport/5.9.0 \
-+ $$QT_SOURCE_TREE/include/QtFontDatabaseSupport/5.9.0
++ $$QT_SOURCE_TREE/include/QtEventDispatcherSupport/$${QT_VERSION} \
++ $$QT_SOURCE_TREE/include/QtFontDatabaseSupport/$${QT_VERSION}
+
DEFINES += QT_NO_FOREACH
diff --git a/src/plugins/platforms/offscreen/offscreen.pro b/src/plugins/platforms/offscreen/offscreen.pro
-index 6652cefd86..03c30f4a96 100644
+index 6652cefd86..a322b17cc5 100644
--- a/src/plugins/platforms/offscreen/offscreen.pro
+++ b/src/plugins/platforms/offscreen/offscreen.pro
@@ -1,8 +1,18 @@
@@ -60,13 +60,13 @@ index 6652cefd86..03c30f4a96 100644
+ -lfreetype -lole32 -lgdi32 -luuid
+# However, this workaround leads to the necessity of specifying include dirs manually
+INCLUDEPATH += \
-+ $$QT_SOURCE_TREE/include/QtEventDispatcherSupport/5.9.0 \
-+ $$QT_SOURCE_TREE/include/QtFontDatabaseSupport/5.9.0
++ $$QT_SOURCE_TREE/include/QtEventDispatcherSupport/$${QT_VERSION} \
++ $$QT_SOURCE_TREE/include/QtFontDatabaseSupport/$${QT_VERSION}
DEFINES += QT_NO_FOREACH
diff --git a/src/plugins/platforms/windows/windows.pro b/src/plugins/platforms/windows/windows.pro
-index 23168c10dc..07d0f16a88 100644
+index 23168c10dc..eb4af726ca 100644
--- a/src/plugins/platforms/windows/windows.pro
+++ b/src/plugins/platforms/windows/windows.pro
@@ -1,11 +1,22 @@
@@ -89,13 +89,13 @@ index 23168c10dc..07d0f16a88 100644
+ -lfreetype -lole32 -lgdi32 -ldwmapi
+# However, this workaround leads to the necessity of specifying include dirs manually
+INCLUDEPATH += \
-+ $$QT_SOURCE_TREE/include/QtEventDispatcherSupport/5.9.0 \
-+ $$QT_SOURCE_TREE/include/QtAccessibilitySupport/5.9.0 \
-+ $$QT_SOURCE_TREE/include/QtFontDatabaseSupport/5.9.0 \
-+ $$QT_SOURCE_TREE/include/QtThemeSupport/5.9.0
++ $$QT_SOURCE_TREE/include/QtEventDispatcherSupport/$${QT_VERSION} \
++ $$QT_SOURCE_TREE/include/QtAccessibilitySupport/$${QT_VERSION} \
++ $$QT_SOURCE_TREE/include/QtFontDatabaseSupport/$${QT_VERSION} \
++ $$QT_SOURCE_TREE/include/QtThemeSupport/$${QT_VERSION}
include(windows.pri)
--
-2.13.0
+2.13.2
diff --git a/PKGBUILD b/PKGBUILD
index 64fb88a1a57..6620754528e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -19,33 +19,40 @@
# The variants listed above only contain dynamic libraries. For building static libraries
# just append '-static' to the package name, eg. mingw-w64-qt5-base-static or mingw-w64-qt5-base-angle-static.
# The static variants rely on the corresponding dynamic variant for headers and tools.
-# I only tested the static version using native OpenGL so far (mingw-w64-qt5-base-static).
+# I only tested the static variant using native OpenGL so far (mingw-w64-qt5-base-static).
# Note that ANGLE will still be loaded as dynamic library in mingw-w64-qt5-base-dynamic-static.
# By default CMake and qmake will link against the dynamic Qt libraries.
-# To use the static Qt libraries with CMake prefix the Qt module with Static:
+# To use the static Qt libraries with CMake prepend the Qt module name with Static:
# eg. find_package(Qt5Core) becomes find_package(StaticQt5Core)
# To use a static module, add the corresponding imported target, eg.
-# target_link_libraries(target ... Qt5::static::Core)
-# This approach allows installing dynamic and static Qt in the same prefix and using
-# both variants in the same CMake project.
+# target_link_libraries(target ... StaticQt5::Core)
+# and using
+# This approach allows installing dynamic and static Qt in the same prefix
+# and using both variants in the same CMake project.
# To use a static plugin, add the corresponding imported target, eg.
-# target_link_libraries(target ... Qt5::static::QWindowsIntegrationPlugin)
+# target_link_libraries(target ... StaticQt5::QWindowsIntegrationPlugin)
# Automatically importing static plugins is currently not possible, though. Hence it is required to use Q_IMPORT_PLUGIN, eg.
# #include<QtPlugin>
# Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)
-# To use the static Qt libraries with qmake set the following variables (either inside the *.pro file or as qmake argument):
+# It is also possible to use static Qt libraries with CMake by setting the
+# variable USE_STATIC_QT_BY_DEFAULT: set(USE_STATIC_QT_BY_DEFAULT ON)
+# In this case the regular imported targets (eg. Qt5::Core) will be static.
+# This approach does *not* allow to use dynamic and static Qt in the same
+# CMake project.
+
+# To use the static Qt libraries with qmake add 'static' to the project config (either inside the *.pro file or as qmake argument):
# CONFIG+=static
# Further Qt modules (those not found in the base repository and hence not included in this package) include by default
-# static and dynamic libraries; if only one version is requried, just set $NO_STATIC_LIBS or $NO_SHARED_LIBS when building
-# the package.
+# static and dynamic libraries; if only one version is requried, just set NO_STATIC_LIBS or NO_SHARED_LIBS when building
+# the package, eg. by adding 'NO_STATIC_LIBS=1' to /etc/makepkg.conf.
# By default, executables will not be removed because I find them useful when testing. To remove executables
-# set $NO_EXECUTABLES (or $NO_STATIC_EXECUTABLES to remove statically linked executables only) when building the package.
+# set NO_EXECUTABLES (or NO_STATIC_EXECUTABLES to remove statically linked executables only) when building the package.
# If Qt modules containing tools are built as static and as dynamic library only the dynamically linked tools will be present
# in the package.
@@ -77,7 +84,7 @@ isNoOpenGL() {
}
pkgname=mingw-w64-qt5-base
-pkgver=5.9.0
+pkgver=5.9.1
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
@@ -124,38 +131,38 @@ source=("https://download.qt.io/official_releases/qt/${pkgver:0:3}/${pkgver}/sub
'0029-Ignore-failing-pkg-config-test.patch'
'0030-Prevent-qmake-from-messing-static-lib-dependencies.patch'
'0031-Hardcode-linker-flags-for-platform-plugins.patch')
-sha256sums=('267eb2af1a203c087f2113f43b08014d0e2d2cb269295b8602d869a2fad5296c'
- 'b4406bba39ee7c8cf74c3b8a98b936b46772ca1798ef6884b7b1574ece80fbdc'
- '86cf470f1694abf6973f7b0f8e6cb75dd8a58e9335bab075b25229d26064adab'
- '670b6cd7a6ee49f12ccf4121e997055daec887d080baf0269793b1d0243d1d89'
- '878c08a1e9d0c8d639ddbdbc944ac8647ff204e9f078ddd9337737b2b929c2ed'
- '38533dba16df99074e8c3f5d52bc15fabdbaffe0a56dbed79683c47f08342587'
- '5ef3a569f4c53e848750ff655342e92a103abe78495905a5ef47afea9da8d1fb'
- 'd21ebc9465a19e01912ebccb365b4f7ecfd3a95787c1de2640f29bdbc161983c'
- '0622a2e606d9edbea23d3a5724ea9d4ed3958e60296b85134176c3980d590a41'
- '90f1347e5c41b9e447c0339715d19e0434a0b58c36fd8405e850190fe17369dc'
- '6b6ebfdf598658172680e4e83d2c3de24dcbc93233b0f48d5ccbf760d8f59a5c'
- '11ce05f79174440406d84b38023d81c1fa87034119360fa2f0bd3887429fa694'
- 'c30c558ea413c986aec2ffe86e34dd8e99f96cbc615e3963f711ec1628888114'
- 'b9fbfc213089e3b44ed888f4e628030e78dd84c8030ba7a2a9f79fbf31312934'
- '94ebedf699ebc0a5c6fed307eecd3dfabf9f864c696f3cf17bd8462789c1fae2'
- 'df05b0f65dcafede1f83ce190895e6c6f4a22feecb1c5b1a0ba03f4948e56220'
- '0acae3adb542d6ea0b405a947adf087826b4971df133b984d9166a9872e5cc98'
- 'bb825226ca1e97cb49c3ac3a0c03a7db9f3e1eca632628d344201fcf9816376d'
- 'e74fb8219bf599fbe5fbd1b08ff89d717089f1fa4d9e488a60e6097b212b7391'
- 'cf3f90b69feb98e42ede770828db4538a3dd31dd02b2b15f55ea1743db5868ad'
- '813cd1c22e3211133337231e1df754b5560159eecf1cf3eef0408d335e186190'
- 'a0feb7b5a9747d6a88058360fc34f8ac8fb3cdeb2b343a5a2b28a88fdabb45b3'
- '82f8f1eba6ac63c9a8749e20eb57fad80e92ddd5a58912a60a8c2fad9e83d6eb'
- '34652aec17d7511815db59b438b0597e52b7f43c19d068e7e417325897a72254'
- 'dcfe2103ace81898960316dd691fae38d05b2b6a79dc0ae0f245ae402f1101a8'
- '0682dcc62b44717fa850700cec183cd856ce7335f26884ab15d4d0e7d3543bfe'
- 'cecf5ff2916d95ffdbcf60ba3e18297a6107e17e9766a5e4d8b9ae748d99ba52'
- '79bc920bb539fc68001b5def07eea3e45eb3d2c6aa3f2a949823236adf8e4633'
- '80757f614fe02bfb85d00292d4f84c9f2ab2c39a512c21e956df135f3fbfdd81'
- 'cc46ffc3a2183539aba923fb256045464eaae37a666034172138f4689a5c9bd3'
- 'f0e63e022d1e52b82a7622828b568c57d1422f9726e116902cd2be81fec45da4'
- '28b11e63f570891212073b3739a20489304d3c7205ae38471cbd6b15c651fabc')
+sha256sums=('bc9a21e9f6fff9629019fdf9f989f064751d5073c3a28dc596def92f4d4275c6'
+ 'f52c581e355a7da69c96c0b31dd42f13b298f11bb616945e6215804fef06866b'
+ 'e540286f502a72dc55649006d671c9bcca5eef174ad4c275087a88f56bc40bfd'
+ 'dc6d77dfa426aabcebbbda7e05f0bf8746a1700519a9bcbc4bf590b47af51eee'
+ 'cb799952f673b18ab9e81528f31b0748adc9313335eccc2a8a3b30cb202d458f'
+ '79634ff2647f5c7c93462ea97e9fca5b2be386450a2c9b27c26ec6f6cfc1f0ee'
+ 'c447040e2fbaae9aae2bda5c8ed21e71cf2f83f9aa57ceba9cce6e1d1386ed12'
+ '99735144a8437b8bc03141e998c5f750b6b5f82490cca5e31c67c013ec7f5b36'
+ '7866105da64a96722a2676318e90951d2ac3e7bbe5793557af2ea5a73d0f321a'
+ '37397374c1e373c74a69c4608834dc642832b51ef5532baad5313889ad477fc4'
+ 'd67c33f9b990ebbd486ad38f5d5907a0f2d4989e5c2c5057ff017ee06e6493b1'
+ '1a4f497ca54cecbb055303d4dd25eb63f5b2261d32d0b045eea4ae8f4e3bbbe5'
+ '11e329848dbfe42abda9c9531370437ee5a0d69483c333766655e847d2b05a62'
+ 'd3b395a536afb2986a0fc4aabaddc9c5ac465b4f7eb7a58a30c9918be07f2f62'
+ '864ba163f331620ecc4df00132dc7fd9b85427038a8209571ddf7b43e5bb2ecd'
+ '68220dc824e0294e604512cec9e6d40e55184d86bf7577dcb5b1af6462da9c66'
+ '1ba5e6862f81456c94e3f57cc37a303d67912269661028357c716de8bf21aeb9'
+ 'a4c60391632d84a085896db61aa4e94f1742be34448c23a97a1aa0910cd2e29a'
+ '3db5c1fe5f6957cecdaef9ce767f27e4d5fdd4d9d775d527dba6c093808f371d'
+ 'd3e0d6d4daea62fd710416f4549c943f601b7c0e5e84c5cc8c524fabb1dd402b'
+ '569a2f1d7e07d439c82754703b1b007ce6907b12743211b10138a394965258c4'
+ '589955c161c1e975536ee6e21ab1470cf6f8d3a5c50f170ba9ee9d855e347c59'
+ 'b1b43064960ca3eb35eb3baed7abf28b00f606d32baeb38d53ffbf96c21dc716'
+ 'cbfbb01f52c17cd37d6724e5fad0708d8337d4ba11b87f59dbbe108863aca7dd'
+ 'f9b1e01c870a1640865d2d57cb756a9c754c047c66ef78f8cadc6e609677ede0'
+ '25138daad7bfc00cb6f6556da53e6efb2ad0c7b09743cfc3633c86b46ad538cc'
+ '19809d59b5b1fd9ffea8bee6afeca0a3992170f362d0cb99d9f20b2148b859a4'
+ 'e0841bd69b6037303bfba1de3072bd55a31ca12c57b8d4e01c28d4ef447b1bed'
+ '4d9204b4e4d634391704954ba152651ccfdd0a00efaabc892c62c710fc6068b4'
+ 'b0e505ceef8cf052a9ceef9a508c9c1f5e4c1b4d49e08f954bcb42e4c1aed79e'
+ '389bee66acc6aa9d36f6ab206d217e43b0aca8ba290dc7b1d170c98b79d64cf2'
+ 'e2dde7f878d8b5176d5aa925aedeaf60e7b3bf14f98a55327af5f7adcff2eb8c')
_architectures='i686-w64-mingw32 x86_64-w64-mingw32'
@@ -222,10 +229,6 @@ build() {
for _arch in ${_architectures}; do
echo "INCLUDEPATH += /usr/${_arch}/include/openssl-1.0" >> src/network/network.pro
- export OPENSSL_LIBS='-L/usr/${_arch}/lib/openssl-1.0 -lssl -lcrypto'
-
- # Phonon is disabled for now because we lack the directx headers
- # FIXME: check whether this is still the case
# To prevent conflicts with the mingw-w64-qt4 package we have
# to put tools in a dedicated folder
@@ -253,12 +256,10 @@ build() {
-sql-mysql \
-sql-psql \
-sql-sqlite \
- -openssl \
-dbus-linked \
-no-glib \
-no-icu \
-iconv \
- -release \
-nomake examples \
-make tools \
-hostprefix /usr/${_arch} \
@@ -276,11 +277,17 @@ build() {
-sysconfdir /usr/${_arch}/etc \
-translationdir /usr/${_arch}/share/qt/translations \
-device-option CROSS_COMPILE=${_arch}- \
+ -device-option CROSS_COMPILE_PREFIX=/usr/${_arch} \
-device-option CROSS_COMPILE_CFLAGS=-fpch-preprocess"
# Fix include directory of freetype2 and dbus
qt_configure_args+=" $(${_arch}-pkg-config --cflags-only-I freetype2 dbus-1)"
+ # Enable debug build if MINGW_W64_QT_DEBUG_BUILD is set (in /etc/makepkg.config)
+ [[ $MINGW_W64_QT_DEBUG_BUILD ]] \
+ && qt_configure_args+=' -debug-and-release' \
+ || qt_configure_args+=' -release'
+
# Configure usage of ANGLE/OpenGL
if isOpenGL; then
msg2 'Using native OpenGL backend'
@@ -305,13 +312,20 @@ build() {
mkdir -p ../build-${_arch} && pushd ../build-${_arch}
if isStatic; then
- ../${_pkgfqn}/configure -static $qt_configure_args
+ export OPENSSL_LIBS="/usr/${_arch}/lib/openssl-1.0/libssl.a /usr/${_arch}/lib/openssl-1.0/libcrypto.a -lws2_32 -lgdi32 -lcrypt32"
+ ../${_pkgfqn}/configure \
+ $qt_configure_args \
+ -static \
+ -openssl-linked
make
else
# The LD_LIBRARY_PATH override is needed because libQt5Bootstrap* are shared
# libraries which various compiled tools (like moc) use. As the libQt5Bootstrap*
# libraries aren't installed at this point yet, we have to workaround this
- ../${_pkgfqn}/configure -shared $qt_configure_args
+ ../${_pkgfqn}/configure $qt_configure_args \
+ -shared \
+ -openssl-runtime \
+ -device-option 'CROSS_COMPILE_CUSTOM_CONFIG=actually_a_shared_build'
LD_LIBRARY_PATH="$PWD/lib" LDFLAGS="-L$PWD/lib" make
fi
popd
@@ -329,7 +343,8 @@ package() {
# Drop Qt5Bootstrap and libraries which are only provided as static lib
# and are hence already present in shared build (such as Qt5OpenGLExtensions)
- rm -f "${pkgdir}/usr/${_arch}/lib/"{lib,}qt5main* \
+ 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,}Qt5EventDispatcherSupport* \