From 8d39d1fb1a62918b32ba7ef606a66f926a1b846e Mon Sep 17 00:00:00 2001 From: Martchus Date: Tue, 13 Apr 2021 12:24:25 +0200 Subject: [PATCH] Update Qt 5.15.2 to use KDE fork --- devel/generator/generate.pl | 15 + .../layouts/mingw-w64-qt5-base.sh.ep | 30 +- .../layouts/mingw-w64-qt5-module.sh.ep | 27 +- devel/qt5/rebase-patches.sh | 15 +- devel/qt5/update-patches.sh | 4 +- ...rofile-for-cross-compilation-with-mi.patch | 166 +-- ...is-defined-when-using-dynamic-OpenGL.patch | 28 +- ...tions-assemler-error-in-OpenGL-facto.patch | 30 +- ...re-.pc-files-are-installed-correctly.patch | 67 +- ...add-resource-files-to-LIBS-parameter.patch | 29 +- ...ug-library-names-in-pkg-config-files.patch | 34 +- ...linking-against-shared-static-libpng.patch | 31 +- ...008-Fix-linking-against-static-D-Bus.patch | 59 +- ...o-use-debug-version-of-D-Bus-library.patch | 30 +- ...Fix-linking-against-static-freetype2.patch | 31 +- ...-Fix-linking-against-static-harfbuzz.patch | 30 +- ...0012-Fix-linking-against-static-pcre.patch | 29 +- ...inking-against-shared-static-MariaDB.patch | 27 +- ...ing-against-shared-static-PostgreSQL.patch | 29 +- .../0015-Rename-qtmain-to-qt5main.patch | 81 +- .../0016-Enable-rpath-for-build-tools.patch | 38 +- ...0017-Use-system-zlib-for-build-tools.patch | 28 +- ...erge-shared-and-static-library-trees.patch | 209 +--- ...9-Use-.dll.a-as-import-lib-extension.patch | 99 +- ...s-of-static-libraries-in-CMake-modul.patch | 506 +------- ...w-usage-of-static-version-with-CMake.patch | 1096 +---------------- ...ags-for-static-build-with-cmake-ming.patch | 32 +- ...3-Use-correct-pkg-config-static-flag.patch | 27 +- ...4-Fix-macro-invoking-moc-rcc-and-uic.patch | 75 +- ...-errors-about-missing-feature-static.patch | 37 +- .../0026-Enable-and-fix-use-of-iconv.patch | 79 +- .../0027-Ignore-failing-pkg-config-test.patch | 26 +- ...from-messing-static-lib-dependencies.patch | 46 +- ...de-linker-flags-for-platform-plugins.patch | 177 +-- ...ng-against-static-plugins-with-qmake.patch | 38 +- ...nnot-find-feature-windows_vulkan_sdk.patch | 38 +- qt5-base/mingw-w64-static/PKGBUILD | 83 +- qt5-base/mingw-w64-static/qtbase-sha256.txt | 2 +- ...rofile-for-cross-compilation-with-mi.patch | 4 +- ...is-defined-when-using-dynamic-OpenGL.patch | 4 +- ...tions-assemler-error-in-OpenGL-facto.patch | 4 +- ...re-.pc-files-are-installed-correctly.patch | 12 +- ...add-resource-files-to-LIBS-parameter.patch | 4 +- ...ug-library-names-in-pkg-config-files.patch | 8 +- ...linking-against-shared-static-libpng.patch | 6 +- ...008-Fix-linking-against-static-D-Bus.patch | 6 +- ...o-use-debug-version-of-D-Bus-library.patch | 6 +- ...Fix-linking-against-static-freetype2.patch | 6 +- ...-Fix-linking-against-static-harfbuzz.patch | 6 +- ...0012-Fix-linking-against-static-pcre.patch | 4 +- ...inking-against-shared-static-MariaDB.patch | 4 +- ...ing-against-shared-static-PostgreSQL.patch | 4 +- .../0015-Rename-qtmain-to-qt5main.patch | 4 +- .../0016-Enable-rpath-for-build-tools.patch | 4 +- ...0017-Use-system-zlib-for-build-tools.patch | 4 +- ...erge-shared-and-static-library-trees.patch | 10 +- ...9-Use-.dll.a-as-import-lib-extension.patch | 4 +- ...s-of-static-libraries-in-CMake-modul.patch | 4 +- ...w-usage-of-static-version-with-CMake.patch | 4 +- ...ags-for-static-build-with-cmake-ming.patch | 4 +- ...3-Use-correct-pkg-config-static-flag.patch | 4 +- ...4-Fix-macro-invoking-moc-rcc-and-uic.patch | 4 +- ...-errors-about-missing-feature-static.patch | 4 +- .../0026-Enable-and-fix-use-of-iconv.patch | 6 +- .../0027-Ignore-failing-pkg-config-test.patch | 6 +- ...from-messing-static-lib-dependencies.patch | 4 +- ...de-linker-flags-for-platform-plugins.patch | 78 +- ...ng-against-static-plugins-with-qmake.patch | 4 +- ...nnot-find-feature-windows_vulkan_sdk.patch | 4 +- qt5-base/mingw-w64/PKGBUILD | 83 +- qt5-base/mingw-w64/qtbase-sha256.txt | 2 +- ...1-Ensure-static-plugins-are-exported.patch | 24 +- ...g-QML-parser-symbols-on-static-build.patch | 38 +- ...0003-Disable-d3d12-requiring-fxc.exe.patch | 34 +- qt5-declarative/mingw-w64-static/PKGBUILD | 22 +- .../mingw-w64-static/qtdeclarative-sha256.txt | 2 +- ...1-Ensure-static-plugins-are-exported.patch | 4 +- ...g-QML-parser-symbols-on-static-build.patch | 4 +- ...0003-Disable-d3d12-requiring-fxc.exe.patch | 4 +- qt5-declarative/mingw-w64/PKGBUILD | 22 +- qt5-svg/mingw-w64-static/PKGBUILD | 20 +- qt5-svg/mingw-w64-static/qtsvg-sha256.txt | 2 +- qt5-svg/mingw-w64/PKGBUILD | 20 +- .../0001-Fix-linguist-macro.patch | 43 +- qt5-tools/mingw-w64-static/PKGBUILD | 18 +- qt5-tools/mingw-w64-static/qttools-sha256.txt | 2 +- .../mingw-w64/0001-Fix-linguist-macro.patch | 14 +- qt5-tools/mingw-w64/PKGBUILD | 18 +- 88 files changed, 428 insertions(+), 3606 deletions(-) mode change 100644 => 120000 qt5-base/mingw-w64-static/0001-Adjust-win32-g-profile-for-cross-compilation-with-mi.patch mode change 100644 => 120000 qt5-base/mingw-w64-static/0002-Ensure-GLdouble-is-defined-when-using-dynamic-OpenGL.patch mode change 100644 => 120000 qt5-base/mingw-w64-static/0003-Fix-too-many-sections-assemler-error-in-OpenGL-facto.patch mode change 100644 => 120000 qt5-base/mingw-w64-static/0004-Make-sure-.pc-files-are-installed-correctly.patch mode change 100644 => 120000 qt5-base/mingw-w64-static/0005-Don-t-add-resource-files-to-LIBS-parameter.patch mode change 100644 => 120000 qt5-base/mingw-w64-static/0006-Prevent-debug-library-names-in-pkg-config-files.patch mode change 100644 => 120000 qt5-base/mingw-w64-static/0007-Fix-linking-against-shared-static-libpng.patch mode change 100644 => 120000 qt5-base/mingw-w64-static/0008-Fix-linking-against-static-D-Bus.patch mode change 100644 => 120000 qt5-base/mingw-w64-static/0009-Don-t-try-to-use-debug-version-of-D-Bus-library.patch mode change 100644 => 120000 qt5-base/mingw-w64-static/0010-Fix-linking-against-static-freetype2.patch mode change 100644 => 120000 qt5-base/mingw-w64-static/0011-Fix-linking-against-static-harfbuzz.patch mode change 100644 => 120000 qt5-base/mingw-w64-static/0012-Fix-linking-against-static-pcre.patch mode change 100644 => 120000 qt5-base/mingw-w64-static/0013-Fix-linking-against-shared-static-MariaDB.patch mode change 100644 => 120000 qt5-base/mingw-w64-static/0014-Fix-linking-against-shared-static-PostgreSQL.patch mode change 100644 => 120000 qt5-base/mingw-w64-static/0015-Rename-qtmain-to-qt5main.patch mode change 100644 => 120000 qt5-base/mingw-w64-static/0016-Enable-rpath-for-build-tools.patch mode change 100644 => 120000 qt5-base/mingw-w64-static/0017-Use-system-zlib-for-build-tools.patch mode change 100644 => 120000 qt5-base/mingw-w64-static/0018-Merge-shared-and-static-library-trees.patch mode change 100644 => 120000 qt5-base/mingw-w64-static/0019-Use-.dll.a-as-import-lib-extension.patch mode change 100644 => 120000 qt5-base/mingw-w64-static/0020-Pull-dependencies-of-static-libraries-in-CMake-modul.patch mode change 100644 => 120000 qt5-base/mingw-w64-static/0021-Allow-usage-of-static-version-with-CMake.patch mode change 100644 => 120000 qt5-base/mingw-w64-static/0022-Adjust-linker-flags-for-static-build-with-cmake-ming.patch mode change 100644 => 120000 qt5-base/mingw-w64-static/0023-Use-correct-pkg-config-static-flag.patch mode change 100644 => 120000 qt5-base/mingw-w64-static/0024-Fix-macro-invoking-moc-rcc-and-uic.patch mode change 100644 => 120000 qt5-base/mingw-w64-static/0025-Ignore-errors-about-missing-feature-static.patch mode change 100644 => 120000 qt5-base/mingw-w64-static/0026-Enable-and-fix-use-of-iconv.patch mode change 100644 => 120000 qt5-base/mingw-w64-static/0027-Ignore-failing-pkg-config-test.patch mode change 100644 => 120000 qt5-base/mingw-w64-static/0028-Prevent-qmake-from-messing-static-lib-dependencies.patch mode change 100644 => 120000 qt5-base/mingw-w64-static/0029-Hardcode-linker-flags-for-platform-plugins.patch mode change 100644 => 120000 qt5-base/mingw-w64-static/0030-Fix-linking-against-static-plugins-with-qmake.patch mode change 100644 => 120000 qt5-base/mingw-w64-static/0031-Prevent-Cannot-find-feature-windows_vulkan_sdk.patch mode change 100644 => 120000 qt5-declarative/mingw-w64-static/0001-Ensure-static-plugins-are-exported.patch mode change 100644 => 120000 qt5-declarative/mingw-w64-static/0002-Prevent-exporting-QML-parser-symbols-on-static-build.patch mode change 100644 => 120000 qt5-declarative/mingw-w64-static/0003-Disable-d3d12-requiring-fxc.exe.patch mode change 100755 => 100644 qt5-declarative/mingw-w64/PKGBUILD mode change 100644 => 120000 qt5-tools/mingw-w64-static/0001-Fix-linguist-macro.patch mode change 100755 => 100644 qt5-tools/mingw-w64/PKGBUILD diff --git a/devel/generator/generate.pl b/devel/generator/generate.pl index cb08e493..06d0edf4 100755 --- a/devel/generator/generate.pl +++ b/devel/generator/generate.pl @@ -73,6 +73,15 @@ $mojolicious->helper(expand_libs => sub { } @_); }); +# define revisions of Qt modules from KDE fork +my %kde_fork_revisions = ( + base => [172, 'cfa90a94f95510711e25920e7742b37faa2f4843', '6344955d17e17e2398720fe60c34cfc2a4a95208'], + declarative => [24, 'e203a185cfab199a89a33b903096d6d0023a8a88', '568763928a78b52373932b01be17e040f7c3fa50'], + tools => [17, '33693a928986006d79c1ee743733cde5966ac402', 'dbe0567470db2b369a9fdb28d9fbac38be3e2d60'], + svg => [5, '95990cbeebc0ab9959e2a925a93ad4897416bbb7', '9aac88424a1b76e0198b52437af58a6d94aff8e9'], + wayland => [18, '2f84a874da064069461284db1da36dc818949ec1', '30cb2a87fcc6265232cb5a3ffce9836da6e531d6'], +); + # find templates; populate "pages" array my @pages; my $template_file_name = 'PKGBUILD.sh.ep'; @@ -88,6 +97,11 @@ for my $top_level_dir (@$top_level_dirs) { $qt_module = $2; } + my $kde_fork_revision; + if ($qt_major_version && $qt_major_version eq '5' && $qt_module) { + $kde_fork_revision = $kde_fork_revisions{$qt_module}; + } + my $variant_dirs = $top_level_dir->list({dir => 1}); for my $variant_dir (@$variant_dirs) { next unless -d $variant_dir; @@ -150,6 +164,7 @@ for my $top_level_dir (@$top_level_dirs) { qt_major_version => $qt_major_version, qt_module => $qt_module, qt_module_sha256 => $qt_module_sha256, + kde_fork_revision => $kde_fork_revision, static_variant => $is_static_variant, static_suffix => $is_static_variant ? '-static' : '', static_deps => undef, diff --git a/devel/generator/templates/layouts/mingw-w64-qt5-base.sh.ep b/devel/generator/templates/layouts/mingw-w64-qt5-base.sh.ep index b0abe59b..7384529a 100644 --- a/devel/generator/templates/layouts/mingw-w64-qt5-base.sh.ep +++ b/devel/generator/templates/layouts/mingw-w64-qt5-base.sh.ep @@ -31,8 +31,11 @@ _qt_module=qt<%== $qt_module %> pkgname=<%= $package_name %> -pkgver=5.15.2 +pkgver=5.15.2<%== $kde_fork_revision ? "+kde+r$kde_fork_revision->[0]" : '' %> pkgrel=1 +% if ($kde_fork_revision) { +_commit=<%== $kde_fork_revision->[1] %> +% } pkgdesc='A cross-platform application and UI framework, <%= $opengl_backend %> OpenGL backend (mingw-w64)' arch=(<%== include 'fragments/mingw-w64-qt5-non_any_archs' %>) url='https://www.qt.io/' @@ -47,7 +50,7 @@ optdepends=('mingw-w64-mesa: use LLVMpipe software rasterizer for Qt Quick' 'mingw-w64-postgresql: PostgreSQL support' 'mingw-w64-mariadb-connector-c: MySQL support') makedepends=('mingw-w64-gcc' 'mingw-w64-postgresql' 'mingw-w64-mariadb-connector-c' - 'mingw-w64-vulkan-headers' 'mingw-w64-pkg-config' 'mingw-w64-environment') + 'mingw-w64-vulkan-headers' 'mingw-w64-pkg-config' 'mingw-w64-environment'<%== $kde_fork_revision ? " 'git'" : '' %>) % if ($is_angle || $is_dynamic) { # makedepends+=('mingw-w64-wine') # the dynamic/ANGLE version needs to run fxc.exe (not implemented yet) % } @@ -64,26 +67,43 @@ conflicts+=('mingw-w64-qt5-base' 'mingw-w64-qt5-base-angle' 'mingw-w64-qt5-base- % } % } options=('!strip' '!buildflags' 'staticlibs' '!emptydirs') +% if ($kde_fork_revision) { +_pkgfqn=${_qt_module} +source=(git+https://invent.kde.org/qt/qt/$_pkgfqn#commit=$_commit\ +% } else { _pkgfqn="${_qt_module}-everywhere-src-${pkgver}" source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz"\ +% } <%== include 'fragments/source_file_list', relevant_files => $patch_files %>) +% if ($kde_fork_revision) { +sha256sums=('SKIP'\ +% } else { sha256sums=('<%== $qt_module_sha256 %>'\ +% } <%== include 'fragments/sha256_list', relevant_files => $patch_files %>) _architectures='i686-w64-mingw32 x86_64-w64-mingw32' +% if ($kde_fork_revision) { +pkgver() { + cd $_pkgfqn + echo "5.15.2+kde+r"`git rev-list --count origin/5.15.2..$_commit` +} + +% } prepare() { cd "${srcdir}/${_pkgfqn}" +% if ($kde_fork_revision) { + git revert -n <%== $kde_fork_revision->[2] %> # Revert version bump + +% } # apply patches; further descriptions can be found in patch files itself for patch in "$srcdir/"*.patch; do msg2 "Applying patch $patch" patch -p1 -i "$patch" done - # make sure the Qt 5 build system uses our external PCRE library and zlib - rm -rf src/3rdparty/{pcre,zlib} - # clear buildflags ('!buildflags' only effects build() but not prepare()) unset CPPFLAGS CFLAGS CXXFLAGS LDFLAGS PKG_CONFIG_PATH diff --git a/devel/generator/templates/layouts/mingw-w64-qt5-module.sh.ep b/devel/generator/templates/layouts/mingw-w64-qt5-module.sh.ep index 1d7506ca..6a192d25 100644 --- a/devel/generator/templates/layouts/mingw-w64-qt5-module.sh.ep +++ b/devel/generator/templates/layouts/mingw-w64-qt5-module.sh.ep @@ -21,13 +21,27 @@ _qt_module=qt<%== $qt_module %> pkgname=mingw-w64-qt5-<%== $qt_module %><%== $static_variant ? '-static' : '' %> <%== content %>\ +% if ($kde_fork_revision) { +_commit=<%== $kde_fork_revision->[1] %> +pkgver+=+kde+r<%== $kde_fork_revision->[0] %> +makedepends+=('git') +% } options=('!strip' '!buildflags' 'staticlibs') groups=('mingw-w64-qt5') url='https://www.qt.io/' +% if ($kde_fork_revision) { +_pkgfqn=${_qt_module} +source=(git+https://invent.kde.org/qt/qt/$_pkgfqn#commit=$_commit\ +% } else { _pkgfqn="${_qt_module}-everywhere-src-${pkgver}" source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz"\ +% } <%== include 'fragments/source_file_list', relevant_files => $patch_files %>) +% if ($kde_fork_revision) { +sha256sums=('SKIP'\ +% } else { sha256sums=('<%== $qt_module_sha256 %>'\ +% } <%== include 'fragments/sha256_list', relevant_files => $patch_files %>) _architectures='i686-w64-mingw32 x86_64-w64-mingw32' @@ -53,9 +67,20 @@ _configurations+=('CONFIG+=actually_a_shared_build <%== content_for 'shared_conf % } <%== content_for 'helper_functions' %>\ -% if ($patch_files->size || content_for('prepare')->size) { +% if ($kde_fork_revision) { +pkgver() { + cd $_pkgfqn + echo "5.15.2+kde+r"`git rev-list --count origin/5.15.2..$_commit` +} + +% } +% if ($patch_files->size || content_for('prepare')->size || $kde_fork_revision) { prepare() { cd "${srcdir}/${_pkgfqn}" +% if ($kde_fork_revision) { + + git revert -n <%== $kde_fork_revision->[2] %> # Revert version bump +% } % if ($patch_files->size) { # apply patches; further descriptions can be found in patch files itself diff --git a/devel/qt5/rebase-patches.sh b/devel/qt5/rebase-patches.sh index 84b482e1..46dacde7 100755 --- a/devel/qt5/rebase-patches.sh +++ b/devel/qt5/rebase-patches.sh @@ -6,15 +6,16 @@ colorize if ! [[ $1 ]] || ! [[ $2 ]]; then echo 'No version specified, must specify the new and old version, eg. 5.9.2 5.9.1' - echo "Usage: $0 newversion oldversion [old-branch-suffix=mingw-w64] [new-branch-suffix=mingw-w64] [new-version-tag]" + echo "Usage: $0 newversion oldversion [old-branch-suffix=mingw-w64] [new-branch-suffix=mingw-w64] [new-version-tag] [old-version-tag]" echo "Note: supposed to be run within the Qt Git checkout" exit -1 fi -newversion="$1" -oldversion="$2" -oldbranchsuffix="${3:-mingw-w64}" -newbranchsuffix="${4:-mingw-w64}" -newversiontag="$5" +newversion=$1 +oldversion=$2 +oldbranchsuffix=${3:-mingw-w64} +newbranchsuffix=${4:-mingw-w64} +newversiontag=$5 +oldversiontag=$6 # check whether branch for new version already exists newversionbranch=$newversion-$newbranchsuffix @@ -63,5 +64,5 @@ if [[ $newversiontag ]]; then else git checkout -b "$newversionbranch" "origin/$newversion" || git checkout -b "$newversionbranch" "v$newversion" fi -git cherry-pick "v$oldversion..$oldversionbranch" +git cherry-pick "${oldversiontag:-v$oldversion}..$oldversionbranch" git push -u $maybe_remote "$newversionbranch" diff --git a/devel/qt5/update-patches.sh b/devel/qt5/update-patches.sh index e393d2a2..44bb5c9a 100755 --- a/devel/qt5/update-patches.sh +++ b/devel/qt5/update-patches.sh @@ -11,7 +11,7 @@ colorize if ! [[ $1 ]]; then echo 'No Qt repo specified - must be specified like eg. base or multimedia.' - echo "Usage: $0 repo [branch=\$pkgver-\$variant] [variant=mingw-w64] [qtver=qt5]" + echo "Usage: $0 repo [branch=\$pkgver-\$variant] [variant=mingw-w64] [qtver=qt5] [tag=v\$pkgver]" echo "Note: DEFAULT_PKGBUILDS_DIR and QT_GIT_REPOS_DIR must point to directories containing PKGBUILDs and the Qt repos." exit -1 fi @@ -34,6 +34,7 @@ pkg="$qtver-$1" repo="qt$1" branch="${2}" variant="${3:-mingw-w64}" +tag=$5 # find dest dir pkgdir= @@ -62,6 +63,7 @@ template=$pkgbuild_path.sh.ep has_template= source "$pkgbuild_path" tag=${tag:-v$pkgver} +tag=${tag%+kde+*} new_sources=() new_md5sums=() diff --git a/qt5-base/mingw-w64-static/0001-Adjust-win32-g-profile-for-cross-compilation-with-mi.patch b/qt5-base/mingw-w64-static/0001-Adjust-win32-g-profile-for-cross-compilation-with-mi.patch deleted file mode 100644 index 06b812e0..00000000 --- a/qt5-base/mingw-w64-static/0001-Adjust-win32-g-profile-for-cross-compilation-with-mi.patch +++ /dev/null @@ -1,165 +0,0 @@ -From ce90790a4f5c2dcf9398d846f63a6c6b50411dcb Mon Sep 17 00:00:00 2001 -From: Martchus -Date: Fri, 3 Feb 2017 18:30:51 +0100 -Subject: [PATCH 01/31] Adjust win32-g++ profile for cross compilation with - mingw-w64 - -Adding a new, separate mkspec instead of patching the existing one -might be the cleaner solution. However, tools like windeployqt and -qbs do checks based on the hardcoded mkspec name to detect MinGW. -So for this to work, the mkspec must be called win32-g++. - -Also see the following issues: -* https://github.com/Martchus/PKGBUILDs/issues/59 -* https://github.com/Martchus/PKGBUILDs/issues/60 - -Change-Id: I127bb0516bd4acfea588a5d48c46811525a8fca8 ---- - mkspecs/common/g++-win32.conf | 50 ++++++++++++++++++++---------- - mkspecs/win32-clang-g++/qmake.conf | 4 +-- - mkspecs/win32-g++/qmake.conf | 4 +-- - 3 files changed, 37 insertions(+), 21 deletions(-) - -diff --git a/mkspecs/common/g++-win32.conf b/mkspecs/common/g++-win32.conf -index c3a1f3a373..d852ccc2ad 100644 ---- a/mkspecs/common/g++-win32.conf -+++ b/mkspecs/common/g++-win32.conf -@@ -8,18 +8,24 @@ - # Compiler-specific settings go into win32-g++/qmake.conf and - # win32-clang-g++/qmake.conf - # -+# The device options CROSS_COMPILE_CUSTOM_CONFIG and CROSS_COMPILE_CFLAGS can be used -+# to specify custom config/flags for cross compilation. -+# - - load(device_config) - include(gcc-base.conf) - include(g++-base.conf) - -+include(angle.conf) -+include(windows-vulkan.conf) -+ - # modifications to gcc-base.conf and g++-base.conf - - MAKEFILE_GENERATOR = MINGW - QMAKE_PLATFORM = win32 mingw --CONFIG += debug_and_release debug_and_release_target precompile_header --DEFINES += UNICODE _UNICODE WIN32 MINGW_HAS_SECURE_API=1 --QMAKE_COMPILER_DEFINES += __GNUC__ _WIN32 -+CONFIG += debug_and_release debug_and_release_target precompile_header $${CROSS_COMPILE_CUSTOM_CONFIG} -+DEFINES += UNICODE _UNICODE MINGW_HAS_SECURE_API=1 -+QMAKE_COMPILER_DEFINES += __GNUC__ _WIN32 WIN32 - # can't add 'DEFINES += WIN64' and 'QMAKE_COMPILER_DEFINES += _WIN64' defines for - # x86_64 platform similar to 'msvc-desktop.conf' toolchain, because, unlike for MSVC, - # 'QMAKE_TARGET.arch' is inherently unavailable. -@@ -32,6 +38,7 @@ QMAKE_YACCFLAGS = -d - QMAKE_CFLAGS_SSE2 += -mstackrealign - - QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions -mthreads -+QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -fno-exceptions - - QMAKE_INCDIR = - -@@ -41,40 +48,49 @@ QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src - QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - - QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads --QMAKE_LFLAGS_RELEASE = -Wl,-s -+QMAKE_LFLAGS_RELEASE = -+QMAKE_LFLAGS_DEBUG = - QMAKE_LFLAGS_CONSOLE = -Wl,-subsystem,console - QMAKE_LFLAGS_WINDOWS = -Wl,-subsystem,windows - QMAKE_LFLAGS_DLL = -shared - QMAKE_LFLAGS_GCSECTIONS = -Wl,--gc-sections --equals(QMAKE_HOST.os, Windows) { -- QMAKE_LINK_OBJECT_MAX = 10 -- QMAKE_LINK_OBJECT_SCRIPT = object_script --} -+QMAKE_LINK_OBJECT_MAX = 10 -+QMAKE_LINK_OBJECT_SCRIPT = object_script - QMAKE_EXT_OBJ = .o - QMAKE_EXT_RES = _res.o - QMAKE_PREFIX_SHLIB = - QMAKE_EXTENSION_SHLIB = dll - QMAKE_PREFIX_STATICLIB = lib - QMAKE_EXTENSION_STATICLIB = a --QMAKE_LIB_EXTENSIONS = a dll.a -+QMAKE_EXTENSION_IMPORTLIB = dll.a -+ -+PKG_CONFIG = $${CROSS_COMPILE}pkg-config -+QMAKE_PKG_CONFIG = $${CROSS_COMPILE}pkg-config - - QMAKE_LIBS = --QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luuid -luser32 -ladvapi32 --QMAKE_LIBS_NETWORK = -lws2_32 -+QMAKE_LIBS_CORE = -lz -lpcre2-16 -liconv -lversion -lnetapi32 -luserenv -lole32 -luuid -lwinmm -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32 -+QMAKE_LIBS_GUI = $$system($${QMAKE_PKG_CONFIG} --libs harfbuzz) $$system($${QMAKE_PKG_CONFIG} --libs freetype2) \ -+ -ljpeg -lpng -lopengl32 -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luuid -luser32 -ladvapi32 -+QMAKE_LIBS_GUI_STATIC = $$system($${QMAKE_PKG_CONFIG} --static --libs harfbuzz) $$system($${QMAKE_PKG_CONFIG} --static --libs freetype2) \ -+ -ljpeg -lpng -lopengl32 -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luuid -luser32 -ladvapi32 -ldxgi -ld3d11 -+QMAKE_LIBS_NETWORK = -lws2_32 -lcrypt32 -ldnsapi -liphlpapi -+QMAKE_LIBS_NETWORK_STATIC = $$system($${QMAKE_PKG_CONFIG} --static --libs openssl) -lws2_32 -lcrypt32 -ldnsapi -liphlpapi -+QMAKE_LIBS_DBUS = $$system($${QMAKE_PKG_CONFIG} --libs dbus-1) -+QMAKE_LIBS_DBUS_STATIC = $$system($${QMAKE_PKG_CONFIG} --static --libs dbus-1) -+QMAKE_LIBS_WIDGETS_STATIC = -ldwmapi -luxtheme - QMAKE_LIBS_OPENGL = -lglu32 -lopengl32 -lgdi32 -luser32 --QMAKE_LIBS_OPENGL_ES2 = -lgdi32 -luser32 --QMAKE_LIBS_OPENGL_ES2_DEBUG = -lgdi32 -luser32 -+QMAKE_LIBS_OPENGL_ES2 = -l$${LIBEGL_NAME} -l$${LIBGLESV2_NAME} -ld3d9 -ldxguid -lgdi32 -luser32 -+QMAKE_LIBS_OPENGL_ES2_DEBUG = -l$${LIBEGL_NAME} -l$${LIBGLESV2_NAME} -ld3d9 -ldxguid -lgdi32 -luser32 - QMAKE_LIBS_COMPAT = -ladvapi32 -lshell32 -lcomdlg32 -luser32 -lgdi32 -lws2_32 - QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqtmain - --QMAKE_IDL = midl -+QMAKE_IDL = $${CROSS_COMPILE}widl - QMAKE_LIB = $${CROSS_COMPILE}ar -rc - QMAKE_RC = $${CROSS_COMPILE}windres -+QMAKE_DLLTOOL = $${CROSS_COMPILE}dlltool -+QMAKE_LRELEASE = $${CROSS_COMPILE}lrelease-qt5 - - QMAKE_STRIP = $${CROSS_COMPILE}strip - QMAKE_STRIPFLAGS_LIB += --strip-unneeded - QMAKE_OBJCOPY = $${CROSS_COMPILE}objcopy - QMAKE_NM = $${CROSS_COMPILE}nm -P -- --include(angle.conf) --include(windows-vulkan.conf) -diff --git a/mkspecs/win32-clang-g++/qmake.conf b/mkspecs/win32-clang-g++/qmake.conf -index 59d42176f0..f8cb9859f2 100644 ---- a/mkspecs/win32-clang-g++/qmake.conf -+++ b/mkspecs/win32-clang-g++/qmake.conf -@@ -14,11 +14,11 @@ include(../common/g++-win32.conf) - QMAKE_COMPILER += clang llvm # clang pretends to be gcc - - QMAKE_CC = $${CROSS_COMPILE}clang --QMAKE_CFLAGS += -+QMAKE_CFLAGS += $${CROSS_COMPILE_CFLAGS} - QMAKE_CFLAGS_WARN_ON += -Wextra -Wno-ignored-attributes - - QMAKE_CXX = $${CROSS_COMPILE}clang++ --QMAKE_CXXFLAGS += -+QMAKE_CXXFLAGS += $${CROSS_COMPILE_CXXFLAGS} - QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON - - QMAKE_LINK = $${CROSS_COMPILE}clang++ -diff --git a/mkspecs/win32-g++/qmake.conf b/mkspecs/win32-g++/qmake.conf -index 5de482f23b..3c3d22c699 100644 ---- a/mkspecs/win32-g++/qmake.conf -+++ b/mkspecs/win32-g++/qmake.conf -@@ -13,11 +13,11 @@ include(../common/windows-desktop.conf) - # modifications to g++-win32.conf - - QMAKE_CC = $${CROSS_COMPILE}gcc --QMAKE_CFLAGS += -fno-keep-inline-dllexport -+QMAKE_CFLAGS += $${CROSS_COMPILE_CFLAGS} - QMAKE_CFLAGS_WARN_ON += -Wextra - - QMAKE_CXX = $${CROSS_COMPILE}g++ --QMAKE_CXXFLAGS += -fno-keep-inline-dllexport -+QMAKE_CXXFLAGS += $${CROSS_COMPILE_CXXFLAGS} - QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON - - QMAKE_LINK = $${CROSS_COMPILE}g++ --- -2.29.2 - diff --git a/qt5-base/mingw-w64-static/0001-Adjust-win32-g-profile-for-cross-compilation-with-mi.patch b/qt5-base/mingw-w64-static/0001-Adjust-win32-g-profile-for-cross-compilation-with-mi.patch new file mode 120000 index 00000000..8b46f5a2 --- /dev/null +++ b/qt5-base/mingw-w64-static/0001-Adjust-win32-g-profile-for-cross-compilation-with-mi.patch @@ -0,0 +1 @@ +../mingw-w64/0001-Adjust-win32-g-profile-for-cross-compilation-with-mi.patch \ No newline at end of file diff --git a/qt5-base/mingw-w64-static/0002-Ensure-GLdouble-is-defined-when-using-dynamic-OpenGL.patch b/qt5-base/mingw-w64-static/0002-Ensure-GLdouble-is-defined-when-using-dynamic-OpenGL.patch deleted file mode 100644 index a7ba57b4..00000000 --- a/qt5-base/mingw-w64-static/0002-Ensure-GLdouble-is-defined-when-using-dynamic-OpenGL.patch +++ /dev/null @@ -1,27 +0,0 @@ -From adbb14a78c0091c81925e5e79644ff8361e7b8e9 Mon Sep 17 00:00:00 2001 -From: Martchus -Date: Sun, 18 Sep 2016 13:36:53 +0200 -Subject: [PATCH 02/31] Ensure GLdouble is defined when using dynamic OpenGL - -FIXME: Not sure whether this is still required ---- - src/gui/opengl/qopenglfunctions.h | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/src/gui/opengl/qopenglfunctions.h b/src/gui/opengl/qopenglfunctions.h -index 4554291bbd..23d55bddeb 100644 ---- a/src/gui/opengl/qopenglfunctions.h -+++ b/src/gui/opengl/qopenglfunctions.h -@@ -56,9 +56,7 @@ - - //#define Q_ENABLE_OPENGL_FUNCTIONS_DEBUG - --#ifdef QT_OPENGL_ES - typedef double GLdouble; --#endif - - #ifdef Q_ENABLE_OPENGL_FUNCTIONS_DEBUG - #include --- -2.29.2 - diff --git a/qt5-base/mingw-w64-static/0002-Ensure-GLdouble-is-defined-when-using-dynamic-OpenGL.patch b/qt5-base/mingw-w64-static/0002-Ensure-GLdouble-is-defined-when-using-dynamic-OpenGL.patch new file mode 120000 index 00000000..56b32b45 --- /dev/null +++ b/qt5-base/mingw-w64-static/0002-Ensure-GLdouble-is-defined-when-using-dynamic-OpenGL.patch @@ -0,0 +1 @@ +../mingw-w64/0002-Ensure-GLdouble-is-defined-when-using-dynamic-OpenGL.patch \ No newline at end of file diff --git a/qt5-base/mingw-w64-static/0003-Fix-too-many-sections-assemler-error-in-OpenGL-facto.patch b/qt5-base/mingw-w64-static/0003-Fix-too-many-sections-assemler-error-in-OpenGL-facto.patch deleted file mode 100644 index 31b28046..00000000 --- a/qt5-base/mingw-w64-static/0003-Fix-too-many-sections-assemler-error-in-OpenGL-facto.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 520b519d962852792bd4ac3c2d1206afa329b65e Mon Sep 17 00:00:00 2001 -From: Martchus -Date: Sun, 18 Sep 2016 13:48:51 +0200 -Subject: [PATCH 03/31] Fix too many sections assemler error in OpenGL factory - -On x86_64 qopenglversionfunctionsfactory.o exceeds the -limit of 32768 sections. -Hence the assembler option -mbig-obj is required. ---- - src/gui/opengl/opengl.pri | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/gui/opengl/opengl.pri b/src/gui/opengl/opengl.pri -index 24758afdeb..aa04b4a672 100644 ---- a/src/gui/opengl/opengl.pri -+++ b/src/gui/opengl/opengl.pri -@@ -3,7 +3,8 @@ - qtConfig(opengl): CONFIG += opengl - qtConfig(opengles2): CONFIG += opengles2 - --qtConfig(opengl) { -+qtConfig(opengl)|qtConfig(opengles2) { -+ mingw:QMAKE_CXXFLAGS+="-Wa,-mbig-obj" - - HEADERS += opengl/qopengl.h \ - opengl/qopengl_p.h \ --- -2.29.2 - diff --git a/qt5-base/mingw-w64-static/0003-Fix-too-many-sections-assemler-error-in-OpenGL-facto.patch b/qt5-base/mingw-w64-static/0003-Fix-too-many-sections-assemler-error-in-OpenGL-facto.patch new file mode 120000 index 00000000..aca2cf94 --- /dev/null +++ b/qt5-base/mingw-w64-static/0003-Fix-too-many-sections-assemler-error-in-OpenGL-facto.patch @@ -0,0 +1 @@ +../mingw-w64/0003-Fix-too-many-sections-assemler-error-in-OpenGL-facto.patch \ No newline at end of file diff --git a/qt5-base/mingw-w64-static/0004-Make-sure-.pc-files-are-installed-correctly.patch b/qt5-base/mingw-w64-static/0004-Make-sure-.pc-files-are-installed-correctly.patch deleted file mode 100644 index 7ad86637..00000000 --- a/qt5-base/mingw-w64-static/0004-Make-sure-.pc-files-are-installed-correctly.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 45491f6d0b4d828f3b4ce6b76ec3c7d68cec6b06 Mon Sep 17 00:00:00 2001 -From: Martchus -Date: Sun, 18 Sep 2016 13:54:12 +0200 -Subject: [PATCH 04/31] Make sure *.pc files are installed correctly - ---- - qmake/generators/makefile.cpp | 8 ++++++-- - qmake/generators/makefile.h | 2 +- - qmake/generators/win32/winmakefile.cpp | 2 +- - 3 files changed, 8 insertions(+), 4 deletions(-) - -diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp -index 5c61a3c65c..e94084381c 100644 ---- a/qmake/generators/makefile.cpp -+++ b/qmake/generators/makefile.cpp -@@ -3211,7 +3211,7 @@ MakefileGenerator::openOutput(QFile &file, const QString &build) const - } - - QString --MakefileGenerator::pkgConfigFileName(bool fixify) -+MakefileGenerator::pkgConfigFileName(bool fixify, bool onlyPrependDestdir) - { - QString ret = project->first("QMAKE_PKGCONFIG_FILE").toQString(); - if (ret.isEmpty()) { -@@ -3236,7 +3236,11 @@ MakefileGenerator::pkgConfigFileName(bool fixify) - if(fixify) { - if(QDir::isRelativePath(ret) && !project->isEmpty("DESTDIR")) - ret.prepend(project->first("DESTDIR").toQString()); -- ret = fileFixify(ret, FileFixifyBackwards); -+ if (onlyPrependDestdir) { -+ ret = Option::fixPathToLocalOS(ret); -+ } else { -+ ret = fileFixify(ret, FileFixifyBackwards); -+ } - } - return ret; - } -diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h -index a96b9c54da..5a7913be7a 100644 ---- a/qmake/generators/makefile.h -+++ b/qmake/generators/makefile.h -@@ -96,7 +96,7 @@ protected: - virtual void writeDefaultVariables(QTextStream &t); - - QString pkgConfigPrefix() const; -- QString pkgConfigFileName(bool fixify=true); -+ QString pkgConfigFileName(bool fixify=true, bool onlyPrependDestdir = false); - QString pkgConfigFixPath(QString) const; - void writePkgConfigFile(); // for pkg-config - -diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp -index 5e446bd7e2..183cef2908 100644 ---- a/qmake/generators/win32/winmakefile.cpp -+++ b/qmake/generators/win32/winmakefile.cpp -@@ -775,7 +775,7 @@ QString Win32MakefileGenerator::defaultInstall(const QString &t) - } - if(!ret.isEmpty()) - ret += "\n\t"; -- ret += installMetaFile(ProKey("QMAKE_PKGCONFIG_INSTALL_REPLACE"), pkgConfigFileName(true), dst_pc); -+ ret += installMetaFile(ProKey("QMAKE_PKGCONFIG_INSTALL_REPLACE"), pkgConfigFileName(true, true), dst_pc); - if(!uninst.isEmpty()) - uninst.append("\n\t"); - uninst.append("-$(DEL_FILE) " + escapeFilePath(dst_pc)); --- -2.29.2 - diff --git a/qt5-base/mingw-w64-static/0004-Make-sure-.pc-files-are-installed-correctly.patch b/qt5-base/mingw-w64-static/0004-Make-sure-.pc-files-are-installed-correctly.patch new file mode 120000 index 00000000..0a39278c --- /dev/null +++ b/qt5-base/mingw-w64-static/0004-Make-sure-.pc-files-are-installed-correctly.patch @@ -0,0 +1 @@ +../mingw-w64/0004-Make-sure-.pc-files-are-installed-correctly.patch \ No newline at end of file diff --git a/qt5-base/mingw-w64-static/0005-Don-t-add-resource-files-to-LIBS-parameter.patch b/qt5-base/mingw-w64-static/0005-Don-t-add-resource-files-to-LIBS-parameter.patch deleted file mode 100644 index 8fe274d0..00000000 --- a/qt5-base/mingw-w64-static/0005-Don-t-add-resource-files-to-LIBS-parameter.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 806b631662ffebfa38085e1f9e708aee2c19f1d9 Mon Sep 17 00:00:00 2001 -From: Martchus -Date: Sun, 18 Sep 2016 13:58:28 +0200 -Subject: [PATCH 05/31] Don't add resource files to LIBS parameter - -Solves an issue where the generated pkg-config -files contained invalid Libs.private references -like .obj/debug/Qt5Cored_resource_res.o ---- - qmake/generators/win32/mingw_make.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp -index ee9a41838b..8d1dcae85b 100644 ---- a/qmake/generators/win32/mingw_make.cpp -+++ b/qmake/generators/win32/mingw_make.cpp -@@ -147,7 +147,7 @@ void MingwMakefileGenerator::init() - - processVars(); - -- project->values("LIBS") += project->values("RES_FILE"); -+ project->values("OBJECTS") += project->values("RES_FILE"); - - if (project->isActiveConfig("dll")) { - QString destDir = ""; --- -2.29.2 - diff --git a/qt5-base/mingw-w64-static/0005-Don-t-add-resource-files-to-LIBS-parameter.patch b/qt5-base/mingw-w64-static/0005-Don-t-add-resource-files-to-LIBS-parameter.patch new file mode 120000 index 00000000..5ac3641b --- /dev/null +++ b/qt5-base/mingw-w64-static/0005-Don-t-add-resource-files-to-LIBS-parameter.patch @@ -0,0 +1 @@ +../mingw-w64/0005-Don-t-add-resource-files-to-LIBS-parameter.patch \ No newline at end of file diff --git a/qt5-base/mingw-w64-static/0006-Prevent-debug-library-names-in-pkg-config-files.patch b/qt5-base/mingw-w64-static/0006-Prevent-debug-library-names-in-pkg-config-files.patch deleted file mode 100644 index 0bc5e996..00000000 --- a/qt5-base/mingw-w64-static/0006-Prevent-debug-library-names-in-pkg-config-files.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 3d816219968cfcaacfd30b6011263c8bb4d975c0 Mon Sep 17 00:00:00 2001 -From: Martchus -Date: Sun, 18 Sep 2016 14:01:14 +0200 -Subject: [PATCH 06/31] Prevent debug library names in pkg-config files - -qmake generates the pkgconfig .pc files two times, once for the -release build and once for the debug build (which we're not actually -building in this package). For both generations the exact same -pkgconfig file name is used. This causes references to the debug -build ending up in the .pc files which are unwanted -Prevent this from happening by giving the pkgconfig .pc -files for the debug build an unique file name. ---- - qmake/generators/makefile.cpp | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp -index e94084381c..8e4d11484f 100644 ---- a/qmake/generators/makefile.cpp -+++ b/qmake/generators/makefile.cpp -@@ -3225,6 +3225,9 @@ MakefileGenerator::pkgConfigFileName(bool fixify, bool onlyPrependDestdir) - if (dot != -1) - ret = ret.left(dot); - } -+ if (project->isActiveConfig("debug")) { -+ ret += "d"; -+ } - ret += Option::pkgcfg_ext; - QString subdir = project->first("QMAKE_PKGCONFIG_DESTDIR").toQString(); - if(!subdir.isEmpty()) { --- -2.29.2 - diff --git a/qt5-base/mingw-w64-static/0006-Prevent-debug-library-names-in-pkg-config-files.patch b/qt5-base/mingw-w64-static/0006-Prevent-debug-library-names-in-pkg-config-files.patch new file mode 120000 index 00000000..ccc6eaeb --- /dev/null +++ b/qt5-base/mingw-w64-static/0006-Prevent-debug-library-names-in-pkg-config-files.patch @@ -0,0 +1 @@ +../mingw-w64/0006-Prevent-debug-library-names-in-pkg-config-files.patch \ No newline at end of file diff --git a/qt5-base/mingw-w64-static/0007-Fix-linking-against-shared-static-libpng.patch b/qt5-base/mingw-w64-static/0007-Fix-linking-against-shared-static-libpng.patch deleted file mode 100644 index 040ddbb4..00000000 --- a/qt5-base/mingw-w64-static/0007-Fix-linking-against-shared-static-libpng.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 77037d64693385c1cdcc2814890567e79548b40d Mon Sep 17 00:00:00 2001 -From: Martchus -Date: Thu, 26 Jan 2017 17:51:31 +0100 -Subject: [PATCH 07/31] Fix linking against shared/static libpng - -Change-Id: Ic7a0ec9544059b8e647a5d0186f1b88c00911dcf ---- - src/gui/configure.json | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/src/gui/configure.json b/src/gui/configure.json -index c8c4864eca..be519a6d39 100644 ---- a/src/gui/configure.json -+++ b/src/gui/configure.json -@@ -399,8 +399,10 @@ - { "type": "pkgConfig", "args": "libpng" }, - { "libs": "-llibpng16", "condition": "config.msvc" }, - { "libs": "-llibpng", "condition": "config.msvc" }, -- { "libs": "-lpng16", "condition": "!config.msvc" }, -- { "libs": "-lpng", "condition": "!config.msvc" }, -+ { "libs": "-lpng16 -lz", "condition": "!config.msvc && !features.shared" }, -+ { "libs": "-lpng -lz", "condition": "!config.msvc && !features.shared" }, -+ { "libs": "-lpng16", "condition": "!config.msvc && features.shared" }, -+ { "libs": "-lpng", "condition": "!config.msvc && features.shared" }, - { "libs": "-s USE_LIBPNG=1", "condition": "config.wasm" } - ], - "use": [ --- -2.29.2 - diff --git a/qt5-base/mingw-w64-static/0007-Fix-linking-against-shared-static-libpng.patch b/qt5-base/mingw-w64-static/0007-Fix-linking-against-shared-static-libpng.patch new file mode 120000 index 00000000..aa7077e0 --- /dev/null +++ b/qt5-base/mingw-w64-static/0007-Fix-linking-against-shared-static-libpng.patch @@ -0,0 +1 @@ +../mingw-w64/0007-Fix-linking-against-shared-static-libpng.patch \ No newline at end of file diff --git a/qt5-base/mingw-w64-static/0008-Fix-linking-against-static-D-Bus.patch b/qt5-base/mingw-w64-static/0008-Fix-linking-against-static-D-Bus.patch deleted file mode 100644 index 82d8973a..00000000 --- a/qt5-base/mingw-w64-static/0008-Fix-linking-against-static-D-Bus.patch +++ /dev/null @@ -1,58 +0,0 @@ -From be0366f6b3d32f5c80038eca7d0c7ddd5375aa85 Mon Sep 17 00:00:00 2001 -From: Martchus -Date: Fri, 3 Feb 2017 19:36:25 +0100 -Subject: [PATCH 08/31] Fix linking against static D-Bus - ---- - configure.json | 9 +++++++-- - src/dbus/qdbus_symbols_p.h | 4 ++++ - 2 files changed, 11 insertions(+), 2 deletions(-) - -diff --git a/configure.json b/configure.json -index c273aeeef1..57c40030d8 100644 ---- a/configure.json -+++ b/configure.json -@@ -190,18 +190,23 @@ - "dbus": { - "label": "D-Bus >= 1.2", - "test": { -- "main": "(void) dbus_bus_get_private(DBUS_BUS_SYSTEM, (DBusError *)NULL);" -+ "main": "(void) dbus_bus_get_private(DBUS_BUS_SYSTEM, (DBusError *)NULL);", -+ "qmake": "static: DEFINES += DBUS_STATIC_BUILD" - }, - "headers": "dbus/dbus.h", - "sources": [ - { "type": "pkgConfig", "args": "dbus-1 >= 1.2" }, -+ { -+ "libs": "-ldbus-1 -lws2_32 -liphlpapi", -+ "condition": "config.win32 && !features.shared" -+ }, - { - "libs": "", - "builds": { - "debug": "-ldbus-1d", - "release": "-ldbus-1" - }, -- "condition": "config.win32" -+ "condition": "config.win32 && features.shared" - }, - { "libs": "-ldbus-1", "condition": "!config.win32" } - ] -diff --git a/src/dbus/qdbus_symbols_p.h b/src/dbus/qdbus_symbols_p.h -index accaa4f5ed..4b11c74caa 100644 ---- a/src/dbus/qdbus_symbols_p.h -+++ b/src/dbus/qdbus_symbols_p.h -@@ -57,6 +57,10 @@ - - #ifndef QT_NO_DBUS - -+#ifdef QT_STATIC -+# define DBUS_STATIC_BUILD -+#endif -+ - #ifdef QT_LINKED_LIBDBUS - # include - #else --- -2.29.2 - diff --git a/qt5-base/mingw-w64-static/0008-Fix-linking-against-static-D-Bus.patch b/qt5-base/mingw-w64-static/0008-Fix-linking-against-static-D-Bus.patch new file mode 120000 index 00000000..58ab8db9 --- /dev/null +++ b/qt5-base/mingw-w64-static/0008-Fix-linking-against-static-D-Bus.patch @@ -0,0 +1 @@ +../mingw-w64/0008-Fix-linking-against-static-D-Bus.patch \ No newline at end of file diff --git a/qt5-base/mingw-w64-static/0009-Don-t-try-to-use-debug-version-of-D-Bus-library.patch b/qt5-base/mingw-w64-static/0009-Don-t-try-to-use-debug-version-of-D-Bus-library.patch deleted file mode 100644 index 2d4c36b9..00000000 --- a/qt5-base/mingw-w64-static/0009-Don-t-try-to-use-debug-version-of-D-Bus-library.patch +++ /dev/null @@ -1,29 +0,0 @@ -From adb495753f647c7b78d923bb512e18003cd309a4 Mon Sep 17 00:00:00 2001 -From: Martchus -Date: Fri, 2 Jun 2017 18:28:10 +0200 -Subject: [PATCH 09/31] Don't try to use debug version of D-Bus library - -Required for a debug build of Qt because mingw-w64-dbus -does not contain debug version - -Change-Id: Ic34e1025fda55f9659e065f5bbe9d51f55420adb ---- - configure.json | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.json b/configure.json -index 57c40030d8..2fa3c08440 100644 ---- a/configure.json -+++ b/configure.json -@@ -203,7 +203,7 @@ - { - "libs": "", - "builds": { -- "debug": "-ldbus-1d", -+ "debug": "-ldbus-1", - "release": "-ldbus-1" - }, - "condition": "config.win32 && features.shared" --- -2.29.2 - diff --git a/qt5-base/mingw-w64-static/0009-Don-t-try-to-use-debug-version-of-D-Bus-library.patch b/qt5-base/mingw-w64-static/0009-Don-t-try-to-use-debug-version-of-D-Bus-library.patch new file mode 120000 index 00000000..95c09f5f --- /dev/null +++ b/qt5-base/mingw-w64-static/0009-Don-t-try-to-use-debug-version-of-D-Bus-library.patch @@ -0,0 +1 @@ +../mingw-w64/0009-Don-t-try-to-use-debug-version-of-D-Bus-library.patch \ No newline at end of file diff --git a/qt5-base/mingw-w64-static/0010-Fix-linking-against-static-freetype2.patch b/qt5-base/mingw-w64-static/0010-Fix-linking-against-static-freetype2.patch deleted file mode 100644 index fc9a35eb..00000000 --- a/qt5-base/mingw-w64-static/0010-Fix-linking-against-static-freetype2.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 8a8da9fb5e44acf747985254b8e4a0e663397c15 Mon Sep 17 00:00:00 2001 -From: Martchus -Date: Fri, 3 Feb 2017 20:51:19 +0100 -Subject: [PATCH 10/31] Fix linking against static freetype2 - ---- - src/gui/configure.json | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/src/gui/configure.json b/src/gui/configure.json -index be519a6d39..d74fd3bc24 100644 ---- a/src/gui/configure.json -+++ b/src/gui/configure.json -@@ -238,8 +238,11 @@ - }, - "headers": "ft2build.h", - "sources": [ -- { "type": "pkgConfig", "args": "freetype2" }, -- { "type": "freetype", "libs": "-lfreetype", "condition": "!config.wasm" }, -+ { "type": "pkgConfig", "args": "--static --libs freetype2", "condition": "!features.shared" }, -+ { "type": "pkgConfig", "args": "--libs freetype2", "condition": "features.shared" }, -+ { "libs": "-lfreetype -lharfbuzz -lfreetype -lglib-2.0 -lintl -lws2_32 -lole32 -lwinmm -lshlwapi -lpcre -lintl -lpcre -lintl -liconv -lgraphite2 -lbz2", "condition": "!features.shared && !config.wasm" }, -+ { "libs": "-Wl,-Bdynamic -lfreetype -Wl,-Bstatic", "condition": "!features.shared && !config.wasm" }, -+ { "libs": "-lfreetype", "condition": "features.shared && !config.wasm" }, - { "libs": "-s USE_FREETYPE=1", "condition": "config.wasm" }, - { "libs": "-lfreetype" } - ], --- -2.29.2 - diff --git a/qt5-base/mingw-w64-static/0010-Fix-linking-against-static-freetype2.patch b/qt5-base/mingw-w64-static/0010-Fix-linking-against-static-freetype2.patch new file mode 120000 index 00000000..a808a062 --- /dev/null +++ b/qt5-base/mingw-w64-static/0010-Fix-linking-against-static-freetype2.patch @@ -0,0 +1 @@ +../mingw-w64/0010-Fix-linking-against-static-freetype2.patch \ No newline at end of file diff --git a/qt5-base/mingw-w64-static/0011-Fix-linking-against-static-harfbuzz.patch b/qt5-base/mingw-w64-static/0011-Fix-linking-against-static-harfbuzz.patch deleted file mode 100644 index e03dd7e6..00000000 --- a/qt5-base/mingw-w64-static/0011-Fix-linking-against-static-harfbuzz.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 32692f0bf4ae8f35145d963fe95b82a11a20e6ca Mon Sep 17 00:00:00 2001 -From: Martchus -Date: Sun, 18 Sep 2016 14:22:56 +0200 -Subject: [PATCH 11/31] Fix linking against static harfbuzz - ---- - src/gui/configure.json | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/src/gui/configure.json b/src/gui/configure.json -index d74fd3bc24..d6759ed96a 100644 ---- a/src/gui/configure.json -+++ b/src/gui/configure.json -@@ -306,7 +306,11 @@ - }, - "headers": "harfbuzz/hb.h", - "sources": [ -- "-lharfbuzz" -+ { "type": "pkgConfig", "args": "--static --libs harfbuzz", "condition": "!features.shared" }, -+ { "type": "pkgConfig", "args": "--libs harfbuzz", "condition": "features.shared" }, -+ { "libs": "-lharfbuzz -lfreetype -lharfbuzz -lglib-2.0 -lintl -lws2_32 -lole32 -lwinmm -lshlwapi -lpcre -lintl -lpcre -lintl -liconv -lgraphite2 -lbz2", "condition": "!features.shared" }, -+ { "libs": "-Wl,-Bdynamic -lharfbuzz -Wl,-Bstatic", "condition": "!features.shared" }, -+ { "libs": "-lharfbuzz", "condition": "features.shared" } - ] - }, - "imf": { --- -2.29.2 - diff --git a/qt5-base/mingw-w64-static/0011-Fix-linking-against-static-harfbuzz.patch b/qt5-base/mingw-w64-static/0011-Fix-linking-against-static-harfbuzz.patch new file mode 120000 index 00000000..c86d1b00 --- /dev/null +++ b/qt5-base/mingw-w64-static/0011-Fix-linking-against-static-harfbuzz.patch @@ -0,0 +1 @@ +../mingw-w64/0011-Fix-linking-against-static-harfbuzz.patch \ No newline at end of file diff --git a/qt5-base/mingw-w64-static/0012-Fix-linking-against-static-pcre.patch b/qt5-base/mingw-w64-static/0012-Fix-linking-against-static-pcre.patch deleted file mode 100644 index 403c1e86..00000000 --- a/qt5-base/mingw-w64-static/0012-Fix-linking-against-static-pcre.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 3bb30ee7403e468705aa03e1d92f797d6ce38332 Mon Sep 17 00:00:00 2001 -From: Martchus -Date: Sun, 18 Sep 2016 14:24:01 +0200 -Subject: [PATCH 12/31] Fix linking against static pcre - -Change-Id: I3225c6e82dc4d17aef37d4289c16eb7a5ea3c5a1 ---- - src/corelib/text/qregularexpression.cpp | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/corelib/text/qregularexpression.cpp b/src/corelib/text/qregularexpression.cpp -index d7e3cc5ee2..e17c19fbae 100644 ---- a/src/corelib/text/qregularexpression.cpp -+++ b/src/corelib/text/qregularexpression.cpp -@@ -53,6 +53,10 @@ - #include - - #define PCRE2_CODE_UNIT_WIDTH 16 -+#ifdef QT_STATIC -+#define PCRE_STATIC -+#define PCRE2_STATIC -+#endif - - #include - --- -2.29.2 - diff --git a/qt5-base/mingw-w64-static/0012-Fix-linking-against-static-pcre.patch b/qt5-base/mingw-w64-static/0012-Fix-linking-against-static-pcre.patch new file mode 120000 index 00000000..dd7692ad --- /dev/null +++ b/qt5-base/mingw-w64-static/0012-Fix-linking-against-static-pcre.patch @@ -0,0 +1 @@ +../mingw-w64/0012-Fix-linking-against-static-pcre.patch \ No newline at end of file diff --git a/qt5-base/mingw-w64-static/0013-Fix-linking-against-shared-static-MariaDB.patch b/qt5-base/mingw-w64-static/0013-Fix-linking-against-shared-static-MariaDB.patch deleted file mode 100644 index dda69c2f..00000000 --- a/qt5-base/mingw-w64-static/0013-Fix-linking-against-shared-static-MariaDB.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 5d301704de074aeee8464bf9933296a437353a6f Mon Sep 17 00:00:00 2001 -From: Martchus -Date: Sun, 18 Sep 2016 18:56:55 +0200 -Subject: [PATCH 13/31] Fix linking against shared/static MariaDB - -Change-Id: I9722c154d845f288a2d4d1ab14a014066b28819b ---- - src/plugins/sqldrivers/configure.json | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/plugins/sqldrivers/configure.json b/src/plugins/sqldrivers/configure.json -index 28ccbeadcd..7262914c64 100644 ---- a/src/plugins/sqldrivers/configure.json -+++ b/src/plugins/sqldrivers/configure.json -@@ -67,6 +67,8 @@ - }, - "headers": "mysql.h", - "sources": [ -+ { "libs": "-lmariadbclient -lssl -lcrypto -lshlwapi -lgdi32 -lws2_32 -lpthread -lz -lm", "condition": "config.win32 && !features.shared" }, -+ { "libs": "-lmariadb", "condition": "config.win32 && features.shared" }, - { "type": "mysqlConfig", "query": "--libs_r", "cleanlibs": true }, - { "type": "mysqlConfig", "query": "--libs", "cleanlibs": true }, - { "type": "mysqlConfig", "query": "--libs_r", "cleanlibs": false }, --- -2.29.2 - diff --git a/qt5-base/mingw-w64-static/0013-Fix-linking-against-shared-static-MariaDB.patch b/qt5-base/mingw-w64-static/0013-Fix-linking-against-shared-static-MariaDB.patch new file mode 120000 index 00000000..f4ea8d76 --- /dev/null +++ b/qt5-base/mingw-w64-static/0013-Fix-linking-against-shared-static-MariaDB.patch @@ -0,0 +1 @@ +../mingw-w64/0013-Fix-linking-against-shared-static-MariaDB.patch \ No newline at end of file diff --git a/qt5-base/mingw-w64-static/0014-Fix-linking-against-shared-static-PostgreSQL.patch b/qt5-base/mingw-w64-static/0014-Fix-linking-against-shared-static-PostgreSQL.patch deleted file mode 100644 index 366913c8..00000000 --- a/qt5-base/mingw-w64-static/0014-Fix-linking-against-shared-static-PostgreSQL.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 0f760f0e2b127ca9e765d2bbf4200b047bfa1a5e Mon Sep 17 00:00:00 2001 -From: Martchus -Date: Sun, 18 Sep 2016 18:58:25 +0200 -Subject: [PATCH 14/31] Fix linking against shared/static PostgreSQL - ---- - src/plugins/sqldrivers/configure.json | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/plugins/sqldrivers/configure.json b/src/plugins/sqldrivers/configure.json -index 7262914c64..852ba558be 100644 ---- a/src/plugins/sqldrivers/configure.json -+++ b/src/plugins/sqldrivers/configure.json -@@ -90,9 +90,9 @@ - }, - "headers": "libpq-fe.h", - "sources": [ -- { "type": "pkgConfig", "args": "libpq" }, - { "type": "psqlConfig" }, -- { "type": "psqlEnv", "libs": "-llibpq -lws2_32 -ladvapi32", "condition": "config.win32" }, -+ { "type": "psqlEnv", "libs": "-lpq -lpgcommon -lpgport -lintl -lssl -lcrypto -lshell32 -lws2_32 -lsecur32 -liconv", "condition": "config.win32 && !features.shared" }, -+ { "type": "psqlEnv", "libs": "-lpq", "condition": "config.win32 && features.shared" }, - { "type": "psqlEnv", "libs": "-lpq", "condition": "!config.win32" } - ] - }, --- -2.29.2 - diff --git a/qt5-base/mingw-w64-static/0014-Fix-linking-against-shared-static-PostgreSQL.patch b/qt5-base/mingw-w64-static/0014-Fix-linking-against-shared-static-PostgreSQL.patch new file mode 120000 index 00000000..d432c0d6 --- /dev/null +++ b/qt5-base/mingw-w64-static/0014-Fix-linking-against-shared-static-PostgreSQL.patch @@ -0,0 +1 @@ +../mingw-w64/0014-Fix-linking-against-shared-static-PostgreSQL.patch \ No newline at end of file diff --git a/qt5-base/mingw-w64-static/0015-Rename-qtmain-to-qt5main.patch b/qt5-base/mingw-w64-static/0015-Rename-qtmain-to-qt5main.patch deleted file mode 100644 index 449698a9..00000000 --- a/qt5-base/mingw-w64-static/0015-Rename-qtmain-to-qt5main.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 092e86f5dedf3173be832f868b60b1c306c42bfa Mon Sep 17 00:00:00 2001 -From: Martchus -Date: Sun, 18 Sep 2016 14:25:40 +0200 -Subject: [PATCH 15/31] Rename qtmain to qt5main - -Prevents conflict with mingw-w64-qt4 package ---- - mkspecs/common/g++-win32.conf | 2 +- - mkspecs/features/create_cmake.prf | 8 ++++---- - mkspecs/features/win32/windows.prf | 4 ++-- - src/winmain/winmain.pro | 2 +- - 4 files changed, 8 insertions(+), 8 deletions(-) - -diff --git a/mkspecs/common/g++-win32.conf b/mkspecs/common/g++-win32.conf -index d852ccc2ad..11249c1470 100644 ---- a/mkspecs/common/g++-win32.conf -+++ b/mkspecs/common/g++-win32.conf -@@ -82,7 +82,7 @@ QMAKE_LIBS_OPENGL = -lglu32 -lopengl32 -lgdi32 -luser32 - QMAKE_LIBS_OPENGL_ES2 = -l$${LIBEGL_NAME} -l$${LIBGLESV2_NAME} -ld3d9 -ldxguid -lgdi32 -luser32 - QMAKE_LIBS_OPENGL_ES2_DEBUG = -l$${LIBEGL_NAME} -l$${LIBGLESV2_NAME} -ld3d9 -ldxguid -lgdi32 -luser32 - QMAKE_LIBS_COMPAT = -ladvapi32 -lshell32 -lcomdlg32 -luser32 -lgdi32 -lws2_32 --QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqtmain -+QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqt5main - - QMAKE_IDL = $${CROSS_COMPILE}widl - QMAKE_LIB = $${CROSS_COMPILE}ar -rc -diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf -index 24ed125f12..593161f362 100644 ---- a/mkspecs/features/create_cmake.prf -+++ b/mkspecs/features/create_cmake.prf -@@ -329,14 +329,14 @@ mac { - } - - mingw { -- CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqtmain$${QT_LIBINFIX}$${debug_suffix}.a -- CMAKE_WINMAIN_FILE_LOCATION_RELEASE = libqtmain$${QT_LIBINFIX}.a -+ CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqt5main$${QT_LIBINFIX}$${debug_suffix}.a -+ CMAKE_WINMAIN_FILE_LOCATION_RELEASE = libqt5main$${QT_LIBINFIX}.a - - CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}$${debug_suffix}.a - CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a - } else { -- CMAKE_WINMAIN_FILE_LOCATION_DEBUG = qtmain$${QT_LIBINFIX}$${debug_suffix}.lib -- CMAKE_WINMAIN_FILE_LOCATION_RELEASE = qtmain$${QT_LIBINFIX}.lib -+ CMAKE_WINMAIN_FILE_LOCATION_DEBUG = qt5main$${QT_LIBINFIX}$${debug_suffix}.lib -+ CMAKE_WINMAIN_FILE_LOCATION_RELEASE = qt5main$${QT_LIBINFIX}.lib - - CMAKE_IMPLIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}$${debug_suffix}.lib - CMAKE_IMPLIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.lib -diff --git a/mkspecs/features/win32/windows.prf b/mkspecs/features/win32/windows.prf -index 272170d428..17f3ef9c2d 100644 ---- a/mkspecs/features/win32/windows.prf -+++ b/mkspecs/features/win32/windows.prf -@@ -5,8 +5,8 @@ contains(TEMPLATE, ".*app") { - mingw:DEFINES += QT_NEEDS_QMAIN - - qt:for(entryLib, $$list($$unique(QMAKE_LIBS_QT_ENTRY))) { -- isEqual(entryLib, -lqtmain) { -- lib = $$QT.core.libs/$${QMAKE_PREFIX_STATICLIB}qtmain$$QT_LIBINFIX$$qtPlatformTargetSuffix().$$QMAKE_EXTENSION_STATICLIB -+ isEqual(entryLib, -lqt5main) { -+ lib = $$QT.core.libs/$${QMAKE_PREFIX_STATICLIB}qt5main$$QT_LIBINFIX$$qtPlatformTargetSuffix().$$QMAKE_EXTENSION_STATICLIB - PRE_TARGETDEPS += $$lib - QMAKE_LIBS += $$lib - } else { -diff --git a/src/winmain/winmain.pro b/src/winmain/winmain.pro -index 1f54c846ec..162e7a4b1b 100644 ---- a/src/winmain/winmain.pro -+++ b/src/winmain/winmain.pro -@@ -2,7 +2,7 @@ - !win32:error("$$_FILE_ is intended only for Windows!") - - TEMPLATE = lib --TARGET = qtmain -+TARGET = qt5main - DESTDIR = $$QT.core.libs - - CONFIG += static --- -2.29.2 - diff --git a/qt5-base/mingw-w64-static/0015-Rename-qtmain-to-qt5main.patch b/qt5-base/mingw-w64-static/0015-Rename-qtmain-to-qt5main.patch new file mode 120000 index 00000000..53db3f8f --- /dev/null +++ b/qt5-base/mingw-w64-static/0015-Rename-qtmain-to-qt5main.patch @@ -0,0 +1 @@ +../mingw-w64/0015-Rename-qtmain-to-qt5main.patch \ No newline at end of file diff --git a/qt5-base/mingw-w64-static/0016-Enable-rpath-for-build-tools.patch b/qt5-base/mingw-w64-static/0016-Enable-rpath-for-build-tools.patch deleted file mode 100644 index c4cf6a4e..00000000 --- a/qt5-base/mingw-w64-static/0016-Enable-rpath-for-build-tools.patch +++ /dev/null @@ -1,37 +0,0 @@ -From fc76d4187ab337a5efb96d6b80099f5075df69ee Mon Sep 17 00:00:00 2001 -From: Martchus -Date: Sun, 18 Sep 2016 17:59:27 +0200 -Subject: [PATCH 16/31] Enable rpath for build tools - -- Required because various tools depend on libQt5Bootstrap.so which resides - in folder /usr/${_arch}/lib -- Can't use regular lib dir because it would conflict with the native package - -Change-Id: I9808062a66406cdec7446a75150b40b2f30038c7 ---- - mkspecs/features/qt_app.prf | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/mkspecs/features/qt_app.prf b/mkspecs/features/qt_app.prf -index 8354f30eea..30e8cf18c5 100644 ---- a/mkspecs/features/qt_app.prf -+++ b/mkspecs/features/qt_app.prf -@@ -21,6 +21,7 @@ isEmpty(QMAKE_TARGET_DESCRIPTION): \ - isEmpty(QMAKE_INFO_PLIST): CONFIG -= app_bundle - - host_build: QT -= gui # no host tool will ever use gui -+host_build: QMAKE_RPATHDIR += $$[QT_INSTALL_LIBS/dev] # force rpath - host_build:force_bootstrap { - !build_pass:qtConfig(release_tools): CONFIG += release - contains(QT, core(-private)?|xml) { -@@ -31,7 +32,6 @@ host_build:force_bootstrap { - } else { - !build_pass:qtConfig(debug_and_release): CONFIG += release - target.path = $$[QT_INSTALL_BINS] -- CONFIG += relative_qt_rpath # Qt's tools and apps should be relocatable - } - INSTALLS += target - --- -2.29.2 - diff --git a/qt5-base/mingw-w64-static/0016-Enable-rpath-for-build-tools.patch b/qt5-base/mingw-w64-static/0016-Enable-rpath-for-build-tools.patch new file mode 120000 index 00000000..9a2f7a72 --- /dev/null +++ b/qt5-base/mingw-w64-static/0016-Enable-rpath-for-build-tools.patch @@ -0,0 +1 @@ +../mingw-w64/0016-Enable-rpath-for-build-tools.patch \ No newline at end of file diff --git a/qt5-base/mingw-w64-static/0017-Use-system-zlib-for-build-tools.patch b/qt5-base/mingw-w64-static/0017-Use-system-zlib-for-build-tools.patch deleted file mode 100644 index 6a30f8cd..00000000 --- a/qt5-base/mingw-w64-static/0017-Use-system-zlib-for-build-tools.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 2e0b11f0f0ba3e756f010b5948b24089be5e3aed Mon Sep 17 00:00:00 2001 -From: Martchus -Date: Sun, 18 Sep 2016 18:04:42 +0200 -Subject: [PATCH 17/31] Use system zlib for build tools - ---- - src/tools/bootstrap/bootstrap.pro | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro -index 24862a07db..698e6cfb95 100644 ---- a/src/tools/bootstrap/bootstrap.pro -+++ b/src/tools/bootstrap/bootstrap.pro -@@ -158,7 +158,9 @@ macx { - ../../corelib/io/qstandardpaths_win.cpp - } - --!qtConfig(system-zlib)|cross_compile { -+cross_compile { -+ LIBS += -lz -+} else:!qtConfig(system-zlib) { - include(../../3rdparty/zlib.pri) - } else { - CONFIG += no_core_dep --- -2.29.2 - diff --git a/qt5-base/mingw-w64-static/0017-Use-system-zlib-for-build-tools.patch b/qt5-base/mingw-w64-static/0017-Use-system-zlib-for-build-tools.patch new file mode 120000 index 00000000..6f1ce620 --- /dev/null +++ b/qt5-base/mingw-w64-static/0017-Use-system-zlib-for-build-tools.patch @@ -0,0 +1 @@ +../mingw-w64/0017-Use-system-zlib-for-build-tools.patch \ No newline at end of file diff --git a/qt5-base/mingw-w64-static/0018-Merge-shared-and-static-library-trees.patch b/qt5-base/mingw-w64-static/0018-Merge-shared-and-static-library-trees.patch deleted file mode 100644 index ae13c161..00000000 --- a/qt5-base/mingw-w64-static/0018-Merge-shared-and-static-library-trees.patch +++ /dev/null @@ -1,208 +0,0 @@ -From bd22c9c095f87d358ea2269bfdd19cc31078b0b1 Mon Sep 17 00:00:00 2001 -From: Martchus -Date: Sun, 18 Sep 2016 18:45:08 +0200 -Subject: [PATCH 18/31] Merge shared and static library trees - -Allow installation of shared and static build in the same prefix - -Change-Id: I1de08df42d83d411aae519691cd3cde1fd6f3d1d ---- - configure.pri | 16 +++++++++++++++- - mkspecs/features/default_post.prf | 11 +++++++++++ - mkspecs/features/device_config.prf | 9 ++++++++- - mkspecs/features/qt.prf | 17 +++++++++++++++++ - mkspecs/features/spec_pre.prf | 11 ++++++++--- - qmake/generators/makefile.cpp | 11 +++++++---- - qtbase.pro | 10 ++++++++-- - 7 files changed, 74 insertions(+), 11 deletions(-) - -diff --git a/configure.pri b/configure.pri -index 49755f7abf..53c67f885b 100644 ---- a/configure.pri -+++ b/configure.pri -@@ -659,7 +659,12 @@ defineTest(qtConfOutput_machineTuple) { - - defineTest(qtConfOutput_commitOptions) { - # qdevice.pri needs to be written early, because the compile tests require it. -- write_file($$QT_BUILD_TREE/mkspecs/qdevice.pri, $${currentConfig}.output.devicePro)|error() -+ shared|actually_a_shared_build { -+ DEVICE_PRI_SUFFIX = .pri -+ } else { -+ DEVICE_PRI_SUFFIX = .static.pri -+ } -+ write_file($$QT_BUILD_TREE/mkspecs/qdevice$$DEVICE_PRI_SUFFIX, $${currentConfig}.output.devicePro)|error() - } - - # type (empty or 'host'), option name, default value -@@ -1398,3 +1403,12 @@ defineTest(createConfigStatus) { - - QMAKE_POST_CONFIGURE += \ - "createConfigStatus()" -+ -+# merge shared and static library trees -+contains(CONFIG, static) { -+ CONFIG -= shared -+ QT_CONFIG += static jpeg gif -+ QT_CONFIG -= shared -+ # prevent smart library merge from messing cyclic dependency between freetype2 and harfbuzz -+ CONFIG += no_smart_library_merge -+} -diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf -index 1d79f5c958..48f6e710b6 100644 ---- a/mkspecs/features/default_post.prf -+++ b/mkspecs/features/default_post.prf -@@ -1,5 +1,16 @@ - # This file is loaded by qmake right after loading the actual project file. - -+win32:contains(CONFIG, static) { -+ # Ensure defines are set correctly for static build -+ DEFINES -= QT_SHARED -+ DEFINES *= QT_STATIC QT_DESIGNER_STATIC -+ contains(QT_CONFIG, angle): DEFINES *= QT_OPENGL_ES_2_ANGLE_STATIC -+ # Ensure we link against all dependencies statically -+ QMAKE_LFLAGS += -static -static-libstdc++ -static-libgcc -+ # Prevent qmake from finding the prl file for shared libs -+ QMAKE_EXT_PRL = .static.prl -+} -+ - contains(TEMPLATE, ".*(lib|app)"):CONFIG += have_target - - !have_target:!force_qt: CONFIG -= qt -diff --git a/mkspecs/features/device_config.prf b/mkspecs/features/device_config.prf -index c15559e174..dd09ac749d 100644 ---- a/mkspecs/features/device_config.prf -+++ b/mkspecs/features/device_config.prf -@@ -4,7 +4,14 @@ - # supposed to be influenced by -device-option then. - host_build: return() - --DEVICE_PRI = $$[QT_HOST_DATA/get]/mkspecs/qdevice.pri -+shared|actually_a_shared_build { -+ DEVICE_PRI = $$[QT_HOST_DATA/get]/mkspecs/qdevice.pri -+} else { -+ DEVICE_PRI = $$[QT_HOST_DATA/get]/mkspecs/qdevice.static.pri -+ !exists($$DEVICE_PRI) { -+ DEVICE_PRI = $$[QT_HOST_DATA/get]/mkspecs/qdevice.pri -+ } -+} - exists($$DEVICE_PRI):include($$DEVICE_PRI) - unset(DEVICE_PRI) - -diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf -index 69d1954306..2bc7b1dedd 100644 ---- a/mkspecs/features/qt.prf -+++ b/mkspecs/features/qt.prf -@@ -235,6 +235,23 @@ for(ever) { - !isEmpty(MODULE_WINRT_CAPABILITIES_DEVICE): \ - WINRT_MANIFEST.capabilities_device_default += $$MODULE_WINRT_CAPABILITIES_DEVICE - } -+ -+ # Ensure linking against all required static libraries as defined in mingw-w64-g++ mkspec -+ win32:contains(CONFIG, static) { -+ isEqual(MODULE_NAME, QtCore) { -+ LIBS$$var_sfx += $$QMAKE_LIBS_CORE -+ } else:isEqual(MODULE_NAME, QtGui) { -+ LIBS$$var_sfx += $$QMAKE_LIBS_GUI_STATIC -+ } else:isEqual(MODULE_NAME, QtNetwork) { -+ LIBS$$var_sfx += $$QMAKE_LIBS_NETWORK_STATIC -+ } else:isEqual(MODULE_NAME, QtDBus) { -+ LIBS$$var_sfx += $$QMAKE_LIBS_DBUS_STATIC -+ } else:isEqual(MODULE_NAME, QtWidgets) { -+ LIBS$$var_sfx += $$QMAKE_LIBS_WIDGETS_STATIC -+ } else:isEqual(MODULE_NAME, QtOpenGL) { -+ LIBS$$var_sfx += $$QMAKE_LIBS_OPENGL -+ } -+ } - } - !isEmpty(BAD_QT):error("Unknown module(s) in QT$$var_sfx: $$replace(BAD_QT, _private$, -private)") - -diff --git a/mkspecs/features/spec_pre.prf b/mkspecs/features/spec_pre.prf -index 51ea3a8321..275e080ae4 100644 ---- a/mkspecs/features/spec_pre.prf -+++ b/mkspecs/features/spec_pre.prf -@@ -14,9 +14,14 @@ QMAKE_EXT_H = .h .hpp .hh .hxx - QMAKE_EXT_H_MOC = .cpp - QMAKE_EXT_JS = .js - QMAKE_EXT_LEX = .l --QMAKE_EXT_LIBTOOL = .la --QMAKE_EXT_PKGCONFIG = .pc --QMAKE_EXT_PRL = .prl -+QMAKE_EXT_PKGCONFIG = .pc -+contains(CONFIG, static) { -+ QMAKE_EXT_LIBTOOL = .static.la -+ QMAKE_EXT_PRL = .static.prl -+} else { -+ QMAKE_EXT_LIBTOOL = .la -+ QMAKE_EXT_PRL = .prl -+} - QMAKE_EXT_UI = .ui - QMAKE_EXT_YACC = .y - -diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp -index 8e4d11484f..c73b19c144 100644 ---- a/qmake/generators/makefile.cpp -+++ b/qmake/generators/makefile.cpp -@@ -3228,6 +3228,9 @@ MakefileGenerator::pkgConfigFileName(bool fixify, bool onlyPrependDestdir) - if (project->isActiveConfig("debug")) { - ret += "d"; - } -+ if (project->isActiveConfig("staticlib")) { -+ ret.insert(0, QStringLiteral("Static")); -+ } - ret += Option::pkgcfg_ext; - QString subdir = project->first("QMAKE_PKGCONFIG_DESTDIR").toQString(); - if(!subdir.isEmpty()) { -@@ -3404,11 +3407,11 @@ MakefileGenerator::writePkgConfigFile() - t << Qt::endl; - - // requires -- const QString requiresString = project->values("QMAKE_PKGCONFIG_REQUIRES").join(' '); -- if (!requiresString.isEmpty()) { -- t << "Requires: " << requiresString << Qt::endl; -+ t << "Requires:"; -+ const auto pkgconfigRequires = project->values("QMAKE_PKGCONFIG_REQUIRES"); -+ for (const auto &required : pkgconfigRequires) { -+ t << (project->isActiveConfig("staticlib") ? QStringLiteral(" Static") : QStringLiteral(" ")) << required.toQString(); - } -- - t << Qt::endl; - } - -diff --git a/qtbase.pro b/qtbase.pro -index c0ce0972ef..5a2deaf31d 100644 ---- a/qtbase.pro -+++ b/qtbase.pro -@@ -20,6 +20,12 @@ CLEAN_DEPS += qmake-clean - # recursive distclean proceeds, including beyond qtbase. - DISTCLEAN_DEPS += qmake-clean - -+shared|actually_a_shared_build { -+ DEVICE_PRI_SUFFIX = .pri -+} else { -+ DEVICE_PRI_SUFFIX = .static.pri -+} -+ - # Files created by configure. - # config.status (and configure.cache, which is the same for Windows) - # are omitted for convenience of rebuilds. -@@ -27,7 +33,7 @@ QMAKE_DISTCLEAN += \ - config.summary \ - config.tests/.qmake.cache \ - mkspecs/qconfig.pri \ -- mkspecs/qdevice.pri \ -+ mkspecs/qdevice$$DEVICE_PRI_SUFFIX \ - mkspecs/qmodule.pri \ - src/corelib/global/qconfig.h \ - src/corelib/global/qconfig_p.h \ -@@ -78,7 +84,7 @@ prefix_build|!equals(PWD, $$OUT_PWD) { - mkspecs.path = $$[QT_HOST_DATA]/mkspecs - mkspecs.files = \ - $$OUT_PWD/mkspecs/qconfig.pri $$OUT_PWD/mkspecs/qmodule.pri \ -- $$OUT_PWD/mkspecs/qdevice.pri \ -+ $$OUT_PWD/mkspecs/qdevice$$DEVICE_PRI_SUFFIX \ - $$files($$PWD/mkspecs/*) - mkspecs.files -= $$PWD/mkspecs/modules $$PWD/mkspecs/modules-inst - INSTALLS += mkspecs --- -2.29.2 - diff --git a/qt5-base/mingw-w64-static/0018-Merge-shared-and-static-library-trees.patch b/qt5-base/mingw-w64-static/0018-Merge-shared-and-static-library-trees.patch new file mode 120000 index 00000000..4cc69d75 --- /dev/null +++ b/qt5-base/mingw-w64-static/0018-Merge-shared-and-static-library-trees.patch @@ -0,0 +1 @@ +../mingw-w64/0018-Merge-shared-and-static-library-trees.patch \ No newline at end of file diff --git a/qt5-base/mingw-w64-static/0019-Use-.dll.a-as-import-lib-extension.patch b/qt5-base/mingw-w64-static/0019-Use-.dll.a-as-import-lib-extension.patch deleted file mode 100644 index 7ae06611..00000000 --- a/qt5-base/mingw-w64-static/0019-Use-.dll.a-as-import-lib-extension.patch +++ /dev/null @@ -1,98 +0,0 @@ -From ae893f34a059c78cf274d1ed05c2d4c4bfb66218 Mon Sep 17 00:00:00 2001 -From: Martchus -Date: Sun, 18 Sep 2016 18:26:18 +0200 -Subject: [PATCH 19/31] Use *.dll.a as import lib extension - -The variables used here are provided by -g++-win32.conf - -Change-Id: I40acb56685628ed52b3e6b89aab7f53f9a872b1a ---- - mkspecs/features/create_cmake.prf | 5 +++-- - mkspecs/features/qt.prf | 15 ++++++++++++--- - qmake/generators/win32/winmakefile.cpp | 15 +++++++++++---- - 3 files changed, 26 insertions(+), 9 deletions(-) - -diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf -index 593161f362..37689938eb 100644 ---- a/mkspecs/features/create_cmake.prf -+++ b/mkspecs/features/create_cmake.prf -@@ -332,8 +332,9 @@ mac { - CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqt5main$${QT_LIBINFIX}$${debug_suffix}.a - CMAKE_WINMAIN_FILE_LOCATION_RELEASE = libqt5main$${QT_LIBINFIX}.a - -- CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}$${debug_suffix}.a -- CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a -+ isEmpty(QMAKE_EXTENSION_IMPORTLIB): QMAKE_EXTENSION_IMPORTLIB = a -+ CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}$${debug_suffix}.$${QMAKE_EXTENSION_IMPORTLIB} -+ CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.$${QMAKE_EXTENSION_IMPORTLIB} - } else { - CMAKE_WINMAIN_FILE_LOCATION_DEBUG = qt5main$${QT_LIBINFIX}$${debug_suffix}.lib - CMAKE_WINMAIN_FILE_LOCATION_RELEASE = qt5main$${QT_LIBINFIX}.lib -diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf -index 2bc7b1dedd..b79b324b88 100644 ---- a/mkspecs/features/qt.prf -+++ b/mkspecs/features/qt.prf -@@ -216,12 +216,21 @@ for(ever) { - LIBS$$var_sfx += -framework $$framework - } else { - lib = $$MODULE_MODULE$$qtPlatformTargetSuffix() -- win32|contains(MODULE_CONFIG, staticlib) { -+ contains(MODULE_CONFIG, staticlib) { - lib = $$MODULE_LIBS/$$QMAKE_PREFIX_STATICLIB$${lib}.$$QMAKE_EXTENSION_STATICLIB - PRE_TARGETDEPS += $$lib - } else { -- lib = $$MODULE_LIBS/$$QMAKE_PREFIX_SHLIB$${lib}.$$QMAKE_EXTENSION_SHLIB -- } -+ win32 { -+ shared|actually_a_shared_build { -+ lib = $$MODULE_LIBS/$$QMAKE_PREFIX_STATICLIB$${lib}.$$QMAKE_EXTENSION_IMPORTLIB -+ } else { -+ lib = $$MODULE_LIBS/$$QMAKE_PREFIX_STATICLIB$${lib}.$$QMAKE_EXTENSION_STATICLIB -+ } -+ PRE_TARGETDEPS += $$lib -+ } else { -+ lib = $$MODULE_LIBS/$$QMAKE_PREFIX_SHLIB$${lib}.$$QMAKE_EXTENSION_SHLIB -+ } -+ } - LIBS$$var_sfx += $$lib - } - } -diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp -index 183cef2908..03732df4a8 100644 ---- a/qmake/generators/win32/winmakefile.cpp -+++ b/qmake/generators/win32/winmakefile.cpp -@@ -99,9 +99,13 @@ private: - bool - Win32MakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags) - { -- ProStringList impexts = project->values("QMAKE_LIB_EXTENSIONS"); -- if (impexts.isEmpty()) -- impexts = project->values("QMAKE_EXTENSION_STATICLIB"); -+ ProStringList impexts; -+ if (project->isActiveConfig("staticlib")) { -+ impexts.append(project->values("QMAKE_EXTENSION_STATICLIB")); -+ } else { -+ impexts.append(project->values("QMAKE_EXTENSION_IMPORTLIB")); -+ impexts.append(project->values("QMAKE_EXTENSION_STATICLIB")); -+ } - QVector dirs; - int libidx = 0; - for (const ProString &dlib : project->values("QMAKE_DEFAULT_LIBDIRS")) -@@ -283,9 +287,12 @@ void Win32MakefileGenerator::fixTargetExt() - if (!project->values("QMAKE_APP_FLAG").isEmpty()) { - project->values("TARGET_EXT").append(".exe"); - } else if (project->isActiveConfig("shared")) { -+ ProString impext = project->first("QMAKE_EXTENSION_IMPORTLIB"); -+ if (impext.isEmpty()) -+ impext = project->first("QMAKE_PREFIX_STATICLIB"); - project->values("LIB_TARGET").prepend(project->first("QMAKE_PREFIX_STATICLIB") - + project->first("TARGET") + project->first("TARGET_VERSION_EXT") -- + '.' + project->first("QMAKE_EXTENSION_STATICLIB")); -+ + '.' + impext); - project->values("TARGET_EXT").append(project->first("TARGET_VERSION_EXT") + "." - + project->first("QMAKE_EXTENSION_SHLIB")); - project->values("TARGET").first() = project->first("QMAKE_PREFIX_SHLIB") + project->first("TARGET"); --- -2.29.2 - diff --git a/qt5-base/mingw-w64-static/0019-Use-.dll.a-as-import-lib-extension.patch b/qt5-base/mingw-w64-static/0019-Use-.dll.a-as-import-lib-extension.patch new file mode 120000 index 00000000..9808e829 --- /dev/null +++ b/qt5-base/mingw-w64-static/0019-Use-.dll.a-as-import-lib-extension.patch @@ -0,0 +1 @@ +../mingw-w64/0019-Use-.dll.a-as-import-lib-extension.patch \ No newline at end of file diff --git a/qt5-base/mingw-w64-static/0020-Pull-dependencies-of-static-libraries-in-CMake-modul.patch b/qt5-base/mingw-w64-static/0020-Pull-dependencies-of-static-libraries-in-CMake-modul.patch deleted file mode 100644 index 4bcd8f46..00000000 --- a/qt5-base/mingw-w64-static/0020-Pull-dependencies-of-static-libraries-in-CMake-modul.patch +++ /dev/null @@ -1,505 +0,0 @@ -From 1b69d19dd9ef7d00a5eec9a22961c3232e19e5b1 Mon Sep 17 00:00:00 2001 -From: Martchus -Date: Sun, 18 Sep 2016 18:32:00 +0200 -Subject: [PATCH 20/31] Pull dependencies of static libraries in CMake modules - -When doing a static build of Qt, the dependencies of the Qt -libraries and plugins itself must be specified when linking -the final application. - -With Qt 5.13.0 the support for doing that has been re-added. -However, some pieces are still missing and that's what this -patch provides: - -1. Take dependencies of static plugins into account as well -2. Create imported targets for the dependencies to prevent - CMake from adding wrong `-Wl,-Bstatic` and `-Wl,-Bdynamic` - linker flags - -This patch has been harmonized with official changes, e.g. to -use QMAKE_PRL_LIBS instead of QMAKE_PRL_LIBS_FOR_CMAKE. - -See https://github.com/Martchus/PKGBUILDs/issues/86#issuecomment-476840055 -for further details on 2. - -With Qt 5.14.0 the support for using static libraries seems -to be further improved. I had not time to test whether it -actually works so I keep using my own implemention for now. -That's why this patch now removes a lot of the 5.14.0 and 5.15.0 -additions in favour of 'how it used to work'. - -Change-Id: I75a9c91e9ab0dc06a941b576c28f87aef254669c ---- - .../data/cmake/Qt5BasicConfig.cmake.in | 242 +++++++++--------- - .../data/cmake/Qt5PluginTarget.cmake.in | 93 +------ - 2 files changed, 133 insertions(+), 202 deletions(-) - -diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in -index db18dbece6..5a5bc4d61d 100644 ---- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in -+++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in -@@ -52,6 +52,10 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura - set(_lib_deps) - set(_link_flags) - -+ # prefer static libs -+ set(CMAKE_FIND_LIBRARY_SUFFIXES .a .lib) -+ set(CMAKE_FIND_LIBRARY_PREFIXES lib \"\") -+ - !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) - set(_qt5_install_libs \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}\") - !!ELSE -@@ -60,6 +64,10 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura - - if(EXISTS \"${prl_file_location}\") - file(STRINGS \"${prl_file_location}\" _prl_strings REGEX \"QMAKE_PRL_LIBS_FOR_CMAKE[ \\t]*=\") -+ if(NOT _prl_strings) -+ message(WARNING \"Prl file for Qt 5 module $${CMAKE_MODULE_NAME} does not contain QMAKE_PRL_LIBS_FOR_CMAKE. Was looking at \\\"${prl_file_location}\\\".\") -+ return() -+ endif() - - # file(STRINGS) replaces all semicolons read from the file with backslash semicolons. - # We need to do a reverse transformation in CMake. For that we replace all backslash -@@ -91,7 +99,7 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura - # Handle normal libraries passed as -lfoo - set(_lib \"${CMAKE_MATCH_1}\") - foreach(_standard_library ${_standard_libraries}) -- if(_standard_library MATCHES \"^${_lib}(\\\\.lib)?$\") -+ if(_standard_library MATCHES \"^${_lib}(\\\\.lib|\\\\.a)?$\") - set(_lib_is_default_linked TRUE) - break() - endif() -@@ -138,6 +146,37 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura - set(${lib_deps} ${_lib_deps} PARENT_SCOPE) - set(${link_flags} \"SHELL:${_link_flags}\" PARENT_SCOPE) - endfunction() -+ -+if(NOT COMMAND _qt5_add_dependencies) -+ # add dependencies via imported targets so CMake does not mess with their (absolute) file path -+ # which can be problematic with unwanted -Wl,-Bstatic or -Wl,-Bdynamic in the linker line -+ function(_qt5_add_dependencies IMPORTED_TARGET_NAME IMPORTED_TARGET_CONFIG STATIC_DEPENDENCIES) -+ set(DEPENDENCY_INDEX 0) -+ unset(EXTRA_PATHS) -+ unset(DEPENDENCY_TARGETS) -+ -+ foreach(LIBRARY_LOCATION ${STATIC_DEPENDENCIES}) -+ if (TARGET \"${LIBRARY_LOCATION}\") -+ list(APPEND DEPENDENCY_TARGETS \"${LIBRARY_LOCATION}\") -+ continue() -+ endif() -+ set(DEPENDENCY_NAME ${IMPORTED_TARGET_NAME}_DEPENDENCY_${DEPENDENCY_INDEX}) -+ if (NOT TARGET \"${DEPENDENCY_NAME}\") -+ add_library(${DEPENDENCY_NAME} STATIC IMPORTED) -+ set_property(TARGET ${DEPENDENCY_NAME} PROPERTY IMPORTED_LOCATION ${LIBRARY_LOCATION}) -+ endif() -+ list(APPEND DEPENDENCY_TARGETS ${DEPENDENCY_NAME}) -+ math(EXPR DEPENDENCY_INDEX \"${DEPENDENCY_INDEX} + 1\") -+ endforeach() -+ -+ if (\"${IMPORTED_TARGET_CONFIG}\" STREQUAL \"ALL\" OR \"${IMPORTED_TARGET_CONFIG}\" STREQUAL \"RELEASE\") -+ set_property(TARGET ${IMPORTED_TARGET_NAME} PROPERTY INTERFACE_LINK_LIBRARIES ${DEPENDENCY_TARGETS}) -+ endif() -+ if (NOT \"${IMPORTED_TARGET_CONFIG}\" STREQUAL \"ALL\") -+ set_property(TARGET ${IMPORTED_TARGET_NAME} PROPERTY INTERFACE_LINK_LIBRARIES_${IMPORTED_TARGET_CONFIG} ${DEPENDENCY_TARGETS}) -+ endif() -+ endfunction() -+endif() - !!ENDIF - - !!IF !equals(TEMPLATE, aux) -@@ -153,59 +192,36 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI - _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location}) - set(_deps - ${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES} -- ) -- set(_static_deps - !!IF !isEmpty(CMAKE_STATIC_TYPE) - ${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES} - !!ENDIF - ) - -+ # FIXME: handle IsDebugAndRelease like in official version -+ -+!!IF !isEmpty(CMAKE_STATIC_TYPE) - set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES - \"IMPORTED_LOCATION_${Configuration}\" ${imported_location} - !!IF !isEmpty(CMAKE_LIB_SONAME) - \"IMPORTED_SONAME_${Configuration}\" \"$${CMAKE_LIB_SONAME}\" - !!ENDIF -- # For backward compatibility with CMake < 2.8.12 -- \"IMPORTED_LINK_INTERFACE_LIBRARIES_${Configuration}\" \"${_deps};${_static_deps}\" - ) -- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY INTERFACE_LINK_LIBRARIES -- \"${_deps}\" -- ) -- --!!IF !isEmpty(CMAKE_STATIC_TYPE) -- if(NOT "${IsDebugAndRelease}") -- set(_genex_condition \"1\") -- else() -- if("${Configuration}" STREQUAL "DEBUG") -- set(_genex_condition \"$\") -- else() -- set(_genex_condition \"$>\") -- endif() -- endif() -- -- if(_static_deps) -- set(_static_deps_genex \"$<${_genex_condition}:${_static_deps}>\") -- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY INTERFACE_LINK_LIBRARIES -- \"${_static_deps_genex}\" -+ _qt5_add_dependencies(Qt5::$${CMAKE_MODULE_NAME} \"${Configuration}\" \"${_deps}\") -+ if(NOT CMAKE_VERSION VERSION_LESS \"3.13\") -+ set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES -+ \"INTERFACE_LINK_OPTIONS\" \"${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LINK_FLAGS}\" - ) - endif() -- -- set(_static_link_flags \"${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LINK_FLAGS}\") -- if(_static_link_flags) -- set(_static_link_flags_genex \"$<${_genex_condition}:${_static_link_flags}>\") -- if(NOT CMAKE_VERSION VERSION_LESS \"3.13\") -- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY INTERFACE_LINK_OPTIONS -- \"${_static_link_flags_genex}\" -- ) -- else() -- # Abuse INTERFACE_LINK_LIBRARIES to add link flags when CMake version is too low. -- # Strip out SHELL:, because it is not supported in this property. And hope for the best. -- string(REPLACE \"SHELL:\" \"\" _static_link_flags_genex \"${_static_link_flags_genex}\") -- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY INTERFACE_LINK_LIBRARIES -- \"${_static_link_flags_genex}\" -- ) -- endif() -- endif() -+!!ELSE -+ set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES -+ \"INTERFACE_LINK_LIBRARIES_${Configuration}\" \"${_deps}\" -+ \"IMPORTED_LOCATION_${Configuration}\" ${imported_location} -+!!IF !isEmpty(CMAKE_LIB_SONAME) -+ \"IMPORTED_SONAME_${Configuration}\" \"$${CMAKE_LIB_SONAME}\" -+!!ENDIF -+ # For backward compatibility with CMake < 2.8.12 -+ \"IMPORTED_LINK_INTERFACE_LIBRARIES_${Configuration}\" \"${_deps}\" -+ ) - !!ENDIF - - !!IF !isEmpty(CMAKE_WINDOWS_BUILD) -@@ -222,6 +238,15 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI - endif() - !!ENDIF - endmacro() -+ -+macro(_populate_$${CMAKE_MODULE_NAME}_plugin_target_dependencies_from_prl_file PLUGIN_TARGET_NAME PRL_FILE_LOCATION CONFIGURATION LIB_DIRECTORY LIB_LOCATION) -+ _qt5_$${CMAKE_MODULE_NAME}_process_prl_file( -+ \"${PRL_FILE_LOCATION}\" -+ \"${CONFIGURATION}\" -+ _Qt5$${CMAKE_MODULE_NAME}_STATIC_PLUGIN_${CONFIGURATION}_LIB_DEPENDENCIES -+ _Qt5$${CMAKE_MODULE_NAME}_STATIC_PLUGIN_${CONFIGURATION}_LINK_FLAGS) -+ _qt5_add_dependencies(\"${PLUGIN_TARGET_NAME}\" ALL \"${_Qt5$${CMAKE_MODULE_NAME}_STATIC_PLUGIN_${CONFIGURATION}_LIB_DEPENDENCIES}\") -+endmacro() - !!ENDIF - - if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) -@@ -411,13 +436,14 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) - add_library(Qt5::$${CMAKE_MODULE_NAME} STATIC IMPORTED) - set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY IMPORTED_LINK_INTERFACE_LANGUAGES "CXX") - !!ENDIF --!!ELSE -+ -+!!ELSE // !isEmpty(CMAKE_STATIC_TYPE) - !!IF equals(TEMPLATE, aux) - add_library(Qt5::$${CMAKE_MODULE_NAME} INTERFACE IMPORTED) - !!ELSE - add_library(Qt5::$${CMAKE_MODULE_NAME} SHARED IMPORTED) - !!ENDIF --!!ENDIF -+!!ENDIF // !isEmpty(CMAKE_STATIC_TYPE) - - !!IF !equals(TEMPLATE, aux) - !!IF !isEmpty(CMAKE_BUILD_IS_FRAMEWORK) -@@ -449,6 +475,56 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) - - set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY INTERFACE_QT_PLUGIN_TYPES \"$${CMAKE_MODULE_PLUGIN_TYPES}\") - -+ # Find plugin targets -+ file(GLOB pluginTargetsMaybe \"${CMAKE_CURRENT_LIST_DIR}/*Qt5$${CMAKE_MODULE_NAME}_*.cmake\") -+ unset(pluginTargets) -+ if(pluginTargetsMaybe) -+ foreach(pluginTarget ${pluginTargetsMaybe}) -+ file(STRINGS ${pluginTarget} matched REGEX Qt5$${CMAKE_MODULE_NAME}_PLUGINS) -+ if(matched) -+ list(APPEND pluginTargets ${pluginTarget}) -+ endif() -+ endforeach() -+ endif() -+ -+ macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties TARGET_NAME PLUGIN_TARGET_NAME PLUGIN_NAME CONFIG PLUGIN_LOCATION) -+ set_property(TARGET ${PLUGIN_TARGET_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${CONFIG}) -+ -+!!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE) -+ set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") -+!!ELSE -+ set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") -+!!ENDIF -+ _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location}) -+ set_target_properties(${PLUGIN_TARGET_NAME} PROPERTIES -+ \"IMPORTED_LOCATION_${CONFIG}\" ${imported_location} -+ ) -+!!IF !isEmpty(CMAKE_STATIC_TYPE) -+ set_property(TARGET ${TARGET_NAME} APPEND PROPERTY STATIC_PLUGINS ${PLUGIN_NAME}) -+ get_filename_component(_PLUGIN_DIR ${PLUGIN_LOCATION} PATH) -+ get_filename_component(_PLUGIN_DIR_NAME ${_PLUGIN_DIR} NAME) -+ get_filename_component(_PLUGIN_NAME ${PLUGIN_LOCATION} NAME) -+ string(REGEX REPLACE \"^lib(.*)\\\\.a\" \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/lib/qt/plugins/${_PLUGIN_DIR_NAME}/\\\\1.static.prl\" PLUGIN_PRL_FILE_LOCATION ${_PLUGIN_NAME}) -+ if(NOT EXISTS ${PLUGIN_PRL_FILE_LOCATION}) -+ string(REGEX REPLACE \"^lib(.*)\\\\.a\" \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/lib/qt/plugins/${_PLUGIN_DIR_NAME}/\\\\1.prl\" PLUGIN_PRL_FILE_LOCATION ${_PLUGIN_NAME}) -+ endif() -+ if(NOT EXISTS ${PLUGIN_PRL_FILE_LOCATION}) -+ string(REGEX REPLACE \"^lib(.*)\\\\.a\" \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/lib/qt/plugins/${_PLUGIN_DIR_NAME}/lib\\\\1.prl\" PLUGIN_PRL_FILE_LOCATION ${_PLUGIN_NAME}) -+ endif() -+ if(NOT EXISTS ${PLUGIN_PRL_FILE_LOCATION}) -+ message(FATAL_ERROR "The prl file containing dependencies of static plugin ${PLUGIN_TARGET_NAME} of ${TARGET_NAME} could not be found.") -+ endif() -+ _populate_$${CMAKE_MODULE_NAME}_plugin_target_dependencies_from_prl_file(${PLUGIN_TARGET_NAME} ${PLUGIN_PRL_FILE_LOCATION} ${CONFIG} \"lib/qt/plugins\" ${PLUGIN_LOCATION}) -+!!ENDIF -+ -+ endmacro() -+ -+ if(pluginTargets) -+ foreach(pluginTarget ${pluginTargets}) -+ include(${pluginTarget}) -+ endforeach() -+ endif() -+ - set(_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIRS_EXIST TRUE) - foreach (_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIR ${Qt5$${CMAKE_MODULE_NAME}_OWN_PRIVATE_INCLUDE_DIRS}) - if (NOT EXISTS ${_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIR}) -@@ -467,6 +543,9 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) - list(APPEND _Qt5$${CMAKE_MODULE_NAME}_PRIVATEDEPS ${dep}Private) - endif() - endforeach() -+!!IF !isEmpty(CMAKE_STATIC_TYPE) -+ _qt5_add_dependencies(Qt5::$${CMAKE_MODULE_NAME}Private ALL \"Qt5::$${CMAKE_MODULE_NAME};${_Qt5$${CMAKE_MODULE_NAME}_PRIVATEDEPS}\") -+!!ELSE - set_property(TARGET Qt5::$${CMAKE_MODULE_NAME}Private PROPERTY - INTERFACE_LINK_LIBRARIES Qt5::$${CMAKE_MODULE_NAME} ${_Qt5$${CMAKE_MODULE_NAME}_PRIVATEDEPS} - ) -@@ -478,6 +557,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) - INTERFACE_LINK_LIBRARIES \"Qt5::$${CMAKE_MODULE_NAME}Private\" - ) - endif() -+!!ENDIF // CMAKE_STATIC_TYPE - endif() - - !!IF !equals(TEMPLATE, aux) -@@ -547,9 +627,11 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) - !!ELSE - \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" ) - !!ENDIF -- _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE}) --!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD -+ _populate_$${CMAKE_MODULE_NAME}_target_properties(Qt5::$${CMAKE_MODULE_NAME} RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE}) - endif() -+!!ENDIF // CMAKE_STATIC_TYPE -+ -+ - !!ENDIF // CMAKE_RELEASE_TYPE - !!ENDIF // CMAKE_FIND_OTHER_LIBRARY_BUILD - -@@ -560,76 +642,6 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) - ) - !!ENDIF // TEMPLATE != aux - --!!IF isEmpty(CMAKE_INTERNAL_MODULE) -- # In Qt 5.15 the glob pattern was relaxed to also catch plugins not literally named "Plugin". -- # Define QT5_STRICT_PLUGIN_GLOB or ModuleName_STRICT_PLUGIN_GLOB to revert to old behavior. -- if (QT5_STRICT_PLUGIN_GLOB OR Qt5$${CMAKE_MODULE_NAME}_STRICT_PLUGIN_GLOB) -- file(GLOB pluginTargets \"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}_*Plugin.cmake\") -- else() -- file(GLOB pluginTargets \"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}_*.cmake\") -- endif() -- -- macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION -- IsDebugAndRelease) -- set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration}) -- --!!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE) -- set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") --!!ELSE -- set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") --!!ENDIF -- _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location}) -- set_target_properties(Qt5::${Plugin} PROPERTIES -- \"IMPORTED_LOCATION_${Configuration}\" ${imported_location} -- ) -- --!!IF !isEmpty(CMAKE_STATIC_TYPE) -- set(_static_deps -- ${_Qt5${Plugin}_STATIC_${Configuration}_LIB_DEPENDENCIES} -- ) -- -- if(NOT "${IsDebugAndRelease}") -- set(_genex_condition \"1\") -- else() -- if("${Configuration}" STREQUAL "DEBUG") -- set(_genex_condition \"$\") -- else() -- set(_genex_condition \"$>\") -- endif() -- endif() -- if(_static_deps) -- set(_static_deps_genex \"$<${_genex_condition}:${_static_deps}>\") -- set_property(TARGET Qt5::${Plugin} APPEND PROPERTY INTERFACE_LINK_LIBRARIES -- \"${_static_deps_genex}\" -- ) -- endif() -- -- set(_static_link_flags \"${_Qt5${Plugin}_STATIC_${Configuration}_LINK_FLAGS}\") -- if(_static_link_flags) -- set(_static_link_flags_genex \"$<${_genex_condition}:${_static_link_flags}>\") -- if(NOT CMAKE_VERSION VERSION_LESS \"3.13\") -- set_property(TARGET Qt5::${Plugin} APPEND PROPERTY INTERFACE_LINK_OPTIONS -- \"${_static_link_flags_genex}\" -- ) -- else() -- # Abuse INTERFACE_LINK_LIBRARIES to add link flags when CMake version is too low. -- # Strip out SHELL:, because it is not supported in this property. And hope for the best. -- string(REPLACE \"SHELL:\" \"\" _static_link_flags_genex \"${_static_link_flags_genex}\") -- set_property(TARGET Qt5::${Plugin} APPEND PROPERTY INTERFACE_LINK_LIBRARIES -- \"${_static_link_flags_genex}\" -- ) -- endif() -- endif() --!!ENDIF -- endmacro() -- -- if (pluginTargets) -- foreach(pluginTarget ${pluginTargets}) -- include(${pluginTarget}) -- endforeach() -- endif() --!!ENDIF // isEmpty(CMAKE_INTERNAL_MODULE) -- - !!IF !isEmpty(CMAKE_MODULE_EXTRAS) - include(\"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}ConfigExtras.cmake\") - !!ENDIF -diff --git a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in -index b550a52c60..acbe1cc33b 100644 ---- a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in -+++ b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in -@@ -1,5 +1,6 @@ -- --add_library(Qt5::$$CMAKE_PLUGIN_NAME MODULE IMPORTED) -+# Some Qt modules also load plugin target in extra config, so check whether the target already exists -+if(NOT TARGET Qt5::$$CMAKE_PLUGIN_NAME) -+ add_library(Qt5::$$CMAKE_PLUGIN_NAME MODULE IMPORTED) - - !!IF !isEmpty(CMAKE_STATIC_TYPE) - set(_Qt5$${CMAKE_PLUGIN_NAME}_MODULE_DEPENDENCIES \"$${CMAKE_PLUGIN_MODULE_DEPS}\") -@@ -16,99 +17,17 @@ foreach(_module_dep ${_Qt5$${CMAKE_PLUGIN_NAME}_MODULE_DEPENDENCIES}) - endforeach() - - !!IF !isEmpty(CMAKE_RELEASE_TYPE) --!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) --_qt5_$${CMAKE_MODULE_NAME}_process_prl_file( -- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE -- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_RELEASE_LIB_DEPENDENCIES -- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_RELEASE_LINK_FLAGS --) --!!ELSE --_qt5_$${CMAKE_MODULE_NAME}_process_prl_file( -- \"$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE -- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_RELEASE_LIB_DEPENDENCIES -- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_RELEASE_LINK_FLAGS --) -+ _populate_$${CMAKE_MODULE_NAME}_plugin_properties(Qt5::$$CMAKE_MODULE_NAME Qt5::$$CMAKE_PLUGIN_NAME $$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE}\") - !!ENDIF - !!ENDIF - - !!IF !isEmpty(CMAKE_DEBUG_TYPE) --!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) --_qt5_$${CMAKE_MODULE_NAME}_process_prl_file( -- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG -- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_DEBUG_LIB_DEPENDENCIES -- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_DEBUG_LINK_FLAGS --) --!!ELSE --_qt5_$${CMAKE_MODULE_NAME}_process_prl_file( -- \"$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG -- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_DEBUG_LIB_DEPENDENCIES -- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_DEBUG_LINK_FLAGS --) --!!ENDIF --!!ENDIF -- --set_property(TARGET Qt5::$$CMAKE_PLUGIN_NAME PROPERTY INTERFACE_SOURCES -- \"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}_$${CMAKE_PLUGIN_NAME}_Import.cpp\" --) --!!ENDIF -- --!!IF !isEmpty(CMAKE_RELEASE_TYPE) --_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE}) --!!ENDIF --!!IF !isEmpty(CMAKE_DEBUG_TYPE) --_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG}\" $${CMAKE_DEBUG_AND_RELEASE}) -+ _populate_$${CMAKE_MODULE_NAME}_plugin_properties(Qt5::$$CMAKE_MODULE_NAME Qt5::$$CMAKE_PLUGIN_NAME $$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG}\") - !!ENDIF - - list(APPEND Qt5$${CMAKE_MODULE_NAME}_PLUGINS Qt5::$$CMAKE_PLUGIN_NAME) - set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY QT_ALL_PLUGINS_$${CMAKE_PLUGIN_TYPE_ESCAPED} Qt5::$${CMAKE_PLUGIN_NAME}) --!!IF !isEmpty(CMAKE_STATIC_TYPE) --# $ wasn\'t added until CMake 3.12, so put a version guard around it --if(CMAKE_VERSION VERSION_LESS \"3.12\") -- set(_manual_plugins_genex \"$\") -- set(_plugin_type_genex \"$\") -- set(_no_plugins_genex \"$\") --else() -- set(_manual_plugins_genex \"$>\") -- set(_plugin_type_genex \"$>\") -- set(_no_plugins_genex \"$>\") --endif() --set(_user_specified_genex -- \"$\" --) --set(_user_specified_genex_versionless -- \"$\" --) --string(CONCAT _plugin_genex -- \"$<$,\" -- \"$,Qt::$${CMAKE_MODULE_NAME}>,\" -- \"$,>\" -- \">,\" -- \"$>,\" -- \"$>\" -- \">\" -- \">:Qt5::$$CMAKE_PLUGIN_NAME>\" --) --set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY INTERFACE_LINK_LIBRARIES -- ${_plugin_genex} --) --set_property(TARGET Qt5::$${CMAKE_PLUGIN_NAME} APPEND PROPERTY INTERFACE_LINK_LIBRARIES -- \"$${CMAKE_PLUGIN_QT5_MODULE_DEPS}\" --) --!!ENDIF - set_property(TARGET Qt5::$${CMAKE_PLUGIN_NAME} PROPERTY QT_PLUGIN_TYPE \"$$CMAKE_PLUGIN_TYPE\") - set_property(TARGET Qt5::$${CMAKE_PLUGIN_NAME} PROPERTY QT_PLUGIN_EXTENDS \"$$CMAKE_PLUGIN_EXTENDS\") - set_property(TARGET Qt5::$${CMAKE_PLUGIN_NAME} PROPERTY QT_PLUGIN_CLASS_NAME \"$$CMAKE_PLUGIN_NAME\") -+endif() -\ No newline at end of file --- -2.29.2 - diff --git a/qt5-base/mingw-w64-static/0020-Pull-dependencies-of-static-libraries-in-CMake-modul.patch b/qt5-base/mingw-w64-static/0020-Pull-dependencies-of-static-libraries-in-CMake-modul.patch new file mode 120000 index 00000000..a6e6c94a --- /dev/null +++ b/qt5-base/mingw-w64-static/0020-Pull-dependencies-of-static-libraries-in-CMake-modul.patch @@ -0,0 +1 @@ +../mingw-w64/0020-Pull-dependencies-of-static-libraries-in-CMake-modul.patch \ No newline at end of file diff --git a/qt5-base/mingw-w64-static/0021-Allow-usage-of-static-version-with-CMake.patch b/qt5-base/mingw-w64-static/0021-Allow-usage-of-static-version-with-CMake.patch deleted file mode 100644 index 17ed0bed..00000000 --- a/qt5-base/mingw-w64-static/0021-Allow-usage-of-static-version-with-CMake.patch +++ /dev/null @@ -1,1095 +0,0 @@ -From 494194c5b6b2775e756e911f5befde85e9ce13e4 Mon Sep 17 00:00:00 2001 -From: Martchus -Date: Sat, 5 Aug 2017 21:14:26 +0200 -Subject: [PATCH 21/31] Allow usage of static version with CMake - -Allow selecting between dynamic and static Qt versions -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: I75f8ff616ad23038416be6271369f9dcc36f2528 ---- - mkspecs/features/create_cmake.prf | 96 ++++-- - .../data/cmake/Qt5BasicConfig.cmake.in | 311 +++++++++++------- - .../data/cmake/Qt5PluginTarget.cmake.in | 32 +- - .../cmake/Qt5StaticOnlyRedirection.cmake.in | 11 + - src/corelib/Qt5CoreConfigExtras.cmake.in | 26 +- - src/gui/Qt5GuiConfigExtras.cmake.in | 8 +- - src/testlib/Qt5TestConfigExtras.cmake.in | 2 +- - 7 files changed, 319 insertions(+), 167 deletions(-) - create mode 100644 mkspecs/features/data/cmake/Qt5StaticOnlyRedirection.cmake.in - -diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf -index 37689938eb..636a2af9b6 100644 ---- a/mkspecs/features/create_cmake.prf -+++ b/mkspecs/features/create_cmake.prf -@@ -68,7 +68,7 @@ split_incpath { - $$QT_MODULE_INCLUDE_BASE/$${CMAKE_INCLUDE_NAME}/$$eval(QT.$${MODULE}.VERSION)/$${CMAKE_INCLUDE_NAME}) - - cmake_extra_source_includes.input = $$PWD/data/cmake/ExtraSourceIncludes.cmake.in -- cmake_extra_source_includes.output = $$CMAKE_OUT_DIR/Qt5$${CMAKE_MODULE_NAME}/ExtraSourceIncludes.cmake -+ 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 -@@ -118,6 +118,8 @@ win32:!static:!staticlib { - } - - static|staticlib:CMAKE_STATIC_TYPE = true -+static|staticlib:DEFAULT_QT_VARIANT_PREFIX = "Static" -+else:DEFAULT_QT_VARIANT_PREFIX = "" - - internal_module { - CMAKE_INTERNAL_MODULE = true -@@ -214,20 +216,25 @@ contains(CONFIG, plugin) { - win32 { - !mingw|qtConfig(debug_and_release): debug_suffix="d" - -- CMAKE_PRL_FILE_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.prl -- CMAKE_PRL_FILE_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}$${debug_suffix}.prl -- -- isEmpty(CMAKE_STATIC_TYPE) { -+ mingw { - CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.dll - CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}$${debug_suffix}.dll -- } else:mingw { -- CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}.a -- CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}$${debug_suffix}.a -+ CMAKE_PLUGIN_LOCATION_RELEASE_STATIC = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}.a -+ CMAKE_PLUGIN_LOCATION_DEBUG_STATIC = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}$${debug_suffix}.a -+ CMAKE_PRL_FILE_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.prl -+ CMAKE_PRL_FILE_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}$${debug_suffix}.prl -+ CMAKE_PRL_FILE_LOCATION_RELEASE_STATIC = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.static.prl -+ CMAKE_PRL_FILE_LOCATION_DEBUG_STATIC = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}$${debug_suffix}.static.prl - } else { # MSVC static - CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.lib - CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}$${debug_suffix}.lib -+ CMAKE_PLUGIN_LOCATION_RELEASE_STATIC = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.lib -+ CMAKE_PLUGIN_LOCATION_DEBUG_STATIC = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}$${debug_suffix}.lib -+ CMAKE_PRL_FILE_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.prl -+ CMAKE_PRL_FILE_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}$${debug_suffix}.prl - } - } else { -+ # this branch is broken by the patch, only apply when building for Windows - mac { - isEmpty(CMAKE_STATIC_TYPE): CMAKE_PLUGIN_EXT = .dylib - else: CMAKE_PLUGIN_EXT = .a -@@ -247,9 +254,9 @@ contains(CONFIG, plugin) { - } - } - cmake_target_file.input = $$PWD/data/cmake/Qt5PluginTarget.cmake.in -- cmake_target_file.output = $$CMAKE_OUT_DIR/Qt5$${CMAKE_MODULE_NAME}/Qt5$${CMAKE_MODULE_NAME}_$${PLUGIN_CLASS_NAME}.cmake -+ cmake_target_file.output = $$CMAKE_OUT_DIR/$${DEFAULT_QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}/$${DEFAULT_QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_$${PLUGIN_CLASS_NAME}.cmake - cmake_qt5_plugin_import_file.input = $$PWD/data/cmake/Qt5ImportPlugin.cpp.in -- cmake_qt5_plugin_import_file.output = $$CMAKE_OUT_DIR/Qt5$${CMAKE_MODULE_NAME}/Qt5$${CMAKE_MODULE_NAME}_$${PLUGIN_CLASS_NAME}_Import.cpp -+ cmake_qt5_plugin_import_file.output = $$CMAKE_OUT_DIR/$${DEFAULT_QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}/Qt5$${CMAKE_MODULE_NAME}_$${PLUGIN_CLASS_NAME}_Import.cpp - - !build_pass { - QMAKE_SUBSTITUTES += cmake_target_file -@@ -258,7 +265,7 @@ contains(CONFIG, plugin) { - - cmake_qt5_plugin_file.files = $$cmake_target_file.output - static|staticlib: cmake_qt5_plugin_file.files += $$cmake_qt5_plugin_import_file.output -- cmake_qt5_plugin_file.path = $$[QT_INSTALL_LIBS]/cmake/Qt5$${CMAKE_MODULE_NAME} -+ cmake_qt5_plugin_file.path = $$[QT_INSTALL_LIBS]/cmake/$${DEFAULT_QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME} - INSTALLS += cmake_qt5_plugin_file - - return() -@@ -271,30 +278,38 @@ mod_deps = - lib_deps = - aux_mod_deps = - aux_lib_deps = -+aux_compile_defs_static = QT_STATIC QT_DESIGNER_STATIC -+contains(QT_CONFIG, angle): aux_compile_defs += QT_OPENGL_ES_2_ANGLE_STATIC - # 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. - for (dep, sorted_deps) { - cdep = $$cmakeModuleName($$dep) - !contains(QT.$${dep}.module_config, no_link) { -- 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_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, ";") - CMAKE_QT5_MODULE_DEPS = $$join(lib_deps, ";") -+CMAKE_QT5_MODULE_DEPS_STATIC = $$join(lib_deps_static, ";") - CMAKE_INTERFACE_MODULE_DEPS = $$join(aux_mod_deps, ";") - CMAKE_INTERFACE_QT5_MODULE_DEPS = $$join(aux_lib_deps, ";") - CMAKE_MODULE_PLUGIN_TYPES = $$join(QT.$${MODULE}.plugin_types, ";") -+CMAKE_INTERFACE_QT5_MODULE_DEPS_STATIC = $$join(aux_lib_deps_static, ";") -+CMAKE_INTERFACE_COMPILE_DEFINITIONS_STATIC = $$join(aux_compile_defs_static, ";") - - # Interface libraries have to have all properties starting with "INTERFACE_". - CMAKE_FEATURE_PROPERTY_PREFIX = "" - equals(TEMPLATE, aux): CMAKE_FEATURE_PROPERTY_PREFIX = "INTERFACE_" - - mac { -+ # this branch is broken by the patch, only apply when building for Windows - !isEmpty(CMAKE_STATIC_TYPE) { - CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}_debug.a - CMAKE_LIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a -@@ -321,13 +336,6 @@ mac { - CMAKE_LIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}$${debug_suffix}.dll - CMAKE_LIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.dll - -- !isEmpty(CMAKE_STATIC_TYPE) { -- CMAKE_STATIC_WINDOWS_BUILD = "true" -- -- CMAKE_PRL_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}$${debug_suffix}.prl -- CMAKE_PRL_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.prl -- } -- - mingw { - CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqt5main$${QT_LIBINFIX}$${debug_suffix}.a - CMAKE_WINMAIN_FILE_LOCATION_RELEASE = libqt5main$${QT_LIBINFIX}.a -@@ -335,14 +343,30 @@ mac { - isEmpty(QMAKE_EXTENSION_IMPORTLIB): QMAKE_EXTENSION_IMPORTLIB = a - CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}$${debug_suffix}.$${QMAKE_EXTENSION_IMPORTLIB} - CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.$${QMAKE_EXTENSION_IMPORTLIB} -+ CMAKE_PRL_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}$${debug_suffix}.prl -+ CMAKE_PRL_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.prl -+ -+ CMAKE_IMPLIB_FILE_LOCATION_DEBUG_STATIC = lib$${CMAKE_QT_STEM}$${debug_suffix}.a -+ CMAKE_IMPLIB_FILE_LOCATION_RELEASE_STATIC = lib$${CMAKE_QT_STEM}.a -+ CMAKE_PRL_FILE_LOCATION_DEBUG_STATIC = $${CMAKE_QT_STEM}$${debug_suffix}.static.prl -+ CMAKE_PRL_FILE_LOCATION_RELEASE_STATIC = $${CMAKE_QT_STEM}.static.prl -+ - } else { - CMAKE_WINMAIN_FILE_LOCATION_DEBUG = qt5main$${QT_LIBINFIX}$${debug_suffix}.lib - CMAKE_WINMAIN_FILE_LOCATION_RELEASE = qt5main$${QT_LIBINFIX}.lib - - CMAKE_IMPLIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}$${debug_suffix}.lib - CMAKE_IMPLIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.lib -+ CMAKE_PRL_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}$${debug_suffix}.prl -+ CMAKE_PRL_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.prl -+ -+ CMAKE_IMPLIB_FILE_LOCATION_DEBUG_STATIC = $${CMAKE_QT_STEM}$${debug_suffix}.lib -+ CMAKE_IMPLIB_FILE_LOCATION_RELEASE_STATIC = $${CMAKE_QT_STEM}.lib -+ CMAKE_PRL_FILE_LOCATION_DEBUG_STATIC = $${CMAKE_QT_STEM}$${debug_suffix}.static.prl -+ CMAKE_PRL_FILE_LOCATION_RELEASE_STATIC = $${CMAKE_QT_STEM}.static.prl - } - } else { -+ # this branch is broken by the patch, only apply when building for Windows - !isEmpty(CMAKE_STATIC_TYPE) { - CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}.a - CMAKE_LIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a -@@ -362,12 +386,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 -+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 -+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 \ -@@ -377,11 +401,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 -+ 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 - -@@ -393,7 +435,7 @@ cmake_macros_file.input = $$_PRO_FILE_PWD_/Qt5$${CMAKE_MODULE_NAME}Macros.cmake - exists($$cmake_macros_file.input) { - CMAKE_MODULE_MACROS = "true" - -- cmake_macros_file.output = $$CMAKE_OUT_DIR/Qt5$${CMAKE_MODULE_NAME}/Qt5$${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 -@@ -401,7 +443,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} -+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 5a5bc4d61d..97150fb244 100644 ---- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in -+++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in -@@ -2,6 +2,33 @@ if (CMAKE_VERSION VERSION_LESS 3.1.0) - message(FATAL_ERROR \"Qt 5 $${CMAKE_MODULE_NAME} module requires at least CMake version 3.1.0\") - endif() - -+!!IF isEmpty(CMAKE_STATIC_TYPE) -+# "redirect" to static package overriding variant prefix so it does not contain "Static" anymore -+option(USE_STATIC_QT_BY_DEFAULT \"specifies whether to use static Qt by default (rather than via Static-prefix)\" OFF) -+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]\") -@@ -28,15 +55,19 @@ set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\") - - !!IF !equals(TEMPLATE, aux) - # For backwards compatibility only. Use Qt5$${CMAKE_MODULE_NAME}_VERSION instead. --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(${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) -- if(NOT EXISTS \"${file}\" ) -- message(FATAL_ERROR \"The imported target \\\"Qt5::$${CMAKE_MODULE_NAME}\\\" references the file -- \\\"${file}\\\" -+!!IF !isEmpty(CMAKE_STATIC_TYPE) -+macro(_qt5_$${CMAKE_MODULE_NAME}_check_file_exists_static FILE) -+!!ELSE -+macro(_qt5_$${CMAKE_MODULE_NAME}_check_file_exists FILE) -+!!ENDIF -+ if(NOT EXISTS \"${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. -@@ -177,12 +208,24 @@ if(NOT COMMAND _qt5_add_dependencies) - endif() - endfunction() - endif() -+ -+# ensure also regular/dynamic macro exists because it might be used in some extra config -+if(NOT COMMAND _qt5_$${CMAKE_MODULE_NAME}_check_file_exists) -+ macro(_qt5_$${CMAKE_MODULE_NAME}_check_file_exists FILE) -+ _qt5_$${CMAKE_MODULE_NAME}_check_file_exists_static(\"${FILE}\") -+ endmacro() -+endif() - !!ENDIF - - !!IF !equals(TEMPLATE, aux) --macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATION IMPLIB_LOCATION -+!!IF !isEmpty(CMAKE_STATIC_TYPE) -+macro(_populate_$${CMAKE_MODULE_NAME}_target_properties_static TARGET_NAME Configuration LIB_LOCATION IMPLIB_LOCATION -+ IsDebugAndRelease) -+!!ELSE -+macro(_populate_$${CMAKE_MODULE_NAME}_target_properties TARGET_NAME Configuration LIB_LOCATION IMPLIB_LOCATION - IsDebugAndRelease) -- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration}) -+!!ENDIF -+ set_property(TARGET ${TARGET_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration}) - - !!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE) - set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\") -@@ -200,20 +243,20 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI - # FIXME: handle IsDebugAndRelease like in official version - - !!IF !isEmpty(CMAKE_STATIC_TYPE) -- set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES -+ set_target_properties(\"${TARGET_NAME}\" PROPERTIES - \"IMPORTED_LOCATION_${Configuration}\" ${imported_location} - !!IF !isEmpty(CMAKE_LIB_SONAME) - \"IMPORTED_SONAME_${Configuration}\" \"$${CMAKE_LIB_SONAME}\" - !!ENDIF - ) -- _qt5_add_dependencies(Qt5::$${CMAKE_MODULE_NAME} \"${Configuration}\" \"${_deps}\") -+ _qt5_add_dependencies(\"${TARGET_NAME}\" \"${Configuration}\" \"${_deps}\") - if(NOT CMAKE_VERSION VERSION_LESS \"3.13\") -- set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES -+ set_target_properties(\"${TARGET_NAME}\" PROPERTIES - \"INTERFACE_LINK_OPTIONS\" \"${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LINK_FLAGS}\" - ) - endif() - !!ELSE -- set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES -+ set_target_properties(\"${TARGET_NAME}\" PROPERTIES - \"INTERFACE_LINK_LIBRARIES_${Configuration}\" \"${_deps}\" - \"IMPORTED_LOCATION_${Configuration}\" ${imported_location} - !!IF !isEmpty(CMAKE_LIB_SONAME) -@@ -230,9 +273,13 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI - !!ELSE - set(imported_implib \"IMPORTED_IMPLIB_${Configuration}\" \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\") - !!ENDIF -+!!IF !isEmpty(CMAKE_STATIC_TYPE) -+ _qt5_$${CMAKE_MODULE_NAME}_check_file_exists_static(${imported_implib}) -+!!ELSE - _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_implib}) -+!!ENDIF - if(NOT \"${IMPLIB_LOCATION}\" STREQUAL \"\") -- set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES -+ set_target_properties(${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} PROPERTIES - \"IMPORTED_IMPLIB_${Configuration}\" ${imported_implib} - ) - endif() -@@ -249,8 +296,7 @@ macro(_populate_$${CMAKE_MODULE_NAME}_plugin_target_dependencies_from_prl_file P - endmacro() - !!ENDIF - --if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) -- -+if(NOT TARGET ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME}) - !!IF !no_module_headers - !!IF !isEmpty(CMAKE_BUILD_IS_FRAMEWORK) - set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS -@@ -258,46 +304,50 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) - \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Headers\" - ) - !!IF isEmpty(CMAKE_NO_PRIVATE_INCLUDES) -- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS -+ set(${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS - \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/\" - \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/$${MODULE_INCNAME}\" - ) --!!ELSE -- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\") --!!ENDIF --!!ELSE -+!!ELSE // isEmpty(CMAKE_NO_PRIVATE_INCLUDES) -+ set(${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\") -+!!ENDIF // isEmpty(CMAKE_NO_PRIVATE_INCLUDES) -+!!ELSE // !isEmpty(CMAKE_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(${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}\" - ) - !!ELSE -- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\") -+ set(${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\") - !!ENDIF - !!ELSE - set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR\" \"$${CMAKE_INCLUDE_DIR}$${CMAKE_INCLUDE_NAME}\") - !!IF isEmpty(CMAKE_NO_PRIVATE_INCLUDES) -- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS -+ set(${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS - \"$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION\" - \"$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION/$${MODULE_INCNAME}\" - ) --!!ELSE -- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\") --!!ENDIF --!!ENDIF --!!ENDIF -+!!ELSE // isEmpty(CMAKE_NO_PRIVATE_INCLUDES) -+ 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) - !!IF !isEmpty(CMAKE_ADD_SOURCE_INCLUDE_DIRS) - include(\"${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake\" OPTIONAL) - !!ENDIF - !!ELSE - set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS \"\") -- set(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}) -+!!IF !isEmpty(CMAKE_STATIC_TYPE) -+ _qt5_$${CMAKE_MODULE_NAME}_check_file_exists_static(${_dir}) -+!!ELSE - _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${_dir}) -+!!ENDIF - endforeach() - - !!IF isEmpty(CMAKE_BUILD_IS_FRAMEWORK) -@@ -306,16 +356,20 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) - list(FIND Qt5$${CMAKE_MODULE_NAME}_FIND_COMPONENTS Private _check_private) - if (NOT _check_private STREQUAL -1) - foreach(_dir ${Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS}) -+!!IF !isEmpty(CMAKE_STATIC_TYPE) -+ _qt5_$${CMAKE_MODULE_NAME}_check_file_exists_static(${_dir}) -+!!ELSE - _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${_dir}) -+!!ENDIF - endforeach() - endif() - !!ENDIF - - !!IF !equals(TEMPLATE, aux) -- set(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_DEFINES}) -+ set(${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_DEFINITIONS -D$${MODULE_DEFINE}) -+ set(${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_COMPILE_DEFINITIONS $${MODULE_DEFINES}) - !!ENDIF // TEMPLATE != aux - set(_Qt5$${CMAKE_MODULE_NAME}_MODULE_DEPENDENCIES \"$${CMAKE_MODULE_DEPS}\") - -@@ -323,10 +377,10 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) - list(APPEND _Qt5$${CMAKE_MODULE_NAME}_MODULE_DEPENDENCIES \"$${CMAKE_INTERFACE_MODULE_DEPS}\") - !!ENDIF - -- set(Qt5$${CMAKE_MODULE_NAME}_OWN_PRIVATE_INCLUDE_DIRS ${Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS}) -+ 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 (${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) -@@ -334,17 +388,17 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) - set(_Qt5$${CMAKE_MODULE_NAME}_DEPENDENCIES_FIND_QUIET QUIET) - endif() - set(_Qt5$${CMAKE_MODULE_NAME}_FIND_VERSION_EXACT) -- if (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(${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 ${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} -@@ -352,25 +406,25 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) - ) - endif() - -- if (NOT Qt5${_module_dep}_FOUND) -- set(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() - - !!IF !equals(TEMPLATE, aux) -- list(APPEND Qt5$${CMAKE_MODULE_NAME}_INCLUDE_DIRS \"${Qt5${_module_dep}_INCLUDE_DIRS}\") -- list(APPEND Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"${Qt5${_module_dep}_PRIVATE_INCLUDE_DIRS}\") -- 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 ${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) -- list(REMOVE_DUPLICATES Qt5$${CMAKE_MODULE_NAME}_INCLUDE_DIRS) -- list(REMOVE_DUPLICATES Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS) -- 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 ${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 - - # It can happen that the same FooConfig.cmake file is included when calling find_package() -@@ -385,11 +439,16 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) - # - # Make sure to return early in the original Config inclusion, because the target has already - # been defined as part of the second inclusion. -- if(TARGET Qt5::$${CMAKE_MODULE_NAME}) -+ set(TARGET_NAME ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME}) -+ if(TARGET ${TARGET_NAME}) - return() - endif() - -+!!IF !isEmpty(CMAKE_STATIC_TYPE) -+ set(_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES \"$${CMAKE_QT5_MODULE_DEPS_STATIC}\") -+!!ELSE - set(_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES \"$${CMAKE_QT5_MODULE_DEPS}\") -+!!ENDIF - - !!IF !isEmpty(CMAKE_INTERFACE_QT5_MODULE_DEPS) - list(APPEND _Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES \"$${CMAKE_INTERFACE_QT5_MODULE_DEPS}\") -@@ -400,13 +459,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) - !!IF !isEmpty(CMAKE_DEBUG_TYPE) - !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) - _qt5_$${CMAKE_MODULE_NAME}_process_prl_file( -- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG -+ \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG_STATIC}\" DEBUG - _Qt5$${CMAKE_MODULE_NAME}_STATIC_DEBUG_LIB_DEPENDENCIES - _Qt5$${CMAKE_MODULE_NAME}_STATIC_DEBUG_LINK_FLAGS - ) - !!ELSE - _qt5_$${CMAKE_MODULE_NAME}_process_prl_file( -- \"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG -+ \"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG_STATIC}\" DEBUG - _Qt5$${CMAKE_MODULE_NAME}_STATIC_DEBUG_LIB_DEPENDENCIES - _Qt5$${CMAKE_MODULE_NAME}_STATIC_DEBUG_LINK_FLAGS - ) -@@ -416,13 +475,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) - !!IF !isEmpty(CMAKE_RELEASE_TYPE) - !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) - _qt5_$${CMAKE_MODULE_NAME}_process_prl_file( -- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE -+ \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE_STATIC}\" RELEASE - _Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LIB_DEPENDENCIES - _Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LINK_FLAGS - ) - !!ELSE - _qt5_$${CMAKE_MODULE_NAME}_process_prl_file( -- \"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE -+ \"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE_STATIC}\" RELEASE - _Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LIB_DEPENDENCIES - _Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LINK_FLAGS - ) -@@ -431,49 +490,60 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) - endif() - - !!IF equals(TEMPLATE, aux) -- add_library(Qt5::$${CMAKE_MODULE_NAME} INTERFACE IMPORTED) -+ add_library(${TARGET_NAME} INTERFACE IMPORTED) - !!ELSE -- add_library(Qt5::$${CMAKE_MODULE_NAME} STATIC IMPORTED) -- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY IMPORTED_LINK_INTERFACE_LANGUAGES "CXX") -+ add_library(${TARGET_NAME} STATIC IMPORTED) -+ set_property(TARGET ${TARGET_NAME} PROPERTY IMPORTED_LINK_INTERFACE_LANGUAGES "CXX") - !!ENDIF - - !!ELSE // !isEmpty(CMAKE_STATIC_TYPE) - !!IF equals(TEMPLATE, aux) -- add_library(Qt5::$${CMAKE_MODULE_NAME} INTERFACE IMPORTED) -+ add_library(${TARGET_NAME} INTERFACE IMPORTED) - !!ELSE -- add_library(Qt5::$${CMAKE_MODULE_NAME} SHARED IMPORTED) -+ add_library(${TARGET_NAME} SHARED IMPORTED) - !!ENDIF - !!ENDIF // !isEmpty(CMAKE_STATIC_TYPE) - - !!IF !equals(TEMPLATE, aux) - !!IF !isEmpty(CMAKE_BUILD_IS_FRAMEWORK) -- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY FRAMEWORK 1) -+ set_property(TARGET ${TARGET_NAME} PROPERTY FRAMEWORK 1) -+!!ENDIF -+!!ENDIF // TEMPLATE != aux -+ -+!!IF !equals(TEMPLATE, aux) -+!!IF !isEmpty(CMAKE_BUILD_IS_FRAMEWORK) -+ set_property(TARGET ${TARGET_NAME} PROPERTY FRAMEWORK 1) - !!ENDIF - !!ENDIF // TEMPLATE != aux - -- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY -+ set_property(TARGET ${TARGET_NAME} PROPERTY - INTERFACE_INCLUDE_DIRECTORIES ${_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS}) -- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY -- INTERFACE_COMPILE_DEFINITIONS $${MODULE_DEFINES}) -+!!IF !isEmpty(CMAKE_STATIC_TYPE) -+ set_property(TARGET ${TARGET_NAME} PROPERTY -+ INTERFACE_COMPILE_DEFINITIONS $${CMAKE_INTERFACE_COMPILE_DEFINITIONS_STATIC} $${MODULE_DEFINES}) -+!!ELSE -+ set_property(TARGET ${TARGET_NAME} PROPERTY -+ INTERFACE_COMPILE_DEFINITIONS $${MODULE_DEFINES}) -+!!ENDIF - -- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY INTERFACE_QT_ENABLED_FEATURES $$join(QT.$${MODULE}.enabled_features, ";")) -- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY INTERFACE_QT_DISABLED_FEATURES $$join(QT.$${MODULE}.disabled_features, ";")) -+ set_property(TARGET ${TARGET_NAME} PROPERTY INTERFACE_QT_ENABLED_FEATURES $$join(QT.$${MODULE}.enabled_features, ";")) -+ set_property(TARGET ${TARGET_NAME} PROPERTY INTERFACE_QT_DISABLED_FEATURES $$join(QT.$${MODULE}.disabled_features, ";")) - - # Qt 6 forward compatible properties. -- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} -+ set_property(TARGET ${TARGET_NAME} - PROPERTY $${CMAKE_FEATURE_PROPERTY_PREFIX}QT_ENABLED_PUBLIC_FEATURES - $$join(QT.$${MODULE}.enabled_features, ";")) -- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} -+ set_property(TARGET ${TARGET_NAME} - PROPERTY $${CMAKE_FEATURE_PROPERTY_PREFIX}QT_DISABLED_PUBLIC_FEATURES - $$join(QT.$${MODULE}.disabled_features, ";")) -- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} -+ set_property(TARGET ${TARGET_NAME} - PROPERTY $${CMAKE_FEATURE_PROPERTY_PREFIX}QT_ENABLED_PRIVATE_FEATURES - $$join(QT.$${MODULE}_private.enabled_features, ";")) -- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} -+ set_property(TARGET ${TARGET_NAME} - PROPERTY $${CMAKE_FEATURE_PROPERTY_PREFIX}QT_DISABLED_PRIVATE_FEATURES - $$join(QT.$${MODULE}_private.disabled_features, ";")) - -- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY INTERFACE_QT_PLUGIN_TYPES \"$${CMAKE_MODULE_PLUGIN_TYPES}\") -+ set_property(TARGET ${TARGET_NAME} PROPERTY INTERFACE_QT_PLUGIN_TYPES \"$${CMAKE_MODULE_PLUGIN_TYPES}\") - - # Find plugin targets - file(GLOB pluginTargetsMaybe \"${CMAKE_CURRENT_LIST_DIR}/*Qt5$${CMAKE_MODULE_NAME}_*.cmake\") -@@ -487,7 +557,11 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) - endforeach() - endif() - -+!!IF !isEmpty(CMAKE_STATIC_TYPE) -+ macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties_static TARGET_NAME PLUGIN_TARGET_NAME PLUGIN_NAME CONFIG PLUGIN_LOCATION) -+!!ELSE - macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties TARGET_NAME PLUGIN_TARGET_NAME PLUGIN_NAME CONFIG PLUGIN_LOCATION) -+!!ENDIF - set_property(TARGET ${PLUGIN_TARGET_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${CONFIG}) - - !!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE) -@@ -495,7 +569,11 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) - !!ELSE - set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") - !!ENDIF -+!!IF !isEmpty(CMAKE_STATIC_TYPE) -+ _qt5_$${CMAKE_MODULE_NAME}_check_file_exists_static(${imported_location}) -+!!ELSE - _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location}) -+!!ENDIF - set_target_properties(${PLUGIN_TARGET_NAME} PROPERTIES - \"IMPORTED_LOCATION_${CONFIG}\" ${imported_location} - ) -@@ -525,17 +603,20 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) - endforeach() - endif() - -+ # set TARGET_NAME back to current module (when loading plugin targets other modules might have been loaded in the meantime) -+ set(TARGET_NAME ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME}) -+ - set(_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIRS_EXIST TRUE) -- foreach (_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIR ${Qt5$${CMAKE_MODULE_NAME}_OWN_PRIVATE_INCLUDE_DIRS}) -+ foreach (_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIR ${${TARGET_NAME}_OWN_PRIVATE_INCLUDE_DIRS}) - if (NOT EXISTS ${_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIR}) - set(_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIRS_EXIST FALSE) - endif() - endforeach() - - if (_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIRS_EXIST) -- add_library(Qt5::$${CMAKE_MODULE_NAME}Private INTERFACE IMPORTED) -- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME}Private PROPERTY -- INTERFACE_INCLUDE_DIRECTORIES ${Qt5$${CMAKE_MODULE_NAME}_OWN_PRIVATE_INCLUDE_DIRS} -+ add_library(${TARGET_NAME}Private INTERFACE IMPORTED) -+ set_property(TARGET ${TARGET_NAME}Private PROPERTY -+ INTERFACE_INCLUDE_DIRECTORIES ${${TARGET_NAME}_OWN_PRIVATE_INCLUDE_DIRS} - ) - set(_Qt5$${CMAKE_MODULE_NAME}_PRIVATEDEPS) - foreach(dep ${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}) -@@ -544,17 +625,18 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) - endif() - endforeach() - !!IF !isEmpty(CMAKE_STATIC_TYPE) -- _qt5_add_dependencies(Qt5::$${CMAKE_MODULE_NAME}Private ALL \"Qt5::$${CMAKE_MODULE_NAME};${_Qt5$${CMAKE_MODULE_NAME}_PRIVATEDEPS}\") -+ _qt5_add_dependencies(${TARGET_NAME}Private ALL -+ \"${TARGET_NAME};${_Qt5$${CMAKE_MODULE_NAME}_PRIVATEDEPS}\") - !!ELSE -- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME}Private PROPERTY -- INTERFACE_LINK_LIBRARIES Qt5::$${CMAKE_MODULE_NAME} ${_Qt5$${CMAKE_MODULE_NAME}_PRIVATEDEPS} -+ set_property(TARGET ${TARGET_NAME}Private PROPERTY -+ INTERFACE_LINK_LIBRARIES ${TARGET_NAME} ${_Qt5$${CMAKE_MODULE_NAME}_PRIVATEDEPS} - ) - - # Add a versionless target, for compatibility with Qt6. -- if(NOT \"${QT_NO_CREATE_VERSIONLESS_TARGETS}\" AND NOT TARGET Qt::$${CMAKE_MODULE_NAME}Private) -- add_library(Qt::$${CMAKE_MODULE_NAME}Private INTERFACE IMPORTED) -- set_target_properties(Qt::$${CMAKE_MODULE_NAME}Private PROPERTIES -- INTERFACE_LINK_LIBRARIES \"Qt5::$${CMAKE_MODULE_NAME}Private\" -+ if(NOT \"${QT_NO_CREATE_VERSIONLESS_TARGETS}\" AND NOT TARGET ${QT_VARIANT_PREFIX}Qt::$${CMAKE_MODULE_NAME}Private) -+ add_library(${QT_VARIANT_PREFIX}Qt::$${CMAKE_MODULE_NAME}Private INTERFACE IMPORTED) -+ set_target_properties(${QT_VARIANT_PREFIX}Qt::$${CMAKE_MODULE_NAME}Private PROPERTIES -+ INTERFACE_LINK_LIBRARIES \"${TARGET_NAME}Private\" - ) - endif() - !!ENDIF // CMAKE_STATIC_TYPE -@@ -562,59 +644,61 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) - - !!IF !equals(TEMPLATE, aux) - !!IF !isEmpty(CMAKE_RELEASE_TYPE) --!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD) -- _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" \"\" $${CMAKE_DEBUG_AND_RELEASE}) -+!!IF !isEmpty(CMAKE_STATIC_TYPE) -+ _populate_$${CMAKE_MODULE_NAME}_target_properties_static(${TARGET_NAME} RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE_STATIC}\" \"\" $${CMAKE_DEBUG_AND_RELEASE}) - !!ELSE -- _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE}) --!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD -+ _populate_$${CMAKE_MODULE_NAME}_target_properties(${TARGET_NAME} RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE}) -+!!ENDIF // CMAKE_STATIC_TYPE -+ - - !!IF !isEmpty(CMAKE_FIND_OTHER_LIBRARY_BUILD) - !!IF isEmpty(CMAKE_DEBUG_TYPE) --!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD) -+!!IF !isEmpty(CMAKE_STATIC_TYPE) - !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) -- if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) -+ if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG_STATIC}\" ) - !!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE - if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) - !!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE -- _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" \"\" $${CMAKE_DEBUG_AND_RELEASE}) --!!ELSE // CMAKE_STATIC_WINDOWS_BUILD -+ _populate_$${CMAKE_MODULE_NAME}_target_properties_static(${TARGET_NAME} DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG_STATIC}\" \"\" $${CMAKE_DEBUG_AND_RELEASE}) -+ endif() -+!!ELSE // CMAKE_STATIC_TYPE - if (EXISTS - !!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE) - \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" - !!ELSE - \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" - !!ENDIF -- AND EXISTS -+ AND EXISTS - !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) - \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) - !!ELSE - \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) - !!ENDIF -- _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" $${CMAKE_DEBUG_AND_RELEASE}) --!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD -+ _populate_$${CMAKE_MODULE_NAME}_target_properties(${TARGET_NAME} DEBUG \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" $${CMAKE_DEBUG_AND_RELEASE}) - endif() -+!!ENDIF // CMAKE_STATIC_TYPE - !!ENDIF // CMAKE_DEBUG_TYPE - !!ENDIF // CMAKE_FIND_OTHER_LIBRARY_BUILD -- - !!ENDIF // CMAKE_RELEASE_TYPE - - !!IF !isEmpty(CMAKE_DEBUG_TYPE) --!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD) -- _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" \"\" $${CMAKE_DEBUG_AND_RELEASE}) -+!!IF !isEmpty(CMAKE_STATIC_TYPE) -+ _populate_$${CMAKE_MODULE_NAME}_target_properties_static(DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" \"\" $${CMAKE_DEBUG_AND_RELEASE}) - !!ELSE - _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" $${CMAKE_DEBUG_AND_RELEASE}) --!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD -+!!ENDIF // CMAKE_STATIC_TYPE - - !!IF !isEmpty(CMAKE_FIND_OTHER_LIBRARY_BUILD) - !!IF isEmpty(CMAKE_RELEASE_TYPE) --!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD) -+ -+!!IF !isEmpty(CMAKE_STATIC_TYPE) - !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) -- if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" ) -+ if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE_STATIC}\" ) - !!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE -- if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" ) -+ if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE_STATIC}\" ) - !!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE -- _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" \"\" $${CMAKE_DEBUG_AND_RELEASE}) --!!ELSE // CMAKE_STATIC_WINDOWS_BUILD -+ _populate_$${CMAKE_MODULE_NAME}_target_properties_static(${TARGET_NAME} RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE_STATIC}\" \"\" $${CMAKE_DEBUG_AND_RELEASE}) -+!!ELSE // CMAKE_STATIC_TYPE - if (EXISTS - !!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE) - \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" -@@ -627,7 +711,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) - !!ELSE - \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" ) - !!ENDIF -- _populate_$${CMAKE_MODULE_NAME}_target_properties(Qt5::$${CMAKE_MODULE_NAME} RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE}) -+ _populate_$${CMAKE_MODULE_NAME}_target_properties(${TARGET_NAME} RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE}) - endif() - !!ENDIF // CMAKE_STATIC_TYPE - -@@ -637,26 +721,29 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) - - !!ENDIF // CMAKE_DEBUG_TYPE - !!ELSE // TEMPLATE != aux -- set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES -+ set_target_properties(${TARGET_NAME} PROPERTIES - INTERFACE_LINK_LIBRARIES \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}\" - ) - !!ENDIF // TEMPLATE != aux - - !!IF !isEmpty(CMAKE_MODULE_EXTRAS) -- include(\"${CMAKE_CURRENT_LIST_DIR}/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}/../${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}/../${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}/${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}ConfigVersion.cmake\") -+!!ELSE -+ _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(\"${CMAKE_CURRENT_LIST_DIR}/../${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}/${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}ConfigVersion.cmake\") -+!!ENDIF - endif() - - # Add a versionless target, for compatibility with Qt6. --if(NOT \"${QT_NO_CREATE_VERSIONLESS_TARGETS}\" AND TARGET Qt5::$${CMAKE_MODULE_NAME} AND NOT TARGET Qt::$${CMAKE_MODULE_NAME}) -- add_library(Qt::$${CMAKE_MODULE_NAME} INTERFACE IMPORTED) -- set_target_properties(Qt::$${CMAKE_MODULE_NAME} PROPERTIES -- INTERFACE_LINK_LIBRARIES \"Qt5::$${CMAKE_MODULE_NAME}\" -+if(NOT \"${QT_NO_CREATE_VERSIONLESS_TARGETS}\" AND TARGET ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} AND NOT TARGET ${QT_VARIANT_PREFIX}Qt::$${CMAKE_MODULE_NAME}) -+ add_library(${QT_VARIANT_PREFIX}Qt::$${CMAKE_MODULE_NAME} INTERFACE IMPORTED) -+ set_target_properties(${QT_VARIANT_PREFIX}Qt::$${CMAKE_MODULE_NAME} PROPERTIES -+ INTERFACE_LINK_LIBRARIES \"${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME}\" - ) - endif() -diff --git a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in -index acbe1cc33b..65869c5122 100644 ---- a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in -+++ b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in -@@ -1,13 +1,13 @@ - # Some Qt modules also load plugin target in extra config, so check whether the target already exists --if(NOT TARGET Qt5::$$CMAKE_PLUGIN_NAME) -- add_library(Qt5::$$CMAKE_PLUGIN_NAME MODULE IMPORTED) -+if(NOT TARGET ${QT_VARIANT_PREFIX}Qt5::$$CMAKE_PLUGIN_NAME) -+ add_library(${QT_VARIANT_PREFIX}Qt5::$$CMAKE_PLUGIN_NAME MODULE IMPORTED) - - !!IF !isEmpty(CMAKE_STATIC_TYPE) - set(_Qt5$${CMAKE_PLUGIN_NAME}_MODULE_DEPENDENCIES \"$${CMAKE_PLUGIN_MODULE_DEPS}\") - - foreach(_module_dep ${_Qt5$${CMAKE_PLUGIN_NAME}_MODULE_DEPENDENCIES}) -- if(NOT Qt5${_module_dep}_FOUND) -- find_package(Qt5${_module_dep} -+ if(NOT ${QT_VARIANT_PREFIX}Qt5${_module_dep}_FOUND) -+ find_package(${QT_VARIANT_PREFIX}Qt5${_module_dep} - $$VERSION ${_Qt5$${CMAKE_MODULE_NAME}_FIND_VERSION_EXACT} - ${_Qt5$${CMAKE_MODULE_NAME}_DEPENDENCIES_FIND_QUIET} - ${_Qt5$${CMAKE_MODULE_NAME}_FIND_DEPENDENCIES_REQUIRED} -@@ -17,17 +17,25 @@ foreach(_module_dep ${_Qt5$${CMAKE_PLUGIN_NAME}_MODULE_DEPENDENCIES}) - endforeach() - - !!IF !isEmpty(CMAKE_RELEASE_TYPE) -- _populate_$${CMAKE_MODULE_NAME}_plugin_properties(Qt5::$$CMAKE_MODULE_NAME Qt5::$$CMAKE_PLUGIN_NAME $$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE}\") -+!!IF !isEmpty(CMAKE_STATIC_TYPE) -+ _populate_$${CMAKE_MODULE_NAME}_plugin_properties_static(${QT_VARIANT_PREFIX}Qt5::$$CMAKE_MODULE_NAME ${QT_VARIANT_PREFIX}Qt5::$$CMAKE_PLUGIN_NAME $$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE_STATIC}\") -+!!ELSE -+ _populate_$${CMAKE_MODULE_NAME}_plugin_properties(${QT_VARIANT_PREFIX}Qt5::$$CMAKE_MODULE_NAME ${QT_VARIANT_PREFIX}Qt5::$$CMAKE_PLUGIN_NAME $$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE}\") -+!!ENDIF - !!ENDIF - !!ENDIF - - !!IF !isEmpty(CMAKE_DEBUG_TYPE) -- _populate_$${CMAKE_MODULE_NAME}_plugin_properties(Qt5::$$CMAKE_MODULE_NAME Qt5::$$CMAKE_PLUGIN_NAME $$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG}\") -+!!IF !isEmpty(CMAKE_STATIC_TYPE) -+ _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(${QT_VARIANT_PREFIX}Qt5::$$CMAKE_MODULE_NAME ${QT_VARIANT_PREFIX}Qt5::$$CMAKE_PLUGIN_NAME $$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG}\") -+!!ENDIF - !!ENDIF - --list(APPEND Qt5$${CMAKE_MODULE_NAME}_PLUGINS Qt5::$$CMAKE_PLUGIN_NAME) --set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY QT_ALL_PLUGINS_$${CMAKE_PLUGIN_TYPE_ESCAPED} Qt5::$${CMAKE_PLUGIN_NAME}) --set_property(TARGET Qt5::$${CMAKE_PLUGIN_NAME} PROPERTY QT_PLUGIN_TYPE \"$$CMAKE_PLUGIN_TYPE\") --set_property(TARGET Qt5::$${CMAKE_PLUGIN_NAME} PROPERTY QT_PLUGIN_EXTENDS \"$$CMAKE_PLUGIN_EXTENDS\") --set_property(TARGET Qt5::$${CMAKE_PLUGIN_NAME} PROPERTY QT_PLUGIN_CLASS_NAME \"$$CMAKE_PLUGIN_NAME\") --endif() -\ No newline at end of file -+list(APPEND ${QT_VARIANT_PREFIX}Qt5$${CMAKE_MODULE_NAME}_PLUGINS ${QT_VARIANT_PREFIX}Qt5::$$CMAKE_PLUGIN_NAME) -+set_property(TARGET ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY QT_ALL_PLUGINS_$${CMAKE_PLUGIN_TYPE_ESCAPED} ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_PLUGIN_NAME}) -+set_property(TARGET ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_PLUGIN_NAME} PROPERTY QT_PLUGIN_TYPE \"$$CMAKE_PLUGIN_TYPE\") -+set_property(TARGET ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_PLUGIN_NAME} PROPERTY QT_PLUGIN_EXTENDS \"$$CMAKE_PLUGIN_EXTENDS\") -+set_property(TARGET ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_PLUGIN_NAME} PROPERTY QT_PLUGIN_CLASS_NAME \"$$CMAKE_PLUGIN_NAME\") -+endif() -diff --git a/mkspecs/features/data/cmake/Qt5StaticOnlyRedirection.cmake.in b/mkspecs/features/data/cmake/Qt5StaticOnlyRedirection.cmake.in -new file mode 100644 -index 0000000000..0091940fd2 ---- /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/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in -index 0d02edb41c..9da1361c95 100644 ---- a/src/corelib/Qt5CoreConfigExtras.cmake.in -+++ b/src/corelib/Qt5CoreConfigExtras.cmake.in -@@ -2,6 +2,8 @@ if(NOT DEFINED QT_DEFAULT_MAJOR_VERSION) - set(QT_DEFAULT_MAJOR_VERSION 5) - endif() - -+set(IMPORTED_TARGET_NAME ${QT_VARIANT_PREFIX}Qt5::$${CMAKE_MODULE_NAME}) -+ - if (NOT TARGET Qt5::qmake) - add_executable(Qt5::qmake IMPORTED) - -@@ -55,12 +57,12 @@ set(Qt5Core_QMAKE_EXECUTABLE Qt5::qmake) - set(Qt5Core_MOC_EXECUTABLE Qt5::moc) - set(Qt5Core_RCC_EXECUTABLE Qt5::rcc) - --set_property(TARGET Qt5::Core PROPERTY INTERFACE_QT_MAJOR_VERSION 5) --set_property(TARGET Qt5::Core PROPERTY INTERFACE_QT_COORD_TYPE $$QT_COORD_TYPE) -+set_property(TARGET ${IMPORTED_TARGET_NAME} PROPERTY INTERFACE_QT_MAJOR_VERSION 5) -+set_property(TARGET ${IMPORTED_TARGET_NAME} PROPERTY INTERFACE_QT_COORD_TYPE $$QT_COORD_TYPE) - !!IF !isEmpty(CMAKE_MIN_DARWIN_DEPLOYMENT_TARGET) --set_property(TARGET Qt5::Core PROPERTY QT_DARWIN_MIN_DEPLOYMENT_TARGET \"$$CMAKE_MIN_DARWIN_DEPLOYMENT_TARGET\") -+set_property(TARGET ${IMPORTED_TARGET_NAME} PROPERTY QT_DARWIN_MIN_DEPLOYMENT_TARGET \"$$CMAKE_MIN_DARWIN_DEPLOYMENT_TARGET\") - !!ENDIF --set_property(TARGET Qt5::Core APPEND PROPERTY -+set_property(TARGET ${IMPORTED_TARGET_NAME} APPEND PROPERTY - COMPATIBLE_INTERFACE_STRING QT_MAJOR_VERSION QT_COORD_TYPE - ) - -@@ -71,7 +73,7 @@ foreach(_dir ${_qt5_corelib_extra_includes}) - endforeach() - - list(APPEND Qt5Core_INCLUDE_DIRS ${_qt5_corelib_extra_includes}) --set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${_qt5_corelib_extra_includes}) -+set_property(TARGET ${IMPORTED_TARGET_NAME} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${_qt5_corelib_extra_includes}) - set(_qt5_corelib_extra_includes) - - # Targets using Qt need to use the POSITION_INDEPENDENT_CODE property. The -@@ -86,7 +88,7 @@ set(Qt5_POSITION_INDEPENDENT_CODE True) - # Applications now need to be compiled with the -fPIC option if the Qt option - # \"reduce relocations\" is active. For backward compatibility only, Qt accepts - # the use of -fPIE for GCC 4.x versions. --set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_COMPILE_OPTIONS $$QMAKE_CXXFLAGS_APP) -+set_property(TARGET ${IMPORTED_TARGET_NAME} APPEND PROPERTY INTERFACE_COMPILE_OPTIONS $$QMAKE_CXXFLAGS_APP) - - # TODO Qt6: Remove - set(Qt5Core_EXECUTABLE_COMPILE_FLAGS \"\") -@@ -94,7 +96,7 @@ set(Qt5Core_EXECUTABLE_COMPILE_FLAGS \"\") - !!IF !isEmpty(QT_NAMESPACE) - list(APPEND Qt5Core_DEFINITIONS -DQT_NAMESPACE=$$QT_NAMESPACE) - list(APPEND Qt5Core_COMPILE_DEFINITIONS QT_NAMESPACE=$$QT_NAMESPACE) --set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS QT_NAMESPACE=$$QT_NAMESPACE) -+set_property(TARGET ${IMPORTED_TARGET_NAME} APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS QT_NAMESPACE=$$QT_NAMESPACE) - !!ENDIF - - !!IF !isEmpty(CMAKE_DISABLED_FEATURES) -@@ -103,9 +105,9 @@ set(Qt5_DISABLED_FEATURES - ) - !!ENDIF - --set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS $<$>:QT_NO_DEBUG>) -+set_property(TARGET ${IMPORTED_TARGET_NAME} APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS $<$>:QT_NO_DEBUG>) - --set_property(TARGET Qt5::Core PROPERTY INTERFACE_COMPILE_FEATURES cxx_decltype) -+set_property(TARGET ${IMPORTED_TARGET_NAME} PROPERTY INTERFACE_COMPILE_FEATURES cxx_decltype) - - !!IF qtConfig(reduce_exports) - set(QT_VISIBILITY_AVAILABLE \"True\") -@@ -153,14 +155,14 @@ if (NOT TARGET Qt5::WinMain) - set(_isWin32 $>) - set(_isNotExcluded $>>) - set(_isPolicyNEW $) -- get_target_property(_configs Qt5::Core IMPORTED_CONFIGURATIONS) -- set_property(TARGET Qt5::Core APPEND PROPERTY -+ get_target_property(_configs ${IMPORTED_TARGET_NAME} IMPORTED_CONFIGURATIONS) -+ set_property(TARGET ${IMPORTED_TARGET_NAME} APPEND PROPERTY - INTERFACE_LINK_LIBRARIES - $<$:Qt5::WinMain> - ) - # For backward compatibility with CMake < 2.8.12 - foreach(_config ${_configs}) -- set_property(TARGET Qt5::Core APPEND PROPERTY -+ set_property(TARGET ${IMPORTED_TARGET_NAME} APPEND PROPERTY - IMPORTED_LINK_INTERFACE_LIBRARIES_${_config} - $<$:Qt5::WinMain> - ) -diff --git a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in -index 84dbbfebd4..31fa875b6c 100644 ---- a/src/gui/Qt5GuiConfigExtras.cmake.in -+++ b/src/gui/Qt5GuiConfigExtras.cmake.in -@@ -1,4 +1,6 @@ - -+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 +69,7 @@ unset(_GL_INCDIRS) - # optional. - - list(APPEND Qt5Gui_INCLUDE_DIRS ${_qt5gui_OPENGL_INCLUDE_DIR}) --set_property(TARGET Qt5::Gui APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${_qt5gui_OPENGL_INCLUDE_DIR}) -+set_property(TARGET ${IMPORTED_TARGET_NAME} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${_qt5gui_OPENGL_INCLUDE_DIR}) - - unset(_qt5gui_OPENGL_INCLUDE_DIR CACHE) - -@@ -183,9 +185,9 @@ _qt5gui_find_extra_libs(OPENGL \"$$CMAKE_OPENGL_LIBS\" \"$$CMAKE_OPENGL_LIBDIR\" - - set(Qt5Gui_OPENGL_IMPLEMENTATION $$CMAKE_QT_OPENGL_IMPLEMENTATION) - --get_target_property(_configs Qt5::Gui IMPORTED_CONFIGURATIONS) -+get_target_property(_configs ${IMPORTED_TARGET_NAME} IMPORTED_CONFIGURATIONS) - foreach(_config ${_configs}) -- set_property(TARGET Qt5::Gui APPEND PROPERTY -+ set_property(TARGET ${IMPORTED_TARGET_NAME} APPEND PROPERTY - IMPORTED_LINK_DEPENDENT_LIBRARIES_${_config} - ${Qt5Gui_EGL_LIBRARIES} ${Qt5Gui_OPENGL_LIBRARIES} - ) -diff --git a/src/testlib/Qt5TestConfigExtras.cmake.in b/src/testlib/Qt5TestConfigExtras.cmake.in -index 2a575958ae..ca0e3be3b5 100644 ---- a/src/testlib/Qt5TestConfigExtras.cmake.in -+++ b/src/testlib/Qt5TestConfigExtras.cmake.in -@@ -1,5 +1,5 @@ - --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.29.2 - diff --git a/qt5-base/mingw-w64-static/0021-Allow-usage-of-static-version-with-CMake.patch b/qt5-base/mingw-w64-static/0021-Allow-usage-of-static-version-with-CMake.patch new file mode 120000 index 00000000..c7a0ab82 --- /dev/null +++ b/qt5-base/mingw-w64-static/0021-Allow-usage-of-static-version-with-CMake.patch @@ -0,0 +1 @@ +../mingw-w64/0021-Allow-usage-of-static-version-with-CMake.patch \ No newline at end of file diff --git a/qt5-base/mingw-w64-static/0022-Adjust-linker-flags-for-static-build-with-cmake-ming.patch b/qt5-base/mingw-w64-static/0022-Adjust-linker-flags-for-static-build-with-cmake-ming.patch deleted file mode 100644 index d8d31d0b..00000000 --- a/qt5-base/mingw-w64-static/0022-Adjust-linker-flags-for-static-build-with-cmake-ming.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 0f44180723f14ae9861b406238d973e0ca20c405 Mon Sep 17 00:00:00 2001 -From: Martchus -Date: Fri, 2 Jun 2017 16:42:07 +0200 -Subject: [PATCH 22/31] Adjust linker flags for static build with - cmake/mingw-w64 - -It is not clear anymore where I picked that change up and for -what reason. Never touch a running system so let's keep it. - -Change-Id: Iad665f18da5b4540f0899829a0165e1d3aa4ea60 ---- - src/corelib/Qt5CoreConfigExtras.cmake.in | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in -index 9da1361c95..5e802dea4c 100644 ---- a/src/corelib/Qt5CoreConfigExtras.cmake.in -+++ b/src/corelib/Qt5CoreConfigExtras.cmake.in -@@ -206,3 +206,9 @@ if(NOT \"${QT_NO_CREATE_VERSIONLESS_TARGETS}\" AND NOT TARGET Qt::WinMain) - ) - endif() - !!ENDIF -+ -+!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD) -+set(_isExe $,EXECUTABLE>) -+# INTERFACE_LINK_LIBRARIES is used to pass a linker flag '-static' and library ws2_32 -+set_target_properties(${IMPORTED_TARGET_NAME} PROPERTIES \"INTERFACE_LINK_LIBRARIES\" \"$<${_isExe}:-static;ws2_32>\") -+unset(_isExe) --- -2.29.2 - diff --git a/qt5-base/mingw-w64-static/0022-Adjust-linker-flags-for-static-build-with-cmake-ming.patch b/qt5-base/mingw-w64-static/0022-Adjust-linker-flags-for-static-build-with-cmake-ming.patch new file mode 120000 index 00000000..4fbb8438 --- /dev/null +++ b/qt5-base/mingw-w64-static/0022-Adjust-linker-flags-for-static-build-with-cmake-ming.patch @@ -0,0 +1 @@ +../mingw-w64/0022-Adjust-linker-flags-for-static-build-with-cmake-ming.patch \ No newline at end of file diff --git a/qt5-base/mingw-w64-static/0023-Use-correct-pkg-config-static-flag.patch b/qt5-base/mingw-w64-static/0023-Use-correct-pkg-config-static-flag.patch deleted file mode 100644 index 873c3996..00000000 --- a/qt5-base/mingw-w64-static/0023-Use-correct-pkg-config-static-flag.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 0084c7966f46b5a64cac040a8c50c793ba680930 Mon Sep 17 00:00:00 2001 -From: Martchus -Date: Sun, 18 Sep 2016 18:50:21 +0200 -Subject: [PATCH 23/31] Use correct pkg-config --static flag - ---- - configure.pri | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/configure.pri b/configure.pri -index 53c67f885b..8934b72291 100644 ---- a/configure.pri -+++ b/configure.pri -@@ -351,6 +351,9 @@ defineTest(qtConfTest_detectPkgConfig) { - qtLog("Found pkg-config from path: $$pkgConfig") - } - } -+ !isEmpty(pkgConfig):qtConfig(static) { -+ pkgConfig = "$$pkgConfig --static" -+ } - - $$qtConfEvaluate("features.cross_compile") { - # cross compiling, check that pkg-config is set up sanely --- -2.29.2 - diff --git a/qt5-base/mingw-w64-static/0023-Use-correct-pkg-config-static-flag.patch b/qt5-base/mingw-w64-static/0023-Use-correct-pkg-config-static-flag.patch new file mode 120000 index 00000000..b4ad4761 --- /dev/null +++ b/qt5-base/mingw-w64-static/0023-Use-correct-pkg-config-static-flag.patch @@ -0,0 +1 @@ +../mingw-w64/0023-Use-correct-pkg-config-static-flag.patch \ No newline at end of file diff --git a/qt5-base/mingw-w64-static/0024-Fix-macro-invoking-moc-rcc-and-uic.patch b/qt5-base/mingw-w64-static/0024-Fix-macro-invoking-moc-rcc-and-uic.patch deleted file mode 100644 index 2a0983f1..00000000 --- a/qt5-base/mingw-w64-static/0024-Fix-macro-invoking-moc-rcc-and-uic.patch +++ /dev/null @@ -1,74 +0,0 @@ -From e5389013ff78085fdfdfbf1da5b0644e784c916d Mon Sep 17 00:00:00 2001 -From: Martchus -Date: Sun, 4 Dec 2016 20:35:47 +0100 -Subject: [PATCH 24/31] Fix macro invoking moc, rcc and uic - -* Otherwise the arguments aren't passed correctly leading to errors like - ``` - [ 3%] Generating qca_core.moc - moc: Too many input files specified: 'Qt5::moc' '/build/qca-qt5/src/qca-2.1.3/include/QtCrypto/qca_safetimer.h' - ``` -* Just a workaround, not sure what is causing the issue (maybe a CMake bug?) -* See https://github.com/Martchus/PKGBUILDs/issues/11 - -Change-Id: I6fde86d0a3ade37b4376604a1eb6d5723eda8b4c ---- - src/corelib/Qt5CoreMacros.cmake | 9 ++++++--- - src/widgets/Qt5WidgetsMacros.cmake | 3 ++- - 2 files changed, 8 insertions(+), 4 deletions(-) - -diff --git a/src/corelib/Qt5CoreMacros.cmake b/src/corelib/Qt5CoreMacros.cmake -index f5766f8775..2403717802 100644 ---- a/src/corelib/Qt5CoreMacros.cmake -+++ b/src/corelib/Qt5CoreMacros.cmake -@@ -153,8 +153,9 @@ function(qt5_create_moc_command infile outfile moc_flags moc_options moc_target - endif() - - set(_moc_extra_parameters_file @${_moc_parameters_file}) -+ get_target_property(MOC_LOC ${Qt5Core_MOC_EXECUTABLE} IMPORTED_LOCATION) - add_custom_command(OUTPUT ${outfile} -- COMMAND ${Qt5Core_MOC_EXECUTABLE} ${_moc_extra_parameters_file} -+ COMMAND ${MOC_LOC} ${_moc_extra_parameters_file} - DEPENDS ${infile} ${moc_depends} - ${_moc_working_dir} - VERBATIM) -@@ -295,8 +296,9 @@ function(qt5_add_binary_resources target) - set(rc_depends ${rc_depends} ${_rc_depends}) - endforeach() - -+ get_target_property(RCC_LOC ${Qt5Core_RCC_EXECUTABLE} IMPORTED_LOCATION) - add_custom_command(OUTPUT ${rcc_destination} -- COMMAND ${Qt5Core_RCC_EXECUTABLE} -+ COMMAND ${RCC_LOC} - ARGS ${rcc_options} --binary --name ${target} --output ${rcc_destination} ${infiles} - DEPENDS ${rc_depends} ${out_depends} ${infiles} VERBATIM) - add_custom_target(${target} ALL DEPENDS ${rcc_destination}) -@@ -339,8 +341,9 @@ function(qt5_add_resources outfiles) - _qt5_parse_qrc_file(${infile} _out_depends _rc_depends) - set_source_files_properties(${infile} PROPERTIES SKIP_AUTORCC ON) - -+ get_target_property(MOC_LOC ${Qt5Core_RCC_EXECUTABLE} IMPORTED_LOCATION) - add_custom_command(OUTPUT ${outfile} -- COMMAND ${Qt5Core_RCC_EXECUTABLE} -+ COMMAND ${MOC_LOC} - ARGS ${rcc_options} --name ${outfilename} --output ${outfile} ${infile} - MAIN_DEPENDENCY ${infile} - DEPENDS ${_rc_depends} "${_out_depends}" VERBATIM) -diff --git a/src/widgets/Qt5WidgetsMacros.cmake b/src/widgets/Qt5WidgetsMacros.cmake -index 35d2a2dc54..99f061f1b8 100644 ---- a/src/widgets/Qt5WidgetsMacros.cmake -+++ b/src/widgets/Qt5WidgetsMacros.cmake -@@ -55,8 +55,9 @@ function(qt5_wrap_ui outfiles ) - get_filename_component(outfile ${it} NAME_WE) - get_filename_component(infile ${it} ABSOLUTE) - set(outfile ${CMAKE_CURRENT_BINARY_DIR}/ui_${outfile}.h) -+ get_target_property(UIC_LOC ${Qt5Widgets_UIC_EXECUTABLE} IMPORTED_LOCATION) - add_custom_command(OUTPUT ${outfile} -- COMMAND ${Qt5Widgets_UIC_EXECUTABLE} -+ COMMAND ${UIC_LOC} - ARGS ${ui_options} -o ${outfile} ${infile} - MAIN_DEPENDENCY ${infile} VERBATIM) - set_source_files_properties(${infile} PROPERTIES SKIP_AUTOUIC ON) --- -2.29.2 - diff --git a/qt5-base/mingw-w64-static/0024-Fix-macro-invoking-moc-rcc-and-uic.patch b/qt5-base/mingw-w64-static/0024-Fix-macro-invoking-moc-rcc-and-uic.patch new file mode 120000 index 00000000..9e3c772b --- /dev/null +++ b/qt5-base/mingw-w64-static/0024-Fix-macro-invoking-moc-rcc-and-uic.patch @@ -0,0 +1 @@ +../mingw-w64/0024-Fix-macro-invoking-moc-rcc-and-uic.patch \ No newline at end of file diff --git a/qt5-base/mingw-w64-static/0025-Ignore-errors-about-missing-feature-static.patch b/qt5-base/mingw-w64-static/0025-Ignore-errors-about-missing-feature-static.patch deleted file mode 100644 index beb723a6..00000000 --- a/qt5-base/mingw-w64-static/0025-Ignore-errors-about-missing-feature-static.patch +++ /dev/null @@ -1,36 +0,0 @@ -From d29a2b44643831e439755d11348b69dc9ed6d60b Mon Sep 17 00:00:00 2001 -From: Martchus -Date: Wed, 25 Jan 2017 20:59:54 +0100 -Subject: [PATCH 25/31] Ignore errors about missing feature static - -Not sure why this error occurs, let's hope for the best ---- - mkspecs/features/qt_build_config.prf | 2 +- - mkspecs/features/qt_functions.prf | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/mkspecs/features/qt_build_config.prf b/mkspecs/features/qt_build_config.prf -index 511b158b91..39760d5ce4 100644 ---- a/mkspecs/features/qt_build_config.prf -+++ b/mkspecs/features/qt_build_config.prf -@@ -153,5 +153,5 @@ defineTest(qtConfig) { - contains(QT.$${module}.disabled_features, $$1): \ - return(false) - } -- error("Could not find feature $${1}.") -+ !equals($$1, "static"): error("Could not find feature $${1}.") - } -diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf -index 7777e615bd..5f30366660 100644 ---- a/mkspecs/features/qt_functions.prf -+++ b/mkspecs/features/qt_functions.prf -@@ -370,5 +370,5 @@ defineTest(qtConfig) { - contains(QT.$${module}.disabled_features, $$1): \ - return(false) - } -- error("Could not find feature $${1}.") -+ !equals($$1, "static"): error("Could not find feature $${1}.") - } --- -2.29.2 - diff --git a/qt5-base/mingw-w64-static/0025-Ignore-errors-about-missing-feature-static.patch b/qt5-base/mingw-w64-static/0025-Ignore-errors-about-missing-feature-static.patch new file mode 120000 index 00000000..689e6e44 --- /dev/null +++ b/qt5-base/mingw-w64-static/0025-Ignore-errors-about-missing-feature-static.patch @@ -0,0 +1 @@ +../mingw-w64/0025-Ignore-errors-about-missing-feature-static.patch \ No newline at end of file diff --git a/qt5-base/mingw-w64-static/0026-Enable-and-fix-use-of-iconv.patch b/qt5-base/mingw-w64-static/0026-Enable-and-fix-use-of-iconv.patch deleted file mode 100644 index f0ac0098..00000000 --- a/qt5-base/mingw-w64-static/0026-Enable-and-fix-use-of-iconv.patch +++ /dev/null @@ -1,78 +0,0 @@ -From becf49560bdf91b82df7bec0bc06c54d7ab8c948 Mon Sep 17 00:00:00 2001 -From: Martchus -Date: Wed, 25 Jan 2017 21:08:20 +0100 -Subject: [PATCH 26/31] Enable and fix use of iconv - -Change-Id: I5f0ab27afca0800dec11c7af74d196190820ae5c ---- - src/corelib/codecs/qiconvcodec.cpp | 7 +++---- - src/corelib/configure.json | 6 +++--- - 2 files changed, 6 insertions(+), 7 deletions(-) - -diff --git a/src/corelib/codecs/qiconvcodec.cpp b/src/corelib/codecs/qiconvcodec.cpp -index 9c39727946..cc14036b25 100644 ---- a/src/corelib/codecs/qiconvcodec.cpp -+++ b/src/corelib/codecs/qiconvcodec.cpp -@@ -47,7 +47,6 @@ - #include - #include - #include --#include - - // unistd.h is needed for the _XOPEN_UNIX macro - #include -@@ -180,7 +179,7 @@ QString QIconvCodec::convertToUnicode(const char* chars, int len, ConverterState - IconvState *state = *pstate; - size_t inBytesLeft = len; - // best case assumption, each byte is converted into one UTF-16 character, plus 2 bytes for the BOM --#if !QT_CONFIG(posix_libiconv) -+#if !QT_CONFIG(posix_libiconv) && !defined(Q_OS_WIN) - // GNU doesn't disagree with POSIX :/ - const char *inBytes = chars; - #else -@@ -279,7 +278,7 @@ static bool setByteOrder(iconv_t cd) - size_t outBytesLeft = sizeof buf; - size_t inBytesLeft = sizeof bom; - --#if !QT_CONFIG(posix_libiconv) -+#if !QT_CONFIG(posix_libiconv) && !defined(Q_OS_WIN) - const char **inBytesPtr = const_cast(&inBytes); - #else - char **inBytesPtr = &inBytes; -@@ -301,7 +300,7 @@ QByteArray QIconvCodec::convertFromUnicode(const QChar *uc, int len, ConverterSt - char *outBytes; - size_t inBytesLeft; - --#if !QT_CONFIG(posix_libiconv) -+#if !QT_CONFIG(posix_libiconv) && !defined(Q_OS_WIN) - const char **inBytesPtr = const_cast(&inBytes); - #else - char **inBytesPtr = &inBytes; -diff --git a/src/corelib/configure.json b/src/corelib/configure.json -index c5e0423273..0b12e22351 100644 ---- a/src/corelib/configure.json -+++ b/src/corelib/configure.json -@@ -72,7 +72,7 @@ - "test": { - "main": [ - "iconv_t x = iconv_open(\"\", \"\");", -- "const char *inp;", -+ "char *inp;", - "char *outp;", - "size_t inbytes, outbytes;", - "iconv(x, &inp, &inbytes, &outp, &outbytes);", -@@ -673,9 +673,9 @@ - }, - "gnu-libiconv": { - "label": "GNU iconv", -- "enable": "input.iconv == 'gnu'", -+ "enable": "'enabling via -gnu-iconv fails' == 'enabling via -gnu-iconv fails'", - "disable": "input.iconv == 'posix' || input.iconv == 'sun' || input.iconv == 'no'", -- "condition": "!config.win32 && !config.qnx && !config.android && !config.darwin && !features.posix-libiconv && !features.sun-libiconv && libs.gnu_iconv", -+ "condition": "!config.qnx && !config.android && !config.darwin && !features.posix-libiconv && !features.sun-libiconv && libs.gnu_iconv", - "output": [ "privateFeature" ] - }, - "icu": { --- -2.29.2 - diff --git a/qt5-base/mingw-w64-static/0026-Enable-and-fix-use-of-iconv.patch b/qt5-base/mingw-w64-static/0026-Enable-and-fix-use-of-iconv.patch new file mode 120000 index 00000000..446b2bb7 --- /dev/null +++ b/qt5-base/mingw-w64-static/0026-Enable-and-fix-use-of-iconv.patch @@ -0,0 +1 @@ +../mingw-w64/0026-Enable-and-fix-use-of-iconv.patch \ No newline at end of file diff --git a/qt5-base/mingw-w64-static/0027-Ignore-failing-pkg-config-test.patch b/qt5-base/mingw-w64-static/0027-Ignore-failing-pkg-config-test.patch deleted file mode 100644 index 0eef1044..00000000 --- a/qt5-base/mingw-w64-static/0027-Ignore-failing-pkg-config-test.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 2fd3c54980c0be5efa03f64c8998287d683ff54f Mon Sep 17 00:00:00 2001 -From: Martchus -Date: Wed, 25 Jan 2017 21:08:48 +0100 -Subject: [PATCH 27/31] Ignore failing pkg-config test - -Didn't investigate why it fails, let's hope for the best ---- - configure.json | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/configure.json b/configure.json -index 2fa3c08440..d96d2a6ecb 100644 ---- a/configure.json -+++ b/configure.json -@@ -772,7 +772,6 @@ - "pkg-config": { - "label": "Using pkg-config", - "autoDetect": "!config.darwin && !config.win32", -- "condition": "tests.pkg-config", - "output": [ - "publicFeature", - { "type": "publicQtConfig", "negative": true }, --- -2.29.2 - diff --git a/qt5-base/mingw-w64-static/0027-Ignore-failing-pkg-config-test.patch b/qt5-base/mingw-w64-static/0027-Ignore-failing-pkg-config-test.patch new file mode 120000 index 00000000..0703dba0 --- /dev/null +++ b/qt5-base/mingw-w64-static/0027-Ignore-failing-pkg-config-test.patch @@ -0,0 +1 @@ +../mingw-w64/0027-Ignore-failing-pkg-config-test.patch \ No newline at end of file diff --git a/qt5-base/mingw-w64-static/0028-Prevent-qmake-from-messing-static-lib-dependencies.patch b/qt5-base/mingw-w64-static/0028-Prevent-qmake-from-messing-static-lib-dependencies.patch deleted file mode 100644 index 14e719aa..00000000 --- a/qt5-base/mingw-w64-static/0028-Prevent-qmake-from-messing-static-lib-dependencies.patch +++ /dev/null @@ -1,45 +0,0 @@ -From e6e16f20966d91dd3c0020d4784d04e79b95613f Mon Sep 17 00:00:00 2001 -From: Martchus -Date: Tue, 7 Feb 2017 18:25:28 +0100 -Subject: [PATCH 28/31] Prevent qmake from messing static lib dependencies - -In particular, it messes resolving cyclic dependency between -static freetype2 and harfbuzz - -Change-Id: Ie5a4e2ad96bd613ae4c26486edb30c74929459b0 ---- - qmake/generators/unix/unixmake.cpp | 3 +++ - qmake/generators/win32/winmakefile.cpp | 3 +++ - 2 files changed, 6 insertions(+) - -diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp -index f7bd6dc663..b76c444012 100644 ---- a/qmake/generators/unix/unixmake.cpp -+++ b/qmake/generators/unix/unixmake.cpp -@@ -391,6 +391,9 @@ UnixMakefileGenerator::fixLibFlag(const ProString &lib) - bool - UnixMakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags) - { -+ if(project->isActiveConfig("staticlib")) { -+ return false; // prevent qmake from messing static lib dependencies -+ } - QVector libdirs, frameworkdirs; - int libidx = 0, fwidx = 0; - for (const ProString &dlib : project->values("QMAKE_DEFAULT_LIBDIRS")) -diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp -index 03732df4a8..602f7609f5 100644 ---- a/qmake/generators/win32/winmakefile.cpp -+++ b/qmake/generators/win32/winmakefile.cpp -@@ -106,6 +106,9 @@ Win32MakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags) - impexts.append(project->values("QMAKE_EXTENSION_IMPORTLIB")); - impexts.append(project->values("QMAKE_EXTENSION_STATICLIB")); - } -+ if(project->isActiveConfig("staticlib")) { -+ return false; // prevent qmake from messing static lib dependencies -+ } - QVector dirs; - int libidx = 0; - for (const ProString &dlib : project->values("QMAKE_DEFAULT_LIBDIRS")) --- -2.29.2 - diff --git a/qt5-base/mingw-w64-static/0028-Prevent-qmake-from-messing-static-lib-dependencies.patch b/qt5-base/mingw-w64-static/0028-Prevent-qmake-from-messing-static-lib-dependencies.patch new file mode 120000 index 00000000..fb0d854d --- /dev/null +++ b/qt5-base/mingw-w64-static/0028-Prevent-qmake-from-messing-static-lib-dependencies.patch @@ -0,0 +1 @@ +../mingw-w64/0028-Prevent-qmake-from-messing-static-lib-dependencies.patch \ No newline at end of file diff --git a/qt5-base/mingw-w64-static/0029-Hardcode-linker-flags-for-platform-plugins.patch b/qt5-base/mingw-w64-static/0029-Hardcode-linker-flags-for-platform-plugins.patch deleted file mode 100644 index 25482a8a..00000000 --- a/qt5-base/mingw-w64-static/0029-Hardcode-linker-flags-for-platform-plugins.patch +++ /dev/null @@ -1,176 +0,0 @@ -From d7d5e89ed1d5b7ea3962588eb719a85c85356f09 Mon Sep 17 00:00:00 2001 -From: Martchus -Date: Wed, 25 Jan 2017 23:42:30 +0100 -Subject: [PATCH 29/31] Hardcode linker flags for platform plugins - -Otherwise incorrect order of libs leads to errors -when building libqminimal.dll, libqoffscreen.dll, -libqwindows.dll and libqdirect2d.dll - -Change-Id: Ibff901ecce864ae8d5ca2adbe37bcec28e5912f3 ---- - src/plugins/platforms/direct2d/direct2d.pro | 39 +++++++++++++++--- - src/plugins/platforms/minimal/minimal.pro | 17 +++++++- - src/plugins/platforms/offscreen/offscreen.pro | 16 +++++++- - src/plugins/platforms/windows/windows.pro | 40 ++++++++++++++----- - 4 files changed, 93 insertions(+), 19 deletions(-) - -diff --git a/src/plugins/platforms/direct2d/direct2d.pro b/src/plugins/platforms/direct2d/direct2d.pro -index 6e73bd14f9..0829c75bd2 100644 ---- a/src/plugins/platforms/direct2d/direct2d.pro -+++ b/src/plugins/platforms/direct2d/direct2d.pro -@@ -1,12 +1,41 @@ - TARGET = qdirect2d - - QT += \ -- core-private gui-private \ -- eventdispatcher_support-private \ -- fontdatabase_support-private theme_support-private -+ core-private gui-private - --qtConfig(accessibility): QT += accessibility_support-private --qtConfig(vulkan): QT += vulkan_support-private -+# Fix linker error when building libqdirect2d.dll by specifying linker flags for -+# required modules manually (otherwise order is messed) -+LIBS += \ -+ $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5EventDispatcherSupport.$${QMAKE_EXTENSION_STATICLIB} \ -+ $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5FontDatabaseSupport.$${QMAKE_EXTENSION_STATICLIB} \ -+ $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5ThemeSupport.$${QMAKE_EXTENSION_STATICLIB} \ -+ -lfreetype -lole32 -lgdi32 -luuid -+# However, this workaround leads to the necessity of specifying include dirs manually -+INCLUDEPATH += \ -+ $$QT_SOURCE_TREE/include/QtEventDispatcherSupport/$${QT_VERSION}/QtEventDispatcherSupport \ -+ $$QT_SOURCE_TREE/include/QtEventDispatcherSupport/$${QT_VERSION} \ -+ $$QT_SOURCE_TREE/include/QtFontDatabaseSupport/$${QT_VERSION}/QtFontDatabaseSupport \ -+ $$QT_SOURCE_TREE/include/QtFontDatabaseSupport/$${QT_VERSION} \ -+ $$QT_SOURCE_TREE/include/QtThemeSupport/$${QT_VERSION}/QtThemeSupport \ -+ $$QT_SOURCE_TREE/include/QtThemeSupport/$${QT_VERSION} -+# Same for private support libs for accessibility and vulkan, if those are enabled -+qtConfig(accessibility) { -+ LIBS += $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5AccessibilitySupport.$${QMAKE_EXTENSION_STATICLIB} -+ INCLUDEPATH += \ -+ $$QT_SOURCE_TREE/include/QtAccessibilitySupport/$${QT_VERSION}/Qt5AccessibilitySupport \ -+ $$QT_SOURCE_TREE/include/QtAccessibilitySupport/$${QT_VERSION} -+} -+qtConfig(vulkan) { -+ LIBS += $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5VulkanSupport.$${QMAKE_EXTENSION_STATICLIB} -+ INCLUDEPATH += \ -+ $$QT_SOURCE_TREE/include/QtVulkanSupport/$${QT_VERSION}/Qt5VulkanSupport \ -+ $$QT_SOURCE_TREE/include/QtVulkanSupport/$${QT_VERSION} -+} -+# Also add Qt5WindowsUIAutomationSupport - it seems to link against it -+LIBS += $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5WindowsUIAutomationSupport.$${QMAKE_EXTENSION_STATICLIB} -+INCLUDEPATH += \ -+ $$QT_SOURCE_TREE/include/Qt5WindowsUIAutomationSupport/$${QT_VERSION}/Qt5WindowsUIAutomationSupport \ -+ $$QT_SOURCE_TREE/include/Qt5WindowsUIAutomationSupport/$${QT_VERSION} - - LIBS += -ldwmapi -lversion - QMAKE_USE_PRIVATE += gdi32 dwrite_1 d2d1_1 d3d11_1 dxgi1_2 -diff --git a/src/plugins/platforms/minimal/minimal.pro b/src/plugins/platforms/minimal/minimal.pro -index a1a2da547b..74ced58662 100644 ---- a/src/plugins/platforms/minimal/minimal.pro -+++ b/src/plugins/platforms/minimal/minimal.pro -@@ -1,8 +1,21 @@ - TARGET = qminimal - - QT += \ -- core-private gui-private \ -- eventdispatcher_support-private fontdatabase_support-private -+ core-private gui-private -+ -+# Fix linker error when building libqminimal.dll by specifying linker flags for -+# required modules manually (otherwise order is messed) -+LIBS += \ -+ $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5EventDispatcherSupport.$${QMAKE_EXTENSION_STATICLIB} \ -+ $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5FontDatabaseSupport.$${QMAKE_EXTENSION_STATICLIB} \ -+ -lfreetype -lole32 -lgdi32 -luuid -+# However, this workaround leads to the necessity of specifying include dirs manually -+INCLUDEPATH += \ -+ $$QT_SOURCE_TREE/include/QtEventDispatcherSupport/$${QT_VERSION}/QtEventDispatcherSupport \ -+ $$QT_SOURCE_TREE/include/QtEventDispatcherSupport/$${QT_VERSION} \ -+ $$QT_SOURCE_TREE/include/QtFontDatabaseSupport/$${QT_VERSION}/QtFontDatabaseSupport \ -+ $$QT_SOURCE_TREE/include/QtFontDatabaseSupport/$${QT_VERSION} -+ - - DEFINES += QT_NO_FOREACH - -diff --git a/src/plugins/platforms/offscreen/offscreen.pro b/src/plugins/platforms/offscreen/offscreen.pro -index f226132592..cac8a007b8 100644 ---- a/src/plugins/platforms/offscreen/offscreen.pro -+++ b/src/plugins/platforms/offscreen/offscreen.pro -@@ -1,8 +1,20 @@ - TARGET = qoffscreen - - QT += \ -- core-private gui-private \ -- eventdispatcher_support-private fontdatabase_support-private -+ core-private gui-private -+ -+# Fix linker error when building libqoffscreen.dll by specifying linker flags for -+# required modules manually (otherwise order is messed) -+LIBS += \ -+ $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5EventDispatcherSupport.$${QMAKE_EXTENSION_STATICLIB} \ -+ $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5FontDatabaseSupport.$${QMAKE_EXTENSION_STATICLIB} \ -+ -lfreetype -lole32 -lgdi32 -luuid -+# However, this workaround leads to the necessity of specifying include dirs manually -+INCLUDEPATH += \ -+ $$QT_SOURCE_TREE/include/QtEventDispatcherSupport/$${QT_VERSION}/QtEventDispatcherSupport \ -+ $$QT_SOURCE_TREE/include/QtEventDispatcherSupport/$${QT_VERSION} \ -+ $$QT_SOURCE_TREE/include/QtFontDatabaseSupport/$${QT_VERSION}/QtFontDatabaseSupport \ -+ $$QT_SOURCE_TREE/include/QtFontDatabaseSupport/$${QT_VERSION} - - DEFINES += QT_NO_FOREACH - -diff --git a/src/plugins/platforms/windows/windows.pro b/src/plugins/platforms/windows/windows.pro -index 50a3bb41a9..53c011642f 100644 ---- a/src/plugins/platforms/windows/windows.pro -+++ b/src/plugins/platforms/windows/windows.pro -@@ -1,15 +1,35 @@ - TARGET = qwindows - --QT += \ -- core-private gui-private \ -- eventdispatcher_support-private \ -- fontdatabase_support-private theme_support-private -- --qtConfig(accessibility): QT += accessibility_support-private --qtConfig(vulkan): QT += vulkan_support-private -- --LIBS += -ldwmapi --QMAKE_USE_PRIVATE += gdi32 -+QT += core-private gui-private -+ -+# Fix linker error when building libqwindows.dll by specifying linker flags for -+# required modules manually (otherwise order is messed) -+LIBS += \ -+ $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5EventDispatcherSupport.$${QMAKE_EXTENSION_STATICLIB} \ -+ $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5FontDatabaseSupport.$${QMAKE_EXTENSION_STATICLIB} \ -+ $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5ThemeSupport.$${QMAKE_EXTENSION_STATICLIB} \ -+ -lfreetype -lole32 -lgdi32 -ldwmapi -+# However, this workaround leads to the necessity of specifying include dirs manually -+INCLUDEPATH += \ -+ $$QT_SOURCE_TREE/include/QtEventDispatcherSupport/$${QT_VERSION}/QtEventDispatcherSupport \ -+ $$QT_SOURCE_TREE/include/QtEventDispatcherSupport/$${QT_VERSION} \ -+ $$QT_SOURCE_TREE/include/QtFontDatabaseSupport/$${QT_VERSION}/QtFontDatabaseSupport \ -+ $$QT_SOURCE_TREE/include/QtFontDatabaseSupport/$${QT_VERSION} \ -+ $$QT_SOURCE_TREE/include/QtThemeSupport/$${QT_VERSION}/QtThemeSupport \ -+ $$QT_SOURCE_TREE/include/QtThemeSupport/$${QT_VERSION} -+# Same for private support libs for accessibility and vulkan, if those are enabled -+qtConfig(accessibility) { -+ LIBS += $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5AccessibilitySupport.$${QMAKE_EXTENSION_STATICLIB} -+ INCLUDEPATH += \ -+ $$QT_SOURCE_TREE/include/QtAccessibilitySupport/$${QT_VERSION}/Qt5AccessibilitySupport \ -+ $$QT_SOURCE_TREE/include/QtAccessibilitySupport/$${QT_VERSION} -+} -+qtConfig(vulkan) { -+ LIBS += $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5VulkanSupport.$${QMAKE_EXTENSION_STATICLIB} -+ INCLUDEPATH += \ -+ $$QT_SOURCE_TREE/include/QtVulkanSupport/$${QT_VERSION}/Qt5VulkanSupport \ -+ $$QT_SOURCE_TREE/include/QtVulkanSupport/$${QT_VERSION} -+} - - include(windows.pri) - --- -2.29.2 - diff --git a/qt5-base/mingw-w64-static/0029-Hardcode-linker-flags-for-platform-plugins.patch b/qt5-base/mingw-w64-static/0029-Hardcode-linker-flags-for-platform-plugins.patch new file mode 120000 index 00000000..24d0067e --- /dev/null +++ b/qt5-base/mingw-w64-static/0029-Hardcode-linker-flags-for-platform-plugins.patch @@ -0,0 +1 @@ +../mingw-w64/0029-Hardcode-linker-flags-for-platform-plugins.patch \ No newline at end of file diff --git a/qt5-base/mingw-w64-static/0030-Fix-linking-against-static-plugins-with-qmake.patch b/qt5-base/mingw-w64-static/0030-Fix-linking-against-static-plugins-with-qmake.patch deleted file mode 100644 index a306ece1..00000000 --- a/qt5-base/mingw-w64-static/0030-Fix-linking-against-static-plugins-with-qmake.patch +++ /dev/null @@ -1,37 +0,0 @@ -From cd3c5ceea13a08c8eea88eea90b24a2cacf816a3 Mon Sep 17 00:00:00 2001 -From: Martchus -Date: Fri, 25 Aug 2017 17:07:17 +0200 -Subject: [PATCH 30/31] Fix linking against static plugins with qmake - -Required because qtConfig(static) does not work -with 'Merge shared and static library trees' -approach ---- - mkspecs/features/qt.prf | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf -index b79b324b88..6a03b7a74b 100644 ---- a/mkspecs/features/qt.prf -+++ b/mkspecs/features/qt.prf -@@ -69,7 +69,7 @@ all_qt_module_deps = $$resolve_depends(qt_module_deps, "QT.", ".depends" ".run_d - - QTPLUGIN = $$unique($$list($$lower($$QTPLUGIN))) - --import_plugins:qtConfig(static) { -+import_plugins:static { - manualplugs = $$QTPLUGIN # User may specify plugins. Mostly legacy. - autoplugs = # Auto-added plugins. - # First round: explicitly specified modules. -@@ -142,7 +142,7 @@ import_plugins:qtConfig(static) { - } - - # Only link against plugins in static builds --!isEmpty(QTPLUGIN):qtConfig(static) { -+!isEmpty(QTPLUGIN):static { - for (plug, QTPLUGIN) { - # Check if the plugin is known to Qt. We can use this to determine - # the plugin path. Unknown plugins must rely on the default link path. --- -2.29.2 - diff --git a/qt5-base/mingw-w64-static/0030-Fix-linking-against-static-plugins-with-qmake.patch b/qt5-base/mingw-w64-static/0030-Fix-linking-against-static-plugins-with-qmake.patch new file mode 120000 index 00000000..deb5e521 --- /dev/null +++ b/qt5-base/mingw-w64-static/0030-Fix-linking-against-static-plugins-with-qmake.patch @@ -0,0 +1 @@ +../mingw-w64/0030-Fix-linking-against-static-plugins-with-qmake.patch \ No newline at end of file diff --git a/qt5-base/mingw-w64-static/0031-Prevent-Cannot-find-feature-windows_vulkan_sdk.patch b/qt5-base/mingw-w64-static/0031-Prevent-Cannot-find-feature-windows_vulkan_sdk.patch deleted file mode 100644 index 6632e2d1..00000000 --- a/qt5-base/mingw-w64-static/0031-Prevent-Cannot-find-feature-windows_vulkan_sdk.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 25a9b54ce96ea574fe18bc6df5dc2ee571d22c36 Mon Sep 17 00:00:00 2001 -From: Martchus -Date: Mon, 24 Jun 2019 13:51:02 +0200 -Subject: [PATCH 31/31] Prevent 'Cannot find feature windows_vulkan_sdk' - -See https://bugreports.qt.io/browse/QTBUG-76660 ---- - mkspecs/common/windows-vulkan.conf | 2 +- - mkspecs/features/qmake_use.prf | 4 +++- - 2 files changed, 4 insertions(+), 2 deletions(-) - -diff --git a/mkspecs/common/windows-vulkan.conf b/mkspecs/common/windows-vulkan.conf -index da061422dc..a5a8ec68d2 100644 ---- a/mkspecs/common/windows-vulkan.conf -+++ b/mkspecs/common/windows-vulkan.conf -@@ -1,2 +1,2 @@ --load(windows_vulkan_sdk) -+load(win32/windows_vulkan_sdk) - QMAKE_LIBS_VULKAN = -diff --git a/mkspecs/features/qmake_use.prf b/mkspecs/features/qmake_use.prf -index 8475e4111a..c0eb8faa17 100644 ---- a/mkspecs/features/qmake_use.prf -+++ b/mkspecs/features/qmake_use.prf -@@ -15,7 +15,9 @@ for(ever) { - error("Library '$$lower($$replace(nu, _, -))' is not defined.") - - DEFINES += $$eval(QMAKE_DEFINES_$${nu}) -- INCLUDEPATH += $$eval(QMAKE_INCDIR_$${nu}) -+ incdir = $$eval(QMAKE_INCDIR_$${nu}) -+ !contains(QMAKE_DEFAULT_INCDIRS, $$incdir): \ -+ INCLUDEPATH += $$incdir - } - LD_USES = $$resolve_depends(LD_USES, QMAKE_DEPENDS_, _LD) - for (nu, LD_USES) { --- -2.29.2 - diff --git a/qt5-base/mingw-w64-static/0031-Prevent-Cannot-find-feature-windows_vulkan_sdk.patch b/qt5-base/mingw-w64-static/0031-Prevent-Cannot-find-feature-windows_vulkan_sdk.patch new file mode 120000 index 00000000..dfbeca09 --- /dev/null +++ b/qt5-base/mingw-w64-static/0031-Prevent-Cannot-find-feature-windows_vulkan_sdk.patch @@ -0,0 +1 @@ +../mingw-w64/0031-Prevent-Cannot-find-feature-windows_vulkan_sdk.patch \ No newline at end of file diff --git a/qt5-base/mingw-w64-static/PKGBUILD b/qt5-base/mingw-w64-static/PKGBUILD index 1e3e3876..abdc22d9 100644 --- a/qt5-base/mingw-w64-static/PKGBUILD +++ b/qt5-base/mingw-w64-static/PKGBUILD @@ -17,8 +17,9 @@ _qt_module=qtbase pkgname=mingw-w64-qt5-base-static -pkgver=5.15.2 +pkgver=5.15.2+kde+r172 pkgrel=1 +_commit=cfa90a94f95510711e25920e7742b37faa2f4843 pkgdesc='A cross-platform application and UI framework, native OpenGL backend (mingw-w64)' arch=('any') url='https://www.qt.io/' @@ -31,11 +32,11 @@ optdepends=('mingw-w64-mesa: use LLVMpipe software rasterizer for Qt Quick' 'mingw-w64-postgresql: PostgreSQL support' 'mingw-w64-mariadb-connector-c: MySQL support') makedepends=('mingw-w64-gcc' 'mingw-w64-postgresql' 'mingw-w64-mariadb-connector-c' - 'mingw-w64-vulkan-headers' 'mingw-w64-pkg-config' 'mingw-w64-environment') + 'mingw-w64-vulkan-headers' 'mingw-w64-pkg-config' 'mingw-w64-environment' 'git') groups=('mingw-w64-qt5') options=('!strip' '!buildflags' 'staticlibs' '!emptydirs') -_pkgfqn="${_qt_module}-everywhere-src-${pkgver}" -source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz" +_pkgfqn=${_qt_module} +source=(git+https://invent.kde.org/qt/qt/$_pkgfqn#commit=$_commit '0001-Adjust-win32-g-profile-for-cross-compilation-with-mi.patch' '0002-Ensure-GLdouble-is-defined-when-using-dynamic-OpenGL.patch' '0003-Fix-too-many-sections-assemler-error-in-OpenGL-facto.patch' @@ -67,53 +68,57 @@ source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/subm '0029-Hardcode-linker-flags-for-platform-plugins.patch' '0030-Fix-linking-against-static-plugins-with-qmake.patch' '0031-Prevent-Cannot-find-feature-windows_vulkan_sdk.patch') -sha256sums=('909fad2591ee367993a75d7e2ea50ad4db332f05e1c38dd7a5a274e156a4e0f8' - 'b3b49e5580f296f993a0aba0b34bd5ae2399f8d1809456878c1881451b14c27e' - '833b8fc2dd8f0bb4a914fb7f5018b28954752b2d54cec2388332885c929a9266' - 'e49f91d9f8f56afc856a9e143feb4ad9cf54c804f773374e5ccb6d1fc264a7bc' - '944288f57ac8cc9063a75a3a6b421c20a3e8b02a5fd5294f7da7df28c840302b' - 'b421b77303f6f03682c04f1bd1c2c63e07b120dc724de93a9248330d0080ee26' - '595fe18bbefb6f7e271a9daeefbd008d6350ef44b16b4b72c4d3183ba14509ee' - '238900f33394be14378b58445abe28dcd66343ed4f0760c8f944508c02ae831b' - 'bbde0b8ac3a9639a90e2937367deb769ea39ee55b036995a253ec8fdd1d2bd2c' - '859c065f54819266b33bab6b57f76f8c21065a48ff36104b191e218e31f20f9e' - '896c0b0d346f271f90609c6b49490ee86d3076ae620af1127503ee397a7664bb' - '15c69cd06b6e28100ad118ed045abef670acd41609351cd8e2652f1aeec9c8c4' - '499b3a1177e2340b5063553452b0a9a44f232e47839f03087939f52da38d0548' - 'bbe45a397cbc4c0303125937710e305c6dbb0e4a8713b4a520ff820208295ea8' - '3fedd43cccc7000271766f7b4ff85efafc9c65ce3b9f40f4c443a0f352518631' - '2b4854083457f85a82e8f05c23d3983095ff8aa1d1e0ea5cfe1f7e9731b061f8' - '6d4dc98c2b9e0ed743332797e1511262bda3b240e4685c2150a40415650c78f0' - '27b0eb4795713e1c6804dbb446970684c19cc2797f9e371eb2605c852d404b05' - '0fa5c3b49425cfb357e9d04bf993e065174d8b44e450dd134aa24187ed66e0e1' - 'd990f99f04dcf52cae5d7f6dd4394aae778683c2d9ebcb41b485129af8c2cf2f' - '7a395f7e9f26a650e09ad4b35563d5cb46c34dfae1c7de2f4dcf0e86f9dd1927' - 'd38cbc2d4566a3915475fa29ae2982173cd1339abdbff292f5cd520c7c741039' - '2b90d5b001da77692805a8fc9f6ac77ed8d3bfce48f52c89be1b13e915b5ef7c' - '5b973e490c3bbbc3aba7bf2b4fa704c38f92601c7736b483334025e2fc913285' - '73683e5bc8672c09c7c4e86b4787bbb5792570a511768509db6c7a7f45a58109' - 'cc8d458974c5168a7956d4682a63b0c15f9918256820ae908b88e5dd18d95811' - '3cb99ad9d910bad53ad8565d0be2fb6bb4a0d1075dbb73fd85cb2ffbe404d73e' - 'ea31c31ccbd47f6d77a1cf00768a9c247b368d79e3ba19dca4854c29f1a69a69' - 'e6ed01492dacf7367d8f444eb00e2bcdae1fc3b3f1648858e6e379b1565f8943' - 'd4cd03c966a6a1c37ce21f9e6bbd9deaadbb62f31a1a652ac12cd48a651fc47d' - 'd9f55e93cfde4bd6d46744697ae846490912342bdb84ad8c4ba0cf7689b472ab' - 'd5478d6cbcb1067bf1b8e3e52210f1416d734303e387facb165b92f281789436') +sha256sums=('SKIP' + '07ca76c848991c2e34e021626374812aad040e210413c84e1ab372f79bc5733b' + 'f271f7509c97e9f3de2d11c887c03be7e58c39b9eafd83691400a87143a86324' + '3fedd054e1dd439664aec2225de903c2d235c62113be69d361908466838e8c55' + 'a57715bf58b66ffdb2e67d9ba5ae437a6f627a144cd759cfaa9726d2151a6a61' + '934bd614407ff0e6c0366a765d93cd0854e23169cc2c6e69f789ef3d14095fea' + '60def68fdbba857ab22eafc05d0e97b6aa43a0b13903e852902958d2cb847010' + '3f8fcde556f9ed718e1c2fdc466ec787fc639f83afba4b71ba125dfc2b0e74d0' + 'ec12dff066a5af6e034cae56984a275576790a6c52512e78d792b0d14503b319' + '26aaff027ba16ba61b7b4684a97f7595eef811c49e9263e5ba88ba6b51e4fcb9' + 'bde7b7b5e8d32814b26e5a46750c8d5e0e83047d335c94cbbc0b485e9b96a188' + '00b5e1bce87c62bc61cac71654ee5dbe57ea005fc8e7ff7206c936699e199747' + '93b2db5134581d8312996ae1eadc834ddc5fc394aaf88532554eea8f0936506f' + '09bc39fa186fc4bed14cb3f589d8b77e10e3bf7a904dba43758805124e1d3787' + '5e6ddbcd6ab35fcf3e75bb353bc10fe258e8e1753456ba55d65f8ba5667d1c7f' + 'd86b3cf81608819c7d371681f293f3168ce6198368441c916505f1efa1f6ad7d' + '5d7eaaeec84a23b9db12e2998c099ceddd853d2d819018bbad472e77ecd72429' + '8ec002dfe54c83be1fac8bf5a3badb611230fba8ce91eb33bd26cd06b6ecec63' + 'c06f2a6a2bfffffea82fef8023039821fa2869a95af4a31bfd4224ee50cfa78c' + '6d3c73791781ba99f48658bf65f446e4e8b94b1327d901f3fa34e3cf9c07c176' + 'b9ddaa27fa95aeb8dce1fb38950ae095e5c60a5c9bcef4f46138fc1fa1824807' + 'bab619655a585095269a5250170900d0dbce7ac6b20586d3ca468e914c39a8d4' + '3ebe50b4d7e436e0bdf396bba04f6c7dc79ca7e62b392cc2f3cdc8b898218682' + '19e1b928c03fa58dca7b5e27d97b7829ee28af280cf857f520d1e6a04e528ad5' + '77e7cf6a9ab87b76fd0d0f0e1c2948ad49db1fb1972887ad46a8ae179c627354' + '232d3dcb1d13d4961ca6a35ff5897aa633bca12f4425a35eea990759124b238d' + '51fb2c38a41133fc816a16bd74cc2ba93b1b8ca4e456bba42b2ffe3e36aa8e80' + 'f1148c997a0d727b7b640594543196d8226f2f8c7df5c849523c8bbe9c37ad45' + '5a74594feb11c0c078ad4bbcefe662e54fc2a451ae7972a20247597ed392c1de' + '70198d0a35338cb56c4aad5ad1789a915a5b628a3e3b780f2767fbd30ef7e31d' + '7413278602ea7f9fc80d749d5008d029e775b191994c71ff78f5de5f780e2e3b' + '1e2900354c1a6c38e87eff51a96099473827d6c70530dd63b036bdb7ba7ab2fa') _architectures='i686-w64-mingw32 x86_64-w64-mingw32' +pkgver() { + cd $_pkgfqn + echo "5.15.2+kde+r"`git rev-list --count origin/5.15.2..$_commit` +} + prepare() { cd "${srcdir}/${_pkgfqn}" + git revert -n 6344955d17e17e2398720fe60c34cfc2a4a95208 # Revert version bump + # apply patches; further descriptions can be found in patch files itself for patch in "$srcdir/"*.patch; do msg2 "Applying patch $patch" patch -p1 -i "$patch" done - # make sure the Qt 5 build system uses our external PCRE library and zlib - rm -rf src/3rdparty/{pcre,zlib} - # clear buildflags ('!buildflags' only effects build() but not prepare()) unset CPPFLAGS CFLAGS CXXFLAGS LDFLAGS PKG_CONFIG_PATH diff --git a/qt5-base/mingw-w64-static/qtbase-sha256.txt b/qt5-base/mingw-w64-static/qtbase-sha256.txt index f34593c4..cc2ecb63 100644 --- a/qt5-base/mingw-w64-static/qtbase-sha256.txt +++ b/qt5-base/mingw-w64-static/qtbase-sha256.txt @@ -1 +1 @@ -909fad2591ee367993a75d7e2ea50ad4db332f05e1c38dd7a5a274e156a4e0f8 +SKIP diff --git a/qt5-base/mingw-w64/0001-Adjust-win32-g-profile-for-cross-compilation-with-mi.patch b/qt5-base/mingw-w64/0001-Adjust-win32-g-profile-for-cross-compilation-with-mi.patch index 06b812e0..93621b5d 100644 --- a/qt5-base/mingw-w64/0001-Adjust-win32-g-profile-for-cross-compilation-with-mi.patch +++ b/qt5-base/mingw-w64/0001-Adjust-win32-g-profile-for-cross-compilation-with-mi.patch @@ -1,4 +1,4 @@ -From ce90790a4f5c2dcf9398d846f63a6c6b50411dcb Mon Sep 17 00:00:00 2001 +From e598463de84a2fa54739b386acf64bef368e8089 Mon Sep 17 00:00:00 2001 From: Martchus Date: Fri, 3 Feb 2017 18:30:51 +0100 Subject: [PATCH 01/31] Adjust win32-g++ profile for cross compilation with @@ -161,5 +161,5 @@ index 5de482f23b..3c3d22c699 100644 QMAKE_LINK = $${CROSS_COMPILE}g++ -- -2.29.2 +2.31.1 diff --git a/qt5-base/mingw-w64/0002-Ensure-GLdouble-is-defined-when-using-dynamic-OpenGL.patch b/qt5-base/mingw-w64/0002-Ensure-GLdouble-is-defined-when-using-dynamic-OpenGL.patch index a7ba57b4..ccbdf7c9 100644 --- a/qt5-base/mingw-w64/0002-Ensure-GLdouble-is-defined-when-using-dynamic-OpenGL.patch +++ b/qt5-base/mingw-w64/0002-Ensure-GLdouble-is-defined-when-using-dynamic-OpenGL.patch @@ -1,4 +1,4 @@ -From adbb14a78c0091c81925e5e79644ff8361e7b8e9 Mon Sep 17 00:00:00 2001 +From e6fef0839710cdc28d5e5df0ae3189d16d629172 Mon Sep 17 00:00:00 2001 From: Martchus 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 4554291bbd..23d55bddeb 100644 #ifdef Q_ENABLE_OPENGL_FUNCTIONS_DEBUG #include -- -2.29.2 +2.31.1 diff --git a/qt5-base/mingw-w64/0003-Fix-too-many-sections-assemler-error-in-OpenGL-facto.patch b/qt5-base/mingw-w64/0003-Fix-too-many-sections-assemler-error-in-OpenGL-facto.patch index 31b28046..64a68df5 100644 --- a/qt5-base/mingw-w64/0003-Fix-too-many-sections-assemler-error-in-OpenGL-facto.patch +++ b/qt5-base/mingw-w64/0003-Fix-too-many-sections-assemler-error-in-OpenGL-facto.patch @@ -1,4 +1,4 @@ -From 520b519d962852792bd4ac3c2d1206afa329b65e Mon Sep 17 00:00:00 2001 +From 434420a1da0cc19096d1877b662eb6844ceb97dd Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 18 Sep 2016 13:48:51 +0200 Subject: [PATCH 03/31] Fix too many sections assemler error in OpenGL factory @@ -25,5 +25,5 @@ index 24758afdeb..aa04b4a672 100644 HEADERS += opengl/qopengl.h \ opengl/qopengl_p.h \ -- -2.29.2 +2.31.1 diff --git a/qt5-base/mingw-w64/0004-Make-sure-.pc-files-are-installed-correctly.patch b/qt5-base/mingw-w64/0004-Make-sure-.pc-files-are-installed-correctly.patch index 7ad86637..a9c2066f 100644 --- a/qt5-base/mingw-w64/0004-Make-sure-.pc-files-are-installed-correctly.patch +++ b/qt5-base/mingw-w64/0004-Make-sure-.pc-files-are-installed-correctly.patch @@ -1,4 +1,4 @@ -From 45491f6d0b4d828f3b4ce6b76ec3c7d68cec6b06 Mon Sep 17 00:00:00 2001 +From f041def0ede2e36edd35ddae430fb7c06186756e Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 18 Sep 2016 13:54:12 +0200 Subject: [PATCH 04/31] Make sure *.pc files are installed correctly @@ -10,10 +10,10 @@ Subject: [PATCH 04/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 5c61a3c65c..e94084381c 100644 +index a901332312..f1e8966123 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp -@@ -3211,7 +3211,7 @@ MakefileGenerator::openOutput(QFile &file, const QString &build) const +@@ -3218,7 +3218,7 @@ MakefileGenerator::openOutput(QFile &file, const QString &build) const } QString @@ -22,7 +22,7 @@ index 5c61a3c65c..e94084381c 100644 { QString ret = project->first("QMAKE_PKGCONFIG_FILE").toQString(); if (ret.isEmpty()) { -@@ -3236,7 +3236,11 @@ MakefileGenerator::pkgConfigFileName(bool fixify) +@@ -3243,7 +3243,11 @@ MakefileGenerator::pkgConfigFileName(bool fixify) if(fixify) { if(QDir::isRelativePath(ret) && !project->isEmpty("DESTDIR")) ret.prepend(project->first("DESTDIR").toQString()); @@ -36,7 +36,7 @@ index 5c61a3c65c..e94084381c 100644 return ret; } diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h -index a96b9c54da..5a7913be7a 100644 +index dc612c392c..7bfd2e1953 100644 --- a/qmake/generators/makefile.h +++ b/qmake/generators/makefile.h @@ -96,7 +96,7 @@ protected: @@ -62,5 +62,5 @@ index 5e446bd7e2..183cef2908 100644 uninst.append("\n\t"); uninst.append("-$(DEL_FILE) " + escapeFilePath(dst_pc)); -- -2.29.2 +2.31.1 diff --git a/qt5-base/mingw-w64/0005-Don-t-add-resource-files-to-LIBS-parameter.patch b/qt5-base/mingw-w64/0005-Don-t-add-resource-files-to-LIBS-parameter.patch index 8fe274d0..062e54e1 100644 --- a/qt5-base/mingw-w64/0005-Don-t-add-resource-files-to-LIBS-parameter.patch +++ b/qt5-base/mingw-w64/0005-Don-t-add-resource-files-to-LIBS-parameter.patch @@ -1,4 +1,4 @@ -From 806b631662ffebfa38085e1f9e708aee2c19f1d9 Mon Sep 17 00:00:00 2001 +From ed8bf76c5e770f8097a375b49f58bedd738f84f7 Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 18 Sep 2016 13:58:28 +0200 Subject: [PATCH 05/31] Don't add resource files to LIBS parameter @@ -24,5 +24,5 @@ index ee9a41838b..8d1dcae85b 100644 if (project->isActiveConfig("dll")) { QString destDir = ""; -- -2.29.2 +2.31.1 diff --git a/qt5-base/mingw-w64/0006-Prevent-debug-library-names-in-pkg-config-files.patch b/qt5-base/mingw-w64/0006-Prevent-debug-library-names-in-pkg-config-files.patch index 0bc5e996..3a1ca909 100644 --- a/qt5-base/mingw-w64/0006-Prevent-debug-library-names-in-pkg-config-files.patch +++ b/qt5-base/mingw-w64/0006-Prevent-debug-library-names-in-pkg-config-files.patch @@ -1,4 +1,4 @@ -From 3d816219968cfcaacfd30b6011263c8bb4d975c0 Mon Sep 17 00:00:00 2001 +From d77ce81ca24a85f10a0fb20a902f051c10662ea2 Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 18 Sep 2016 14:01:14 +0200 Subject: [PATCH 06/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 e94084381c..8e4d11484f 100644 +index f1e8966123..f45b6c9fd5 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp -@@ -3225,6 +3225,9 @@ MakefileGenerator::pkgConfigFileName(bool fixify, bool onlyPrependDestdir) +@@ -3232,6 +3232,9 @@ MakefileGenerator::pkgConfigFileName(bool fixify, bool onlyPrependDestdir) if (dot != -1) ret = ret.left(dot); } @@ -29,5 +29,5 @@ index e94084381c..8e4d11484f 100644 QString subdir = project->first("QMAKE_PKGCONFIG_DESTDIR").toQString(); if(!subdir.isEmpty()) { -- -2.29.2 +2.31.1 diff --git a/qt5-base/mingw-w64/0007-Fix-linking-against-shared-static-libpng.patch b/qt5-base/mingw-w64/0007-Fix-linking-against-shared-static-libpng.patch index 040ddbb4..1d7ff60c 100644 --- a/qt5-base/mingw-w64/0007-Fix-linking-against-shared-static-libpng.patch +++ b/qt5-base/mingw-w64/0007-Fix-linking-against-shared-static-libpng.patch @@ -1,4 +1,4 @@ -From 77037d64693385c1cdcc2814890567e79548b40d Mon Sep 17 00:00:00 2001 +From 6838542142005d64b1447a1720109c82b2eb0434 Mon Sep 17 00:00:00 2001 From: Martchus Date: Thu, 26 Jan 2017 17:51:31 +0100 Subject: [PATCH 07/31] Fix linking against shared/static libpng @@ -9,7 +9,7 @@ Change-Id: Ic7a0ec9544059b8e647a5d0186f1b88c00911dcf 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/configure.json b/src/gui/configure.json -index c8c4864eca..be519a6d39 100644 +index 1f08795c57..7a5fc6ce7a 100644 --- a/src/gui/configure.json +++ b/src/gui/configure.json @@ -399,8 +399,10 @@ @@ -26,5 +26,5 @@ index c8c4864eca..be519a6d39 100644 ], "use": [ -- -2.29.2 +2.31.1 diff --git a/qt5-base/mingw-w64/0008-Fix-linking-against-static-D-Bus.patch b/qt5-base/mingw-w64/0008-Fix-linking-against-static-D-Bus.patch index 82d8973a..be6d0a5b 100644 --- a/qt5-base/mingw-w64/0008-Fix-linking-against-static-D-Bus.patch +++ b/qt5-base/mingw-w64/0008-Fix-linking-against-static-D-Bus.patch @@ -1,4 +1,4 @@ -From be0366f6b3d32f5c80038eca7d0c7ddd5375aa85 Mon Sep 17 00:00:00 2001 +From 81a8053aafc7f2111ecdc0a07d4f5e062fd19f70 Mon Sep 17 00:00:00 2001 From: Martchus Date: Fri, 3 Feb 2017 19:36:25 +0100 Subject: [PATCH 08/31] Fix linking against static D-Bus @@ -9,7 +9,7 @@ Subject: [PATCH 08/31] Fix linking against static D-Bus 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/configure.json b/configure.json -index c273aeeef1..57c40030d8 100644 +index 4a7c50f684..fedc80fa18 100644 --- a/configure.json +++ b/configure.json @@ -190,18 +190,23 @@ @@ -54,5 +54,5 @@ index accaa4f5ed..4b11c74caa 100644 # include #else -- -2.29.2 +2.31.1 diff --git a/qt5-base/mingw-w64/0009-Don-t-try-to-use-debug-version-of-D-Bus-library.patch b/qt5-base/mingw-w64/0009-Don-t-try-to-use-debug-version-of-D-Bus-library.patch index 2d4c36b9..0b35e1c7 100644 --- a/qt5-base/mingw-w64/0009-Don-t-try-to-use-debug-version-of-D-Bus-library.patch +++ b/qt5-base/mingw-w64/0009-Don-t-try-to-use-debug-version-of-D-Bus-library.patch @@ -1,4 +1,4 @@ -From adb495753f647c7b78d923bb512e18003cd309a4 Mon Sep 17 00:00:00 2001 +From 83ce093ca3e4ba1414395840e550bd1cb4dcce41 Mon Sep 17 00:00:00 2001 From: Martchus Date: Fri, 2 Jun 2017 18:28:10 +0200 Subject: [PATCH 09/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 57c40030d8..2fa3c08440 100644 +index fedc80fa18..e308b5b7d7 100644 --- a/configure.json +++ b/configure.json @@ -203,7 +203,7 @@ @@ -25,5 +25,5 @@ index 57c40030d8..2fa3c08440 100644 }, "condition": "config.win32 && features.shared" -- -2.29.2 +2.31.1 diff --git a/qt5-base/mingw-w64/0010-Fix-linking-against-static-freetype2.patch b/qt5-base/mingw-w64/0010-Fix-linking-against-static-freetype2.patch index fc9a35eb..201be0f8 100644 --- a/qt5-base/mingw-w64/0010-Fix-linking-against-static-freetype2.patch +++ b/qt5-base/mingw-w64/0010-Fix-linking-against-static-freetype2.patch @@ -1,4 +1,4 @@ -From 8a8da9fb5e44acf747985254b8e4a0e663397c15 Mon Sep 17 00:00:00 2001 +From 82af201a622c806d9a26e5f2710ad1391034a957 Mon Sep 17 00:00:00 2001 From: Martchus Date: Fri, 3 Feb 2017 20:51:19 +0100 Subject: [PATCH 10/31] Fix linking against static freetype2 @@ -8,7 +8,7 @@ Subject: [PATCH 10/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 be519a6d39..d74fd3bc24 100644 +index 7a5fc6ce7a..b117f6fff6 100644 --- a/src/gui/configure.json +++ b/src/gui/configure.json @@ -238,8 +238,11 @@ @@ -26,5 +26,5 @@ index be519a6d39..d74fd3bc24 100644 { "libs": "-lfreetype" } ], -- -2.29.2 +2.31.1 diff --git a/qt5-base/mingw-w64/0011-Fix-linking-against-static-harfbuzz.patch b/qt5-base/mingw-w64/0011-Fix-linking-against-static-harfbuzz.patch index e03dd7e6..8dafb916 100644 --- a/qt5-base/mingw-w64/0011-Fix-linking-against-static-harfbuzz.patch +++ b/qt5-base/mingw-w64/0011-Fix-linking-against-static-harfbuzz.patch @@ -1,4 +1,4 @@ -From 32692f0bf4ae8f35145d963fe95b82a11a20e6ca Mon Sep 17 00:00:00 2001 +From 781ee4c305c86f72fb851324e10b85ad113ca8d3 Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 18 Sep 2016 14:22:56 +0200 Subject: [PATCH 11/31] Fix linking against static harfbuzz @@ -8,7 +8,7 @@ Subject: [PATCH 11/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 d74fd3bc24..d6759ed96a 100644 +index b117f6fff6..2a0207920a 100644 --- a/src/gui/configure.json +++ b/src/gui/configure.json @@ -306,7 +306,11 @@ @@ -25,5 +25,5 @@ index d74fd3bc24..d6759ed96a 100644 }, "imf": { -- -2.29.2 +2.31.1 diff --git a/qt5-base/mingw-w64/0012-Fix-linking-against-static-pcre.patch b/qt5-base/mingw-w64/0012-Fix-linking-against-static-pcre.patch index 403c1e86..f4638474 100644 --- a/qt5-base/mingw-w64/0012-Fix-linking-against-static-pcre.patch +++ b/qt5-base/mingw-w64/0012-Fix-linking-against-static-pcre.patch @@ -1,4 +1,4 @@ -From 3bb30ee7403e468705aa03e1d92f797d6ce38332 Mon Sep 17 00:00:00 2001 +From 0bac31a16786b2ffac3b8623d6a9f28b5924fee9 Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 18 Sep 2016 14:24:01 +0200 Subject: [PATCH 12/31] Fix linking against static pcre @@ -24,5 +24,5 @@ index d7e3cc5ee2..e17c19fbae 100644 #include -- -2.29.2 +2.31.1 diff --git a/qt5-base/mingw-w64/0013-Fix-linking-against-shared-static-MariaDB.patch b/qt5-base/mingw-w64/0013-Fix-linking-against-shared-static-MariaDB.patch index dda69c2f..a1761711 100644 --- a/qt5-base/mingw-w64/0013-Fix-linking-against-shared-static-MariaDB.patch +++ b/qt5-base/mingw-w64/0013-Fix-linking-against-shared-static-MariaDB.patch @@ -1,4 +1,4 @@ -From 5d301704de074aeee8464bf9933296a437353a6f Mon Sep 17 00:00:00 2001 +From 370cd6e5833f50acbd4fdfdef5d1b8465f369696 Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 18 Sep 2016 18:56:55 +0200 Subject: [PATCH 13/31] Fix linking against shared/static MariaDB @@ -22,5 +22,5 @@ index 28ccbeadcd..7262914c64 100644 { "type": "mysqlConfig", "query": "--libs", "cleanlibs": true }, { "type": "mysqlConfig", "query": "--libs_r", "cleanlibs": false }, -- -2.29.2 +2.31.1 diff --git a/qt5-base/mingw-w64/0014-Fix-linking-against-shared-static-PostgreSQL.patch b/qt5-base/mingw-w64/0014-Fix-linking-against-shared-static-PostgreSQL.patch index 366913c8..bfb06780 100644 --- a/qt5-base/mingw-w64/0014-Fix-linking-against-shared-static-PostgreSQL.patch +++ b/qt5-base/mingw-w64/0014-Fix-linking-against-shared-static-PostgreSQL.patch @@ -1,4 +1,4 @@ -From 0f760f0e2b127ca9e765d2bbf4200b047bfa1a5e Mon Sep 17 00:00:00 2001 +From f1cce674c4e438e623387d8091bb9b3528c1210d Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 18 Sep 2016 18:58:25 +0200 Subject: [PATCH 14/31] Fix linking against shared/static PostgreSQL @@ -24,5 +24,5 @@ index 7262914c64..852ba558be 100644 ] }, -- -2.29.2 +2.31.1 diff --git a/qt5-base/mingw-w64/0015-Rename-qtmain-to-qt5main.patch b/qt5-base/mingw-w64/0015-Rename-qtmain-to-qt5main.patch index 449698a9..44cf536e 100644 --- a/qt5-base/mingw-w64/0015-Rename-qtmain-to-qt5main.patch +++ b/qt5-base/mingw-w64/0015-Rename-qtmain-to-qt5main.patch @@ -1,4 +1,4 @@ -From 092e86f5dedf3173be832f868b60b1c306c42bfa Mon Sep 17 00:00:00 2001 +From 9aa2c124207494aaedfeead42851cc0cbf488237 Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 18 Sep 2016 14:25:40 +0200 Subject: [PATCH 15/31] Rename qtmain to qt5main @@ -76,5 +76,5 @@ index 1f54c846ec..162e7a4b1b 100644 CONFIG += static -- -2.29.2 +2.31.1 diff --git a/qt5-base/mingw-w64/0016-Enable-rpath-for-build-tools.patch b/qt5-base/mingw-w64/0016-Enable-rpath-for-build-tools.patch index c4cf6a4e..540fd010 100644 --- a/qt5-base/mingw-w64/0016-Enable-rpath-for-build-tools.patch +++ b/qt5-base/mingw-w64/0016-Enable-rpath-for-build-tools.patch @@ -1,4 +1,4 @@ -From fc76d4187ab337a5efb96d6b80099f5075df69ee Mon Sep 17 00:00:00 2001 +From 8d40dc38a6d42e0aa72d94dead17af04319345a6 Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 18 Sep 2016 17:59:27 +0200 Subject: [PATCH 16/31] Enable rpath for build tools @@ -33,5 +33,5 @@ index 8354f30eea..30e8cf18c5 100644 INSTALLS += target -- -2.29.2 +2.31.1 diff --git a/qt5-base/mingw-w64/0017-Use-system-zlib-for-build-tools.patch b/qt5-base/mingw-w64/0017-Use-system-zlib-for-build-tools.patch index 6a30f8cd..3aabdee0 100644 --- a/qt5-base/mingw-w64/0017-Use-system-zlib-for-build-tools.patch +++ b/qt5-base/mingw-w64/0017-Use-system-zlib-for-build-tools.patch @@ -1,4 +1,4 @@ -From 2e0b11f0f0ba3e756f010b5948b24089be5e3aed Mon Sep 17 00:00:00 2001 +From ec4a953eddc6fe6f19a8f932ef4bcbcb15868e63 Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 18 Sep 2016 18:04:42 +0200 Subject: [PATCH 17/31] Use system zlib for build tools @@ -23,5 +23,5 @@ index 24862a07db..698e6cfb95 100644 } else { CONFIG += no_core_dep -- -2.29.2 +2.31.1 diff --git a/qt5-base/mingw-w64/0018-Merge-shared-and-static-library-trees.patch b/qt5-base/mingw-w64/0018-Merge-shared-and-static-library-trees.patch index ae13c161..8a70156a 100644 --- a/qt5-base/mingw-w64/0018-Merge-shared-and-static-library-trees.patch +++ b/qt5-base/mingw-w64/0018-Merge-shared-and-static-library-trees.patch @@ -1,4 +1,4 @@ -From bd22c9c095f87d358ea2269bfdd19cc31078b0b1 Mon Sep 17 00:00:00 2001 +From f0d6651cfac8231a7f57a0f70300d439f56ed5fc Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 18 Sep 2016 18:45:08 +0200 Subject: [PATCH 18/31] Merge shared and static library trees @@ -139,10 +139,10 @@ index 51ea3a8321..275e080ae4 100644 QMAKE_EXT_YACC = .y diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp -index 8e4d11484f..c73b19c144 100644 +index f45b6c9fd5..39221caf68 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp -@@ -3228,6 +3228,9 @@ MakefileGenerator::pkgConfigFileName(bool fixify, bool onlyPrependDestdir) +@@ -3235,6 +3235,9 @@ MakefileGenerator::pkgConfigFileName(bool fixify, bool onlyPrependDestdir) if (project->isActiveConfig("debug")) { ret += "d"; } @@ -152,7 +152,7 @@ index 8e4d11484f..c73b19c144 100644 ret += Option::pkgcfg_ext; QString subdir = project->first("QMAKE_PKGCONFIG_DESTDIR").toQString(); if(!subdir.isEmpty()) { -@@ -3404,11 +3407,11 @@ MakefileGenerator::writePkgConfigFile() +@@ -3411,11 +3414,11 @@ MakefileGenerator::writePkgConfigFile() t << Qt::endl; // requires @@ -204,5 +204,5 @@ index c0ce0972ef..5a2deaf31d 100644 mkspecs.files -= $$PWD/mkspecs/modules $$PWD/mkspecs/modules-inst INSTALLS += mkspecs -- -2.29.2 +2.31.1 diff --git a/qt5-base/mingw-w64/0019-Use-.dll.a-as-import-lib-extension.patch b/qt5-base/mingw-w64/0019-Use-.dll.a-as-import-lib-extension.patch index 7ae06611..ba915dcd 100644 --- a/qt5-base/mingw-w64/0019-Use-.dll.a-as-import-lib-extension.patch +++ b/qt5-base/mingw-w64/0019-Use-.dll.a-as-import-lib-extension.patch @@ -1,4 +1,4 @@ -From ae893f34a059c78cf274d1ed05c2d4c4bfb66218 Mon Sep 17 00:00:00 2001 +From de05a40cbb5e86f0a0217624f80cb1a1ad31351f Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 18 Sep 2016 18:26:18 +0200 Subject: [PATCH 19/31] Use *.dll.a as import lib extension @@ -94,5 +94,5 @@ index 183cef2908..03732df4a8 100644 + project->first("QMAKE_EXTENSION_SHLIB")); project->values("TARGET").first() = project->first("QMAKE_PREFIX_SHLIB") + project->first("TARGET"); -- -2.29.2 +2.31.1 diff --git a/qt5-base/mingw-w64/0020-Pull-dependencies-of-static-libraries-in-CMake-modul.patch b/qt5-base/mingw-w64/0020-Pull-dependencies-of-static-libraries-in-CMake-modul.patch index 4bcd8f46..d1ebf92e 100644 --- a/qt5-base/mingw-w64/0020-Pull-dependencies-of-static-libraries-in-CMake-modul.patch +++ b/qt5-base/mingw-w64/0020-Pull-dependencies-of-static-libraries-in-CMake-modul.patch @@ -1,4 +1,4 @@ -From 1b69d19dd9ef7d00a5eec9a22961c3232e19e5b1 Mon Sep 17 00:00:00 2001 +From 625df2d13ff194603a339e770c645489e2a52f9a Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 18 Sep 2016 18:32:00 +0200 Subject: [PATCH 20/31] Pull dependencies of static libraries in CMake modules @@ -501,5 +501,5 @@ index b550a52c60..acbe1cc33b 100644 +endif() \ No newline at end of file -- -2.29.2 +2.31.1 diff --git a/qt5-base/mingw-w64/0021-Allow-usage-of-static-version-with-CMake.patch b/qt5-base/mingw-w64/0021-Allow-usage-of-static-version-with-CMake.patch index 17ed0bed..847f92f2 100644 --- a/qt5-base/mingw-w64/0021-Allow-usage-of-static-version-with-CMake.patch +++ b/qt5-base/mingw-w64/0021-Allow-usage-of-static-version-with-CMake.patch @@ -1,4 +1,4 @@ -From 494194c5b6b2775e756e911f5befde85e9ce13e4 Mon Sep 17 00:00:00 2001 +From 195f06dc9b77f9c5db4cbab8af0b8dc2fac34427 Mon Sep 17 00:00:00 2001 From: Martchus Date: Sat, 5 Aug 2017 21:14:26 +0200 Subject: [PATCH 21/31] Allow usage of static version with CMake @@ -1091,5 +1091,5 @@ index 2a575958ae..ca0e3be3b5 100644 INTERFACE_COMPILE_DEFINITIONS QT_TESTCASE_BUILDDIR=\\\"\${CMAKE_BINARY_DIR}\\\" ) -- -2.29.2 +2.31.1 diff --git a/qt5-base/mingw-w64/0022-Adjust-linker-flags-for-static-build-with-cmake-ming.patch b/qt5-base/mingw-w64/0022-Adjust-linker-flags-for-static-build-with-cmake-ming.patch index d8d31d0b..3b9ad058 100644 --- a/qt5-base/mingw-w64/0022-Adjust-linker-flags-for-static-build-with-cmake-ming.patch +++ b/qt5-base/mingw-w64/0022-Adjust-linker-flags-for-static-build-with-cmake-ming.patch @@ -1,4 +1,4 @@ -From 0f44180723f14ae9861b406238d973e0ca20c405 Mon Sep 17 00:00:00 2001 +From 70e76369ababd9f7c22cef148eaa2755e31c2b2b Mon Sep 17 00:00:00 2001 From: Martchus Date: Fri, 2 Jun 2017 16:42:07 +0200 Subject: [PATCH 22/31] Adjust linker flags for static build with @@ -27,5 +27,5 @@ index 9da1361c95..5e802dea4c 100644 +set_target_properties(${IMPORTED_TARGET_NAME} PROPERTIES \"INTERFACE_LINK_LIBRARIES\" \"$<${_isExe}:-static;ws2_32>\") +unset(_isExe) -- -2.29.2 +2.31.1 diff --git a/qt5-base/mingw-w64/0023-Use-correct-pkg-config-static-flag.patch b/qt5-base/mingw-w64/0023-Use-correct-pkg-config-static-flag.patch index 873c3996..7992084d 100644 --- a/qt5-base/mingw-w64/0023-Use-correct-pkg-config-static-flag.patch +++ b/qt5-base/mingw-w64/0023-Use-correct-pkg-config-static-flag.patch @@ -1,4 +1,4 @@ -From 0084c7966f46b5a64cac040a8c50c793ba680930 Mon Sep 17 00:00:00 2001 +From ee3bd9b4ff71e2f8f923245f61294284c7085d8a Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 18 Sep 2016 18:50:21 +0200 Subject: [PATCH 23/31] Use correct pkg-config --static flag @@ -22,5 +22,5 @@ index 53c67f885b..8934b72291 100644 $$qtConfEvaluate("features.cross_compile") { # cross compiling, check that pkg-config is set up sanely -- -2.29.2 +2.31.1 diff --git a/qt5-base/mingw-w64/0024-Fix-macro-invoking-moc-rcc-and-uic.patch b/qt5-base/mingw-w64/0024-Fix-macro-invoking-moc-rcc-and-uic.patch index 2a0983f1..ef906160 100644 --- a/qt5-base/mingw-w64/0024-Fix-macro-invoking-moc-rcc-and-uic.patch +++ b/qt5-base/mingw-w64/0024-Fix-macro-invoking-moc-rcc-and-uic.patch @@ -1,4 +1,4 @@ -From e5389013ff78085fdfdfbf1da5b0644e784c916d Mon Sep 17 00:00:00 2001 +From 292851da7011f84ffa9031cc653997b7a5a9822e Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 4 Dec 2016 20:35:47 +0100 Subject: [PATCH 24/31] Fix macro invoking moc, rcc and uic @@ -70,5 +70,5 @@ index 35d2a2dc54..99f061f1b8 100644 MAIN_DEPENDENCY ${infile} VERBATIM) set_source_files_properties(${infile} PROPERTIES SKIP_AUTOUIC ON) -- -2.29.2 +2.31.1 diff --git a/qt5-base/mingw-w64/0025-Ignore-errors-about-missing-feature-static.patch b/qt5-base/mingw-w64/0025-Ignore-errors-about-missing-feature-static.patch index beb723a6..74a69eb1 100644 --- a/qt5-base/mingw-w64/0025-Ignore-errors-about-missing-feature-static.patch +++ b/qt5-base/mingw-w64/0025-Ignore-errors-about-missing-feature-static.patch @@ -1,4 +1,4 @@ -From d29a2b44643831e439755d11348b69dc9ed6d60b Mon Sep 17 00:00:00 2001 +From 318d7e6283975013fc4eea21c5c2ac861849aafe Mon Sep 17 00:00:00 2001 From: Martchus Date: Wed, 25 Jan 2017 20:59:54 +0100 Subject: [PATCH 25/31] Ignore errors about missing feature static @@ -32,5 +32,5 @@ index 7777e615bd..5f30366660 100644 + !equals($$1, "static"): error("Could not find feature $${1}.") } -- -2.29.2 +2.31.1 diff --git a/qt5-base/mingw-w64/0026-Enable-and-fix-use-of-iconv.patch b/qt5-base/mingw-w64/0026-Enable-and-fix-use-of-iconv.patch index f0ac0098..b30fc0b0 100644 --- a/qt5-base/mingw-w64/0026-Enable-and-fix-use-of-iconv.patch +++ b/qt5-base/mingw-w64/0026-Enable-and-fix-use-of-iconv.patch @@ -1,4 +1,4 @@ -From becf49560bdf91b82df7bec0bc06c54d7ab8c948 Mon Sep 17 00:00:00 2001 +From 5e272dca9b420ada9e233a8b9134035b3747d8ee Mon Sep 17 00:00:00 2001 From: Martchus Date: Wed, 25 Jan 2017 21:08:20 +0100 Subject: [PATCH 26/31] Enable and fix use of iconv @@ -49,7 +49,7 @@ index 9c39727946..cc14036b25 100644 #else char **inBytesPtr = &inBytes; diff --git a/src/corelib/configure.json b/src/corelib/configure.json -index c5e0423273..0b12e22351 100644 +index 9b5d19d41b..f649a9f6ef 100644 --- a/src/corelib/configure.json +++ b/src/corelib/configure.json @@ -72,7 +72,7 @@ @@ -74,5 +74,5 @@ index c5e0423273..0b12e22351 100644 }, "icu": { -- -2.29.2 +2.31.1 diff --git a/qt5-base/mingw-w64/0027-Ignore-failing-pkg-config-test.patch b/qt5-base/mingw-w64/0027-Ignore-failing-pkg-config-test.patch index 0eef1044..71f1eff1 100644 --- a/qt5-base/mingw-w64/0027-Ignore-failing-pkg-config-test.patch +++ b/qt5-base/mingw-w64/0027-Ignore-failing-pkg-config-test.patch @@ -1,4 +1,4 @@ -From 2fd3c54980c0be5efa03f64c8998287d683ff54f Mon Sep 17 00:00:00 2001 +From 407fc2e686c14cf64cc519225440439b783b15f6 Mon Sep 17 00:00:00 2001 From: Martchus Date: Wed, 25 Jan 2017 21:08:48 +0100 Subject: [PATCH 27/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 2fa3c08440..d96d2a6ecb 100644 +index e308b5b7d7..928ee2afa1 100644 --- a/configure.json +++ b/configure.json @@ -772,7 +772,6 @@ @@ -21,5 +21,5 @@ index 2fa3c08440..d96d2a6ecb 100644 "publicFeature", { "type": "publicQtConfig", "negative": true }, -- -2.29.2 +2.31.1 diff --git a/qt5-base/mingw-w64/0028-Prevent-qmake-from-messing-static-lib-dependencies.patch b/qt5-base/mingw-w64/0028-Prevent-qmake-from-messing-static-lib-dependencies.patch index 14e719aa..c862bd56 100644 --- a/qt5-base/mingw-w64/0028-Prevent-qmake-from-messing-static-lib-dependencies.patch +++ b/qt5-base/mingw-w64/0028-Prevent-qmake-from-messing-static-lib-dependencies.patch @@ -1,4 +1,4 @@ -From e6e16f20966d91dd3c0020d4784d04e79b95613f Mon Sep 17 00:00:00 2001 +From defdf39ad4a6d4c905e7416da5e4160b093b1fc5 Mon Sep 17 00:00:00 2001 From: Martchus Date: Tue, 7 Feb 2017 18:25:28 +0100 Subject: [PATCH 28/31] Prevent qmake from messing static lib dependencies @@ -41,5 +41,5 @@ index 03732df4a8..602f7609f5 100644 int libidx = 0; for (const ProString &dlib : project->values("QMAKE_DEFAULT_LIBDIRS")) -- -2.29.2 +2.31.1 diff --git a/qt5-base/mingw-w64/0029-Hardcode-linker-flags-for-platform-plugins.patch b/qt5-base/mingw-w64/0029-Hardcode-linker-flags-for-platform-plugins.patch index 25482a8a..b46165dc 100644 --- a/qt5-base/mingw-w64/0029-Hardcode-linker-flags-for-platform-plugins.patch +++ b/qt5-base/mingw-w64/0029-Hardcode-linker-flags-for-platform-plugins.patch @@ -1,13 +1,15 @@ -From d7d5e89ed1d5b7ea3962588eb719a85c85356f09 Mon Sep 17 00:00:00 2001 +From 1af55162492b245d789b9d76234eeef3d0fed5f6 Mon Sep 17 00:00:00 2001 From: Martchus Date: Wed, 25 Jan 2017 23:42:30 +0100 Subject: [PATCH 29/31] Hardcode linker flags for platform plugins Otherwise incorrect order of libs leads to errors when building libqminimal.dll, libqoffscreen.dll, -libqwindows.dll and libqdirect2d.dll +libqwindows.dll and libqdirect2d.dll. Unfortunately +this workaround leads to hardcoding include flags +as well. -Change-Id: Ibff901ecce864ae8d5ca2adbe37bcec28e5912f3 +Change-Id: I1863d184cff744d2c02e15875e1d108d32ea7861 --- src/plugins/platforms/direct2d/direct2d.pro | 39 +++++++++++++++--- src/plugins/platforms/minimal/minimal.pro | 17 +++++++- @@ -16,7 +18,7 @@ Change-Id: Ibff901ecce864ae8d5ca2adbe37bcec28e5912f3 4 files changed, 93 insertions(+), 19 deletions(-) diff --git a/src/plugins/platforms/direct2d/direct2d.pro b/src/plugins/platforms/direct2d/direct2d.pro -index 6e73bd14f9..0829c75bd2 100644 +index 6e73bd14f9..8046e73d61 100644 --- a/src/plugins/platforms/direct2d/direct2d.pro +++ b/src/plugins/platforms/direct2d/direct2d.pro @@ -1,12 +1,41 @@ @@ -39,35 +41,35 @@ index 6e73bd14f9..0829c75bd2 100644 + -lfreetype -lole32 -lgdi32 -luuid +# However, this workaround leads to the necessity of specifying include dirs manually +INCLUDEPATH += \ -+ $$QT_SOURCE_TREE/include/QtEventDispatcherSupport/$${QT_VERSION}/QtEventDispatcherSupport \ -+ $$QT_SOURCE_TREE/include/QtEventDispatcherSupport/$${QT_VERSION} \ -+ $$QT_SOURCE_TREE/include/QtFontDatabaseSupport/$${QT_VERSION}/QtFontDatabaseSupport \ -+ $$QT_SOURCE_TREE/include/QtFontDatabaseSupport/$${QT_VERSION} \ -+ $$QT_SOURCE_TREE/include/QtThemeSupport/$${QT_VERSION}/QtThemeSupport \ -+ $$QT_SOURCE_TREE/include/QtThemeSupport/$${QT_VERSION} ++ $$QT_BUILD_TREE/include/QtEventDispatcherSupport/$${QT_VERSION}/QtEventDispatcherSupport \ ++ $$QT_BUILD_TREE/include/QtEventDispatcherSupport/$${QT_VERSION} \ ++ $$QT_BUILD_TREE/include/QtFontDatabaseSupport/$${QT_VERSION}/QtFontDatabaseSupport \ ++ $$QT_BUILD_TREE/include/QtFontDatabaseSupport/$${QT_VERSION} \ ++ $$QT_BUILD_TREE/include/QtThemeSupport/$${QT_VERSION}/QtThemeSupport \ ++ $$QT_BUILD_TREE/include/QtThemeSupport/$${QT_VERSION} +# Same for private support libs for accessibility and vulkan, if those are enabled +qtConfig(accessibility) { + LIBS += $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5AccessibilitySupport.$${QMAKE_EXTENSION_STATICLIB} + INCLUDEPATH += \ -+ $$QT_SOURCE_TREE/include/QtAccessibilitySupport/$${QT_VERSION}/Qt5AccessibilitySupport \ -+ $$QT_SOURCE_TREE/include/QtAccessibilitySupport/$${QT_VERSION} ++ $$QT_BUILD_TREE/include/QtAccessibilitySupport/$${QT_VERSION}/Qt5AccessibilitySupport \ ++ $$QT_BUILD_TREE/include/QtAccessibilitySupport/$${QT_VERSION} +} +qtConfig(vulkan) { + LIBS += $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5VulkanSupport.$${QMAKE_EXTENSION_STATICLIB} + INCLUDEPATH += \ -+ $$QT_SOURCE_TREE/include/QtVulkanSupport/$${QT_VERSION}/Qt5VulkanSupport \ -+ $$QT_SOURCE_TREE/include/QtVulkanSupport/$${QT_VERSION} ++ $$QT_BUILD_TREE/include/QtVulkanSupport/$${QT_VERSION}/Qt5VulkanSupport \ ++ $$QT_BUILD_TREE/include/QtVulkanSupport/$${QT_VERSION} +} +# Also add Qt5WindowsUIAutomationSupport - it seems to link against it +LIBS += $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5WindowsUIAutomationSupport.$${QMAKE_EXTENSION_STATICLIB} +INCLUDEPATH += \ -+ $$QT_SOURCE_TREE/include/Qt5WindowsUIAutomationSupport/$${QT_VERSION}/Qt5WindowsUIAutomationSupport \ -+ $$QT_SOURCE_TREE/include/Qt5WindowsUIAutomationSupport/$${QT_VERSION} ++ $$QT_BUILD_TREE/include/Qt5WindowsUIAutomationSupport/$${QT_VERSION}/Qt5WindowsUIAutomationSupport \ ++ $$QT_BUILD_TREE/include/Qt5WindowsUIAutomationSupport/$${QT_VERSION} LIBS += -ldwmapi -lversion QMAKE_USE_PRIVATE += gdi32 dwrite_1 d2d1_1 d3d11_1 dxgi1_2 diff --git a/src/plugins/platforms/minimal/minimal.pro b/src/plugins/platforms/minimal/minimal.pro -index a1a2da547b..74ced58662 100644 +index a1a2da547b..9fd5c4fca2 100644 --- a/src/plugins/platforms/minimal/minimal.pro +++ b/src/plugins/platforms/minimal/minimal.pro @@ -1,8 +1,21 @@ @@ -86,16 +88,16 @@ index a1a2da547b..74ced58662 100644 + -lfreetype -lole32 -lgdi32 -luuid +# However, this workaround leads to the necessity of specifying include dirs manually +INCLUDEPATH += \ -+ $$QT_SOURCE_TREE/include/QtEventDispatcherSupport/$${QT_VERSION}/QtEventDispatcherSupport \ -+ $$QT_SOURCE_TREE/include/QtEventDispatcherSupport/$${QT_VERSION} \ -+ $$QT_SOURCE_TREE/include/QtFontDatabaseSupport/$${QT_VERSION}/QtFontDatabaseSupport \ -+ $$QT_SOURCE_TREE/include/QtFontDatabaseSupport/$${QT_VERSION} ++ $$QT_BUILD_TREE/include/QtEventDispatcherSupport/$${QT_VERSION}/QtEventDispatcherSupport \ ++ $$QT_BUILD_TREE/include/QtEventDispatcherSupport/$${QT_VERSION} \ ++ $$QT_BUILD_TREE/include/QtFontDatabaseSupport/$${QT_VERSION}/QtFontDatabaseSupport \ ++ $$QT_BUILD_TREE/include/QtFontDatabaseSupport/$${QT_VERSION} + DEFINES += QT_NO_FOREACH diff --git a/src/plugins/platforms/offscreen/offscreen.pro b/src/plugins/platforms/offscreen/offscreen.pro -index f226132592..cac8a007b8 100644 +index f226132592..592fa7406f 100644 --- a/src/plugins/platforms/offscreen/offscreen.pro +++ b/src/plugins/platforms/offscreen/offscreen.pro @@ -1,8 +1,20 @@ @@ -114,15 +116,15 @@ index f226132592..cac8a007b8 100644 + -lfreetype -lole32 -lgdi32 -luuid +# However, this workaround leads to the necessity of specifying include dirs manually +INCLUDEPATH += \ -+ $$QT_SOURCE_TREE/include/QtEventDispatcherSupport/$${QT_VERSION}/QtEventDispatcherSupport \ -+ $$QT_SOURCE_TREE/include/QtEventDispatcherSupport/$${QT_VERSION} \ -+ $$QT_SOURCE_TREE/include/QtFontDatabaseSupport/$${QT_VERSION}/QtFontDatabaseSupport \ -+ $$QT_SOURCE_TREE/include/QtFontDatabaseSupport/$${QT_VERSION} ++ $$QT_BUILD_TREE/include/QtEventDispatcherSupport/$${QT_VERSION}/QtEventDispatcherSupport \ ++ $$QT_BUILD_TREE/include/QtEventDispatcherSupport/$${QT_VERSION} \ ++ $$QT_BUILD_TREE/include/QtFontDatabaseSupport/$${QT_VERSION}/QtFontDatabaseSupport \ ++ $$QT_BUILD_TREE/include/QtFontDatabaseSupport/$${QT_VERSION} DEFINES += QT_NO_FOREACH diff --git a/src/plugins/platforms/windows/windows.pro b/src/plugins/platforms/windows/windows.pro -index 50a3bb41a9..53c011642f 100644 +index 50a3bb41a9..02f74650a9 100644 --- a/src/plugins/platforms/windows/windows.pro +++ b/src/plugins/platforms/windows/windows.pro @@ -1,15 +1,35 @@ @@ -149,28 +151,28 @@ index 50a3bb41a9..53c011642f 100644 + -lfreetype -lole32 -lgdi32 -ldwmapi +# However, this workaround leads to the necessity of specifying include dirs manually +INCLUDEPATH += \ -+ $$QT_SOURCE_TREE/include/QtEventDispatcherSupport/$${QT_VERSION}/QtEventDispatcherSupport \ -+ $$QT_SOURCE_TREE/include/QtEventDispatcherSupport/$${QT_VERSION} \ -+ $$QT_SOURCE_TREE/include/QtFontDatabaseSupport/$${QT_VERSION}/QtFontDatabaseSupport \ -+ $$QT_SOURCE_TREE/include/QtFontDatabaseSupport/$${QT_VERSION} \ -+ $$QT_SOURCE_TREE/include/QtThemeSupport/$${QT_VERSION}/QtThemeSupport \ -+ $$QT_SOURCE_TREE/include/QtThemeSupport/$${QT_VERSION} ++ $$QT_BUILD_TREE/include/QtEventDispatcherSupport/$${QT_VERSION}/QtEventDispatcherSupport \ ++ $$QT_BUILD_TREE/include/QtEventDispatcherSupport/$${QT_VERSION} \ ++ $$QT_BUILD_TREE/include/QtFontDatabaseSupport/$${QT_VERSION}/QtFontDatabaseSupport \ ++ $$QT_BUILD_TREE/include/QtFontDatabaseSupport/$${QT_VERSION} \ ++ $$QT_BUILD_TREE/include/QtThemeSupport/$${QT_VERSION}/QtThemeSupport \ ++ $$QT_BUILD_TREE/include/QtThemeSupport/$${QT_VERSION} +# Same for private support libs for accessibility and vulkan, if those are enabled +qtConfig(accessibility) { + LIBS += $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5AccessibilitySupport.$${QMAKE_EXTENSION_STATICLIB} + INCLUDEPATH += \ -+ $$QT_SOURCE_TREE/include/QtAccessibilitySupport/$${QT_VERSION}/Qt5AccessibilitySupport \ -+ $$QT_SOURCE_TREE/include/QtAccessibilitySupport/$${QT_VERSION} ++ $$QT_BUILD_TREE/include/QtAccessibilitySupport/$${QT_VERSION}/Qt5AccessibilitySupport \ ++ $$QT_BUILD_TREE/include/QtAccessibilitySupport/$${QT_VERSION} +} +qtConfig(vulkan) { + LIBS += $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5VulkanSupport.$${QMAKE_EXTENSION_STATICLIB} + INCLUDEPATH += \ -+ $$QT_SOURCE_TREE/include/QtVulkanSupport/$${QT_VERSION}/Qt5VulkanSupport \ -+ $$QT_SOURCE_TREE/include/QtVulkanSupport/$${QT_VERSION} ++ $$QT_BUILD_TREE/include/QtVulkanSupport/$${QT_VERSION}/Qt5VulkanSupport \ ++ $$QT_BUILD_TREE/include/QtVulkanSupport/$${QT_VERSION} +} include(windows.pri) -- -2.29.2 +2.31.1 diff --git a/qt5-base/mingw-w64/0030-Fix-linking-against-static-plugins-with-qmake.patch b/qt5-base/mingw-w64/0030-Fix-linking-against-static-plugins-with-qmake.patch index a306ece1..d40100ef 100644 --- a/qt5-base/mingw-w64/0030-Fix-linking-against-static-plugins-with-qmake.patch +++ b/qt5-base/mingw-w64/0030-Fix-linking-against-static-plugins-with-qmake.patch @@ -1,4 +1,4 @@ -From cd3c5ceea13a08c8eea88eea90b24a2cacf816a3 Mon Sep 17 00:00:00 2001 +From ff9e461f1fa6eab244ca2adafa4d5e2ac2d85e5b Mon Sep 17 00:00:00 2001 From: Martchus Date: Fri, 25 Aug 2017 17:07:17 +0200 Subject: [PATCH 30/31] Fix linking against static plugins with qmake @@ -33,5 +33,5 @@ index b79b324b88..6a03b7a74b 100644 # Check if the plugin is known to Qt. We can use this to determine # the plugin path. Unknown plugins must rely on the default link path. -- -2.29.2 +2.31.1 diff --git a/qt5-base/mingw-w64/0031-Prevent-Cannot-find-feature-windows_vulkan_sdk.patch b/qt5-base/mingw-w64/0031-Prevent-Cannot-find-feature-windows_vulkan_sdk.patch index 6632e2d1..adfa4bbc 100644 --- a/qt5-base/mingw-w64/0031-Prevent-Cannot-find-feature-windows_vulkan_sdk.patch +++ b/qt5-base/mingw-w64/0031-Prevent-Cannot-find-feature-windows_vulkan_sdk.patch @@ -1,4 +1,4 @@ -From 25a9b54ce96ea574fe18bc6df5dc2ee571d22c36 Mon Sep 17 00:00:00 2001 +From f483f2d0cf4db82ba2302874c67923b77ae15cb9 Mon Sep 17 00:00:00 2001 From: Martchus Date: Mon, 24 Jun 2019 13:51:02 +0200 Subject: [PATCH 31/31] Prevent 'Cannot find feature windows_vulkan_sdk' @@ -33,5 +33,5 @@ index 8475e4111a..c0eb8faa17 100644 LD_USES = $$resolve_depends(LD_USES, QMAKE_DEPENDS_, _LD) for (nu, LD_USES) { -- -2.29.2 +2.31.1 diff --git a/qt5-base/mingw-w64/PKGBUILD b/qt5-base/mingw-w64/PKGBUILD index b6221dfa..a845432e 100644 --- a/qt5-base/mingw-w64/PKGBUILD +++ b/qt5-base/mingw-w64/PKGBUILD @@ -17,8 +17,9 @@ _qt_module=qtbase pkgname=mingw-w64-qt5-base -pkgver=5.15.2 +pkgver=5.15.2+kde+r172 pkgrel=1 +_commit=cfa90a94f95510711e25920e7742b37faa2f4843 pkgdesc='A cross-platform application and UI framework, native OpenGL backend (mingw-w64)' arch=('i686' 'x86_64') url='https://www.qt.io/' @@ -30,11 +31,11 @@ optdepends=('mingw-w64-mesa: use LLVMpipe software rasterizer for Qt Quick' 'mingw-w64-postgresql: PostgreSQL support' 'mingw-w64-mariadb-connector-c: MySQL support') makedepends=('mingw-w64-gcc' 'mingw-w64-postgresql' 'mingw-w64-mariadb-connector-c' - 'mingw-w64-vulkan-headers' 'mingw-w64-pkg-config' 'mingw-w64-environment') + 'mingw-w64-vulkan-headers' 'mingw-w64-pkg-config' 'mingw-w64-environment' 'git') groups=('mingw-w64-qt5') options=('!strip' '!buildflags' 'staticlibs' '!emptydirs') -_pkgfqn="${_qt_module}-everywhere-src-${pkgver}" -source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz" +_pkgfqn=${_qt_module} +source=(git+https://invent.kde.org/qt/qt/$_pkgfqn#commit=$_commit '0001-Adjust-win32-g-profile-for-cross-compilation-with-mi.patch' '0002-Ensure-GLdouble-is-defined-when-using-dynamic-OpenGL.patch' '0003-Fix-too-many-sections-assemler-error-in-OpenGL-facto.patch' @@ -66,53 +67,57 @@ source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/subm '0029-Hardcode-linker-flags-for-platform-plugins.patch' '0030-Fix-linking-against-static-plugins-with-qmake.patch' '0031-Prevent-Cannot-find-feature-windows_vulkan_sdk.patch') -sha256sums=('909fad2591ee367993a75d7e2ea50ad4db332f05e1c38dd7a5a274e156a4e0f8' - 'b3b49e5580f296f993a0aba0b34bd5ae2399f8d1809456878c1881451b14c27e' - '833b8fc2dd8f0bb4a914fb7f5018b28954752b2d54cec2388332885c929a9266' - 'e49f91d9f8f56afc856a9e143feb4ad9cf54c804f773374e5ccb6d1fc264a7bc' - '944288f57ac8cc9063a75a3a6b421c20a3e8b02a5fd5294f7da7df28c840302b' - 'b421b77303f6f03682c04f1bd1c2c63e07b120dc724de93a9248330d0080ee26' - '595fe18bbefb6f7e271a9daeefbd008d6350ef44b16b4b72c4d3183ba14509ee' - '238900f33394be14378b58445abe28dcd66343ed4f0760c8f944508c02ae831b' - 'bbde0b8ac3a9639a90e2937367deb769ea39ee55b036995a253ec8fdd1d2bd2c' - '859c065f54819266b33bab6b57f76f8c21065a48ff36104b191e218e31f20f9e' - '896c0b0d346f271f90609c6b49490ee86d3076ae620af1127503ee397a7664bb' - '15c69cd06b6e28100ad118ed045abef670acd41609351cd8e2652f1aeec9c8c4' - '499b3a1177e2340b5063553452b0a9a44f232e47839f03087939f52da38d0548' - 'bbe45a397cbc4c0303125937710e305c6dbb0e4a8713b4a520ff820208295ea8' - '3fedd43cccc7000271766f7b4ff85efafc9c65ce3b9f40f4c443a0f352518631' - '2b4854083457f85a82e8f05c23d3983095ff8aa1d1e0ea5cfe1f7e9731b061f8' - '6d4dc98c2b9e0ed743332797e1511262bda3b240e4685c2150a40415650c78f0' - '27b0eb4795713e1c6804dbb446970684c19cc2797f9e371eb2605c852d404b05' - '0fa5c3b49425cfb357e9d04bf993e065174d8b44e450dd134aa24187ed66e0e1' - 'd990f99f04dcf52cae5d7f6dd4394aae778683c2d9ebcb41b485129af8c2cf2f' - '7a395f7e9f26a650e09ad4b35563d5cb46c34dfae1c7de2f4dcf0e86f9dd1927' - 'd38cbc2d4566a3915475fa29ae2982173cd1339abdbff292f5cd520c7c741039' - '2b90d5b001da77692805a8fc9f6ac77ed8d3bfce48f52c89be1b13e915b5ef7c' - '5b973e490c3bbbc3aba7bf2b4fa704c38f92601c7736b483334025e2fc913285' - '73683e5bc8672c09c7c4e86b4787bbb5792570a511768509db6c7a7f45a58109' - 'cc8d458974c5168a7956d4682a63b0c15f9918256820ae908b88e5dd18d95811' - '3cb99ad9d910bad53ad8565d0be2fb6bb4a0d1075dbb73fd85cb2ffbe404d73e' - 'ea31c31ccbd47f6d77a1cf00768a9c247b368d79e3ba19dca4854c29f1a69a69' - 'e6ed01492dacf7367d8f444eb00e2bcdae1fc3b3f1648858e6e379b1565f8943' - 'd4cd03c966a6a1c37ce21f9e6bbd9deaadbb62f31a1a652ac12cd48a651fc47d' - 'd9f55e93cfde4bd6d46744697ae846490912342bdb84ad8c4ba0cf7689b472ab' - 'd5478d6cbcb1067bf1b8e3e52210f1416d734303e387facb165b92f281789436') +sha256sums=('SKIP' + '07ca76c848991c2e34e021626374812aad040e210413c84e1ab372f79bc5733b' + 'f271f7509c97e9f3de2d11c887c03be7e58c39b9eafd83691400a87143a86324' + '3fedd054e1dd439664aec2225de903c2d235c62113be69d361908466838e8c55' + 'a57715bf58b66ffdb2e67d9ba5ae437a6f627a144cd759cfaa9726d2151a6a61' + '934bd614407ff0e6c0366a765d93cd0854e23169cc2c6e69f789ef3d14095fea' + '60def68fdbba857ab22eafc05d0e97b6aa43a0b13903e852902958d2cb847010' + '3f8fcde556f9ed718e1c2fdc466ec787fc639f83afba4b71ba125dfc2b0e74d0' + 'ec12dff066a5af6e034cae56984a275576790a6c52512e78d792b0d14503b319' + '26aaff027ba16ba61b7b4684a97f7595eef811c49e9263e5ba88ba6b51e4fcb9' + 'bde7b7b5e8d32814b26e5a46750c8d5e0e83047d335c94cbbc0b485e9b96a188' + '00b5e1bce87c62bc61cac71654ee5dbe57ea005fc8e7ff7206c936699e199747' + '93b2db5134581d8312996ae1eadc834ddc5fc394aaf88532554eea8f0936506f' + '09bc39fa186fc4bed14cb3f589d8b77e10e3bf7a904dba43758805124e1d3787' + '5e6ddbcd6ab35fcf3e75bb353bc10fe258e8e1753456ba55d65f8ba5667d1c7f' + 'd86b3cf81608819c7d371681f293f3168ce6198368441c916505f1efa1f6ad7d' + '5d7eaaeec84a23b9db12e2998c099ceddd853d2d819018bbad472e77ecd72429' + '8ec002dfe54c83be1fac8bf5a3badb611230fba8ce91eb33bd26cd06b6ecec63' + 'c06f2a6a2bfffffea82fef8023039821fa2869a95af4a31bfd4224ee50cfa78c' + '6d3c73791781ba99f48658bf65f446e4e8b94b1327d901f3fa34e3cf9c07c176' + 'b9ddaa27fa95aeb8dce1fb38950ae095e5c60a5c9bcef4f46138fc1fa1824807' + 'bab619655a585095269a5250170900d0dbce7ac6b20586d3ca468e914c39a8d4' + '3ebe50b4d7e436e0bdf396bba04f6c7dc79ca7e62b392cc2f3cdc8b898218682' + '19e1b928c03fa58dca7b5e27d97b7829ee28af280cf857f520d1e6a04e528ad5' + '77e7cf6a9ab87b76fd0d0f0e1c2948ad49db1fb1972887ad46a8ae179c627354' + '232d3dcb1d13d4961ca6a35ff5897aa633bca12f4425a35eea990759124b238d' + '51fb2c38a41133fc816a16bd74cc2ba93b1b8ca4e456bba42b2ffe3e36aa8e80' + 'f1148c997a0d727b7b640594543196d8226f2f8c7df5c849523c8bbe9c37ad45' + '5a74594feb11c0c078ad4bbcefe662e54fc2a451ae7972a20247597ed392c1de' + '70198d0a35338cb56c4aad5ad1789a915a5b628a3e3b780f2767fbd30ef7e31d' + '7413278602ea7f9fc80d749d5008d029e775b191994c71ff78f5de5f780e2e3b' + '1e2900354c1a6c38e87eff51a96099473827d6c70530dd63b036bdb7ba7ab2fa') _architectures='i686-w64-mingw32 x86_64-w64-mingw32' +pkgver() { + cd $_pkgfqn + echo "5.15.2+kde+r"`git rev-list --count origin/5.15.2..$_commit` +} + prepare() { cd "${srcdir}/${_pkgfqn}" + git revert -n 6344955d17e17e2398720fe60c34cfc2a4a95208 # Revert version bump + # apply patches; further descriptions can be found in patch files itself for patch in "$srcdir/"*.patch; do msg2 "Applying patch $patch" patch -p1 -i "$patch" done - # make sure the Qt 5 build system uses our external PCRE library and zlib - rm -rf src/3rdparty/{pcre,zlib} - # clear buildflags ('!buildflags' only effects build() but not prepare()) unset CPPFLAGS CFLAGS CXXFLAGS LDFLAGS PKG_CONFIG_PATH diff --git a/qt5-base/mingw-w64/qtbase-sha256.txt b/qt5-base/mingw-w64/qtbase-sha256.txt index f34593c4..cc2ecb63 100644 --- a/qt5-base/mingw-w64/qtbase-sha256.txt +++ b/qt5-base/mingw-w64/qtbase-sha256.txt @@ -1 +1 @@ -909fad2591ee367993a75d7e2ea50ad4db332f05e1c38dd7a5a274e156a4e0f8 +SKIP diff --git a/qt5-declarative/mingw-w64-static/0001-Ensure-static-plugins-are-exported.patch b/qt5-declarative/mingw-w64-static/0001-Ensure-static-plugins-are-exported.patch deleted file mode 100644 index b9bc384c..00000000 --- a/qt5-declarative/mingw-w64-static/0001-Ensure-static-plugins-are-exported.patch +++ /dev/null @@ -1,23 +0,0 @@ -From a77306009e96c2dd6d7a3c6eafe9ea39fcf99407 Mon Sep 17 00:00:00 2001 -From: Martchus -Date: Sun, 23 Oct 2016 01:18:13 +0200 -Subject: [PATCH 1/3] Ensure static plugins are exported - ---- - src/qml/Qt5QmlConfigExtras.cmake.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/qml/Qt5QmlConfigExtras.cmake.in b/src/qml/Qt5QmlConfigExtras.cmake.in -index 4242143bca..bccb7b3146 100644 ---- a/src/qml/Qt5QmlConfigExtras.cmake.in -+++ b/src/qml/Qt5QmlConfigExtras.cmake.in -@@ -1,5 +1,5 @@ - if(QT5_STRICT_PLUGIN_GLOB OR Qt5Qml_STRICT_PLUGIN_GLOB) -- file(GLOB _qt5qml_other_plugins "${CMAKE_CURRENT_LIST_DIR}/Qt5Qml_*Factory.cmake") -+ file(GLOB _qt5qml_other_plugins "${CMAKE_CURRENT_LIST_DIR}/*Qt5Qml_*Factory.cmake") - - foreach(_other_plugin ${_qt5qml_other_plugins}) - include(${_other_plugin} OPTIONAL) --- -2.29.2 - diff --git a/qt5-declarative/mingw-w64-static/0001-Ensure-static-plugins-are-exported.patch b/qt5-declarative/mingw-w64-static/0001-Ensure-static-plugins-are-exported.patch new file mode 120000 index 00000000..a2adaf0e --- /dev/null +++ b/qt5-declarative/mingw-w64-static/0001-Ensure-static-plugins-are-exported.patch @@ -0,0 +1 @@ +../mingw-w64/0001-Ensure-static-plugins-are-exported.patch \ No newline at end of file diff --git a/qt5-declarative/mingw-w64-static/0002-Prevent-exporting-QML-parser-symbols-on-static-build.patch b/qt5-declarative/mingw-w64-static/0002-Prevent-exporting-QML-parser-symbols-on-static-build.patch deleted file mode 100644 index d0c427e7..00000000 --- a/qt5-declarative/mingw-w64-static/0002-Prevent-exporting-QML-parser-symbols-on-static-build.patch +++ /dev/null @@ -1,37 +0,0 @@ -From b147be462b1b727470243b83722a3f310d6f0876 Mon Sep 17 00:00:00 2001 -From: Martchus -Date: Sat, 4 Feb 2017 01:59:59 +0100 -Subject: [PATCH 2/3] Prevent exporting QML parser symbols on static build - ---- - src/qml/parser/qqmljsglobal_p.h | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/qml/parser/qqmljsglobal_p.h b/src/qml/parser/qqmljsglobal_p.h -index bf8155c6ec..2bfa230bcc 100644 ---- a/src/qml/parser/qqmljsglobal_p.h -+++ b/src/qml/parser/qqmljsglobal_p.h -@@ -54,9 +54,9 @@ - - #ifdef QT_CREATOR - --# ifdef QDECLARATIVEJS_BUILD_DIR -+# if defined(QDECLARATIVEJS_BUILD_DIR) && !defined(QT_STATIC) - # define QML_PARSER_EXPORT Q_DECL_EXPORT --# elif QML_BUILD_STATIC_LIB -+# elif defined(QML_BUILD_STATIC_LIB) || defined(QT_STATIC) - # define QML_PARSER_EXPORT - # else - # define QML_PARSER_EXPORT Q_DECL_IMPORT -@@ -64,7 +64,7 @@ - - #else // !QT_CREATOR - # ifndef QT_STATIC --# if defined(QT_BUILD_QMLDEVTOOLS_LIB) || defined(QT_QMLDEVTOOLS_LIB) -+# if defined(QT_BUILD_QMLDEVTOOLS_LIB) || defined(QT_QMLDEVTOOLS_LIB) || defined(QT_STATIC) - // QmlDevTools is a static library - # define QML_PARSER_EXPORT - # elif defined(QT_BUILD_QML_LIB) --- -2.29.2 - diff --git a/qt5-declarative/mingw-w64-static/0002-Prevent-exporting-QML-parser-symbols-on-static-build.patch b/qt5-declarative/mingw-w64-static/0002-Prevent-exporting-QML-parser-symbols-on-static-build.patch new file mode 120000 index 00000000..54129731 --- /dev/null +++ b/qt5-declarative/mingw-w64-static/0002-Prevent-exporting-QML-parser-symbols-on-static-build.patch @@ -0,0 +1 @@ +../mingw-w64/0002-Prevent-exporting-QML-parser-symbols-on-static-build.patch \ No newline at end of file diff --git a/qt5-declarative/mingw-w64-static/0003-Disable-d3d12-requiring-fxc.exe.patch b/qt5-declarative/mingw-w64-static/0003-Disable-d3d12-requiring-fxc.exe.patch deleted file mode 100644 index 4763e3a2..00000000 --- a/qt5-declarative/mingw-w64-static/0003-Disable-d3d12-requiring-fxc.exe.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 2346e6d7028640b03b58bb358d0569917e8c27e7 Mon Sep 17 00:00:00 2001 -From: Martchus -Date: Fri, 20 Nov 2020 18:32:31 +0100 -Subject: [PATCH 3/3] Disable d3d12 requiring fxc.exe - -* fxc.exe is not provided by WINE or mingw-w64 and hence not available - in our build environment -* The version from https://github.com/mozilla/fxc2 builds but it does - not support all CLI options required by Qt's build system -* The build error looks like this: - ``` - make[5]: Entering directory '/build/mingw-w64-qt5-declarative/src/qtdeclarative-everywhere-src-5.15.2/build-i686-w64-mingw32-shared/src/plugins/scenegraph/d3d12' - fxc.exe /nologo /E VS_VertexColor /T vs_5_0 /Fh vs_vertexcolor.hlslh /build/mingw-w64-qt5-declarative/src/qtdeclarative-everywhere-src-5.15.2/src/plugins/scenegraph/d3d12/shaders/vertexcolor.hlsl - make[5]: fxc.exe: No such file or directory - make[5]: *** [Makefile.Release:233: vs_vertexcolor.hlslh] Error 127 - ``` ---- - src/plugins/scenegraph/scenegraph.pro | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/src/plugins/scenegraph/scenegraph.pro b/src/plugins/scenegraph/scenegraph.pro -index 39c0c0815c..9cc521a191 100644 ---- a/src/plugins/scenegraph/scenegraph.pro -+++ b/src/plugins/scenegraph/scenegraph.pro -@@ -1,5 +1,4 @@ - TEMPLATE = subdirs - QT_FOR_CONFIG += quick --qtConfig(d3d12): SUBDIRS += d3d12 - qtConfig(openvg): SUBDIRS += openvg - --- -2.29.2 - diff --git a/qt5-declarative/mingw-w64-static/0003-Disable-d3d12-requiring-fxc.exe.patch b/qt5-declarative/mingw-w64-static/0003-Disable-d3d12-requiring-fxc.exe.patch new file mode 120000 index 00000000..9d87aeb6 --- /dev/null +++ b/qt5-declarative/mingw-w64-static/0003-Disable-d3d12-requiring-fxc.exe.patch @@ -0,0 +1 @@ +../mingw-w64/0003-Disable-d3d12-requiring-fxc.exe.patch \ No newline at end of file diff --git a/qt5-declarative/mingw-w64-static/PKGBUILD b/qt5-declarative/mingw-w64-static/PKGBUILD index 89adbcf3..baff61af 100755 --- a/qt5-declarative/mingw-w64-static/PKGBUILD +++ b/qt5-declarative/mingw-w64-static/PKGBUILD @@ -21,27 +21,37 @@ pkgdesc='Classes for QML and JavaScript languages (mingw-w64)' depends=('mingw-w64-qt5-base-static') makedepends=('mingw-w64-gcc' 'mingw-w64-vulkan-headers' 'mingw-w64-pkg-config' 'python') license=('GPL3' 'LGPL3' 'FDL' 'custom') +_commit=e203a185cfab199a89a33b903096d6d0023a8a88 +pkgver+=+kde+r24 +makedepends+=('git') options=('!strip' '!buildflags' 'staticlibs') groups=('mingw-w64-qt5') url='https://www.qt.io/' -_pkgfqn="${_qt_module}-everywhere-src-${pkgver}" -source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz" +_pkgfqn=${_qt_module} +source=(git+https://invent.kde.org/qt/qt/$_pkgfqn#commit=$_commit '0001-Ensure-static-plugins-are-exported.patch' '0002-Prevent-exporting-QML-parser-symbols-on-static-build.patch' '0003-Disable-d3d12-requiring-fxc.exe.patch') -sha256sums=('c600d09716940f75d684f61c5bdaced797f623a86db1627da599027f6c635651' - '0ba64350a82e050cf86ab507999ed2d813496cc2ab1c738f3aa8da6cb6502460' - 'e476a3f619163911aab103304e271ad33194f1ddb9ef25d554f89994077ad792' - '83ed9816e4581ffe9c67ab2bd28488c5e3ba04c06e6ff558da8844c4a265c9f5') +sha256sums=('SKIP' + '05e6f881e3c327025bb7693b3622652e37cc0acd1a4c4efebbb8b39d0391e568' + '451dd25d86f64c641048eda8a6ab7f74c0ffcf99436ca32b149f96e44060a119' + 'bc4b056d159920124bd007086a791d657b41ec4d22213fd59200524c386400ab') _architectures='i686-w64-mingw32 x86_64-w64-mingw32' depends+=(${pkgname%-static}) # the static version relies on the shared version for build tools and headers _configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') +pkgver() { + cd $_pkgfqn + echo "5.15.2+kde+r"`git rev-list --count origin/5.15.2..$_commit` +} + prepare() { cd "${srcdir}/${_pkgfqn}" + git revert -n 568763928a78b52373932b01be17e040f7c3fa50 # Revert version bump + # apply patches; further descriptions can be found in patch files itself for patch in "$srcdir/"*.patch; do patch -p1 -i "$patch" diff --git a/qt5-declarative/mingw-w64-static/qtdeclarative-sha256.txt b/qt5-declarative/mingw-w64-static/qtdeclarative-sha256.txt index d9d8a92d..cc2ecb63 100644 --- a/qt5-declarative/mingw-w64-static/qtdeclarative-sha256.txt +++ b/qt5-declarative/mingw-w64-static/qtdeclarative-sha256.txt @@ -1 +1 @@ -c600d09716940f75d684f61c5bdaced797f623a86db1627da599027f6c635651 +SKIP diff --git a/qt5-declarative/mingw-w64/0001-Ensure-static-plugins-are-exported.patch b/qt5-declarative/mingw-w64/0001-Ensure-static-plugins-are-exported.patch index b9bc384c..c0b76679 100644 --- a/qt5-declarative/mingw-w64/0001-Ensure-static-plugins-are-exported.patch +++ b/qt5-declarative/mingw-w64/0001-Ensure-static-plugins-are-exported.patch @@ -1,4 +1,4 @@ -From a77306009e96c2dd6d7a3c6eafe9ea39fcf99407 Mon Sep 17 00:00:00 2001 +From 5b23d07532d7622129bdf5093b80d24fd0e72cbe Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 23 Oct 2016 01:18:13 +0200 Subject: [PATCH 1/3] Ensure static plugins are exported @@ -19,5 +19,5 @@ index 4242143bca..bccb7b3146 100644 foreach(_other_plugin ${_qt5qml_other_plugins}) include(${_other_plugin} OPTIONAL) -- -2.29.2 +2.31.1 diff --git a/qt5-declarative/mingw-w64/0002-Prevent-exporting-QML-parser-symbols-on-static-build.patch b/qt5-declarative/mingw-w64/0002-Prevent-exporting-QML-parser-symbols-on-static-build.patch index d0c427e7..a64dff92 100644 --- a/qt5-declarative/mingw-w64/0002-Prevent-exporting-QML-parser-symbols-on-static-build.patch +++ b/qt5-declarative/mingw-w64/0002-Prevent-exporting-QML-parser-symbols-on-static-build.patch @@ -1,4 +1,4 @@ -From b147be462b1b727470243b83722a3f310d6f0876 Mon Sep 17 00:00:00 2001 +From 3ff37757918247a848198d205d03b8a1f0760b48 Mon Sep 17 00:00:00 2001 From: Martchus Date: Sat, 4 Feb 2017 01:59:59 +0100 Subject: [PATCH 2/3] Prevent exporting QML parser symbols on static build @@ -33,5 +33,5 @@ index bf8155c6ec..2bfa230bcc 100644 # define QML_PARSER_EXPORT # elif defined(QT_BUILD_QML_LIB) -- -2.29.2 +2.31.1 diff --git a/qt5-declarative/mingw-w64/0003-Disable-d3d12-requiring-fxc.exe.patch b/qt5-declarative/mingw-w64/0003-Disable-d3d12-requiring-fxc.exe.patch index 4763e3a2..a7bffb55 100644 --- a/qt5-declarative/mingw-w64/0003-Disable-d3d12-requiring-fxc.exe.patch +++ b/qt5-declarative/mingw-w64/0003-Disable-d3d12-requiring-fxc.exe.patch @@ -1,4 +1,4 @@ -From 2346e6d7028640b03b58bb358d0569917e8c27e7 Mon Sep 17 00:00:00 2001 +From c08f46e4b43ae0635df976fa0933f499e141b168 Mon Sep 17 00:00:00 2001 From: Martchus Date: Fri, 20 Nov 2020 18:32:31 +0100 Subject: [PATCH 3/3] Disable d3d12 requiring fxc.exe @@ -29,5 +29,5 @@ index 39c0c0815c..9cc521a191 100644 qtConfig(openvg): SUBDIRS += openvg -- -2.29.2 +2.31.1 diff --git a/qt5-declarative/mingw-w64/PKGBUILD b/qt5-declarative/mingw-w64/PKGBUILD old mode 100755 new mode 100644 index 5156091d..c7f76b93 --- a/qt5-declarative/mingw-w64/PKGBUILD +++ b/qt5-declarative/mingw-w64/PKGBUILD @@ -21,26 +21,36 @@ pkgdesc='Classes for QML and JavaScript languages (mingw-w64)' depends=('mingw-w64-qt5-base') makedepends=('mingw-w64-gcc' 'mingw-w64-vulkan-headers' 'mingw-w64-pkg-config' 'python') license=('GPL3' 'LGPL3' 'FDL' 'custom') +_commit=e203a185cfab199a89a33b903096d6d0023a8a88 +pkgver+=+kde+r24 +makedepends+=('git') options=('!strip' '!buildflags' 'staticlibs') groups=('mingw-w64-qt5') url='https://www.qt.io/' -_pkgfqn="${_qt_module}-everywhere-src-${pkgver}" -source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz" +_pkgfqn=${_qt_module} +source=(git+https://invent.kde.org/qt/qt/$_pkgfqn#commit=$_commit '0001-Ensure-static-plugins-are-exported.patch' '0002-Prevent-exporting-QML-parser-symbols-on-static-build.patch' '0003-Disable-d3d12-requiring-fxc.exe.patch') -sha256sums=('c600d09716940f75d684f61c5bdaced797f623a86db1627da599027f6c635651' - '0ba64350a82e050cf86ab507999ed2d813496cc2ab1c738f3aa8da6cb6502460' - 'e476a3f619163911aab103304e271ad33194f1ddb9ef25d554f89994077ad792' - '83ed9816e4581ffe9c67ab2bd28488c5e3ba04c06e6ff558da8844c4a265c9f5') +sha256sums=('SKIP' + '05e6f881e3c327025bb7693b3622652e37cc0acd1a4c4efebbb8b39d0391e568' + '451dd25d86f64c641048eda8a6ab7f74c0ffcf99436ca32b149f96e44060a119' + 'bc4b056d159920124bd007086a791d657b41ec4d22213fd59200524c386400ab') _architectures='i686-w64-mingw32 x86_64-w64-mingw32' _configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') +pkgver() { + cd $_pkgfqn + echo "5.15.2+kde+r"`git rev-list --count origin/5.15.2..$_commit` +} + prepare() { cd "${srcdir}/${_pkgfqn}" + git revert -n 568763928a78b52373932b01be17e040f7c3fa50 # Revert version bump + # apply patches; further descriptions can be found in patch files itself for patch in "$srcdir/"*.patch; do patch -p1 -i "$patch" diff --git a/qt5-svg/mingw-w64-static/PKGBUILD b/qt5-svg/mingw-w64-static/PKGBUILD index c452946f..b44b0fc6 100644 --- a/qt5-svg/mingw-w64-static/PKGBUILD +++ b/qt5-svg/mingw-w64-static/PKGBUILD @@ -17,18 +17,32 @@ pkgdesc="Classes for displaying the contents of SVG files (mingw-w64)" depends=('mingw-w64-qt5-base-static') makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config') license=('GPL3' 'LGPL' 'FDL' 'custom') +_commit=95990cbeebc0ab9959e2a925a93ad4897416bbb7 +pkgver+=+kde+r5 +makedepends+=('git') options=('!strip' '!buildflags' 'staticlibs') groups=('mingw-w64-qt5') url='https://www.qt.io/' -_pkgfqn="${_qt_module}-everywhere-src-${pkgver}" -source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz") -sha256sums=('8bc3c2c1bc2671e9c67d4205589a8309b57903721ad14c60ea21a5d06acb585e') +_pkgfqn=${_qt_module} +source=(git+https://invent.kde.org/qt/qt/$_pkgfqn#commit=$_commit) +sha256sums=('SKIP') _architectures='i686-w64-mingw32 x86_64-w64-mingw32' depends+=(${pkgname%-static}) # the static version relies on the shared version for build tools and headers _configurations+=('CONFIG+=no_smart_library_merge CONFIG+=static') +pkgver() { + cd $_pkgfqn + echo "5.15.2+kde+r"`git rev-list --count origin/5.15.2..$_commit` +} + +prepare() { + cd "${srcdir}/${_pkgfqn}" + + git revert -n 9aac88424a1b76e0198b52437af58a6d94aff8e9 # Revert version bump +} + build() { cd "${srcdir}/${_pkgfqn}" diff --git a/qt5-svg/mingw-w64-static/qtsvg-sha256.txt b/qt5-svg/mingw-w64-static/qtsvg-sha256.txt index 07f801f0..cc2ecb63 100644 --- a/qt5-svg/mingw-w64-static/qtsvg-sha256.txt +++ b/qt5-svg/mingw-w64-static/qtsvg-sha256.txt @@ -1 +1 @@ -8bc3c2c1bc2671e9c67d4205589a8309b57903721ad14c60ea21a5d06acb585e +SKIP diff --git a/qt5-svg/mingw-w64/PKGBUILD b/qt5-svg/mingw-w64/PKGBUILD index 91d1d3f8..b1f71757 100644 --- a/qt5-svg/mingw-w64/PKGBUILD +++ b/qt5-svg/mingw-w64/PKGBUILD @@ -17,17 +17,31 @@ pkgdesc="Classes for displaying the contents of SVG files (mingw-w64)" depends=('mingw-w64-qt5-base') makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config') license=('GPL3' 'LGPL' 'FDL' 'custom') +_commit=95990cbeebc0ab9959e2a925a93ad4897416bbb7 +pkgver+=+kde+r5 +makedepends+=('git') options=('!strip' '!buildflags' 'staticlibs') groups=('mingw-w64-qt5') url='https://www.qt.io/' -_pkgfqn="${_qt_module}-everywhere-src-${pkgver}" -source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz") -sha256sums=('8bc3c2c1bc2671e9c67d4205589a8309b57903721ad14c60ea21a5d06acb585e') +_pkgfqn=${_qt_module} +source=(git+https://invent.kde.org/qt/qt/$_pkgfqn#commit=$_commit) +sha256sums=('SKIP') _architectures='i686-w64-mingw32 x86_64-w64-mingw32' _configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') +pkgver() { + cd $_pkgfqn + echo "5.15.2+kde+r"`git rev-list --count origin/5.15.2..$_commit` +} + +prepare() { + cd "${srcdir}/${_pkgfqn}" + + git revert -n 9aac88424a1b76e0198b52437af58a6d94aff8e9 # Revert version bump +} + build() { cd "${srcdir}/${_pkgfqn}" diff --git a/qt5-tools/mingw-w64-static/0001-Fix-linguist-macro.patch b/qt5-tools/mingw-w64-static/0001-Fix-linguist-macro.patch deleted file mode 100644 index 44200a93..00000000 --- a/qt5-tools/mingw-w64-static/0001-Fix-linguist-macro.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 43c51a28149ae923fedbf215a64a5456dc44a664 Mon Sep 17 00:00:00 2001 -From: Martchus -Date: Sun, 25 Sep 2016 21:44:42 +0200 -Subject: [PATCH] Fix linguist macro - -- Prevent CMake appending extra 'Qt5::lupdate'/'Qt5::lrelease' to - command line when invoking lupdate/lrelease -- Achieved by resolveing the IMPORTED_LOCATION manually ---- - src/linguist/Qt5LinguistToolsMacros.cmake | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/src/linguist/Qt5LinguistToolsMacros.cmake b/src/linguist/Qt5LinguistToolsMacros.cmake -index ab271d56..f54c99c4 100644 ---- a/src/linguist/Qt5LinguistToolsMacros.cmake -+++ b/src/linguist/Qt5LinguistToolsMacros.cmake -@@ -71,8 +71,10 @@ function(QT5_CREATE_TRANSLATION _qm_files) - - file(WRITE ${_ts_lst_file} "${_lst_file_srcs}") - endif() -+ -+ get_target_property(LUPDATE_LOC ${Qt5_LUPDATE_EXECUTABLE} IMPORTED_LOCATION) - add_custom_command(OUTPUT ${_ts_file} -- COMMAND ${Qt5_LUPDATE_EXECUTABLE} -+ COMMAND ${LUPDATE_LOC} - ARGS ${_lupdate_options} "@${_ts_lst_file}" -ts ${_ts_file} - DEPENDS ${_my_sources} - BYPRODUCTS ${_ts_lst_file} VERBATIM) -@@ -114,8 +116,9 @@ function(QT5_ADD_TRANSLATION _qm_files) - set(qm "${CMAKE_CURRENT_BINARY_DIR}/${FILE_NAME}.qm") - endif() - -+ get_target_property(LRELEASE_LOC ${Qt5_LRELEASE_EXECUTABLE} IMPORTED_LOCATION) - add_custom_command(OUTPUT ${qm} -- COMMAND ${Qt5_LRELEASE_EXECUTABLE} -+ COMMAND ${LRELEASE_LOC} - ARGS ${_LRELEASE_OPTIONS} ${_abs_FILE} -qm ${qm} - DEPENDS ${_abs_FILE} VERBATIM - ) --- -2.29.2 - diff --git a/qt5-tools/mingw-w64-static/0001-Fix-linguist-macro.patch b/qt5-tools/mingw-w64-static/0001-Fix-linguist-macro.patch new file mode 120000 index 00000000..30457d27 --- /dev/null +++ b/qt5-tools/mingw-w64-static/0001-Fix-linguist-macro.patch @@ -0,0 +1 @@ +../mingw-w64/0001-Fix-linguist-macro.patch \ No newline at end of file diff --git a/qt5-tools/mingw-w64-static/PKGBUILD b/qt5-tools/mingw-w64-static/PKGBUILD index bcb8cf1b..b2520958 100755 --- a/qt5-tools/mingw-w64-static/PKGBUILD +++ b/qt5-tools/mingw-w64-static/PKGBUILD @@ -30,23 +30,33 @@ pkgdesc="A cross-platform application and UI framework (Development Tools, QtHel depends=('mingw-w64-qt5-declarative-static') makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config' 'mingw-w64-postgresql' 'mingw-w64-mariadb-connector-c' 'mingw-w64-vulkan-headers') license=('GPL3' 'LGPL3' 'FDL' 'custom') +_commit=33693a928986006d79c1ee743733cde5966ac402 +pkgver+=+kde+r17 +makedepends+=('git') options=('!strip' '!buildflags' 'staticlibs') groups=('mingw-w64-qt5') url='https://www.qt.io/' -_pkgfqn="${_qt_module}-everywhere-src-${pkgver}" -source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz" +_pkgfqn=${_qt_module} +source=(git+https://invent.kde.org/qt/qt/$_pkgfqn#commit=$_commit '0001-Fix-linguist-macro.patch') -sha256sums=('c189d0ce1ff7c739db9a3ace52ac3e24cb8fd6dbf234e49f075249b38f43c1cc' - 'e2ce8a553c78fd0dc6934be7d58a9bb90fe465619ac20a567d579c4c90bc01ab') +sha256sums=('SKIP' + 'cf7fcd9b2cfa110e95bde957a00c600da17bc75fdf7be1f72204eb5364cbf397') _architectures='i686-w64-mingw32 x86_64-w64-mingw32' depends+=(${pkgname%-static}) # the static version relies on the shared version for build tools and headers _configurations+=('CONFIG+=no_smart_library_merge CONFIG+=no_smart_library_merge QTPLUGIN.sqldrivers=qsqlite QTPLUGIN.sqldrivers+=qsqlodbc CONFIG+=static') +pkgver() { + cd $_pkgfqn + echo "5.15.2+kde+r"`git rev-list --count origin/5.15.2..$_commit` +} + prepare() { cd "${srcdir}/${_pkgfqn}" + git revert -n dbe0567470db2b369a9fdb28d9fbac38be3e2d60 # Revert version bump + # apply patches; further descriptions can be found in patch files itself for patch in "$srcdir/"*.patch; do patch -p1 -i "$patch" diff --git a/qt5-tools/mingw-w64-static/qttools-sha256.txt b/qt5-tools/mingw-w64-static/qttools-sha256.txt index 73691a3f..cc2ecb63 100644 --- a/qt5-tools/mingw-w64-static/qttools-sha256.txt +++ b/qt5-tools/mingw-w64-static/qttools-sha256.txt @@ -1 +1 @@ -c189d0ce1ff7c739db9a3ace52ac3e24cb8fd6dbf234e49f075249b38f43c1cc +SKIP diff --git a/qt5-tools/mingw-w64/0001-Fix-linguist-macro.patch b/qt5-tools/mingw-w64/0001-Fix-linguist-macro.patch index 44200a93..8927b419 100644 --- a/qt5-tools/mingw-w64/0001-Fix-linguist-macro.patch +++ b/qt5-tools/mingw-w64/0001-Fix-linguist-macro.patch @@ -1,4 +1,4 @@ -From 43c51a28149ae923fedbf215a64a5456dc44a664 Mon Sep 17 00:00:00 2001 +From 4818c98b4cc9441fecea9c63479ca7d5c05ed967 Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 25 Sep 2016 21:44:42 +0200 Subject: [PATCH] Fix linguist macro @@ -11,10 +11,10 @@ Subject: [PATCH] Fix linguist macro 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/linguist/Qt5LinguistToolsMacros.cmake b/src/linguist/Qt5LinguistToolsMacros.cmake -index ab271d56..f54c99c4 100644 +index 20fb1493..406d3d3a 100644 --- a/src/linguist/Qt5LinguistToolsMacros.cmake +++ b/src/linguist/Qt5LinguistToolsMacros.cmake -@@ -71,8 +71,10 @@ function(QT5_CREATE_TRANSLATION _qm_files) +@@ -90,8 +90,10 @@ function(QT5_CREATE_TRANSLATION _qm_files) file(WRITE ${_ts_lst_file} "${_lst_file_srcs}") endif() @@ -24,9 +24,9 @@ index ab271d56..f54c99c4 100644 - COMMAND ${Qt5_LUPDATE_EXECUTABLE} + COMMAND ${LUPDATE_LOC} ARGS ${_lupdate_options} "@${_ts_lst_file}" -ts ${_ts_file} - DEPENDS ${_my_sources} - BYPRODUCTS ${_ts_lst_file} VERBATIM) -@@ -114,8 +116,9 @@ function(QT5_ADD_TRANSLATION _qm_files) + DEPENDS ${_dependencies} + VERBATIM) +@@ -133,8 +135,9 @@ function(QT5_ADD_TRANSLATION _qm_files) set(qm "${CMAKE_CURRENT_BINARY_DIR}/${FILE_NAME}.qm") endif() @@ -38,5 +38,5 @@ index ab271d56..f54c99c4 100644 DEPENDS ${_abs_FILE} VERBATIM ) -- -2.29.2 +2.31.1 diff --git a/qt5-tools/mingw-w64/PKGBUILD b/qt5-tools/mingw-w64/PKGBUILD old mode 100755 new mode 100644 index 9b985ddd..29c9af2a --- a/qt5-tools/mingw-w64/PKGBUILD +++ b/qt5-tools/mingw-w64/PKGBUILD @@ -30,22 +30,32 @@ pkgdesc="A cross-platform application and UI framework (Development Tools, QtHel depends=('mingw-w64-qt5-declarative') makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config' 'mingw-w64-postgresql' 'mingw-w64-mariadb-connector-c' 'mingw-w64-vulkan-headers') license=('GPL3' 'LGPL3' 'FDL' 'custom') +_commit=33693a928986006d79c1ee743733cde5966ac402 +pkgver+=+kde+r17 +makedepends+=('git') options=('!strip' '!buildflags' 'staticlibs') groups=('mingw-w64-qt5') url='https://www.qt.io/' -_pkgfqn="${_qt_module}-everywhere-src-${pkgver}" -source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz" +_pkgfqn=${_qt_module} +source=(git+https://invent.kde.org/qt/qt/$_pkgfqn#commit=$_commit '0001-Fix-linguist-macro.patch') -sha256sums=('c189d0ce1ff7c739db9a3ace52ac3e24cb8fd6dbf234e49f075249b38f43c1cc' - 'e2ce8a553c78fd0dc6934be7d58a9bb90fe465619ac20a567d579c4c90bc01ab') +sha256sums=('SKIP' + 'cf7fcd9b2cfa110e95bde957a00c600da17bc75fdf7be1f72204eb5364cbf397') _architectures='i686-w64-mingw32 x86_64-w64-mingw32' _configurations+=('CONFIG+=actually_a_shared_build CONFIG+=shared') +pkgver() { + cd $_pkgfqn + echo "5.15.2+kde+r"`git rev-list --count origin/5.15.2..$_commit` +} + prepare() { cd "${srcdir}/${_pkgfqn}" + git revert -n dbe0567470db2b369a9fdb28d9fbac38be3e2d60 # Revert version bump + # apply patches; further descriptions can be found in patch files itself for patch in "$srcdir/"*.patch; do patch -p1 -i "$patch"