From daaec2a9257feb3fd3e102fda06e4d2b73ea73f9 Mon Sep 17 00:00:00 2001 From: stahta01 Date: Wed, 20 Sep 2017 13:03:47 -0400 Subject: [PATCH] Qt5 git staging (#2934) * qt5-git: changed branch to "5.9". Very major changes to prepare and pkgver fuctions. Added prepare_build_folder and other helper functions. Copied code from qt5 and qt5-static packages. Renamed patch filenames to match qt5.8 or "-qt-5.6-" names. And, many formatting changes. * qt5-git: Added patch files. Added new patch files: 0001-qt-5.9.1-fix-sql-libraries-mingw.patch 0002-qt-5.8.1-configure-gcc-before-clang.patch 0007-qt-5.9.0-win32-g-Enable-static-builds.patch 0024-qt-5.9.2-icu-add-U_LIB_SUFFIX_C_NAME.patch 0051-qt-5.9.0-disable-qtlocation-mapboxgl-plugin.patch 0051-qt-5.9.1-disable-qtlocation-mapboxgl-plugin.patch And, from qt5 package added 0001-qt-5.8.0-fix-sql-libraries-mingw.patch 0002-qt-5.8.0-configure-gcc-before-clang.patch 0003-qt-5.8.0-autodetect-fontconfig.patch 0011-qt-5.8.0-mingw-dbus-and-pkg-config.patch 0016-qt-5.8.0-win32-g++-use-qpa-genericunixfontdatabase.patch 0020-qt-5.3.0-use-external-angle-library.patch 0023-qt-5.3.0-env-set-external-angle.patch 0025-qt-5.8.0-force-using-make-on-msys.patch 0028-qt-5.8.0-Revert-untangle-use-of-system-vs.-shell-path-list-se.patch 0029-qt-5.8.0-Revert-fix-quoting-and-path-separators-in-qtPrepareT.patch 0046-qt-5.4.1-Revert-Revert-fix-NTFS-mount-points.patch 0049-qt-5.8.0-win32-do-not-use-fontconfig.patch 0049-qt-5.9.0-win32-do-not-use-fontconfig.patch 0125-qt-5.8.0-windeployqt-fixes.patch 0125-qt-5.9.0-windeployqt-fixes.patch 0300-qt-5.8.0-cast-errors.patch * qt5-git: Rename patch files files. Renamed qt5-git 5.7 patch files to match the ones in the qt5 5.8 package; Or, renamed patch files with "-qt-5.6-" after seq. number. * qt5-git: Changed to pcre2 from pcre depends. --- ...=> 0001-qt-5.6-oracle-driver-prompt.patch} | 0 ...001-qt-5.8.0-fix-sql-libraries-mingw.patch | 37 + ...001-qt-5.9.1-fix-sql-libraries-mingw.patch | 39 + ...t-5.6-use-fbclient-instead-of-gds32.patch} | 0 ...-qt-5.8.0-configure-gcc-before-clang.patch | 11 + ...-qt-5.8.1-configure-gcc-before-clang.patch | 19 + ...t-5.6-use-mingw-built-mysql-library.patch} | 0 .../0003-qt-5.8.0-autodetect-fontconfig.patch | 18 + ...x.patch => 0005-qt-5.3.0-syncqt-fix.patch} | 0 ...h => 0006-qt-5.3.0-win_flex-replace.patch} | 0 ...-5.3.0-win32-g-Enable-static-builds.patch} | 0 ...t-5.9.0-win32-g-Enable-static-builds.patch | 40 + ..._EXTENSION_IMPORTLIB-defaulting-to-.patch} | 0 ...t-5.6-win32-g++-allow-static-dbus-1.patch} | 0 ...1-qt-5.8.0-mingw-dbus-and-pkg-config.patch | 23 + ...-icu-after-setting-static-or-shared.patch} | 0 ... => 0014-qt-5.6-fix-configure-tests.patch} | 0 ...-5.6-properly-split-libraries-mingw.patch} | 0 ...g++-use-qpa-genericunixfontdatabase.patch} | 0 ...-g++-use-qpa-genericunixfontdatabase.patch | 11 + ...0017-qt-5.3.0-fix-examples-building.patch} | 0 ...-qt-5.3.0-use-external-angle-library.patch | 113 ++ ...0023-qt-5.3.0-env-set-external-angle.patch | 53 + ...t-5.3.0-icu-add-U_LIB_SUFFIX_C_NAME.patch} | 0 ...qt-5.9.2-icu-add-U_LIB_SUFFIX_C_NAME.patch | 21 + ...025-qt-5.6-force-using-make-on-msys.patch} | 0 ...25-qt-5.8.0-force-using-make-on-msys.patch | 17 + ...use-of-system-vs.-shell-path-list-se.patch | 103 ++ ...ng-and-path-separators-in-qtPrepareT.patch | 96 ++ ...ound-ansidecl-h-PTR-define-conflict.patch} | 0 ...5.0-workaround-BOOL-define-conflict.patch} | 0 ...REFIX_STATICLIB-in-create_cmake-prf.patch} | 0 ...nt-add-resource-files-to-qmake-libs.patch} | 0 ...tatic-cmake-link-ws2_32-and--static.patch} | 0 ...tion-as-not-all-are-suffixed-Plugin.patch} | 0 ...arrange-STATIC-vs-INTERFACE-targets.patch} | 0 ...to-use-static-builds-of-Qt-with-CMa.patch} | 0 ...ed-libraries-in-prl-files-for-CMake.patch} | 0 ...te_cmake-prl-file-has-no-lib-prefix.patch} | 0 ...e-also-link-plugins-and-plugin-deps.patch} | 0 ...LL_LIBS-in-QMAKE_PRL_LIBS_FOR_CMAKE.patch} | 0 ...orm-plugin-for-qcollectiongenerator.patch} | 0 ...-Revert-Revert-fix-NTFS-mount-points.patch | 120 +++ ...Revert-Revert-fix-NTFS-mount-points.patch} | 0 ...ace-segfaults-with-minimal-platform.patch} | 0 ...qt-5.8.0-win32-do-not-use-fontconfig.patch | 11 + ...qt-5.9.0-win32-do-not-use-fontconfig.patch | 11 + ...0-disable-qtlocation-mapboxgl-plugin.patch | 22 + ...1-disable-qtlocation-mapboxgl-plugin.patch | 22 + .../0125-qt-5.8.0-windeployqt-fixes.patch | 74 ++ .../0125-qt-5.9.0-windeployqt-fixes.patch | 35 + .../0300-qt-5.8.0-cast-errors.patch | 11 + mingw-w64-qt5-git/PKGBUILD | 975 ++++++++++++------ 53 files changed, 1589 insertions(+), 293 deletions(-) rename mingw-w64-qt5-git/{0001-oracle-driver-prompt.patch => 0001-qt-5.6-oracle-driver-prompt.patch} (100%) create mode 100644 mingw-w64-qt5-git/0001-qt-5.8.0-fix-sql-libraries-mingw.patch create mode 100644 mingw-w64-qt5-git/0001-qt-5.9.1-fix-sql-libraries-mingw.patch rename mingw-w64-qt5-git/{0002-use-fbclient-instead-of-gds32.patch => 0002-qt-5.6-use-fbclient-instead-of-gds32.patch} (100%) create mode 100644 mingw-w64-qt5-git/0002-qt-5.8.0-configure-gcc-before-clang.patch create mode 100644 mingw-w64-qt5-git/0002-qt-5.8.1-configure-gcc-before-clang.patch rename mingw-w64-qt5-git/{0003-use-mingw-built-mysql-library.patch => 0003-qt-5.6-use-mingw-built-mysql-library.patch} (100%) create mode 100644 mingw-w64-qt5-git/0003-qt-5.8.0-autodetect-fontconfig.patch rename mingw-w64-qt5-git/{0005-syncqt-fix.patch => 0005-qt-5.3.0-syncqt-fix.patch} (100%) rename mingw-w64-qt5-git/{0006-win_flex-replace.patch => 0006-qt-5.3.0-win_flex-replace.patch} (100%) rename mingw-w64-qt5-git/{0007-win32-g-Enable-static-builds.patch => 0007-qt-5.3.0-win32-g-Enable-static-builds.patch} (100%) create mode 100644 mingw-w64-qt5-git/0007-qt-5.9.0-win32-g-Enable-static-builds.patch rename mingw-w64-qt5-git/{0008-win32-g-Add-QMAKE_EXTENSION_IMPORTLIB-defaulting-to-.patch => 0008-qt-5.3.0-win32-g-Add-QMAKE_EXTENSION_IMPORTLIB-defaulting-to-.patch} (100%) rename mingw-w64-qt5-git/{0011-win32-g++-allow-static-dbus-1.patch => 0011-qt-5.6-win32-g++-allow-static-dbus-1.patch} (100%) create mode 100644 mingw-w64-qt5-git/0011-qt-5.8.0-mingw-dbus-and-pkg-config.patch rename mingw-w64-qt5-git/{0012-compileTest-for-icu-after-setting-static-or-shared.patch => 0012-qt-5.6-compileTest-for-icu-after-setting-static-or-shared.patch} (100%) rename mingw-w64-qt5-git/{0014-fix-configure-tests.patch => 0014-qt-5.6-fix-configure-tests.patch} (100%) rename mingw-w64-qt5-git/{0015-properly-split-libraries-mingw.patch => 0015-qt-5.6-properly-split-libraries-mingw.patch} (100%) rename mingw-w64-qt5-git/{0016-win32-g++-use-qpa-genericunixfontdatabase.patch => 0016-qt-5.6-win32-g++-use-qpa-genericunixfontdatabase.patch} (100%) create mode 100644 mingw-w64-qt5-git/0016-qt-5.8.0-win32-g++-use-qpa-genericunixfontdatabase.patch rename mingw-w64-qt5-git/{0017-fix-examples-building.patch => 0017-qt-5.3.0-fix-examples-building.patch} (100%) create mode 100644 mingw-w64-qt5-git/0020-qt-5.3.0-use-external-angle-library.patch create mode 100644 mingw-w64-qt5-git/0023-qt-5.3.0-env-set-external-angle.patch rename mingw-w64-qt5-git/{0024-icu-add-U_LIB_SUFFIX_C_NAME.patch => 0024-qt-5.3.0-icu-add-U_LIB_SUFFIX_C_NAME.patch} (100%) create mode 100644 mingw-w64-qt5-git/0024-qt-5.9.2-icu-add-U_LIB_SUFFIX_C_NAME.patch rename mingw-w64-qt5-git/{0025-force-using-make-on-msys.patch => 0025-qt-5.6-force-using-make-on-msys.patch} (100%) create mode 100644 mingw-w64-qt5-git/0025-qt-5.8.0-force-using-make-on-msys.patch create mode 100644 mingw-w64-qt5-git/0028-qt-5.8.0-Revert-untangle-use-of-system-vs.-shell-path-list-se.patch create mode 100644 mingw-w64-qt5-git/0029-qt-5.8.0-Revert-fix-quoting-and-path-separators-in-qtPrepareT.patch rename mingw-w64-qt5-git/{0030-workaround-ansidecl-h-PTR-define-conflict.patch => 0030-qt-5.3.1-workaround-ansidecl-h-PTR-define-conflict.patch} (100%) rename mingw-w64-qt5-git/{0031-workaround-BOOL-define-conflict.patch => 0031-qt-5.5.0-workaround-BOOL-define-conflict.patch} (100%) rename mingw-w64-qt5-git/{0034-Use-QMAKE_PREFIX_STATICLIB-in-create_cmake-prf.patch => 0034-qt-5.3.2-Use-QMAKE_PREFIX_STATICLIB-in-create_cmake-prf.patch} (100%) rename mingw-w64-qt5-git/{0035-dont-add-resource-files-to-qmake-libs.patch => 0035-qt-5.3.2-dont-add-resource-files-to-qmake-libs.patch} (100%) rename mingw-w64-qt5-git/{0036-win32-qt5-static-cmake-link-ws2_32-and--static.patch => 0036-qt-5.3.2-win32-qt5-static-cmake-link-ws2_32-and--static.patch} (100%) rename mingw-w64-qt5-git/{0037-Improve-cmake-plugin-detection-as-not-all-are-suffixed-Plugin.patch => 0037-qt-5.4.0-Improve-cmake-plugin-detection-as-not-all-are-suffixed-Plugin.patch} (100%) rename mingw-w64-qt5-git/{0038-cmake-Rearrange-STATIC-vs-INTERFACE-targets.patch => 0038-qt-5.5.0-cmake-Rearrange-STATIC-vs-INTERFACE-targets.patch} (100%) rename mingw-w64-qt5-git/{0039-Make-it-possible-to-use-static-builds-of-Qt-with-CMa.patch => 0039-qt-5.4.0-Make-it-possible-to-use-static-builds-of-Qt-with-CMa.patch} (100%) rename mingw-w64-qt5-git/{0040-Generate-separated-libraries-in-prl-files-for-CMake.patch => 0040-qt-5.4.0-Generate-separated-libraries-in-prl-files-for-CMake.patch} (100%) rename mingw-w64-qt5-git/{0041-Fix-mingw-create_cmake-prl-file-has-no-lib-prefix.patch => 0041-qt-5.4.0-Fix-mingw-create_cmake-prl-file-has-no-lib-prefix.patch} (100%) rename mingw-w64-qt5-git/{0042-static-cmake-also-link-plugins-and-plugin-deps.patch => 0042-qt-5.4.0-static-cmake-also-link-plugins-and-plugin-deps.patch} (100%) rename mingw-w64-qt5-git/{0043-static-cmake-regex-QT_INSTALL_LIBS-in-QMAKE_PRL_LIBS_FOR_CMAKE.patch => 0043-qt-5.5.0-static-cmake-regex-QT_INSTALL_LIBS-in-QMAKE_PRL_LIBS_FOR_CMAKE.patch} (100%) rename mingw-w64-qt5-git/{0045-static-use-qminimal-platform-plugin-for-qcollectiongenerator.patch => 0045-qt-5.4.1-static-use-qminimal-platform-plugin-for-qcollectiongenerator.patch} (100%) create mode 100644 mingw-w64-qt5-git/0046-qt-5.4.1-Revert-Revert-fix-NTFS-mount-points.patch rename mingw-w64-qt5-git/{0046-Revert-Revert-fix-NTFS-mount-points.patch => 0046-qt-5.6-Revert-Revert-fix-NTFS-mount-points.patch} (100%) rename mingw-w64-qt5-git/{0048-win32-Avoid-platformNativeInterface-segfaults-with-minimal-platform.patch => 0048-qt-5.4.2-win32-Avoid-platformNativeInterface-segfaults-with-minimal-platform.patch} (100%) create mode 100644 mingw-w64-qt5-git/0049-qt-5.8.0-win32-do-not-use-fontconfig.patch create mode 100644 mingw-w64-qt5-git/0049-qt-5.9.0-win32-do-not-use-fontconfig.patch create mode 100644 mingw-w64-qt5-git/0051-qt-5.9.0-disable-qtlocation-mapboxgl-plugin.patch create mode 100644 mingw-w64-qt5-git/0051-qt-5.9.1-disable-qtlocation-mapboxgl-plugin.patch create mode 100644 mingw-w64-qt5-git/0125-qt-5.8.0-windeployqt-fixes.patch create mode 100644 mingw-w64-qt5-git/0125-qt-5.9.0-windeployqt-fixes.patch create mode 100644 mingw-w64-qt5-git/0300-qt-5.8.0-cast-errors.patch diff --git a/mingw-w64-qt5-git/0001-oracle-driver-prompt.patch b/mingw-w64-qt5-git/0001-qt-5.6-oracle-driver-prompt.patch similarity index 100% rename from mingw-w64-qt5-git/0001-oracle-driver-prompt.patch rename to mingw-w64-qt5-git/0001-qt-5.6-oracle-driver-prompt.patch diff --git a/mingw-w64-qt5-git/0001-qt-5.8.0-fix-sql-libraries-mingw.patch b/mingw-w64-qt5-git/0001-qt-5.8.0-fix-sql-libraries-mingw.patch new file mode 100644 index 0000000000..3d46a2823f --- /dev/null +++ b/mingw-w64-qt5-git/0001-qt-5.8.0-fix-sql-libraries-mingw.patch @@ -0,0 +1,37 @@ +--- qt-everywhere-opensource-src-5.8.0/qtbase/src/sql/configure.json.orig 2017-01-25 13:37:26.111247700 +0300 ++++ qt-everywhere-opensource-src-5.8.0/qtbase/src/sql/configure.json 2017-01-25 13:40:54.161502400 +0300 +@@ -50,7 +50,7 @@ + "label": "InterBase", + "test": "unix/ibase", + "sources": [ +- { "libs": "-lgds32_ms", "condition": "config.win32" }, ++ { "libs": "-lfbclient", "condition": "config.win32" }, + { "libs": "-lgds", "condition": "!config.win32" } + ] + }, +@@ -61,7 +61,7 @@ + { "type": "mysqlConfig", "query": "--libs_r" }, + { "type": "mysqlConfig", "query": "--libs" }, + { "libs": "-lmysqlclient_r", "condition": "!config.win32" }, +- { "libs": "-llibmysql", "condition": "config.win32" }, ++ { "libs": "-lmysqlclient", "condition": "config.win32" }, + { "libs": "-lmysqlclient", "condition": "!config.win32" } + ] + }, +@@ -180,16 +180,6 @@ + } + }, + +- "report": [ +- { +- "type": "warning", +- "condition": "config.win32 && !config.msvc && features.sql-oci", +- "message": "Qt does not support compiling the Oracle database driver with +-MinGW, due to lack of such support from Oracle. Consider disabling the +-Oracle driver, as the current build will most likely fail." +- } +- ], +- + "summary": [ + { + "section": "Qt Sql", diff --git a/mingw-w64-qt5-git/0001-qt-5.9.1-fix-sql-libraries-mingw.patch b/mingw-w64-qt5-git/0001-qt-5.9.1-fix-sql-libraries-mingw.patch new file mode 100644 index 0000000000..a044368f84 --- /dev/null +++ b/mingw-w64-qt5-git/0001-qt-5.9.1-fix-sql-libraries-mingw.patch @@ -0,0 +1,39 @@ +--- qt-everywhere-opensource-src-5.9.1/qtbase/src/plugins/sqldrivers/configure.json.orig 2017-01-25 13:37:26.111247700 +0300 ++++ qt-everywhere-opensource-src-5.9.1/qtbase/src/plugins/sqldrivers/configure.json 2017-01-25 13:40:54.161502400 +0300 +@@ -50,7 +50,7 @@ + "label": "InterBase", + "test": "unix/ibase", + "sources": [ +- { "libs": "-lgds32_ms", "condition": "config.win32" }, ++ { "libs": "-lfbclient", "condition": "config.win32" }, + { "libs": "-lgds", "condition": "!config.win32" } + ] + }, +@@ -61,8 +61,8 @@ + { "type": "mysqlConfig", "query": "--libs_r", "cleanlibs": false }, + { "type": "mysqlConfig", "query": "--libs", "cleanlibs": false }, + { "libs": "-lmysqlclient_r", "condition": "!config.win32" }, +- { "libs": "-llibmysql", "condition": "config.win32" }, +- { "libs": "-lmysqlclient", "condition": "!config.win32" } ++ { "libs": "-llibmysql", "condition": "config.msvc" }, ++ { "libs": "-lmysqlclient", "condition": "!config.msvc" } + ] + }, + "psql": { +@@ -180,16 +180,6 @@ + } + }, + +- "report": [ +- { +- "type": "warning", +- "condition": "config.win32 && !config.msvc && features.sql-oci", +- "message": "Qt does not support compiling the Oracle database driver with +-MinGW, due to lack of such support from Oracle. Consider disabling the +-Oracle driver, as the current build will most likely fail." +- } +- ], +- + "summary": [ + { + "section": "Qt Sql", diff --git a/mingw-w64-qt5-git/0002-use-fbclient-instead-of-gds32.patch b/mingw-w64-qt5-git/0002-qt-5.6-use-fbclient-instead-of-gds32.patch similarity index 100% rename from mingw-w64-qt5-git/0002-use-fbclient-instead-of-gds32.patch rename to mingw-w64-qt5-git/0002-qt-5.6-use-fbclient-instead-of-gds32.patch diff --git a/mingw-w64-qt5-git/0002-qt-5.8.0-configure-gcc-before-clang.patch b/mingw-w64-qt5-git/0002-qt-5.8.0-configure-gcc-before-clang.patch new file mode 100644 index 0000000000..a8f31e0e56 --- /dev/null +++ b/mingw-w64-qt5-git/0002-qt-5.8.0-configure-gcc-before-clang.patch @@ -0,0 +1,11 @@ +--- x86_64/qtbase/configure.bat.orig 2017-01-26 10:49:27.923099300 +0300 ++++ x86_64/qtbase/configure.bat 2017-01-26 10:50:56.168562200 +0300 +@@ -150,7 +150,7 @@ + :doneargs + + rem Find various executables +-for %%C in (clang-cl.exe cl.exe icl.exe g++.exe perl.exe jom.exe) do set %%C=%%~$PATH:C ++for %%C in (g++.exe clang-cl.exe cl.exe icl.exe perl.exe jom.exe) do set %%C=%%~$PATH:C + + rem Determine host spec + diff --git a/mingw-w64-qt5-git/0002-qt-5.8.1-configure-gcc-before-clang.patch b/mingw-w64-qt5-git/0002-qt-5.8.1-configure-gcc-before-clang.patch new file mode 100644 index 0000000000..2a053ff4ea --- /dev/null +++ b/mingw-w64-qt5-git/0002-qt-5.8.1-configure-gcc-before-clang.patch @@ -0,0 +1,19 @@ +--- a/qtbase/configure.bat ++++ b/qtbase/configure.bat +@@ -157,12 +157,12 @@ rem Determine host spec + if "%PLATFORM%" == "" ( + if not "%icl.exe%" == "" ( + set PLATFORM=win32-icc +- ) else if not "%clang-cl.exe%" == "" ( +- set PLATFORM=win32-clang-msvc + ) else if not "%cl.exe%" == "" ( + set PLATFORM=win32-msvc + ) else if not "%g++.exe%" == "" ( + set PLATFORM=win32-g++ ++ ) else if not "%clang-cl.exe%" == "" ( ++ set PLATFORM=win32-clang-msvc + ) else ( + echo Cannot detect host toolchain. Please use -platform. Aborting. >&2 + exit /b 1 +-- +2.13.0.windows.1 diff --git a/mingw-w64-qt5-git/0003-use-mingw-built-mysql-library.patch b/mingw-w64-qt5-git/0003-qt-5.6-use-mingw-built-mysql-library.patch similarity index 100% rename from mingw-w64-qt5-git/0003-use-mingw-built-mysql-library.patch rename to mingw-w64-qt5-git/0003-qt-5.6-use-mingw-built-mysql-library.patch diff --git a/mingw-w64-qt5-git/0003-qt-5.8.0-autodetect-fontconfig.patch b/mingw-w64-qt5-git/0003-qt-5.8.0-autodetect-fontconfig.patch new file mode 100644 index 0000000000..318d60ba34 --- /dev/null +++ b/mingw-w64-qt5-git/0003-qt-5.8.0-autodetect-fontconfig.patch @@ -0,0 +1,18 @@ +--- x86_64/qtbase/src/gui/configure.json.orig 2017-01-26 11:44:31.552004100 +0300 ++++ x86_64/qtbase/src/gui/configure.json 2017-01-26 11:45:32.569724600 +0300 +@@ -465,13 +465,13 @@ + "label": " Using system FreeType", + "enable": "input.freetype == 'system'", + "disable": "input.freetype == 'qt'", +- "autoDetect": "!config.win32", ++ "autoDetect": "!config.msvc", + "condition": "features.freetype && libs.freetype", + "output": [ "privateFeature" ] + }, + "fontconfig": { + "label": "Fontconfig", +- "condition": "!config.win32 && !config.darwin && features.system-freetype && libs.fontconfig", ++ "condition": "!config.msvc && !config.darwin && features.system-freetype && libs.fontconfig", + "output": [ "privateFeature", "feature" ] + }, + "gbm": { diff --git a/mingw-w64-qt5-git/0005-syncqt-fix.patch b/mingw-w64-qt5-git/0005-qt-5.3.0-syncqt-fix.patch similarity index 100% rename from mingw-w64-qt5-git/0005-syncqt-fix.patch rename to mingw-w64-qt5-git/0005-qt-5.3.0-syncqt-fix.patch diff --git a/mingw-w64-qt5-git/0006-win_flex-replace.patch b/mingw-w64-qt5-git/0006-qt-5.3.0-win_flex-replace.patch similarity index 100% rename from mingw-w64-qt5-git/0006-win_flex-replace.patch rename to mingw-w64-qt5-git/0006-qt-5.3.0-win_flex-replace.patch diff --git a/mingw-w64-qt5-git/0007-win32-g-Enable-static-builds.patch b/mingw-w64-qt5-git/0007-qt-5.3.0-win32-g-Enable-static-builds.patch similarity index 100% rename from mingw-w64-qt5-git/0007-win32-g-Enable-static-builds.patch rename to mingw-w64-qt5-git/0007-qt-5.3.0-win32-g-Enable-static-builds.patch diff --git a/mingw-w64-qt5-git/0007-qt-5.9.0-win32-g-Enable-static-builds.patch b/mingw-w64-qt5-git/0007-qt-5.9.0-win32-g-Enable-static-builds.patch new file mode 100644 index 0000000000..d82925c187 --- /dev/null +++ b/mingw-w64-qt5-git/0007-qt-5.9.0-win32-g-Enable-static-builds.patch @@ -0,0 +1,40 @@ +From 5d2359f12904691329be75a348d28c59bc299929 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Mon, 10 Mar 2014 23:25:11 +0000 +Subject: [PATCH] win32-g++: Enable static builds + +Change-Id: I05944b0d9d0f6f987331e98a4d9071803349833f +--- + mkspecs/features/default_post.prf | 2 +- + mkspecs/win32-g++/qmake.conf | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf +index 938670b..23deaec 100644 +--- a/mkspecs/features/default_post.prf ++++ b/mkspecs/features/default_post.prf +@@ -61,8 +61,8 @@ debug { + QMAKE_LIBFLAGS += $$QMAKE_LIBFLAGS_RELEASE + } + ++static: QMAKE_LFLAGS += $$QMAKE_LFLAGS_STATIC_LIB + dll:win32: QMAKE_LFLAGS += $$QMAKE_LFLAGS_DLL +-static:mac: QMAKE_LFLAGS += $$QMAKE_LFLAGS_STATIC_LIB + staticlib:unix { + QMAKE_CFLAGS += $$QMAKE_CFLAGS_STATIC_LIB + QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_STATIC_LIB +diff --git a/mkspecs/win32-g++/qmake.conf b/mkspecs/win32-g++/qmake.conf +index 1ac3561..c0f9daa 100644 +--- a/mkspecs/win32-g++/qmake.conf ++++ b/mkspecs/win32-g++/qmake.conf +@@ -49,6 +49,7 @@ QMAKE_LFLAGS_DEBUG = + QMAKE_LFLAGS_CONSOLE = -Wl,-subsystem,console + QMAKE_LFLAGS_WINDOWS = -Wl,-subsystem,windows + QMAKE_LFLAGS_DLL = -shared ++QMAKE_LFLAGS_STATIC_LIB = -static + QMAKE_LFLAGS_GCSECTIONS = -Wl,--gc-sections + QMAKE_LINK_OBJECT_MAX = 10 + QMAKE_LINK_OBJECT_SCRIPT = object_script +-- +1.9.2 + diff --git a/mingw-w64-qt5-git/0008-win32-g-Add-QMAKE_EXTENSION_IMPORTLIB-defaulting-to-.patch b/mingw-w64-qt5-git/0008-qt-5.3.0-win32-g-Add-QMAKE_EXTENSION_IMPORTLIB-defaulting-to-.patch similarity index 100% rename from mingw-w64-qt5-git/0008-win32-g-Add-QMAKE_EXTENSION_IMPORTLIB-defaulting-to-.patch rename to mingw-w64-qt5-git/0008-qt-5.3.0-win32-g-Add-QMAKE_EXTENSION_IMPORTLIB-defaulting-to-.patch diff --git a/mingw-w64-qt5-git/0011-win32-g++-allow-static-dbus-1.patch b/mingw-w64-qt5-git/0011-qt-5.6-win32-g++-allow-static-dbus-1.patch similarity index 100% rename from mingw-w64-qt5-git/0011-win32-g++-allow-static-dbus-1.patch rename to mingw-w64-qt5-git/0011-qt-5.6-win32-g++-allow-static-dbus-1.patch diff --git a/mingw-w64-qt5-git/0011-qt-5.8.0-mingw-dbus-and-pkg-config.patch b/mingw-w64-qt5-git/0011-qt-5.8.0-mingw-dbus-and-pkg-config.patch new file mode 100644 index 0000000000..aa5ecbe997 --- /dev/null +++ b/mingw-w64-qt5-git/0011-qt-5.8.0-mingw-dbus-and-pkg-config.patch @@ -0,0 +1,23 @@ +--- qt-everywhere-opensource-src-5.8.0/qtbase/configure.json.orig 2017-01-25 16:08:36.160957400 +0300 ++++ qt-everywhere-opensource-src-5.8.0/qtbase/configure.json 2017-01-26 07:12:57.018632800 +0300 +@@ -163,9 +163,9 @@ + "debug": "-ldbus-1d", + "release": "-ldbus-1" + }, +- "condition": "config.win32" ++ "condition": "config.msvc" + }, +- { "libs": "-ldbus-1", "condition": "!config.win32" } ++ { "libs": "-ldbus-1", "condition": "!config.msvc" } + ] + }, + "host_dbus": { +@@ -467,7 +467,7 @@ + }, + "pkg-config": { + "label": "Using pkg-config", +- "autoDetect": "!config.darwin && !config.win32", ++ "autoDetect": "!config.darwin && !config.msvc", + "condition": "tests.pkg-config", + "output": [ + "publicFeature", diff --git a/mingw-w64-qt5-git/0012-compileTest-for-icu-after-setting-static-or-shared.patch b/mingw-w64-qt5-git/0012-qt-5.6-compileTest-for-icu-after-setting-static-or-shared.patch similarity index 100% rename from mingw-w64-qt5-git/0012-compileTest-for-icu-after-setting-static-or-shared.patch rename to mingw-w64-qt5-git/0012-qt-5.6-compileTest-for-icu-after-setting-static-or-shared.patch diff --git a/mingw-w64-qt5-git/0014-fix-configure-tests.patch b/mingw-w64-qt5-git/0014-qt-5.6-fix-configure-tests.patch similarity index 100% rename from mingw-w64-qt5-git/0014-fix-configure-tests.patch rename to mingw-w64-qt5-git/0014-qt-5.6-fix-configure-tests.patch diff --git a/mingw-w64-qt5-git/0015-properly-split-libraries-mingw.patch b/mingw-w64-qt5-git/0015-qt-5.6-properly-split-libraries-mingw.patch similarity index 100% rename from mingw-w64-qt5-git/0015-properly-split-libraries-mingw.patch rename to mingw-w64-qt5-git/0015-qt-5.6-properly-split-libraries-mingw.patch diff --git a/mingw-w64-qt5-git/0016-win32-g++-use-qpa-genericunixfontdatabase.patch b/mingw-w64-qt5-git/0016-qt-5.6-win32-g++-use-qpa-genericunixfontdatabase.patch similarity index 100% rename from mingw-w64-qt5-git/0016-win32-g++-use-qpa-genericunixfontdatabase.patch rename to mingw-w64-qt5-git/0016-qt-5.6-win32-g++-use-qpa-genericunixfontdatabase.patch diff --git a/mingw-w64-qt5-git/0016-qt-5.8.0-win32-g++-use-qpa-genericunixfontdatabase.patch b/mingw-w64-qt5-git/0016-qt-5.8.0-win32-g++-use-qpa-genericunixfontdatabase.patch new file mode 100644 index 0000000000..9d4981cdfa --- /dev/null +++ b/mingw-w64-qt5-git/0016-qt-5.8.0-win32-g++-use-qpa-genericunixfontdatabase.patch @@ -0,0 +1,11 @@ +--- a/qtbase/src/platformsupport/fontdatabases/fontdatabases.pro 2014-04-08 22:03:26.386318500 +0100 ++++ b/qtbase/src/platformsupport/fontdatabases/fontdatabases.pro 2014-04-08 22:01:12.262286900 +0100 +@@ -14,7 +14,7 @@ + include($$PWD/basic/basic.pri) + } + +- unix { ++ unix|win32-g++ { + include($$PWD/genericunix/genericunix.pri) + qtConfig(fontconfig) { + include($$PWD/fontconfig/fontconfig.pri) diff --git a/mingw-w64-qt5-git/0017-fix-examples-building.patch b/mingw-w64-qt5-git/0017-qt-5.3.0-fix-examples-building.patch similarity index 100% rename from mingw-w64-qt5-git/0017-fix-examples-building.patch rename to mingw-w64-qt5-git/0017-qt-5.3.0-fix-examples-building.patch diff --git a/mingw-w64-qt5-git/0020-qt-5.3.0-use-external-angle-library.patch b/mingw-w64-qt5-git/0020-qt-5.3.0-use-external-angle-library.patch new file mode 100644 index 0000000000..17a3ee6973 --- /dev/null +++ b/mingw-w64-qt5-git/0020-qt-5.3.0-use-external-angle-library.patch @@ -0,0 +1,113 @@ +--- a/qtbase/src/gui/Qt5GuiConfigExtras.cmake.in 2014-12-05 09:24:36.000000000 -0700 ++++ b/qtbase/src/gui/Qt5GuiConfigExtras.cmake.in 2014-12-11 10:19:51.599972209 -0700 +@@ -2,9 +2,9 @@ + !!IF !isEmpty(CMAKE_ANGLE_EGL_DLL_RELEASE) + + !!IF isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE) +-set(Qt5Gui_EGL_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR/QtANGLE\") ++set(Qt5Gui_EGL_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR\") + !!ELSE +-set(Qt5Gui_EGL_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR/QtANGLE\") ++set(Qt5Gui_EGL_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR\") + !!ENDIF + + _qt5_Gui_check_file_exists(${Qt5Gui_EGL_INCLUDE_DIRS}) +--- a/qtbase/src/gui/gui.pro 2014-12-05 09:24:35.000000000 -0700 ++++ b/qtbase/src/gui/gui.pro 2014-12-11 10:22:37.644366784 -0700 +@@ -17,12 +17,6 @@ + imageformats \ + egldeviceintegrations + +-# This is here only because the platform plugin is no module, obviously. +-win32:contains(QT_CONFIG, angle)|contains(QT_CONFIG, dynamicgl) { +- MODULE_AUX_INCLUDES = \ +- \$\$QT_MODULE_INCLUDE_BASE/QtANGLE +-} +- + load(qt_module) + + # Code coverage with TestCocoon +@@ -33,6 +27,10 @@ + + mac:!ios: LIBS_PRIVATE += -framework Cocoa + ++win32:contains(QT_CONFIG, angle) { ++ LIBS_PRIVATE += -lGLESv2 ++} ++ + CONFIG += simd optimize_full + + include(accessible/accessible.pri) +@@ -55,13 +53,21 @@ + contains(QT_CONFIG, angle) { + CMAKE_GL_INCDIRS = $$CMAKE_INCLUDE_DIR + CMAKE_ANGLE_EGL_DLL_RELEASE = libEGL.dll +- CMAKE_ANGLE_EGL_IMPLIB_RELEASE = libEGL.lib + CMAKE_ANGLE_GLES2_DLL_RELEASE = libGLESv2.dll +- CMAKE_ANGLE_GLES2_IMPLIB_RELEASE = libGLESv2.lib + CMAKE_ANGLE_EGL_DLL_DEBUG = libEGLd.dll +- CMAKE_ANGLE_EGL_IMPLIB_DEBUG = libEGLd.lib + CMAKE_ANGLE_GLES2_DLL_DEBUG = libGLESv2d.dll +- CMAKE_ANGLE_GLES2_IMPLIB_DEBUG = libGLESv2d.lib ++ ++ win32-g++* { ++ CMAKE_ANGLE_EGL_IMPLIB_RELEASE = libEGL.dll.a ++ CMAKE_ANGLE_GLES2_IMPLIB_RELEASE = libGLESv2.dll.a ++ CMAKE_ANGLE_EGL_IMPLIB_DEBUG = libEGLd.dll.a ++ CMAKE_ANGLE_GLES2_IMPLIB_DEBUG = libGLESv2d.dll.a ++ } else { ++ CMAKE_ANGLE_EGL_IMPLIB_RELEASE = libEGL.lib ++ CMAKE_ANGLE_GLES2_IMPLIB_RELEASE = libGLESv2.lib ++ CMAKE_ANGLE_EGL_IMPLIB_DEBUG = libEGLd.lib ++ CMAKE_ANGLE_GLES2_IMPLIB_DEBUG = libGLESv2d.lib ++ } + + CMAKE_QT_OPENGL_IMPLEMENTATION = GLESv2 + } else { +--- a/qtbase/src/opengl/opengl.pro 2014-12-05 09:24:31.000000000 -0700 ++++ b/qtbase/src/opengl/opengl.pro 2014-12-11 10:15:45.884805707 -0700 +@@ -13,6 +13,10 @@ + contains(QT_CONFIG, opengl):CONFIG += opengl + contains(QT_CONFIG, opengles2):CONFIG += opengles2 + ++win32:contains(QT_CONFIG, angle) { ++ LIBS_PRIVATE += -lGLESv2 ++} ++ + HEADERS += qgl.h \ + qgl_p.h \ + qglcolormap.h \ +--- a/qtbase/src/plugins/platforms/windows/windows.pri 2014-12-05 09:24:37.000000000 -0700 ++++ b/qtbase/src/plugins/platforms/windows/windows.pri 2014-12-11 10:13:45.228261276 -0700 +@@ -3,6 +3,7 @@ + !wince: LIBS *= -luser32 -lwinspool -limm32 -lwinmm -loleaut32 + + contains(QT_CONFIG, opengl):!contains(QT_CONFIG, opengles2):!contains(QT_CONFIG, dynamicgl): LIBS *= -lopengl32 ++contains(QT_CONFIG, angle):LIBS += -lGLESv2 -lEGL + + mingw: LIBS *= -luuid + # For the dialog helpers: +--- a/qtbase/src/src.pro 2014-12-05 09:24:31.000000000 -0700 ++++ b/qtbase/src/src.pro 2014-12-11 10:06:14.882845813 -0700 +@@ -155,10 +155,6 @@ + SUBDIRS += src_3rdparty_harfbuzzng + src_gui.depends += src_3rdparty_harfbuzzng + } +- win32:contains(QT_CONFIG, angle)|contains(QT_CONFIG, dynamicgl) { +- SUBDIRS += src_angle +- src_gui.depends += src_angle +- } + contains(QT_CONFIG, freetype) { + SUBDIRS += src_3rdparty_freetype + src_platformsupport.depends += src_3rdparty_freetype +--- a/qtbase/src/plugins/platforms/windows/qwindowseglcontext.cpp 2014-12-05 09:24:37.000000000 -0700 ++++ b/qtbase/src/plugins/platforms/windows/qwindowseglcontext.cpp 2014-12-11 20:07:27.099190408 -0700 +@@ -39,7 +39,7 @@ + #include + + #if defined(QT_OPENGL_ES_2_ANGLE) || defined(QT_OPENGL_DYNAMIC) +-# include ++# include + #endif + + QT_BEGIN_NAMESPACE diff --git a/mingw-w64-qt5-git/0023-qt-5.3.0-env-set-external-angle.patch b/mingw-w64-qt5-git/0023-qt-5.3.0-env-set-external-angle.patch new file mode 100644 index 0000000000..082c4c8d0a --- /dev/null +++ b/mingw-w64-qt5-git/0023-qt-5.3.0-env-set-external-angle.patch @@ -0,0 +1,53 @@ +--- x86_64/qtbase/tools/configure/configureapp.cpp.orig 2014-03-23 03:12:04.000000000 +0400 ++++ x86_64/qtbase/tools/configure/configureapp.cpp 2014-04-10 22:56:50.341400000 +0400 +@@ -2077,6 +2077,8 @@ + + bool Configure::checkAngleAvailability(QString *errorMessage /* = 0 */) const + { ++ const QByteArray externalAngle = qgetenv("EXTERNAL_ANGLE"); ++ if (externalAngle.isEmpty()) { + // Check for Direct X SDK (include lib and direct shader compiler 'fxc'). + // Up to Direct X SDK June 2010 and for MinGW, this is pointed to by the + // DXSDK_DIR variable. Starting with Windows Kit 8, it is included +@@ -2120,6 +2122,7 @@ + *errorMessage = QString::fromLatin1("The shader compiler '%1' could not be found.").arg(fxcBinary); + return false; + } ++ } + return true; + } + +--- x86_64/qtbase/tools/configure/environment.cpp.orig 2014-04-10 22:49:11.171000000 +0400 ++++ x86_64/qtbase/tools/configure/environment.cpp 2014-04-10 22:57:20.901800000 +0400 +@@ -610,11 +610,14 @@ + // MinGW: Although gcc doesn't care about INCLUDE, qmake automatically adds it via -I + headerPaths += splitPathList(QString::fromLocal8Bit(getenv("INCLUDE"))); + ++ const QByteArray externalAngle = qgetenv("EXTERNAL_ANGLE"); ++ if (externalAngle.isEmpty()) { + // Add Direct X SDK for ANGLE + const QString directXSdk = detectDirectXSdk(); + if (!directXSdk.isEmpty()) // Add Direct X SDK for ANGLE + headerPaths += directXSdk + QLatin1String("/include"); + return headerPaths; ++ } + } + + QStringList Environment::libraryPaths(Compiler compiler) +@@ -626,6 +629,8 @@ + // MinGW: Although gcc doesn't care about LIB, qmake automatically adds it via -L + libraryPaths += splitPathList(QString::fromLocal8Bit(qgetenv("LIB"))); + ++ const QByteArray externalAngle = qgetenv("EXTERNAL_ANGLE"); ++ if (externalAngle.isEmpty()) { + // Add Direct X SDK for ANGLE + const QString directXSdk = detectDirectXSdk(); + if (!directXSdk.isEmpty()) { +@@ -635,6 +640,7 @@ + libraryPaths += directXSdk + QLatin1String("/lib/x86"); + #endif + } ++ } + return libraryPaths; + } + diff --git a/mingw-w64-qt5-git/0024-icu-add-U_LIB_SUFFIX_C_NAME.patch b/mingw-w64-qt5-git/0024-qt-5.3.0-icu-add-U_LIB_SUFFIX_C_NAME.patch similarity index 100% rename from mingw-w64-qt5-git/0024-icu-add-U_LIB_SUFFIX_C_NAME.patch rename to mingw-w64-qt5-git/0024-qt-5.3.0-icu-add-U_LIB_SUFFIX_C_NAME.patch diff --git a/mingw-w64-qt5-git/0024-qt-5.9.2-icu-add-U_LIB_SUFFIX_C_NAME.patch b/mingw-w64-qt5-git/0024-qt-5.9.2-icu-add-U_LIB_SUFFIX_C_NAME.patch new file mode 100644 index 0000000000..67b6294c78 --- /dev/null +++ b/mingw-w64-qt5-git/0024-qt-5.9.2-icu-add-U_LIB_SUFFIX_C_NAME.patch @@ -0,0 +1,21 @@ +--- a/qtlocation/src/3rdparty/icu_dependency.pri ++++ b/qtlocation/src/3rdparty/icu_dependency.pri +@@ -2,11 +2,17 @@ + CONFIG(static, static|shared) { + CONFIG(debug, debug|release) { + LIBS_PRIVATE += -lsicuind -lsicuucd -lsicudtd ++ DEFINES += "U_LIB_SUFFIX_C_NAME=d" + } else { + LIBS_PRIVATE += -lsicuin -lsicuuc -lsicudt + } + } else { +- LIBS_PRIVATE += -licuin -licuuc -licudt ++ CONFIG(debug, debug|release) { ++ LIBS_PRIVATE += -licuind -licuucd -licudtd ++ DEFINES += "U_LIB_SUFFIX_C_NAME=d" ++ } else { ++ LIBS_PRIVATE += -licuin -licuuc -licudt ++ } + } + } else { + LIBS_PRIVATE += -licui18n -licuuc -licudata diff --git a/mingw-w64-qt5-git/0025-force-using-make-on-msys.patch b/mingw-w64-qt5-git/0025-qt-5.6-force-using-make-on-msys.patch similarity index 100% rename from mingw-w64-qt5-git/0025-force-using-make-on-msys.patch rename to mingw-w64-qt5-git/0025-qt-5.6-force-using-make-on-msys.patch diff --git a/mingw-w64-qt5-git/0025-qt-5.8.0-force-using-make-on-msys.patch b/mingw-w64-qt5-git/0025-qt-5.8.0-force-using-make-on-msys.patch new file mode 100644 index 0000000000..dbc94d12bc --- /dev/null +++ b/mingw-w64-qt5-git/0025-qt-5.8.0-force-using-make-on-msys.patch @@ -0,0 +1,17 @@ +--- qt-everywhere-opensource-src-5.8.0/qtbase/mkspecs/features/configure_base.prf.orig 2014-04-20 21:21:48.808906400 +0100 ++++ qt-everywhere-opensource-src-5.8.0/qtbase/mkspecs/features/configure_base.prf 2014-04-20 21:20:41.677381800 +0100 +@@ -10,10 +10,10 @@ + !isEmpty(QMAKE_MAKE) { + # We were called recursively. Use the same make. + } else: if(equals(MAKEFILE_GENERATOR, UNIX)|equals(MAKEFILE_GENERATOR, MINGW)) { +- !equals(QMAKE_HOST.os, Windows): \ +- QMAKE_MAKE = make +- else: \ +- QMAKE_MAKE = mingw32-make ++ equals(QMAKE_HOST.os, Windows):isEmpty(QMAKE_SH): \ ++ QMAKE_MAKE = mingw32-make ++ else: \ ++ QMAKE_MAKE = make + } else: if(equals(MAKEFILE_GENERATOR, MSVC.NET)|equals(MAKEFILE_GENERATOR, MSBUILD)) { + QMAKE_MAKE = nmake + } else { diff --git a/mingw-w64-qt5-git/0028-qt-5.8.0-Revert-untangle-use-of-system-vs.-shell-path-list-se.patch b/mingw-w64-qt5-git/0028-qt-5.8.0-Revert-untangle-use-of-system-vs.-shell-path-list-se.patch new file mode 100644 index 0000000000..7ebadf5589 --- /dev/null +++ b/mingw-w64-qt5-git/0028-qt-5.8.0-Revert-untangle-use-of-system-vs.-shell-path-list-se.patch @@ -0,0 +1,103 @@ +From f5380f44d371f470b3455e1b604046af655e5be9 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Sun, 29 Jun 2014 21:16:08 +0100 +Subject: [PATCH] Revert "untangle use of system vs. shell path(-list) + semantics" + +This reverts commit e5024c219fffa972e087a684bacef240082dca82. +--- + mkspecs/features/default_post.prf | 4 ++-- + mkspecs/features/incredibuild_xge.prf | 2 +- + mkspecs/features/java.prf | 2 +- + mkspecs/features/testcase.prf | 2 +- + mkspecs/features/win32/windeployqt.prf | 6 +++--- + qtbase.pro | 2 +- + 7 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf +index 6fb140b..938670b 100644 +--- a/mkspecs/features/default_post.prf ++++ b/mkspecs/features/default_post.prf +@@ -83,8 +83,8 @@ silent { + + breakpad { + load(resolve_target) +- DEBUGFILENAME = $$shell_quote($$system_path($$QMAKE_RESOLVED_TARGET)) +- PROJECTPATH = $$shell_quote($$system_path($$OUT_PWD)) ++ DEBUGFILENAME = $$shell_quote($$shell_path($$QMAKE_RESOLVED_TARGET)) ++ PROJECTPATH = $$shell_quote($$shell_path($$OUT_PWD)) + + !isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK = $$QMAKE_POST_LINK$$escape_expand(\\n\\t) + QMAKE_POST_LINK = $$QMAKE_POST_LINK$$quote($${QT_BREAKPAD_ROOT_PATH}$${QMAKE_DIR_SEP}qtbreakpadsymbols $$DEBUGFILENAME $$PROJECTPATH) +diff --git a/mkspecs/features/incredibuild_xge.prf b/mkspecs/features/incredibuild_xge.prf +index 75c7a9a..b43ecf2 100644 +--- a/mkspecs/features/incredibuild_xge.prf ++++ b/mkspecs/features/incredibuild_xge.prf +@@ -3,6 +3,6 @@ contains(TEMPLATE, "vc.*") { + EOC = $$escape_expand(\\r\\h) + + for(xge, INCREDIBUILD_XGE) { +- $${xge}.commands = Rem IncrediBuild_AllowRemote $$EOC Rem IncrediBuild_OutputFile $$system_path($${xge}.output) $$EOC $$eval($${xge}.commands) ++ $${xge}.commands = Rem IncrediBuild_AllowRemote $$EOC Rem IncrediBuild_OutputFile $$shell_path($${xge}.output) $$EOC $$eval($${xge}.commands) + } + } +diff --git a/mkspecs/features/java.prf b/mkspecs/features/java.prf +index 790724c..eeaafcc 100644 +--- a/mkspecs/features/java.prf ++++ b/mkspecs/features/java.prf +@@ -44,7 +44,7 @@ CONFIG += plugin no_plugin_name_prefix + javac.input = JAVASOURCES + javac.output = $$CLASS_DIR + javac.CONFIG += combine +-javac.commands = javac -source 6 -target 6 -Xlint:unchecked -bootclasspath $$ANDROID_JAR_FILE -cp $$shell_quote($$system_path($$join(JAVACLASSPATH, $$DIRLIST_SEPARATOR))) -d $$shell_quote($$CLASS_DIR) ${QMAKE_FILE_IN} ++javac.commands = javac -source 6 -target 6 -Xlint:unchecked -bootclasspath $$ANDROID_JAR_FILE -cp $$shell_quote($$shell_path($$join(JAVACLASSPATH, $$QMAKE_DIRLIST_SEP))) -d $$shell_quote($$CLASS_DIR) ${QMAKE_FILE_IN} + # Force rebuild every time, because we don't know the paths of the destination files + # as they depend on the code. + javac.depends = FORCE +diff --git a/mkspecs/features/testcase.prf b/mkspecs/features/testcase.prf +index 770afa3..c06cbf1 100644 +--- a/mkspecs/features/testcase.prf ++++ b/mkspecs/features/testcase.prf +@@ -45,8 +45,7 @@ qtAddTargetEnv(check.commands, QT) + # Allow for custom arguments to tests + $${type}.commands += $(TESTARGS) + +-!isEmpty(TESTRUN_CWD):!contains(TESTRUN_CWD, ^\\./?): \ +- $${type}.commands = $$QMAKE_CD $$shell_path($$TESTRUN_CWD) && $$eval($${type}.commands) ++ $${type}.commands = $$QMAKE_CD $$system_path($$TESTRUN_CWD) && $$eval($${type}.commands) + + # If the test is marked as insignificant, discard the exit code + insignificant_test: $${type}.commands = -$$eval($${type}.commands) +diff --git a/mkspecs/features/win32/windeployqt.prf b/mkspecs/features/win32/windeployqt.prf +index 22253f6..f49df47 100644 +--- a/mkspecs/features/win32/windeployqt.prf ++++ b/mkspecs/features/win32/windeployqt.prf +@@ -3,9 +3,9 @@ qtPrepareTool(QMAKE_WINDEPLOYQT, windeployqt) + build_pass { + load(resolve_target) + +- isEmpty(WINDEPLOYQT_OPTIONS): WINDEPLOYQT_OPTIONS = -qmldir $$shell_quote($$system_path($$_PRO_FILE_PWD_)) +- WINDEPLOYQT_TARGET = $$shell_quote($$system_path($$QMAKE_RESOLVED_TARGET)) +- WINDEPLOYQT_OUTPUT = $$shell_quote($$system_path($$dirname(QMAKE_RESOLVED_TARGET)/$$basename(TARGET).windeployqt)) ++ isEmpty(WINDEPLOYQT_OPTIONS): WINDEPLOYQT_OPTIONS = -qmldir $$shell_quote($$shell_path($$_PRO_FILE_PWD_)) ++ WINDEPLOYQT_TARGET = $$shell_quote($$shell_path($$QMAKE_RESOLVED_TARGET)) ++ WINDEPLOYQT_OUTPUT = $$shell_quote($$shell_path($$dirname(QMAKE_RESOLVED_TARGET)/$$basename(TARGET).windeployqt)) + windeployqt.target = windeployqt + windeployqt.commands = $$QMAKE_WINDEPLOYQT $$WINDEPLOYQT_OPTIONS -list target $$WINDEPLOYQT_TARGET > $$WINDEPLOYQT_OUTPUT + +diff --git a/qtbase.pro b/qtbase.pro +index d6861cf..ed6fc39 100644 +--- a/qtbase.pro ++++ b/qtbase.pro +@@ -87,7 +87,7 @@ INSTALLS += syncqt + # qtPrepareTool() to find the non-installed syncqt. + prefix_build|!equals(PWD, $$OUT_PWD) { + +- cmd = perl -w $$system_path($$PWD/bin/syncqt.pl) ++ cmd = perl -w $$shell_path($$PWD/bin/syncqt.pl) + + TOOL_PRI = $$OUT_PWD/mkspecs/modules/qt_tool_syncqt.pri + +-- +2.0.1 + diff --git a/mingw-w64-qt5-git/0029-qt-5.8.0-Revert-fix-quoting-and-path-separators-in-qtPrepareT.patch b/mingw-w64-qt5-git/0029-qt-5.8.0-Revert-fix-quoting-and-path-separators-in-qtPrepareT.patch new file mode 100644 index 0000000000..23715dfdfc --- /dev/null +++ b/mingw-w64-qt5-git/0029-qt-5.8.0-Revert-fix-quoting-and-path-separators-in-qtPrepareT.patch @@ -0,0 +1,96 @@ +From 036ba8edbe4103a7f7b63d2f84730afbddbb3d7d Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Sun, 29 Jun 2014 20:30:50 +0100 +Subject: [PATCH] Revert "fix quoting and path separators in qtPrepareTool()" + +This reverts commit 4a35f21208f2f6ae23a4a2f668c72ea6d9def4c9. +--- + mkspecs/features/qt_functions.prf | 24 ++++++++++-------------- + mkspecs/features/qt_tool.prf | 3 +-- + 2 files changed, 11 insertions(+), 16 deletions(-) + +diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf +index 9a4d80e..5dd6987 100644 +--- a/mkspecs/features/qt_functions.prf ++++ b/mkspecs/features/qt_functions.prf +@@ -55,40 +55,36 @@ defineTest(qtAddRpathLink) { + + # variable, default, [suffix for variable for system() use], [prepare primary variable for system() use] + defineTest(qtPrepareTool) { +- cmd = $$eval(QT_TOOL.$${2}.binary) +- isEmpty(cmd) { +- cmd = $$[QT_HOST_BINS]/$$2 +- exists($${cmd}.pl) { +- $${1}_EXE = $${cmd}.pl +- cmd = perl -w $$system_path($${cmd}.pl) ++ $$1 = $$eval(QT_TOOL.$${2}.binary) ++ isEmpty($$1) { ++ $$1 = $$[QT_HOST_BINS]/$$2 ++ exists($$eval($$1).pl) { ++ $${1}_EXE = $$eval($$1).pl ++ $$1 = perl -w $$eval($$1).pl + } else: contains(QMAKE_HOST.os, Windows) { +- $${1}_EXE = $${cmd}.exe +- cmd = $$system_path($${cmd}.exe) ++ $${1}_EXE = $$eval($$1).exe ++ $$1 = $$eval($$1).exe + } else:contains(QMAKE_HOST.os, Darwin) { +- BUNDLENAME = $${cmd}.app/Contents/MacOS/$$2 ++ BUNDLENAME = $$eval($$1).app/Contents/MacOS/$$2 + exists($$BUNDLENAME) { +- cmd = $$BUNDLENAME ++ $$1 = $$BUNDLENAME + } +- $${1}_EXE = $$cmd ++ $${1}_EXE = $$eval($$1).exe + } else { +- $${1}_EXE = $$cmd ++ $${1}_EXE = $$eval($$1).exe + } + } else { +- $${1}_EXE = $$last(cmd) ++ $${1}_EXE = $$last($$eval($$1)) + } + export($${1}_EXE) + QT_TOOL_ENV += $$eval(QT_TOOL.$${2}.envvars) + QT_TOOL_NAME = $$2 + !isEmpty(3)|!isEmpty(4) { +- $$1$$3 = +- for (arg, cmd): \ +- $$1$$3 += $$system_quote($$arg) ++ $$1$$3 = $$system_path($$eval($$1)) + qtAddTargetEnv($$1$$3, QT_TOOL.$${2}.depends, system) + } + isEmpty(4) { +- $$1 = +- for (arg, cmd): \ +- $$1 += $$shell_quote($$arg) ++ $$1 = $$shell_path($$eval($$1)) + qtAddTargetEnv($$1, QT_TOOL.$${2}.depends, ) + } + } +diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf +index 1d3e88c..f0864f9 100644 +--- a/mkspecs/features/qt_tool.prf ++++ b/mkspecs/features/qt_tool.prf +@@ -45,15 +45,14 @@ CONFIG += console + module_envvars = + } + +- bin = $$system_path($$QMAKE_RESOLVED_TARGET) ++ bin = $$QMAKE_RESOLVED_TARGET + } else { + bin = $${HOST_QT_TOOLS}/$${TARGET} + equals(QMAKE_HOST.os, Windows): bin = $${bin}.exe +- bin = $$system_path($$bin) + } + + TOOL_PRI_CONT = \ +- "QT_TOOL.$${MODULE}.binary = $$val_escape(bin)" \ ++ "QT_TOOL.$${MODULE}.binary = $$bin" \ + "QT_TOOL.$${MODULE}.depends =$$join(MODULE_DEPENDS, " ", " ")" \ + $$module_envvars + write_file($$TOOL_PRI, TOOL_PRI_CONT)|error() +-- +2.0.1 + diff --git a/mingw-w64-qt5-git/0030-workaround-ansidecl-h-PTR-define-conflict.patch b/mingw-w64-qt5-git/0030-qt-5.3.1-workaround-ansidecl-h-PTR-define-conflict.patch similarity index 100% rename from mingw-w64-qt5-git/0030-workaround-ansidecl-h-PTR-define-conflict.patch rename to mingw-w64-qt5-git/0030-qt-5.3.1-workaround-ansidecl-h-PTR-define-conflict.patch diff --git a/mingw-w64-qt5-git/0031-workaround-BOOL-define-conflict.patch b/mingw-w64-qt5-git/0031-qt-5.5.0-workaround-BOOL-define-conflict.patch similarity index 100% rename from mingw-w64-qt5-git/0031-workaround-BOOL-define-conflict.patch rename to mingw-w64-qt5-git/0031-qt-5.5.0-workaround-BOOL-define-conflict.patch diff --git a/mingw-w64-qt5-git/0034-Use-QMAKE_PREFIX_STATICLIB-in-create_cmake-prf.patch b/mingw-w64-qt5-git/0034-qt-5.3.2-Use-QMAKE_PREFIX_STATICLIB-in-create_cmake-prf.patch similarity index 100% rename from mingw-w64-qt5-git/0034-Use-QMAKE_PREFIX_STATICLIB-in-create_cmake-prf.patch rename to mingw-w64-qt5-git/0034-qt-5.3.2-Use-QMAKE_PREFIX_STATICLIB-in-create_cmake-prf.patch diff --git a/mingw-w64-qt5-git/0035-dont-add-resource-files-to-qmake-libs.patch b/mingw-w64-qt5-git/0035-qt-5.3.2-dont-add-resource-files-to-qmake-libs.patch similarity index 100% rename from mingw-w64-qt5-git/0035-dont-add-resource-files-to-qmake-libs.patch rename to mingw-w64-qt5-git/0035-qt-5.3.2-dont-add-resource-files-to-qmake-libs.patch diff --git a/mingw-w64-qt5-git/0036-win32-qt5-static-cmake-link-ws2_32-and--static.patch b/mingw-w64-qt5-git/0036-qt-5.3.2-win32-qt5-static-cmake-link-ws2_32-and--static.patch similarity index 100% rename from mingw-w64-qt5-git/0036-win32-qt5-static-cmake-link-ws2_32-and--static.patch rename to mingw-w64-qt5-git/0036-qt-5.3.2-win32-qt5-static-cmake-link-ws2_32-and--static.patch diff --git a/mingw-w64-qt5-git/0037-Improve-cmake-plugin-detection-as-not-all-are-suffixed-Plugin.patch b/mingw-w64-qt5-git/0037-qt-5.4.0-Improve-cmake-plugin-detection-as-not-all-are-suffixed-Plugin.patch similarity index 100% rename from mingw-w64-qt5-git/0037-Improve-cmake-plugin-detection-as-not-all-are-suffixed-Plugin.patch rename to mingw-w64-qt5-git/0037-qt-5.4.0-Improve-cmake-plugin-detection-as-not-all-are-suffixed-Plugin.patch diff --git a/mingw-w64-qt5-git/0038-cmake-Rearrange-STATIC-vs-INTERFACE-targets.patch b/mingw-w64-qt5-git/0038-qt-5.5.0-cmake-Rearrange-STATIC-vs-INTERFACE-targets.patch similarity index 100% rename from mingw-w64-qt5-git/0038-cmake-Rearrange-STATIC-vs-INTERFACE-targets.patch rename to mingw-w64-qt5-git/0038-qt-5.5.0-cmake-Rearrange-STATIC-vs-INTERFACE-targets.patch diff --git a/mingw-w64-qt5-git/0039-Make-it-possible-to-use-static-builds-of-Qt-with-CMa.patch b/mingw-w64-qt5-git/0039-qt-5.4.0-Make-it-possible-to-use-static-builds-of-Qt-with-CMa.patch similarity index 100% rename from mingw-w64-qt5-git/0039-Make-it-possible-to-use-static-builds-of-Qt-with-CMa.patch rename to mingw-w64-qt5-git/0039-qt-5.4.0-Make-it-possible-to-use-static-builds-of-Qt-with-CMa.patch diff --git a/mingw-w64-qt5-git/0040-Generate-separated-libraries-in-prl-files-for-CMake.patch b/mingw-w64-qt5-git/0040-qt-5.4.0-Generate-separated-libraries-in-prl-files-for-CMake.patch similarity index 100% rename from mingw-w64-qt5-git/0040-Generate-separated-libraries-in-prl-files-for-CMake.patch rename to mingw-w64-qt5-git/0040-qt-5.4.0-Generate-separated-libraries-in-prl-files-for-CMake.patch diff --git a/mingw-w64-qt5-git/0041-Fix-mingw-create_cmake-prl-file-has-no-lib-prefix.patch b/mingw-w64-qt5-git/0041-qt-5.4.0-Fix-mingw-create_cmake-prl-file-has-no-lib-prefix.patch similarity index 100% rename from mingw-w64-qt5-git/0041-Fix-mingw-create_cmake-prl-file-has-no-lib-prefix.patch rename to mingw-w64-qt5-git/0041-qt-5.4.0-Fix-mingw-create_cmake-prl-file-has-no-lib-prefix.patch diff --git a/mingw-w64-qt5-git/0042-static-cmake-also-link-plugins-and-plugin-deps.patch b/mingw-w64-qt5-git/0042-qt-5.4.0-static-cmake-also-link-plugins-and-plugin-deps.patch similarity index 100% rename from mingw-w64-qt5-git/0042-static-cmake-also-link-plugins-and-plugin-deps.patch rename to mingw-w64-qt5-git/0042-qt-5.4.0-static-cmake-also-link-plugins-and-plugin-deps.patch diff --git a/mingw-w64-qt5-git/0043-static-cmake-regex-QT_INSTALL_LIBS-in-QMAKE_PRL_LIBS_FOR_CMAKE.patch b/mingw-w64-qt5-git/0043-qt-5.5.0-static-cmake-regex-QT_INSTALL_LIBS-in-QMAKE_PRL_LIBS_FOR_CMAKE.patch similarity index 100% rename from mingw-w64-qt5-git/0043-static-cmake-regex-QT_INSTALL_LIBS-in-QMAKE_PRL_LIBS_FOR_CMAKE.patch rename to mingw-w64-qt5-git/0043-qt-5.5.0-static-cmake-regex-QT_INSTALL_LIBS-in-QMAKE_PRL_LIBS_FOR_CMAKE.patch diff --git a/mingw-w64-qt5-git/0045-static-use-qminimal-platform-plugin-for-qcollectiongenerator.patch b/mingw-w64-qt5-git/0045-qt-5.4.1-static-use-qminimal-platform-plugin-for-qcollectiongenerator.patch similarity index 100% rename from mingw-w64-qt5-git/0045-static-use-qminimal-platform-plugin-for-qcollectiongenerator.patch rename to mingw-w64-qt5-git/0045-qt-5.4.1-static-use-qminimal-platform-plugin-for-qcollectiongenerator.patch diff --git a/mingw-w64-qt5-git/0046-qt-5.4.1-Revert-Revert-fix-NTFS-mount-points.patch b/mingw-w64-qt5-git/0046-qt-5.4.1-Revert-Revert-fix-NTFS-mount-points.patch new file mode 100644 index 0000000000..4493d02ad6 --- /dev/null +++ b/mingw-w64-qt5-git/0046-qt-5.4.1-Revert-Revert-fix-NTFS-mount-points.patch @@ -0,0 +1,120 @@ +From 1d9aff66270aba6d16077f460aa85fbf161aba99 Mon Sep 17 00:00:00 2001 +From: Joerg Bornemann +Date: Tue, 17 Jan 2012 14:21:05 +0100 +Subject: [PATCH] Revert "Revert "fix NTFS mount points"" + +This reverts commit 49d1b068987d0895b2429b3d87beb561d9fbcbd7 + +Because of https://github.com/msys2/msys2.github.io/issues/4 + +.. bringing back: + +fix NTFS mount points + +NTFS mount points are not treated as symlinks, because they might +not have a link target. +This is the case when a volume is mounted as a single mount point +without a drive letter. +This patch fixes building Qt in an NTFS mount point. + +Task-number: QTBUG-20431 +Change-Id: Ie2e15212e1a7ca7fa0067b7ca8857e243e42c21a +Reviewed-by: Thomas Hartmann +--- + src/corelib/io/qfilesystemengine_win.cpp | 10 ++++++---- + src/corelib/io/qfilesystemiterator_win.cpp | 2 +- + src/corelib/io/qfilesystemmetadata_p.h | 23 +++++++++++++++++------ + 3 files changed, 24 insertions(+), 11 deletions(-) + +diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp +index 221cea3..fa56d7c 100644 +--- a/src/corelib/io/qfilesystemengine_win.cpp ++++ b/src/corelib/io/qfilesystemengine_win.cpp +@@ -914,9 +914,10 @@ static bool tryFindFallback(const QFileSystemEntry &fname, QFileSystemMetaData & + int errorCode = GetLastError(); + if (errorCode == ERROR_ACCESS_DENIED || errorCode == ERROR_SHARING_VIOLATION) { + WIN32_FIND_DATA findData; +- if (getFindData(fname.nativeFilePath(), findData) ++ const QString nativeFilePath = fname.nativeFilePath(); ++ if (getFindData(nativeFilePath, findData) + && findData.dwFileAttributes != INVALID_FILE_ATTRIBUTES) { +- data.fillFromFindData(findData, true, fname.isDriveRoot()); ++ data.fillFromFindData(findData, true, fname.isDriveRoot(), nativeFilePath); + filledData = true; + } + } +@@ -1031,8 +1032,9 @@ bool QFileSystemEngine::fillMetaData(const QFileSystemEntry &entry, QFileSystemM + data.knownFlagsMask |= QFileSystemMetaData::LinkType; + if (data.fileAttribute_ & FILE_ATTRIBUTE_REPARSE_POINT) { + WIN32_FIND_DATA findData; +- if (getFindData(fname.nativeFilePath(), findData)) +- data.fillFromFindData(findData, true); ++ const QString nativeFilePath = fname.nativeFilePath(); ++ if (getFindData(nativeFilePath, findData)) ++ data.fillFromFindData(findData, true, false, nativeFilePath); + } + } + data.knownFlagsMask |= what; +diff --git a/src/corelib/io/qfilesystemiterator_win.cpp b/src/corelib/io/qfilesystemiterator_win.cpp +index 6351a35..6fa22ef 100644 +--- a/src/corelib/io/qfilesystemiterator_win.cpp ++++ b/src/corelib/io/qfilesystemiterator_win.cpp +@@ -138,7 +138,7 @@ bool QFileSystemIterator::advance(QFileSystemEntry &fileEntry, QFileSystemMetaDa + fileEntry = QFileSystemEntry(dirPath + fileName); + metaData = QFileSystemMetaData(); + if (!fileName.endsWith(QLatin1String(".lnk"))) { +- metaData.fillFromFindData(findData, true); ++ metaData.fillFromFindData(findData, true, false, fileEntry.nativeFilePath()); + } + return true; + } +diff --git a/src/corelib/io/qfilesystemmetadata_p.h b/src/corelib/io/qfilesystemmetadata_p.h +index da9576b..266111e 100644 +--- a/src/corelib/io/qfilesystemmetadata_p.h ++++ b/src/corelib/io/qfilesystemmetadata_p.h +@@ -211,7 +211,7 @@ public: + + #if defined(Q_OS_WIN) + inline void fillFromFileAttribute(DWORD fileAttribute, bool isDriveRoot = false); +- inline void fillFromFindData(WIN32_FIND_DATA &findData, bool setLinkType = false, bool isDriveRoot = false); ++ inline void fillFromFindData(WIN32_FIND_DATA &findData, bool setLinkType = false, bool isDriveRoot = false, const QString &nativeFullFilePath = QString()); + # ifndef Q_OS_WINRT + inline void fillFromFindInfo(BY_HANDLE_FILE_INFORMATION &fileInfo); + # endif +@@ -308,7 +308,7 @@ inline void QFileSystemMetaData::fillFromFileAttribute(DWORD fileAttribute,bool + knownFlagsMask |= FileType | DirectoryType | HiddenAttribute | ExistsAttribute; + } + +-inline void QFileSystemMetaData::fillFromFindData(WIN32_FIND_DATA &findData, bool setLinkType, bool isDriveRoot) ++inline void QFileSystemMetaData::fillFromFindData(WIN32_FIND_DATA &findData, bool setLinkType, bool isDriveRoot, const QString &nativeFullFilePath) + { + fillFromFileAttribute(findData.dwFileAttributes, isDriveRoot); + creationTime_ = findData.ftCreationTime; +@@ -326,9 +326,21 @@ inline void QFileSystemMetaData::fillFromFindData(WIN32_FIND_DATA &findData, boo + if (setLinkType) { + knownFlagsMask |= LinkType; + entryFlags &= ~LinkType; +- if ((fileAttribute_ & FILE_ATTRIBUTE_REPARSE_POINT) +- && (findData.dwReserved0 == IO_REPARSE_TAG_SYMLINK)) { +- entryFlags |= LinkType; ++ if (fileAttribute_ & FILE_ATTRIBUTE_REPARSE_POINT) { ++ if (findData.dwReserved0 == IO_REPARSE_TAG_SYMLINK) { ++ entryFlags |= LinkType; ++ } else if (findData.dwReserved0 == IO_REPARSE_TAG_MOUNT_POINT) { ++ // Junctions and mount points are implemented as NTFS reparse points. ++ // But mount points cannot be treated as symlinks because they might ++ // not have a link target. ++ wchar_t buf[50]; ++ QString path = nativeFullFilePath; ++ if (!path.endsWith(QLatin1Char('\\'))) ++ path.append(QLatin1Char('\\')); ++ BOOL isMountPoint = GetVolumeNameForVolumeMountPoint(reinterpret_cast(path.utf16()), buf, sizeof(buf) / sizeof(wchar_t)); ++ if (!isMountPoint) ++ entryFlags |= LinkType; ++ } + } + } + } +-- +2.3.4 + diff --git a/mingw-w64-qt5-git/0046-Revert-Revert-fix-NTFS-mount-points.patch b/mingw-w64-qt5-git/0046-qt-5.6-Revert-Revert-fix-NTFS-mount-points.patch similarity index 100% rename from mingw-w64-qt5-git/0046-Revert-Revert-fix-NTFS-mount-points.patch rename to mingw-w64-qt5-git/0046-qt-5.6-Revert-Revert-fix-NTFS-mount-points.patch diff --git a/mingw-w64-qt5-git/0048-win32-Avoid-platformNativeInterface-segfaults-with-minimal-platform.patch b/mingw-w64-qt5-git/0048-qt-5.4.2-win32-Avoid-platformNativeInterface-segfaults-with-minimal-platform.patch similarity index 100% rename from mingw-w64-qt5-git/0048-win32-Avoid-platformNativeInterface-segfaults-with-minimal-platform.patch rename to mingw-w64-qt5-git/0048-qt-5.4.2-win32-Avoid-platformNativeInterface-segfaults-with-minimal-platform.patch diff --git a/mingw-w64-qt5-git/0049-qt-5.8.0-win32-do-not-use-fontconfig.patch b/mingw-w64-qt5-git/0049-qt-5.8.0-win32-do-not-use-fontconfig.patch new file mode 100644 index 0000000000..c98d89cba3 --- /dev/null +++ b/mingw-w64-qt5-git/0049-qt-5.8.0-win32-do-not-use-fontconfig.patch @@ -0,0 +1,11 @@ +--- x86_64/qtbase/src/plugins/platforms/minimal/qminimalintegration.cpp.orig 2016-06-08 20:09:49.795870200 +0300 ++++ x86_64/qtbase/src/plugins/platforms/minimal/qminimalintegration.cpp 2016-06-08 20:10:59.856863400 +0300 +@@ -112,7 +112,7 @@ + QPlatformFontDatabase *QMinimalIntegration::fontDatabase() const + { + if (m_options & EnableFonts) { +-#if QT_CONFIG(fontconfig) ++#if QT_CONFIG(fontconfig) && !defined(Q_OS_WIN) + if (!m_fontDatabase) + m_fontDatabase = new QGenericUnixFontDatabase; + #else \ No newline at end of file diff --git a/mingw-w64-qt5-git/0049-qt-5.9.0-win32-do-not-use-fontconfig.patch b/mingw-w64-qt5-git/0049-qt-5.9.0-win32-do-not-use-fontconfig.patch new file mode 100644 index 0000000000..44ab2afd52 --- /dev/null +++ b/mingw-w64-qt5-git/0049-qt-5.9.0-win32-do-not-use-fontconfig.patch @@ -0,0 +1,11 @@ +--- x86_64/qtbase/src/plugins/platforms/minimal/qminimalintegration.cpp.orig 2016-06-08 20:09:49.795870200 +0300 ++++ x86_64/qtbase/src/plugins/platforms/minimal/qminimalintegration.cpp 2016-06-08 20:10:59.856863400 +0300 +@@ -129,7 +129,7 @@ + QPlatformFontDatabase *QMinimalIntegration::fontDatabase() const + { + if (!m_fontDatabase && (m_options & EnableFonts)) { +-#if QT_CONFIG(fontconfig) ++#if QT_CONFIG(fontconfig) && !defined(Q_OS_WIN) + m_fontDatabase = new QGenericUnixFontDatabase; + #elif defined(Q_OS_WINRT) + m_fontDatabase = new QWinRTFontDatabase; \ No newline at end of file diff --git a/mingw-w64-qt5-git/0051-qt-5.9.0-disable-qtlocation-mapboxgl-plugin.patch b/mingw-w64-qt5-git/0051-qt-5.9.0-disable-qtlocation-mapboxgl-plugin.patch new file mode 100644 index 0000000000..656be4ecc7 --- /dev/null +++ b/mingw-w64-qt5-git/0051-qt-5.9.0-disable-qtlocation-mapboxgl-plugin.patch @@ -0,0 +1,22 @@ +--- qt-everywhere-opensource-src-5.9.0.orig/qtlocation/src/plugins/geoservices/geoservices.pro 2017-06-07 19:05:58.022981900 +0200 ++++ qt-everywhere-opensource-src-5.9.0/qtlocation/src/plugins/geoservices/geoservices.pro 2017-06-07 19:00:24.921062300 +0200 +@@ -6,11 +6,11 @@ + SUBDIRS += osm + } + +-qtConfig(c++14):!win32|mingw:!qnx { +- !exists(../../3rdparty/mapbox-gl-native/CMakeLists.txt) { +- warning("Submodule mapbox-gl-native does not exist. Run 'git submodule update --init' on qtlocation.") +- } else { +- SUBDIRS += mapboxgl ../../3rdparty/mapbox-gl-native +- mapboxgl.depends = ../../3rdparty/mapbox-gl-native +- } +-} ++#qtConfig(c++14):!win32|mingw:!qnx { ++# !exists(../../3rdparty/mapbox-gl-native/CMakeLists.txt) { ++# warning("Submodule mapbox-gl-native does not exist. Run 'git submodule update --init' on qtlocation.") ++# } else { ++# SUBDIRS += mapboxgl ../../3rdparty/mapbox-gl-native ++# mapboxgl.depends = ../../3rdparty/mapbox-gl-native ++# } ++#} diff --git a/mingw-w64-qt5-git/0051-qt-5.9.1-disable-qtlocation-mapboxgl-plugin.patch b/mingw-w64-qt5-git/0051-qt-5.9.1-disable-qtlocation-mapboxgl-plugin.patch new file mode 100644 index 0000000000..4121c62646 --- /dev/null +++ b/mingw-w64-qt5-git/0051-qt-5.9.1-disable-qtlocation-mapboxgl-plugin.patch @@ -0,0 +1,22 @@ +--- a/qtlocation/src/plugins/geoservices/geoservices.pro ++++ b/qtlocation/src/plugins/geoservices/geoservices.pro +@@ -6,11 +6,11 @@ qtConfig(concurrent) { + SUBDIRS += osm + } + +-qtConfig(opengl):qtConfig(c++14):!win32|mingw:!qnx { +- !exists(../../3rdparty/mapbox-gl-native/CMakeLists.txt) { +- warning("Submodule mapbox-gl-native does not exist. Run 'git submodule update --init' on qtlocation.") +- } else { +- SUBDIRS += mapboxgl ../../3rdparty/mapbox-gl-native +- mapboxgl.depends = ../../3rdparty/mapbox-gl-native +- } +-} ++#qtConfig(opengl):qtConfig(c++14):!win32|mingw:!qnx { ++# !exists(../../3rdparty/mapbox-gl-native/CMakeLists.txt) { ++# warning("Submodule mapbox-gl-native does not exist. Run 'git submodule update --init' on qtlocation.") ++# } else { ++# SUBDIRS += mapboxgl ../../3rdparty/mapbox-gl-native ++# mapboxgl.depends = ../../3rdparty/mapbox-gl-native ++# } ++#} diff --git a/mingw-w64-qt5-git/0125-qt-5.8.0-windeployqt-fixes.patch b/mingw-w64-qt5-git/0125-qt-5.8.0-windeployqt-fixes.patch new file mode 100644 index 0000000000..5450902d1b --- /dev/null +++ b/mingw-w64-qt5-git/0125-qt-5.8.0-windeployqt-fixes.patch @@ -0,0 +1,74 @@ +From fccfcf6e3b023ef392e1a199a14459ae30a6b44f Mon Sep 17 00:00:00 2001 +From: James Duley +Date: Mon, 20 Jun 2016 15:10:09 +0100 +Subject: [PATCH] Fix windeployqt for MSYS2 + +Note this breaks normal MinGW deployment +--- + src/windeployqt/main.cpp | 36 +----------------------------------- + 1 file changed, 1 insertion(+), 35 deletions(-) + +diff --git a/src/windeployqt/main.cpp b/src/windeployqt/main.cpp +index 6c78353..3ac75d8 100644 +--- a/src/windeployqt/main.cpp ++++ b/src/windeployqt/main.cpp +@@ -1010,7 +1010,7 @@ static QStringList compilerRunTimeLibs(Platform platform, bool isDebug, unsigned + QStringList result; + switch (platform) { + case WindowsMinGW: { // MinGW: Add runtime libraries +- static const char *minGwRuntimes[] = {"*gcc_", "*stdc++", "*winpthread"}; ++ static const char *minGwRuntimes[] = {"*gcc_s_", "*stdc++", "*winpthread"}; + const QString gcc = findInPath(QStringLiteral("g++.exe")); + if (gcc.isEmpty()) { + std::wcerr << "Warning: Cannot find GCC installation directory. g++.exe must be in the path.\n"; +@@ -1194,38 +1194,6 @@ static DeployResult deploy(const Options &options, + return result; + } + +- // Some Windows-specific checks: Qt5Core depends on ICU when configured with "-icu". Other than +- // that, Qt5WebKit has a hard dependency on ICU. +- if (options.platform & WindowsBased) { +- const QStringList qtLibs = dependentQtLibs.filter(QStringLiteral("Qt5Core"), Qt::CaseInsensitive) +- + dependentQtLibs.filter(QStringLiteral("Qt5WebKit"), Qt::CaseInsensitive); +- foreach (const QString &qtLib, qtLibs) { +- QStringList icuLibs = findDependentLibraries(qtLib, options.platform, errorMessage).filter(QStringLiteral("ICU"), Qt::CaseInsensitive); +- if (!icuLibs.isEmpty()) { +- // Find out the ICU version to add the data library icudtXX.dll, which does not show +- // as a dependency. +- QRegExp numberExpression(QStringLiteral("\\d+")); +- Q_ASSERT(numberExpression.isValid()); +- const int index = numberExpression.indexIn(icuLibs.front()); +- if (index >= 0) { +- const QString icuVersion = icuLibs.front().mid(index, numberExpression.matchedLength()); +- if (optVerboseLevel > 1) +- std::wcout << "Adding ICU version " << icuVersion << '\n'; +- icuLibs.push_back(QStringLiteral("icudt") + icuVersion + QLatin1String(windowsSharedLibrarySuffix)); +- } +- foreach (const QString &icuLib, icuLibs) { +- const QString icuPath = findInPath(icuLib); +- if (icuPath.isEmpty()) { +- *errorMessage = QStringLiteral("Unable to locate ICU library ") + icuLib; +- return result; +- } +- dependentQtLibs.push_back(icuPath); +- } // foreach icuLib +- break; +- } // !icuLibs.isEmpty() +- } // Qt5Core/Qt5WebKit +- } // Windows +- + // Scan Quick2 imports + QmlImportScanResult qmlScanResult; + if (options.quickImports && usesQml2) { +@@ -1522,8 +1490,6 @@ int main(int argc, char **argv) + const QMap qmakeVariables = queryQMakeAll(&errorMessage); + const QString xSpec = qmakeVariables.value(QStringLiteral("QMAKE_XSPEC")); + options.platform = platformFromMkSpec(xSpec); +- if (options.platform == WindowsMinGW || options.platform == Windows) +- options.compilerRunTime = true; + + { // Command line + QCommandLineParser parser; +-- +2.8.2 + diff --git a/mingw-w64-qt5-git/0125-qt-5.9.0-windeployqt-fixes.patch b/mingw-w64-qt5-git/0125-qt-5.9.0-windeployqt-fixes.patch new file mode 100644 index 0000000000..1a206464b1 --- /dev/null +++ b/mingw-w64-qt5-git/0125-qt-5.9.0-windeployqt-fixes.patch @@ -0,0 +1,35 @@ +From fccfcf6e3b023ef392e1a199a14459ae30a6b44f Mon Sep 17 00:00:00 2001 +From: James Duley +Date: Mon, 20 Jun 2016 15:10:09 +0100 +Subject: [PATCH] Fix windeployqt for MSYS2 + +Note this breaks normal MinGW deployment +--- + src/windeployqt/main.cpp | 36 +----------------------------------- + 1 file changed, 1 insertion(+), 35 deletions(-) + +diff --git a/src/windeployqt/main.cpp b/src/windeployqt/main.cpp +index 6c78353..3ac75d8 100644 +--- a/src/windeployqt/main.cpp ++++ b/src/windeployqt/main.cpp +@@ -1010,7 +1010,7 @@ static QStringList compilerRunTimeLibs(Platform platform, bool isDebug, unsigned + QStringList result; + switch (platform) { + case WindowsMinGW: { // MinGW: Add runtime libraries +- static const char *minGwRuntimes[] = {"*gcc_", "*stdc++", "*winpthread"}; ++ static const char *minGwRuntimes[] = {"*gcc_s_", "*stdc++", "*winpthread"}; + const QString gcc = findInPath(QStringLiteral("g++.exe")); + if (gcc.isEmpty()) { + std::wcerr << "Warning: Cannot find GCC installation directory. g++.exe must be in the path.\n"; +@@ -1522,8 +1490,6 @@ int main(int argc, char **argv) + const QMap qmakeVariables = queryQMakeAll(&errorMessage); + const QString xSpec = qmakeVariables.value(QStringLiteral("QMAKE_XSPEC")); + options.platform = platformFromMkSpec(xSpec); +- if (options.platform == WindowsMinGW || options.platform == Windows) +- options.compilerRunTime = true; + + { // Command line + QCommandLineParser parser; +-- +2.8.2 + diff --git a/mingw-w64-qt5-git/0300-qt-5.8.0-cast-errors.patch b/mingw-w64-qt5-git/0300-qt-5.8.0-cast-errors.patch new file mode 100644 index 0000000000..9eb4dc601f --- /dev/null +++ b/mingw-w64-qt5-git/0300-qt-5.8.0-cast-errors.patch @@ -0,0 +1,11 @@ +--- x86_64/qtbase/src/plugins/platforms/direct2d/qwindowsdirect2dintegration.cpp.orig 2017-01-26 15:35:53.584495700 +0300 ++++ x86_64/qtbase/src/plugins/platforms/direct2d/qwindowsdirect2dintegration.cpp 2017-01-26 15:40:06.088564600 +0300 +@@ -113,7 +113,7 @@ + UINT size; + DWORD *fi; + +- if (VerQueryValue(info.constData(), __TEXT("\\"), (LPVOID *) &fi, &size) && size) { ++ if (VerQueryValue(info.data(), __TEXT("\\"), (LPVOID *) &fi, &size) && size) { + VS_FIXEDFILEINFO *verInfo = (VS_FIXEDFILEINFO *) fi; + return Direct2DVersion(HIWORD(verInfo->dwFileVersionMS), + LOWORD(verInfo->dwFileVersionMS), diff --git a/mingw-w64-qt5-git/PKGBUILD b/mingw-w64-qt5-git/PKGBUILD index 3100b3fb14..ebd7e9136e 100644 --- a/mingw-w64-qt5-git/PKGBUILD +++ b/mingw-w64-qt5-git/PKGBUILD @@ -1,18 +1,27 @@ # Maintainer: Alexey Pavlov # Maintainer: Massimo Callegari +# Maintainer: Tim S + +#_variant=-static +_variant=-shared # The Qt5 GIT repository to clone from _qt_git_repo=https://code.qt.io/qt -#_qt_git_repo=https://github.com/qtproject +# Branch tested for applying patches include 5.6 and 5.9. # The Qt5 GIT branch to clone and build (replace with 'dev' to build the bleeding edge sources) -_qt_git_branch=5.7 +_qt_git_branch=5.9 # When changing this value the x86_64 and i686 folders +# # under the src folder must be deleted to have a good build. -# The way Qt5 libraries are built. Possible values are '-release', '-debug' or '-debug_and_release' +# "./configure" is more likely to have windows build issues. +#_configure=./configure.bat +# configure.bat fails for Version 5.7. +_configure=./configure + +# The way Qt5 libraries are built. Possible values are '-release', '-debug' or '-debug-and-release' _build_mode=-release - -# The package target installation path -_qt5_prefix="${MINGW_PREFIX}" +# _build_mode=-debug +# _build_mode=-debug-and-release # Tune the following to decide how and what to build _with_icu=yes @@ -21,156 +30,175 @@ _with_openssl=yes _with_dbus=yes _system_freetype=yes _system_zlib=yes -_system_pcre=yes +_system_pcre2=yes _system_libpng=yes _system_libjpeg=yes _system_harfbuzz=yes -_build_examples=yes -_build_tools=yes -_build_tests=yes -_make_docs=yes - -# Set the way opengl should be compiled. Possible values are 'angle', 'desktop' or 'dynamic' -_opengl=desktop -_opengl_for_configure="${_opengl}" +_make_docs=no +_build_examples=no +_build_script=no +_build_tools=no +_build_tests=no +_build_multimedia=no +_build_imageformats=no +_build_xmlpatterns=no +_build_declarative=no +_build_datavis3d=no +_build_activeqt=no +_build_serialport=no +_build_svg=no +_build_connectivity=no +_build_location=no +_build_charts=no +_build_sensors=no +_build_websockets=no +_build_gamepad=no +_build_webchannel=no +_build_winextras=no # Getting crashes that only happen in release builds? -# Define this and you may have a hope of figuring out why .. +# Define this and you may have a hope of figuring out +# why .. _debuggable_release=no +#_debuggable_release=yes +if [ "${_variant}" = "-static" ]; then + _namesuff="-static" + _system_freetype=no +# _ltcg="yes" + _ltcg="no" +else + _namesuff= + _ltcg="no" +fi + +_realname=qt5${_namesuff} _basename=qt5 -pkgbase=mingw-w64-${_basename}-git -pkgname="${MINGW_PACKAGE_PREFIX}-${_basename}-git" -_ver_base=5.7.0 -pkgver=5.7.0.1.d9beab9 +pkgbase=mingw-w64-${_realname}-git +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" +pkgver=5.9.2.r925.6dd41c8 pkgrel=1 arch=('any') url='https://www.qt.io/' install=qt5.install license=('GPL3' 'LGPL' 'FDL' 'custom') -provides=("${MINGW_PACKAGE_PREFIX}-${_basename}") -conflicts=("${MINGW_PACKAGE_PREFIX}-${_basename}") +provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") +conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") -depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-qtbinpatcher" - $([[ "$_with_dbus" == "yes" ]] && echo "${MINGW_PACKAGE_PREFIX}-dbus") - $([[ "$_with_fontconfig" == "yes" ]] && echo "${MINGW_PACKAGE_PREFIX}-fontconfig") - $([[ "$_system_freetype" == "yes" ]] && echo "${MINGW_PACKAGE_PREFIX}-freetype") - $([[ "$_system_harfbuzz" == "yes" ]] && echo "${MINGW_PACKAGE_PREFIX}-harfbuzz") - "${MINGW_PACKAGE_PREFIX}-jasper" - $([[ "$_system_libjpeg" == "yes" ]] && echo "${MINGW_PACKAGE_PREFIX}-libjpeg") - "${MINGW_PACKAGE_PREFIX}-libmng" - $([[ "$_system_libpng" == "yes" ]] && echo "${MINGW_PACKAGE_PREFIX}-libpng") - "${MINGW_PACKAGE_PREFIX}-libtiff" - "${MINGW_PACKAGE_PREFIX}-libxml2" - "${MINGW_PACKAGE_PREFIX}-libxslt" - "${MINGW_PACKAGE_PREFIX}-libwebp" - $([[ "$_with_openssl" == "yes" ]] && echo "${MINGW_PACKAGE_PREFIX}-openssl") - $([[ "$_system_pcre" == "yes" ]] && echo "${MINGW_PACKAGE_PREFIX}-pcre") - "${MINGW_PACKAGE_PREFIX}-sqlite3" - "${MINGW_PACKAGE_PREFIX}-xpm-nox" - $([[ "$_system_zlib" == "yes" ]] && echo "${MINGW_PACKAGE_PREFIX}-zlib") - $([[ "$_with_icu" == "yes" ]] && echo \ - "${MINGW_PACKAGE_PREFIX}-icu" \ - "${MINGW_PACKAGE_PREFIX}-icu-debug-libs" ) - ) - -makedepends=("git" - "diffutils" - "gperf" - "m4" - "make" - "patch" - "perl" - "${MINGW_PACKAGE_PREFIX}-ruby" - "${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-pkg-config" - "${MINGW_PACKAGE_PREFIX}-python2" - "${MINGW_PACKAGE_PREFIX}-make" - "${MINGW_PACKAGE_PREFIX}-libmariadbclient" - "${MINGW_PACKAGE_PREFIX}-firebird2" - "${MINGW_PACKAGE_PREFIX}-postgresql" - ) +depends=( + "${MINGW_PACKAGE_PREFIX}-gcc-libs" + "${MINGW_PACKAGE_PREFIX}-qtbinpatcher" + $([[ "$_variant" == "-shared" ]] && echo "${MINGW_PACKAGE_PREFIX}-assimp") + $([[ "$_with_dbus" == "yes" ]] && echo "${MINGW_PACKAGE_PREFIX}-dbus") + $([[ "$_with_fontconfig" == "yes" ]] && echo "${MINGW_PACKAGE_PREFIX}-fontconfig") + $([[ "$_system_freetype" == "yes" ]] && echo "${MINGW_PACKAGE_PREFIX}-freetype") + $([[ "$_system_harfbuzz" == "yes" ]] && echo "${MINGW_PACKAGE_PREFIX}-harfbuzz") + "${MINGW_PACKAGE_PREFIX}-jasper" + $([[ "$_system_libjpeg" == "yes" ]] && echo "${MINGW_PACKAGE_PREFIX}-libjpeg") + "${MINGW_PACKAGE_PREFIX}-libmng" + $([[ "$_system_libpng" == "yes" ]] && echo "${MINGW_PACKAGE_PREFIX}-libpng") + "${MINGW_PACKAGE_PREFIX}-libtiff" + "${MINGW_PACKAGE_PREFIX}-libxml2" + "${MINGW_PACKAGE_PREFIX}-libxslt" + "${MINGW_PACKAGE_PREFIX}-libwebp" + $([[ "$_with_openssl" == "yes" ]] && echo "${MINGW_PACKAGE_PREFIX}-openssl") + $([[ "$_system_pcre2" == "yes" ]] && echo "${MINGW_PACKAGE_PREFIX}-pcre2") + "${MINGW_PACKAGE_PREFIX}-sqlite3" + "${MINGW_PACKAGE_PREFIX}-xpm-nox" + $([[ "$_system_zlib" == "yes" ]] && echo "${MINGW_PACKAGE_PREFIX}-zlib") + $([[ "$_with_icu" == "yes" ]] && echo \ + "${MINGW_PACKAGE_PREFIX}-icu" \ + "${MINGW_PACKAGE_PREFIX}-icu-debug-libs" ) +) +optdepends=( + $([[ "$_variant" == "-shared" ]] && echo \ + "${MINGW_PACKAGE_PREFIX}-libmariadbclient" \ + "${MINGW_PACKAGE_PREFIX}-firebird" \ + "${MINGW_PACKAGE_PREFIX}-postgresql") +) +makedepends=( + "git" + "diffutils" + "gperf" + "m4" + "make" + "patch" + "perl" + "dos2unix" + "${MINGW_PACKAGE_PREFIX}-ruby" + "${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-pkg-config" + "${MINGW_PACKAGE_PREFIX}-python2" + "${MINGW_PACKAGE_PREFIX}-make" + $([[ "$_variant" == "-static" ]] && echo \ + "${MINGW_PACKAGE_PREFIX}-dbus" \ + "${MINGW_PACKAGE_PREFIX}-openssl") + $([[ "$_variant" == "-shared" ]] && echo \ + "${MINGW_PACKAGE_PREFIX}-libmariadbclient" \ + "${MINGW_PACKAGE_PREFIX}-firebird2" \ + "${MINGW_PACKAGE_PREFIX}-postgresql") +) groups=("${MINGW_PACKAGE_PREFIX}-qt" "${MINGW_PACKAGE_PREFIX}-qt5") options=('!strip' 'staticlibs') -qt_modules=( - qt5 - qt3d - qtactiveqt - qtandroidextras - qtbase - qtcanvas3d - qtcharts - qtconnectivity - qtdatavis3d - qtdeclarative - qtdoc - qtenginio - qtgamepad - qtgraphicaleffects - qtimageformats - qtlocation - qtmacextras - qtmultimedia - qtpurchasing - qtquick1 - qtquickcontrols - qtquickcontrols2 - qtscript - qtscxml - qtsensors - qtserialbus - qtserialport - qtsvg - qttools - qttranslations - qtvirtualkeyboard - qtwebchannel - qtwebsockets - qtwinextras - qtx11extras - qtxmlpatterns - ) source=( - 0001-oracle-driver-prompt.patch - 0002-use-fbclient-instead-of-gds32.patch - 0003-use-mingw-built-mysql-library.patch - 0005-syncqt-fix.patch - 0006-win_flex-replace.patch - 0007-win32-g-Enable-static-builds.patch - 0008-win32-g-Add-QMAKE_EXTENSION_IMPORTLIB-defaulting-to-.patch - 0011-win32-g++-allow-static-dbus-1.patch - 0012-compileTest-for-icu-after-setting-static-or-shared.patch - 0014-fix-configure-tests.patch - 0015-properly-split-libraries-mingw.patch - 0016-win32-g++-use-qpa-genericunixfontdatabase.patch - 0017-fix-examples-building.patch - 0024-icu-add-U_LIB_SUFFIX_C_NAME.patch - 0025-force-using-make-on-msys.patch - 0030-workaround-ansidecl-h-PTR-define-conflict.patch - 0031-workaround-BOOL-define-conflict.patch - 0034-Use-QMAKE_PREFIX_STATICLIB-in-create_cmake-prf.patch - 0035-dont-add-resource-files-to-qmake-libs.patch - 0036-win32-qt5-static-cmake-link-ws2_32-and--static.patch - 0037-Improve-cmake-plugin-detection-as-not-all-are-suffixed-Plugin.patch - 0038-cmake-Rearrange-STATIC-vs-INTERFACE-targets.patch - 0039-Make-it-possible-to-use-static-builds-of-Qt-with-CMa.patch - 0040-Generate-separated-libraries-in-prl-files-for-CMake.patch - 0041-Fix-mingw-create_cmake-prl-file-has-no-lib-prefix.patch - 0042-static-cmake-also-link-plugins-and-plugin-deps.patch - 0043-static-cmake-regex-QT_INSTALL_LIBS-in-QMAKE_PRL_LIBS_FOR_CMAKE.patch - 0045-static-use-qminimal-platform-plugin-for-qcollectiongenerator.patch - 0046-Revert-Revert-fix-NTFS-mount-points.patch - 0048-win32-Avoid-platformNativeInterface-segfaults-with-minimal-platform.patch - 0049-do-not-include-qopengles2ext-h.patch - ) + 0001-qt-5.6-oracle-driver-prompt.patch + 0001-qt-5.8.0-fix-sql-libraries-mingw.patch + 0001-qt-5.9.1-fix-sql-libraries-mingw.patch + 0002-qt-5.6-use-fbclient-instead-of-gds32.patch + 0002-qt-5.8.1-configure-gcc-before-clang.patch + 0003-qt-5.6-use-mingw-built-mysql-library.patch + 0003-qt-5.8.0-autodetect-fontconfig.patch + 0005-qt-5.3.0-syncqt-fix.patch + 0006-qt-5.3.0-win_flex-replace.patch + 0007-qt-5.3.0-win32-g-Enable-static-builds.patch + 0007-qt-5.9.0-win32-g-Enable-static-builds.patch + 0008-qt-5.3.0-win32-g-Add-QMAKE_EXTENSION_IMPORTLIB-defaulting-to-.patch + 0011-qt-5.6-win32-g++-allow-static-dbus-1.patch + 0011-qt-5.8.0-mingw-dbus-and-pkg-config.patch + 0012-qt-5.6-compileTest-for-icu-after-setting-static-or-shared.patch + 0014-qt-5.6-fix-configure-tests.patch + 0015-qt-5.6-properly-split-libraries-mingw.patch + 0016-qt-5.6-win32-g++-use-qpa-genericunixfontdatabase.patch + 0016-qt-5.8.0-win32-g++-use-qpa-genericunixfontdatabase.patch + 0017-qt-5.3.0-fix-examples-building.patch + 0024-qt-5.3.0-icu-add-U_LIB_SUFFIX_C_NAME.patch + 0024-qt-5.9.2-icu-add-U_LIB_SUFFIX_C_NAME.patch + 0025-qt-5.6-force-using-make-on-msys.patch + 0025-qt-5.8.0-force-using-make-on-msys.patch + 0030-qt-5.3.1-workaround-ansidecl-h-PTR-define-conflict.patch + 0031-qt-5.5.0-workaround-BOOL-define-conflict.patch + 0034-qt-5.3.2-Use-QMAKE_PREFIX_STATICLIB-in-create_cmake-prf.patch + 0035-qt-5.3.2-dont-add-resource-files-to-qmake-libs.patch + 0036-qt-5.3.2-win32-qt5-static-cmake-link-ws2_32-and--static.patch + 0037-qt-5.4.0-Improve-cmake-plugin-detection-as-not-all-are-suffixed-Plugin.patch + 0038-qt-5.5.0-cmake-Rearrange-STATIC-vs-INTERFACE-targets.patch + 0039-qt-5.4.0-Make-it-possible-to-use-static-builds-of-Qt-with-CMa.patch + 0040-qt-5.4.0-Generate-separated-libraries-in-prl-files-for-CMake.patch + 0041-qt-5.4.0-Fix-mingw-create_cmake-prl-file-has-no-lib-prefix.patch + 0042-qt-5.4.0-static-cmake-also-link-plugins-and-plugin-deps.patch + 0043-qt-5.5.0-static-cmake-regex-QT_INSTALL_LIBS-in-QMAKE_PRL_LIBS_FOR_CMAKE.patch + 0045-qt-5.4.1-static-use-qminimal-platform-plugin-for-qcollectiongenerator.patch + 0046-qt-5.6-Revert-Revert-fix-NTFS-mount-points.patch + 0048-qt-5.4.2-win32-Avoid-platformNativeInterface-segfaults-with-minimal-platform.patch + 0049-qt-5.8.0-win32-do-not-use-fontconfig.patch + 0049-qt-5.9.0-win32-do-not-use-fontconfig.patch + 0051-qt-5.9.0-disable-qtlocation-mapboxgl-plugin.patch + 0051-qt-5.9.1-disable-qtlocation-mapboxgl-plugin.patch + 0125-qt-5.8.0-windeployqt-fixes.patch + 0125-qt-5.9.0-windeployqt-fixes.patch + 0300-qt-5.8.0-cast-errors.patch +) + +# qt5-static must be kept in its own prefix hierarchy +# as otherwise it will conflict with qt5 itself +if [ "${_variant}" = "-static" ]; then + _qt5_prefix="${MINGW_PREFIX}/${_realname}" +else + _qt5_prefix="${MINGW_PREFIX}" +fi -pkgver() { - cd "$srcdir/$_basename" - printf "%s.%s.%s" "$_ver_base" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" -} # Thiago's patch doesn't contain the configure script changes # needed, you may be able to get somewhere with this in the @@ -180,15 +208,23 @@ if [ "${_ltcg}" = "yes" ]; then LTCG_LFLAGS="-flto-partition=1to1 -flto -ffat-lto-objects" fi +pkgver() { + cd "$srcdir/$_basename" + + local full_version=${_qt_version}.r$(git rev-list --count --first-parent HEAD ).$(git rev-parse --short HEAD ) + + printf "%s" $full_version +} + # Translates using cygpath according to the ${_make} being used # (so either mingw32-make or MSYS2 make can be used) path_conv_for_make() { - if [ "${_make}" = "mingw32-make" ]; then - echo -n "${1}" | sed "s|${MINGW_PREFIX}|$(cygpath -m ${MINGW_PREFIX})|g" - else # MSYS2 make +# if [ "${_make}" = "mingw32-make" ]; then +# echo -n "${1}" | sed "s|${MINGW_PREFIX}|$(cygpath -m ${MINGW_PREFIX})|g" +# else # MSYS2 make MINGW_PREFIX_W=$(cygpath -m ${MINGW_PREFIX}) echo -n "${1}" | sed "s|${MINGW_PREFIX_W}|$(cygpath -u ${MINGW_PREFIX})|g" - fi +# fi } # Runs pkg-config with all arguments, then calls path_conv_for_make on each @@ -204,62 +240,131 @@ pkg_config_qt5() { echo "${_final[@]}" } -prepare() { - cd ${srcdir} - - for submodule in ${qt_modules[@]}; do - if [ ! -f $submodule/.cloned ]; then - if [ -f ${submodule}.tar.gz ]; then - echo "Using ${submodule}.tar.gz archive instead of cloning..." - tar xzf ${submodule}.tar.gz - else - echo "git clone --depth 1 --branch "$_qt_git_branch" "$_qt_git_repo"/${submodule}.git" - git clone --depth 1 --branch "$_qt_git_branch" "$_qt_git_repo"/${submodule}.git - touch $submodule/.cloned - tar czf ${submodule}.tar.gz ${submodule} - fi - else - echo "${submodule} already cloned. Skipping..." - fi - if [[ $submodule == ${_basename} ]]; then - cd ${_basename} +git_switch_to_branch () { + local current_branch=$(git rev-parse --abbrev-ref HEAD) + if [[ $current_branch != $1 ]]; then + git reset --hard + echo "git checkout $1 || git checkout -b $1 --track origin/$1" + git checkout $1 || git checkout -b $1 --track origin/$1 fi - done - +} + +git_clone_or_switch_to_branch () { + if [ ! -f $1/.cloned ]; then + echo "git clone --no-single-branch --no-checkout --branch "$_qt_git_branch" "$_qt_git_repo"/$1.git" + git clone --no-single-branch --no-checkout --branch "$_qt_git_branch" "$_qt_git_repo"/$1.git + touch $1/.cloned + else + pushd $1 > /dev/null + git_switch_to_branch $_qt_git_branch + popd > /dev/null + fi +} + +git_clone_or_update_local_submodule () { + if [ ! -f $1/.cloned ]; then + echo "git clone --branch "$_qt_git_branch" --quiet "${srcdir}"/${_basename}/$1 $1" + git clone --branch "$_qt_git_branch" --quiet "${srcdir}"/${_basename}/$1 $1 + touch $1/.cloned + else + echo "$1 already cloned." + pushd $1 > /dev/null + if [[ $1 == "qtbase" || \ + $1 == "qtactiveqt" || \ + $1 == "qtcanvas3d" || \ + $1 == "qtdeclarative" || \ + $1 == "qtimageformats" || \ + $1 == "qtlocation" || \ + $1 == "qtsensors" || \ + $1 == "qttools" ]] ; then + echo "Resetting $1 ..." + git reset --hard HEAD + fi + git_switch_to_branch $_qt_git_branch + echo "Pulling $1 ..." + git pull + popd > /dev/null + fi +} + +prepare_build_folder() { # MSYS2 gperf cannot handle \r\n. find . -name "*.gperf" -exec dos2unix "{}" \; - patch -p1 -i ${srcdir}/0001-oracle-driver-prompt.patch - patch -p1 -i ${srcdir}/0002-use-fbclient-instead-of-gds32.patch - patch -p1 -i ${srcdir}/0003-use-mingw-built-mysql-library.patch - patch -p1 -i ${srcdir}/0005-syncqt-fix.patch - patch -p1 -i ${srcdir}/0006-win_flex-replace.patch - + if [[ ${_qt_version:0:3} == "5.6" || ${_qt_version:0:3} == "5.7" ]] ; then + patch -p1 -i ${srcdir}/0001-qt-5.6-oracle-driver-prompt.patch + patch -p1 -i ${srcdir}/0002-qt-5.6-use-fbclient-instead-of-gds32.patch + patch -p1 -i ${srcdir}/0003-qt-5.6-use-mingw-built-mysql-library.patch + else + if [[ ${_qt_version:0:3} != "5.7" ]] ; then + if [[ ${_qt_version:0:3} == "5.8" || ${_qt_version} == "5.9.0" ]] ; then + patch -p1 -i ${srcdir}/0001-qt-5.8.0-fix-sql-libraries-mingw.patch + else + patch -p1 -i ${srcdir}/0001-qt-5.9.1-fix-sql-libraries-mingw.patch + fi + fi + fi + if [[ ${_qt_version:0:3} != "5.6" && ${_qt_version:0:3} != "5.7" ]] ; then + patch -p1 -i ${srcdir}/0002-qt-5.8.1-configure-gcc-before-clang.patch + patch -p1 -i ${srcdir}/0003-qt-5.8.0-autodetect-fontconfig.patch + fi + patch -p1 -i ${srcdir}/0005-qt-5.3.0-syncqt-fix.patch + patch -p1 -i ${srcdir}/0006-qt-5.3.0-win_flex-replace.patch + # Some patches are against qtbase's repository. pushd qtbase > /dev/null - patch -p1 -i ${srcdir}/0007-win32-g-Enable-static-builds.patch - patch -p1 -i ${srcdir}/0008-win32-g-Add-QMAKE_EXTENSION_IMPORTLIB-defaulting-to-.patch - patch -p1 -i ${srcdir}/0011-win32-g++-allow-static-dbus-1.patch + if [[ ${_qt_version:0:3} == "5.9" ]] ; then + patch -p1 -i ${srcdir}/0007-qt-5.9.0-win32-g-Enable-static-builds.patch + else + if [[ ${_qt_version:0:4} != "5.10" ]] ; then + patch -p1 -i ${srcdir}/0007-qt-5.3.0-win32-g-Enable-static-builds.patch + fi + fi + patch -p1 -i ${srcdir}/0008-qt-5.3.0-win32-g-Add-QMAKE_EXTENSION_IMPORTLIB-defaulting-to-.patch + if [[ ${_qt_version:0:3} == "5.6" || ${_qt_version:0:3} == "5.7" ]] ; then + patch -p1 -i ${srcdir}/0011-qt-5.6-win32-g++-allow-static-dbus-1.patch + else + popd > /dev/null + patch -p1 -i ${srcdir}/0011-qt-5.8.0-mingw-dbus-and-pkg-config.patch + pushd qtbase > /dev/null + fi + # The next patch needs some work. It's moving a block of shell script un-necessarily # as the bit: QMAKE_CONFIG="$QMAKE_CONFIG static" before calling compileTest is what # actually made it work. There may be a good reason for not adding static to QMAKE_CONFIG # so it might be necessary to back up the value, do compileTest then restore it after. - patch -p1 -i ${srcdir}/0012-compileTest-for-icu-after-setting-static-or-shared.patch + if [[ ${_qt_version:0:3} == "5.6" || ${_qt_version:0:3} == "5.7" ]] ; then + patch -p1 -i ${srcdir}/0012-qt-5.6-compileTest-for-icu-after-setting-static-or-shared.patch + fi popd > /dev/null - - patch -p1 -i ${srcdir}/0014-fix-configure-tests.patch - patch -p1 -i ${srcdir}/0015-properly-split-libraries-mingw.patch - patch -p1 -i ${srcdir}/0016-win32-g++-use-qpa-genericunixfontdatabase.patch - patch -p1 -i ${srcdir}/0017-fix-examples-building.patch - - patch -p1 -i ${srcdir}/0024-icu-add-U_LIB_SUFFIX_C_NAME.patch - patch -p1 -i ${srcdir}/0025-force-using-make-on-msys.patch - - pushd qtbase > /dev/null - patch -p1 -i ${srcdir}/0030-workaround-ansidecl-h-PTR-define-conflict.patch - popd - patch -p1 -i ${srcdir}/0031-workaround-BOOL-define-conflict.patch + if [[ ${_qt_version:0:3} == "5.6" || ${_qt_version:0:3} == "5.7" ]] ; then + patch -p1 -i ${srcdir}/0014-qt-5.6-fix-configure-tests.patch + patch -p1 -i ${srcdir}/0015-qt-5.6-properly-split-libraries-mingw.patch + patch -p1 -i ${srcdir}/0016-qt-5.6-win32-g++-use-qpa-genericunixfontdatabase.patch + else + patch -p1 -i ${srcdir}/0016-qt-5.8.0-win32-g++-use-qpa-genericunixfontdatabase.patch + fi + if [[ ${_qt_version:0:3} != "5.9" ]] ; then + patch -p1 -i ${srcdir}/0017-qt-5.3.0-fix-examples-building.patch + fi + + if [[ ${_qt_version} != "5.9.2" ]] ; then + patch -p1 -i ${srcdir}/0024-qt-5.3.0-icu-add-U_LIB_SUFFIX_C_NAME.patch + else + patch -p1 -i ${srcdir}/0024-qt-5.9.2-icu-add-U_LIB_SUFFIX_C_NAME.patch + fi + if [[ ${_qt_version:0:3} == "5.6" || ${_qt_version:0:3} == "5.7" ]] ; then + patch -p1 -i ${srcdir}/0025-qt-5.6-force-using-make-on-msys.patch + else + patch -p1 -i ${srcdir}/0025-qt-5.8.0-force-using-make-on-msys.patch + fi + + pushd qtbase > /dev/null + patch -p1 -i ${srcdir}/0030-qt-5.3.1-workaround-ansidecl-h-PTR-define-conflict.patch + popd > /dev/null + + patch -p1 -i ${srcdir}/0031-qt-5.5.0-workaround-BOOL-define-conflict.patch # See discussion at https://bugreports.qt.io/browse/QTBUG-41292 # I think what is possibly happening instead is that the Debug and Release @@ -267,33 +372,67 @@ prepare() { # suggestion (below) doesn't fix the problem entirely, it makes the chances # of it happening near 0. His take on it is that we should have different # target files for RegExpJitTables.h for each of release and debug. - patch -p1 -i ${srcdir}/0034-Use-QMAKE_PREFIX_STATICLIB-in-create_cmake-prf.patch - patch -p1 -i ${srcdir}/0035-dont-add-resource-files-to-qmake-libs.patch + patch -p1 -i ${srcdir}/0034-qt-5.3.2-Use-QMAKE_PREFIX_STATICLIB-in-create_cmake-prf.patch + patch -p1 -i ${srcdir}/0035-qt-5.3.2-dont-add-resource-files-to-qmake-libs.patch # Patches so that qt5-static can be used with cmake. - patch -p1 -i ${srcdir}/0036-win32-qt5-static-cmake-link-ws2_32-and--static.patch - patch -p1 -i ${srcdir}/0037-Improve-cmake-plugin-detection-as-not-all-are-suffixed-Plugin.patch + patch -p1 -i ${srcdir}/0036-qt-5.3.2-win32-qt5-static-cmake-link-ws2_32-and--static.patch + patch -p1 -i ${srcdir}/0037-qt-5.4.0-Improve-cmake-plugin-detection-as-not-all-are-suffixed-Plugin.patch pushd qtbase > /dev/null - patch -p1 -i ${srcdir}/0038-cmake-Rearrange-STATIC-vs-INTERFACE-targets.patch - popd + patch -p1 -i ${srcdir}/0038-qt-5.5.0-cmake-Rearrange-STATIC-vs-INTERFACE-targets.patch + popd > /dev/null - patch -p1 -i ${srcdir}/0039-Make-it-possible-to-use-static-builds-of-Qt-with-CMa.patch - patch -p1 -i ${srcdir}/0040-Generate-separated-libraries-in-prl-files-for-CMake.patch - patch -p1 -i ${srcdir}/0041-Fix-mingw-create_cmake-prl-file-has-no-lib-prefix.patch - patch -p1 -i ${srcdir}/0042-static-cmake-also-link-plugins-and-plugin-deps.patch - patch -p1 -i ${srcdir}/0043-static-cmake-regex-QT_INSTALL_LIBS-in-QMAKE_PRL_LIBS_FOR_CMAKE.patch + patch -p1 -i ${srcdir}/0039-qt-5.4.0-Make-it-possible-to-use-static-builds-of-Qt-with-CMa.patch + patch -p1 -i ${srcdir}/0040-qt-5.4.0-Generate-separated-libraries-in-prl-files-for-CMake.patch + patch -p1 -i ${srcdir}/0041-qt-5.4.0-Fix-mingw-create_cmake-prl-file-has-no-lib-prefix.patch + patch -p1 -i ${srcdir}/0042-qt-5.4.0-static-cmake-also-link-plugins-and-plugin-deps.patch + patch -p1 -i ${srcdir}/0043-qt-5.5.0-static-cmake-regex-QT_INSTALL_LIBS-in-QMAKE_PRL_LIBS_FOR_CMAKE.patch # More odds and sods. - patch -p1 -i ${srcdir}/0045-static-use-qminimal-platform-plugin-for-qcollectiongenerator.patch + patch -p1 -i ${srcdir}/0045-qt-5.4.1-static-use-qminimal-platform-plugin-for-qcollectiongenerator.patch pushd qtbase > /dev/null - patch -p1 -i ${srcdir}/0046-Revert-Revert-fix-NTFS-mount-points.patch - patch -p1 -i ${srcdir}/0049-do-not-include-qopengles2ext-h.patch + if [[ ${_qt_version:0:3} == "5.6" || ${_qt_version:0:3} == "5.7" ]] ; then + patch -p1 -i ${srcdir}/0046-qt-5.6-Revert-Revert-fix-NTFS-mount-points.patch + fi popd > /dev/null - rm -f ${srcdir}/qt5/qtbase/src/gui/opengl/qopengles2ext.h - patch -p1 -i ${srcdir}/0048-win32-Avoid-platformNativeInterface-segfaults-with-minimal-platform.patch + rm -f ./qtbase/src/gui/opengl/qopengles2ext.h + + patch -p1 -i ${srcdir}/0048-qt-5.4.2-win32-Avoid-platformNativeInterface-segfaults-with-minimal-platform.patch + + if [[ ${_qt_version:0:3} == "5.8" ]] ; then + patch -p1 -i ${srcdir}/0049-qt-5.8.0-windows-not-use-fontconfig.patch + else + if [[ ${_qt_version:0:3} == "5.9" ]] ; then + patch -p1 -i ${srcdir}/0049-qt-5.9.0-win32-do-not-use-fontconfig.patch + fi + fi + + if [[ ${_qt_version:0:3} == "5.9" ]] ; then + if [[ ${_qt_version} == "5.9.0" ]] ; then + patch -p1 -i ${srcdir}/0051-qt-5.9.0-disable-qtlocation-mapboxgl-plugin.patch + else + if [[ ${_qt_version} == "5.9.1" ]] ; then + patch -p1 -i ${srcdir}/0051-qt-5.9.1-disable-qtlocation-mapboxgl-plugin.patch + fi + fi + fi + + pushd qttools > /dev/null + if [[ ${_qt_version:0:3} == "5.8" ]] ; then + patch -p1 -i ${srcdir}/0125-qt-5.8.0-windeployqt-fixes.patch + else + if [[ ${_qt_version:0:3} == "5.9" ]] ; then + patch -p1 -i ${srcdir}/0125-qt-5.9.0-windeployqt-fixes.patch + fi + fi + popd > /dev/null + + if [[ ${_qt_version:0:3} == "5.8" ]] ; then + patch -p1 -i ${srcdir}/0300-qt-5.8.0-cast-errors.patch + fi local _ARCH_TUNE= case ${MINGW_CHOST} in @@ -305,11 +444,24 @@ prepare() { ;; esac + # Determine the CFLAGS, DEBUG_CFLAGS and LDFLAGS that we will tell qmake.conf about. + # If this is qt5-static, we'd like to add -Os in an attempt to reduce size a little, + # however there's an ICE in GCC 4.9.1 with x86_64, so must tread carefully. + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61207 + # Unlike OPTIM_D, please keep this one down here since it is not user selectable due + # to the GCC bug. + # This is the default, prevent re-appending. + # OPTIM_O="-O2" + if [ "${_variant}" = "-static" -a "${CARCH}" = "i686" ]; then + OPTIM_O="-Os" + fi + if [ "${_debuggable_release}" = "yes" ]; then QMAKE_LFLAGS_RELEASE= - OPTIM_O=${OPTIM_O}" -g" + OPTIM_O="${OPTIM_O} -g" else - QMAKE_LFLAGS_RELEASE="-Wl,-s" + QMAKE_LFLAGS_RELEASE="-Wl,-s,--relax,--gc-sections" + OPTIM_O="${OPTIM_O} -ffunction-sections -fdata-sections" fi BIGOBJ_FLAGS="-Wa,-mbig-obj" @@ -327,90 +479,303 @@ prepare() { sed -i "s|^QMAKE_LFLAGS_RELEASE .*= \(.*\)$|QMAKE_LFLAGS_RELEASE = ${QMAKE_LFLAGS_RELEASE}|g" qtbase/mkspecs/win32-g++/qmake.conf } -build() { +_qt_modules=( + qtmultimedia + qtconnectivity + qtdeclarative + qtdoc + qttools + qttranslations + qtwebsockets +) +# Qt Add-On modules +_qt_modules+=( + qt3d + qtactiveqt +# qtandroidextras # Is this useful on Windows? + qtcanvas3d + qtcharts + qtdatavis3d + qtgraphicaleffects + qtimageformats + qtlocation +# qtmacextras # Is this useful on Windows? + qtpurchasing + qtquickcontrols + qtquickcontrols2 + qtscript # Deprecated in 5.9 + qtsensors + qtserialbus + qtserialport + qtsvg + qtvirtualkeyboard + qtwebchannel + qtwinextras +# qtx11extras # Is this useful on Windows? + qtxmlpatterns +) +if [[ ${_qt_git_branch:0:3} == "5.6" ]] ; then + _qt_modules+=(qtenginio) # Lasted updated in 5.6.0 +else + _qt_modules+=(qtgamepad) # Added in 5.7 + _qt_modules+=(qtscxml) # Added in 5.7 +fi +prepare() { cd ${srcdir} - cd ${_basename} + + ### Check out the git source code + # + # Check out the git super module source code + git_clone_or_switch_to_branch ${_basename} + + cd ${_basename} + git_clone_or_switch_to_branch "qtbase" + + pushd qtbase > /dev/null + git checkout HEAD -- ".qmake.conf" + popd > /dev/null + + _qt_version=$(head -n 34 qtbase/.qmake.conf | grep 'MODULE_VERSION' | sed -e 's/.* //' | tr '\n' '.' | sed 's/.$/\n/') + echo "_qt_version := ${_qt_version}" + + # Check out the git submodule source code + for submodule in ${_qt_modules[@]}; do + git_clone_or_switch_to_branch ${submodule} + done +} + +build() { + cd "${srcdir}" + + if [ ! -d ${CARCH}/.git ]; then + git clone --branch "$_qt_git_branch" --quiet --local ${_basename} ${CARCH} + fi + + cd ${CARCH} + git pull + + git_clone_or_update_local_submodule qtbase + + for submodule in ${_qt_modules[@]}; do + git_clone_or_update_local_submodule ${submodule} + done + + cd "${srcdir}"/${CARCH} + + prepare_build_folder local _buildpkgdir=${pkgdirbase}/${pkgname}/${_qt5_prefix} mkdir -p ${_buildpkgdir} local QTDIR_WIN=$(cygpath -am ${_buildpkgdir}) - + local _freetype2_pkgconf="" - if [ "$_system_freetype" == "yes" ]; then + if [[ "$_system_freetype" == "yes" ]]; then _freetype2_pkgconf="freetype2" fi - + local -a _extra_incpaths=($(pkg_config_qt5 --cflags-only-I dbus-1 libxml-2.0 ${_freetype2_pkgconf})) _extra_incpaths+=("-I") _extra_incpaths+=("${MINGW_PREFIX}/include/mariadb") - + # This *could* be used but we'd have to make sure it's correct for all variants first. # local -a _extra_libpaths=($(pkg_config_qt5 --libs-only-L dbus-1 libxml-2.0 freetype2)) # local -a _extra_libs=($(pkg_config_qt5 --libs-only-l dbus-1 libxml-2.0 freetype2)) local -a _extra_libpaths=() local -a _extra_libs=() - export PATH="${srcdir}/${_basename}/qtbase/bin:${srcdir}/${_basename}/qtbase/lib:${PATH}" - + if [ "${_variant}" = "-static" ]; then + if [ ${_qt_version:0:3} = "5.6" ]; then + _extra_libs+=("-l" "iphlpapi") # Needed after linking static dbus library + fi + fi + + export PATH="${srcdir}/${CARCH}/qtbase/bin:${srcdir}/${CARCH}/qtbase/lib:${PATH}" + + if [ "${_variant}" = "-shared" ]; then + # This export breaks the static library build in 5.9.0; + # Causes the DBUS_LIBS setting passed to configure to be ignored. + export PKG_CONFIG="${MINGW_PREFIX}/bin/pkg-config.exe" + fi + + # Set other config stuff that's configure-script-type dependent. + local -a _extra_config + if [ "${_configure}" = "./configure" ]; then + _extra_config+=("-no-glib") + else + _extra_config+=("-make-tool" "make") + fi + + # Determine the SQL driver configuration, variant dependent. + # static can't use anything but -qt-sql-sqlite both for size + # reasons and because shared libraries get auto-detected and + # built as plugins. + local -a _sql_config + if [ "${_variant}" = "-static" ]; then + _sql_config+=("-no-sql-ibase") + _sql_config+=("-no-sql-mysql") + _sql_config+=("-no-sql-odbc") + _sql_config+=("-no-sql-psql") + _sql_config+=("-no-sql-sqlite2") + if [[ ${_qt_version:0:3} != "5.6" ]] ; then + _sql_config+=("-sql-sqlite") + _sql_config+=("-qt-sqlite") + fi + else + if [[ ${_qt_version:0:3} != "5.6" ]]; then + _sql_config+=("-plugin-sql-ibase") + fi + _sql_config+=("-plugin-sql-psql") + _sql_config+=("-plugin-sql-mysql") + _sql_config+=("-plugin-sql-odbc") + fi + # Qt manages the compiler flags for release / debug configs separately, so having our own values (-O2) is harmful here .. unset CFLAGS unset CXXFLAGS unset LDFLAGS - + unset QMAKESPEC + unset XQMAKESPEC + unset QMAKEPATH + unset QMAKEFEATURES + local -a configure_opts - if [ "$_with_fontconfig" == "no" ]; then + if [ "${_variant}" = "-static" ]; then + configure_opts+=("-static") + configure_opts+=("-D" "DBUS_STATIC_BUILD") + configure_opts+=("-D" "JAS_DLL=0") + configure_opts+=("-openssl-linked" "OPENSSL_LIBS=-L${MINGW_PREFIX}/lib -lssl -lws2_32 -lgdi32 -lcrypt32 -lcrypto -lws2_32 -lgdi32 -lcrypt32") + if [[ ${_qt_version:0:3} != "5.6" ]] ; then + configure_opts+=("-dbus" "DBUS_LIBS=-ldbus-1 -lws2_32 -liphlpapi") + else + configure_opts+=("-dbus") + fi configure_opts+=("-no-fontconfig") - fi - if [ "$_with_openssl" == "no" ]; then - configure_opts+=("-no-openssl") - fi - if [ "$_with_dbus" == "no" ]; then - configure_opts+=("-no-dbus") - fi - if [ "$_system_freetype" == "yes" ]; then - configure_opts+=("-system-freetype") - fi - if [ "$_system_harfbuzz" == "yes" ]; then - configure_opts+=("-system-harfbuzz") - else - configure_opts+=("-qt-harfbuzz") - fi - if [ "$_system_libjpeg" == "no" ]; then - configure_opts+=("-qt-libjpeg") - fi - if [ "$_system_libpng" == "no" ]; then - configure_opts+=("-qt-libpng") - fi - if [ "$_system_zlib" == "no" ]; then - configure_opts+=("-qt-zlib") - fi - if [ "$_system_pcre" == "no" ]; then - configure_opts+=("-qt-pcre") - fi - if [ "$_with_icu" == "yes" ]; then - configure_opts+=("-icu") - else configure_opts+=("-no-icu") - fi - if [ "$_build_examples" == "no" ]; then - configure_opts+=("-nomake" "examples") - fi - if [ "$_build_tests" == "no" ]; then - configure_opts+=("-nomake" "tests") - fi - if [ "$_build_tools" == "no" ]; then - configure_opts+=("-skip" "qttools") + configure_opts+=("-qt-zlib") + configure_opts+=("-qt-pcre") + configure_opts+=("-qt-libpng") + configure_opts+=("-qt-libjpeg") + configure_opts+=("-qt-harfbuzz") + configure_opts+=("-qt-freetype") + else + configure_opts+=("-shared") + if [[ "$_with_fontconfig" == "no" ]]; then + configure_opts+=("-no-fontconfig") + fi + if [[ "$_with_openssl" == "no" ]]; then + configure_opts+=("-no-openssl") + fi + if [[ "$_with_dbus" == "no" ]]; then + configure_opts+=("-no-dbus") + else + configure_opts+=("-dbus") + fi + if [[ "$_system_freetype" == "yes" ]]; then + configure_opts+=("-system-freetype") + fi + if [[ "$_system_harfbuzz" == "yes" ]]; then + configure_opts+=("-system-harfbuzz") + else + configure_opts+=("-qt-harfbuzz") + fi + if [[ "$_system_libjpeg" == "no" ]]; then + configure_opts+=("-qt-libjpeg") + fi + if [[ "$_system_libpng" == "no" ]]; then + configure_opts+=("-qt-libpng") + fi + if [[ "$_system_zlib" == "no" ]]; then + configure_opts+=("-qt-zlib") + fi + if [[ "$_system_pcre2" == "no" ]]; then + configure_opts+=("-qt-pcre") + fi + if [[ "$_with_icu" == "yes" ]]; then + configure_opts+=("-icu") + else + configure_opts+=("-no-icu") + fi fi - ./configure.bat \ + if [[ "$_build_examples" == "no" ]]; then + configure_opts+=("-nomake" "examples") + fi + if [[ "$_build_tests" == "no" ]]; then + configure_opts+=("-nomake" "tests") + fi + if [[ "$_build_tools" == "no" ]]; then + configure_opts+=("-skip" "qttools") + fi + if [[ "$_build_multimedia" == "no" ]]; then + configure_opts+=("-skip" "qtmultimedia") + else + if [[ ${_qt_version:0:3} != "5.6" ]] ; then + configure_opts+=("-no-gstreamer") + fi + fi + if [[ "$_build_imageformats" == "no" ]]; then + configure_opts+=("-skip" "qtimageformats") + fi + if [[ "$_build_script" == "no" ]]; then + configure_opts+=("-skip" "qtscript") + fi + if [[ "$_build_xmlpatterns" == "no" ]]; then + configure_opts+=("-skip" "qtxmlpatterns") + fi + if [[ "$_build_declarative" == "no" ]]; then + configure_opts+=("-skip" "qtdeclarative") + fi + if [[ "$_build_datavis3d" == "no" ]]; then + configure_opts+=("-skip" "qtdatavis3d") + fi + if [[ "$_build_activeqt" == "no" ]]; then + configure_opts+=("-skip" "qtactiveqt") + fi + if [[ "$_build_serialport" == "no" ]]; then + configure_opts+=("-skip" "serialport") + fi + if [[ "$_build_svg" == "no" ]]; then + configure_opts+=("-skip" "qtsvg") + fi + if [[ "$_build_connectivity" == "no" ]]; then + configure_opts+=("-skip" "qtconnectivity") + fi + if [[ "$_build_location" == "no" ]]; then + configure_opts+=("-skip" "qtlocation") + fi + if [[ "$_build_charts" == "no" ]]; then + configure_opts+=("-skip" "qtcharts") + fi + if [[ "$_build_sensors" == "no" ]]; then + configure_opts+=("-skip" "qtsensors") + fi + if [[ "$_build_websockets" == "no" ]]; then + configure_opts+=("-skip" "qtwebsockets") + fi + if [[ "$_build_gamepad" == "no" ]]; then + if [[ ${_qt_version:0:3} != "5.6" ]] ; then + configure_opts+=("-skip" "qtgamepad") + fi + fi + if [[ "$_build_webchannel" == "no" ]]; then + configure_opts+=("-skip" "qtwebchannel") + fi + if [[ "$_build_winextras" == "no" ]]; then + configure_opts+=("-skip" "qtwinextras") + fi + + +# make confclean # May be needed while doing configure changes. + + ${_configure} \ -prefix ${QTDIR_WIN} \ -datadir ${QTDIR_WIN}/share/qt5 \ -archdatadir ${QTDIR_WIN}/share/qt5 \ -examplesdir ${QTDIR_WIN}/share/qt5/examples \ -testsdir ${QTDIR_WIN}/share/qt5/tests \ - -opengl ${_opengl_for_configure} \ + -opengl desktop \ -opensource \ -confirm-license \ -platform win32-g++ \ @@ -423,69 +788,93 @@ build() { "${_sql_config[@]}" \ "${configure_opts[@]}" - make ${MAKEFLAGS} + # There is a race condition / dependency problem with libqtiff and dumpdoc.exe which + # can happen at -j9 so make twice (dumpdoc.exe depends on libqtiff but can get built + # first). + make ${MAKEFLAGS} || make ${MAKEFLAGS} + # For quicker turn-around testing qtactiveqt for race issue in static build. + # rm -fr qtimageformats/plugins/imageformats + # make module-qtbase + # make -j1 module-qtactiveqt + # exit 1 } package() { cd ${srcdir} - cd ${_basename} + cd ${CARCH} - export PATH=${pkgdir}${_qt5_prefix}/bin:${srcdir}/${_basename}/qtbase/bin:${srcdir}/${_basename}/qtbase/lib:${PATH} + export PATH=${pkgdir}${_qt5_prefix}/bin:${srcdir}/${CARCH}/qtbase/bin:${srcdir}/${CARCH}/qtbase/lib:${PATH} make install - if [ "$_make_docs" == "yes" ]; then + if [[ "$_make_docs" == "yes" ]]; then make docs make install_qch_docs fi install -D -m644 LGPL_EXCEPTION.txt "${pkgdir}${_qt5_prefix}"/share/licenses/qt5/LGPL_EXCEPTION.txt - # Remove dll's from lib + # Remove dlls from lib/ rm -f "${pkgdir}${_qt5_prefix}/lib"/*.dll # Workaround for installing empty .pc files plain "---> Fix pkgconfig files..." - local _pc_files=( $(find ${srcdir}/${_basename} -type f -name Qt5*.pc) ) + local _pc_files=( $(find ${srcdir}/${CARCH} -type f -name Qt5*.pc) ) cp -f ${_pc_files[@]} ${pkgdir}${_qt5_prefix}/lib/pkgconfig/ - + # Fix paths in qconfig.pri and qmodule.pri: - # $(cygpath -m ${_qt5_prefix}) -> $(cygpath -m ${pkgdir}${_qt5_prefix}) + # $(cygpath -m ${MINGW_PREFIX}) -> $(cygpath -m ${pkgdir}${MINGW_PREFIX}) MINGW_PREFIX_WIN=$(cygpath -m ${_qt5_prefix}) PKGDIR_MINGW_PREFIX_WIN=$(cygpath -m ${pkgdir}${_qt5_prefix}) find "${pkgdir}${_qt5_prefix}/share/qt5" -type f -name '*.pri' \ -exec sed -i -e "s|${MINGW_PREFIX_WIN}|${PKGDIR_MINGW_PREFIX_WIN}|g" {} \; } -sha256sums=('609ab74b93ef11f24ef4d7c1bd0a2e81c4280b07fa455dfcf003a2364ab72745' # 0001-oracle-driver-prompt.patch - '1b3aace0abc6c1ab1d077a57f7b2b0b7772e63c5b61519b633e955bbbc6d5485' # 0002-use-fbclient-instead-of-gds32.patch - '12263a04ef371f5a934b43bef7b8607cb7aa8a6d6da69a75a5411da6d44368d6' # 0003-use-mingw-built-mysql-library.patch - '334e8f84b892e1bda5d71ec078d6e2a325d979f0d3ab454fe348594d1c039f84' # 0005-syncqt-fix.patch - 'c01e095a624f8fb7527ac0a1f476d5b395c55a7abc8618d69c09c503caca86ea' # 0006-win_flex-replace.patch - '02d007a0a735f6b41e4feab7f0cc30a5bf8e55d413513177f9513eff0dfd55d8' # 0007-win32-g-Enable-static-builds.patch - 'b21726bbd2ed34ad78e18d6b82a2c3b3c3e753ee2e978a5bb58b386f1f33ce41' # 0008-win32-g-Add-QMAKE_EXTENSION_IMPORTLIB-defaulting-to-.patch - '44dfc8b56be2d3f33bb7f67abd472a58380d22bc3532f3ecdabfb3dd108f4a77' # 0011-win32-g++-allow-static-dbus-1.patch - '193957a4fbd18cbe951dc11d836e1ff5d6ad07780643ef81e559d57f6672b028' # 0012-compileTest-for-icu-after-setting-static-or-shared.patch - '539653bcce49d1841aba70b5753407f4e3d2232db77fc75381a9182dec76defe' # 0014-fix-configure-tests.patch - '84945d2b47e05465af08094fefa743bff12f1d842ec0524b61ff789cd0f2d0e5' # 0015-properly-split-libraries-mingw.patch - '7a85c145e2053f8ac48defa50b31ec9745cca62ed87284662b2b4661b25376ab' # 0016-win32-g++-use-qpa-genericunixfontdatabase.patch - '8048fe32b4f4155b1616dbd68e6e2fa4e01e7e0916d64664be24e7f21329c3f2' # 0017-fix-examples-building.patch - '2c949e5fd0339892e5ea1253f233231c2e594783af517ae924b9b3c6799521da' # 0024-icu-add-U_LIB_SUFFIX_C_NAME.patch - 'f3c5709803303cc411b8f4f0232cafa6f9b6b9c1f2d3791cb70415c6db0060b8' # 0025-force-using-make-on-msys.patch - '6893c83e4d26643a1cf5607a1a367401d27fec98440fa1d3685a8cf1478ddf92' # 0030-workaround-ansidecl-h-PTR-define-conflict.patch - '7f5e092a5062db776a96ab32758ff175c3689b79902f5d9656f31029c33f66dd' # 0031-workaround-BOOL-define-conflict.patch - '1ada266bc6cd033d770bc40ad879527db222563fc20cf98cf2848b84b2a0e503' # 0034-Use-QMAKE_PREFIX_STATICLIB-in-create_cmake-prf.patch - '27e9d402126d313ff647066207038578c26a3cf0f60833ae5d76157d53712eae' # 0035-dont-add-resource-files-to-qmake-libs.patch - '29f13f7b44476bebfc5280a8481fa24926185860476ed0fd05f6b5a959b801d8' # 0036-win32-qt5-static-cmake-link-ws2_32-and--static.patch - 'c114d2df071b66e47f4bd43d335d48868fd5bcf9670f276b557edacd53fa92c0' # 0037-Improve-cmake-plugin-detection-as-not-all-are-suffixed-Plugin.patch - 'b9939efea7792a960cdc9404a515c6f0a1cd42ffbdb018d52f2b0206fffe17f5' # 0038-cmake-Rearrange-STATIC-vs-INTERFACE-targets.patch - '3ae9d64fb683036b3b1f91036378791e1ec4a10205c59e78761d22d8479c0540' # 0039-Make-it-possible-to-use-static-builds-of-Qt-with-CMa.patch - 'd720ac76035d56caea1f045dfb468a25865f9d4b22016cec5414f1c639a7697a' # 0040-Generate-separated-libraries-in-prl-files-for-CMake.patch - '914051840e01bf453e3db710d4471e6758e39e2cb87f8ffe3072fb90218c9f83' # 0041-Fix-mingw-create_cmake-prl-file-has-no-lib-prefix.patch - '9eb9366d81179883e09e180bcd6bba3452661879f993a7e48e4c86d8bb4720e6' # 0042-static-cmake-also-link-plugins-and-plugin-deps.patch - '29ed4566d4c1853b70a5173c6391ed90f123c5121b5836f2d16f8478f6354f0a' # 0043-static-cmake-regex-QT_INSTALL_LIBS-in-QMAKE_PRL_LIBS_FOR_CMAKE.patch - '72e46178f2f694d8408f22684d1a7d39394056cb574fc4855c1f38c9d51e7e6c' # 0045-static-use-qminimal-platform-plugin-for-qcollectiongenerator.patch - 'fd6b1cd956730c1a05a7489760afed6b36561a3b0ec5857c3fbe21dcd7a54617' # 0046-Revert-Revert-fix-NTFS-mount-points.patch - '3bda25f357a33b122345fea011a14199b5953fd248fab960a5344a2ed9401331' # 0048-win32-Avoid-platformNativeInterface-segfaults-with-minimal-platform.patch - '199c08dbf2f1e8596023b484714de8757a8bcf7d78c5dfe64ea271c54a401687' # 0049-do-not-include-qopengles2ext-h.patch - ) +sha256sums=( + '609ab74b93ef11f24ef4d7c1bd0a2e81c4280b07fa455dfcf003a2364ab72745' # 0001 + '571a2f0a60ca97bfa696b030c416ac04a11202b3f33eb93d582654209e1cdbbe' # 0001 + '70938426942058ad66c1b9b304b12cfe7a85947712729a9b7235c86397cfc265' # 0001 + '1b3aace0abc6c1ab1d077a57f7b2b0b7772e63c5b61519b633e955bbbc6d5485' # 0002 + '231203cbb4112a2cc03452829663f9867ba5326b2901bc2f26f536ad1cfc8339' # 0002 + '12263a04ef371f5a934b43bef7b8607cb7aa8a6d6da69a75a5411da6d44368d6' # 0003 + '91b9e23592cc1042fde7ee43a828be695da91c5575803924897eac2a3bef8853' # 0003 + '334e8f84b892e1bda5d71ec078d6e2a325d979f0d3ab454fe348594d1c039f84' # 0005 + 'c01e095a624f8fb7527ac0a1f476d5b395c55a7abc8618d69c09c503caca86ea' # 0006 + '02d007a0a735f6b41e4feab7f0cc30a5bf8e55d413513177f9513eff0dfd55d8' # 0007 + '1d8ac1807437f2ac6fa7b25e173c3ca69dd32381e5b2fa501499f96972ad1d2e' # 0007 + 'b21726bbd2ed34ad78e18d6b82a2c3b3c3e753ee2e978a5bb58b386f1f33ce41' # 0008 + '44dfc8b56be2d3f33bb7f67abd472a58380d22bc3532f3ecdabfb3dd108f4a77' # 0011 + '66b6c6dac6b3c208d5930d12602e0d4a714d72fb881a5792bf966c0c46ab5aa9' # 0011 + '193957a4fbd18cbe951dc11d836e1ff5d6ad07780643ef81e559d57f6672b028' # 0012 + '539653bcce49d1841aba70b5753407f4e3d2232db77fc75381a9182dec76defe' # 0014 + '84945d2b47e05465af08094fefa743bff12f1d842ec0524b61ff789cd0f2d0e5' # 0015 + '7a85c145e2053f8ac48defa50b31ec9745cca62ed87284662b2b4661b25376ab' # 0016 + '10dc3177cf7c76667e28fee51dc3b029ba1f0eff16901672b39250177fa20663' # 0016 + '8048fe32b4f4155b1616dbd68e6e2fa4e01e7e0916d64664be24e7f21329c3f2' # 0017 + '2c949e5fd0339892e5ea1253f233231c2e594783af517ae924b9b3c6799521da' # 0024 + '200aab02ab07ea15b31efd54f4a1eee1e9ed65398edf392dde462288d47cb7a2' # 0024 + 'f3c5709803303cc411b8f4f0232cafa6f9b6b9c1f2d3791cb70415c6db0060b8' # 0025 + '493c081dd06836baa28cac1f38b2d87b2f402670e442b8a163530d3f965cc5e1' # 0025 + '6893c83e4d26643a1cf5607a1a367401d27fec98440fa1d3685a8cf1478ddf92' # 0030 + '7f5e092a5062db776a96ab32758ff175c3689b79902f5d9656f31029c33f66dd' # 0031 + '1ada266bc6cd033d770bc40ad879527db222563fc20cf98cf2848b84b2a0e503' # 0034 + '27e9d402126d313ff647066207038578c26a3cf0f60833ae5d76157d53712eae' # 0035 + '29f13f7b44476bebfc5280a8481fa24926185860476ed0fd05f6b5a959b801d8' # 0036 + 'c114d2df071b66e47f4bd43d335d48868fd5bcf9670f276b557edacd53fa92c0' # 0037 + 'b9939efea7792a960cdc9404a515c6f0a1cd42ffbdb018d52f2b0206fffe17f5' # 0038 + '3ae9d64fb683036b3b1f91036378791e1ec4a10205c59e78761d22d8479c0540' # 0039 + 'd720ac76035d56caea1f045dfb468a25865f9d4b22016cec5414f1c639a7697a' # 0040 + '914051840e01bf453e3db710d4471e6758e39e2cb87f8ffe3072fb90218c9f83' # 0041 + '9eb9366d81179883e09e180bcd6bba3452661879f993a7e48e4c86d8bb4720e6' # 0042 + '29ed4566d4c1853b70a5173c6391ed90f123c5121b5836f2d16f8478f6354f0a' # 0043 + '72e46178f2f694d8408f22684d1a7d39394056cb574fc4855c1f38c9d51e7e6c' # 0045 + 'fd6b1cd956730c1a05a7489760afed6b36561a3b0ec5857c3fbe21dcd7a54617' # 0046 + '3bda25f357a33b122345fea011a14199b5953fd248fab960a5344a2ed9401331' # 0048 + '9dd8bb8d64d08bed96086dbd7d2b8ff0a5ea7f7672db65c45cab626b51f6061c' # 0049 + 'ca5a67f795f04ed0831dc6084affc3553b22ea9b6af6c11c15871415c81f6a04' # 0049 + 'f69b0391a523133ee5f1434c441736149976a0e8223de25ca1c1eed416fbf707' # 0051 + 'aff6c5fa28ab0a7e8b111f894bf167e949707b69bf1b45ebc48bb59194b714f9' # 0051 + 'e868da7e8716fd3f09d448d003796feda77e59b38d194cab7c8a99fabbdb78af' # 0125 + 'b6bfe63f370a8553f02145a4d412489e705bb00d1d3abcb321fe6a562f065bec' # 0125 + '0f1dd2950ec0cfd0a4ceca746e7a09e3ee38e4abf6138f54b087b73e207b3233' # 0300 +)