This file is part of MXE. See LICENSE.md for licensing information. Contains ad hoc patches for cross building. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Thu, 6 Aug 2015 23:35:08 +0200 Subject: [PATCH] fix qwindows plugin linking with system-freetype (MXE specific) Change-Id: I8783e3ab2d19011b083dd3c471107298a17293c4 diff --git a/src/3rdparty/freetype_dependency.pri b/src/3rdparty/freetype_dependency.pri index 1111111..2222222 100644 --- a/src/3rdparty/freetype_dependency.pri +++ b/src/3rdparty/freetype_dependency.pri @@ -4,4 +4,5 @@ contains(QT_CONFIG, freetype) { } else:contains(QT_CONFIG, system-freetype) { # pull in the proper freetype2 include directory include($$QT_SOURCE_TREE/config.tests/unix/freetype/freetype.pri) + win32:shared:LIBS_PRIVATE += -lfreetype } From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Sat, 21 Jun 2014 13:12:49 +0200 Subject: [PATCH] use pkg-config for harfbuzz (MXE specific) Change-Id: Id4e4c37d68b63c9f480d72a561d95d4d2a5ded50 diff --git a/config.tests/unix/harfbuzz/harfbuzz.pro b/config.tests/unix/harfbuzz/harfbuzz.pro index 1111111..2222222 100644 --- a/config.tests/unix/harfbuzz/harfbuzz.pro +++ b/config.tests/unix/harfbuzz/harfbuzz.pro @@ -1,3 +1,4 @@ SOURCES = harfbuzz.cpp CONFIG -= qt dylib -LIBS += -lharfbuzz +CONFIG += link_pkgconfig +PKGCONFIG += harfbuzz diff --git a/src/3rdparty/harfbuzz_dependency.pri b/src/3rdparty/harfbuzz_dependency.pri index 1111111..2222222 100644 --- a/src/3rdparty/harfbuzz_dependency.pri +++ b/src/3rdparty/harfbuzz_dependency.pri @@ -2,5 +2,6 @@ contains(QT_CONFIG, harfbuzz) { INCLUDEPATH += $$PWD/harfbuzz-ng/include LIBS_PRIVATE += -L$$QT_BUILD_TREE/lib -lqtharfbuzzng$$qtPlatformTargetSuffix() } else:contains(QT_CONFIG, system-harfbuzz) { - LIBS_PRIVATE += -lharfbuzz + CONFIG += link_pkgconfig + PKGCONFIG += harfbuzz } From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Mon, 8 Dec 2014 14:15:12 +0100 Subject: [PATCH] fix oci config test on windows Change-Id: If1ce2241682259ca495b0ba68bf18410f8548922 diff --git a/config.tests/unix/oci/oci.pro b/config.tests/unix/oci/oci.pro index 1111111..2222222 100644 --- a/config.tests/unix/oci/oci.pro +++ b/config.tests/unix/oci/oci.pro @@ -1,3 +1,3 @@ SOURCES = oci.cpp CONFIG -= qt dylib -LIBS += -lclntsh +!win32:LIBS += -lclntsh From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Thu, 6 Aug 2015 13:24:56 +0200 Subject: [PATCH] configure: don't set QT_NO_SYSTEMSEMAPHORE for Windows Change-Id: I53c110ef40e3d14cc49fa23aa5d294611cac2ffa diff --git a/configure b/configure index 1111111..2222222 100755 --- a/configure +++ b/configure @@ -4656,7 +4656,7 @@ fi [ "$XPLATFORM_ANDROID" = "yes" ] && QMakeVar add styles "android" # check IPC support -if ! compileTest unix/ipc_sysv "ipc_sysv" ; then +if [ "$XPLATFORM_MINGW" = "no" ] && ! compileTest unix/ipc_sysv "ipc_sysv" ; then # SYSV IPC is not supported - check POSIX IPC if compileTest unix/ipc_posix "ipc_posix" ; then QCONFIG_FLAGS="$QCONFIG_FLAGS QT_POSIX_IPC" From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Tue, 6 Oct 2015 09:53:20 +0200 Subject: [PATCH] fix building mysql driver under mingw Change-Id: I9c4e821d5b3a6919566c6b684cb4916827feb6a9 diff --git a/src/sql/drivers/mysql/qsql_mysql.pri b/src/sql/drivers/mysql/qsql_mysql.pri index 1111111..2222222 100644 --- a/src/sql/drivers/mysql/qsql_mysql.pri +++ b/src/sql/drivers/mysql/qsql_mysql.pri @@ -4,7 +4,7 @@ SOURCES += $$PWD/qsql_mysql.cpp QMAKE_CXXFLAGS *= $$QT_CFLAGS_MYSQL LIBS += $$QT_LFLAGS_MYSQL -unix { +if (unix|mingw) { isEmpty(QT_LFLAGS_MYSQL) { !contains(LIBS, .*mysqlclient.*):!contains(LIBS, .*mysqld.*) { use_libmysqlclient_r:LIBS += -lmysqlclient_r From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Wed, 26 Aug 2015 12:45:43 +0100 Subject: [PATCH] cmake: Rearrange STATIC vs INTERFACE targets Otherwise we attempt to add_library(Qt5::UiPlugin STATIC IMPORTED) for header-only modules when building Qt5 statically. Source: https://git.io/vzWJz See also: https://github.com/mxe/mxe/issues/1185 diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in index 1111111..2222222 100644 --- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in @@ -222,13 +222,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) endif() !!ENDIF +!!IF equals(TEMPLATE, aux) + add_library(Qt5::$${CMAKE_MODULE_NAME} INTERFACE IMPORTED) +!!ELSE !!IF !isEmpty(CMAKE_STATIC_TYPE) add_library(Qt5::$${CMAKE_MODULE_NAME} STATIC IMPORTED) set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY IMPORTED_LINK_INTERFACE_LANGUAGES "CXX") !!ELSE -!!IF equals(TEMPLATE, aux) - add_library(Qt5::$${CMAKE_MODULE_NAME} INTERFACE IMPORTED) -!!ELSE add_library(Qt5::$${CMAKE_MODULE_NAME} SHARED IMPORTED) !!ENDIF !!ENDIF From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 18 May 2016 14:40:20 -0700 Subject: [PATCH] Fix linking of the minimal platform plugin on OS X platformsupport/fontdatabases/fontdatabases.pri disables all font databases except CoreText on OS X, so this is required for linking. Otherwise, we get undefined reference linker errors: Undefined symbols for architecture x86_64: "vtable for QBasicFontDatabase", referenced from: QMinimalIntegration::fontDatabase() const in qminimalintegration.o Change-Id: I31298e973803b4d6eedbf61607056114d1556584 Reviewed-by: Jake Petroules (cherry picked from commit 16864c42d6bc0ee6b3e3fa03123ef5884557ceea) diff --git a/src/plugins/platforms/minimal/minimal.pro b/src/plugins/platforms/minimal/minimal.pro index 1111111..2222222 100644 --- a/src/plugins/platforms/minimal/minimal.pro +++ b/src/plugins/platforms/minimal/minimal.pro @@ -11,6 +11,7 @@ HEADERS = qminimalintegration.h \ OTHER_FILES += minimal.json CONFIG += qpa/genericunixfontdatabase +darwin: DEFINES += QT_NO_FONTCONFIG PLUGIN_TYPE = platforms PLUGIN_CLASS_NAME = QMinimalIntegrationPlugin From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Boris Pek Date: Sun, 19 Jun 2016 03:15:43 +0300 Subject: [PATCH] Fix build of the minimal platform plugin for MS Windows when qtbase is configured with -fontconfig and -system-freetype. This fix is necessary after 060e0f6628fd185994911307c59f5355acaaf18f. Used the same approach as in 16864c42d6bc0ee6b3e3fa03123ef5884557ceea. Change-Id: Idece0dc11d89e38266c95de1769be751c06324ef (cherry picked from commit 02d2969fafe5088bb1c80eb58b2736df447326cd) diff --git a/src/plugins/platforms/minimal/minimal.pro b/src/plugins/platforms/minimal/minimal.pro index 1111111..2222222 100644 --- a/src/plugins/platforms/minimal/minimal.pro +++ b/src/plugins/platforms/minimal/minimal.pro @@ -12,6 +12,7 @@ OTHER_FILES += minimal.json CONFIG += qpa/genericunixfontdatabase darwin: DEFINES += QT_NO_FONTCONFIG +win32: DEFINES += QT_NO_FONTCONFIG PLUGIN_TYPE = platforms PLUGIN_CLASS_NAME = QMinimalIntegrationPlugin From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Tony Theodore Date: Sat, 16 Jul 2016 20:31:07 +1000 Subject: [PATCH] Fix pkgconfig file and library naming See: https://codereview.qt-project.org/#/c/165394/ https://bugreports.qt.io/browse/QTBUG-30898 Currently, *.pc files are generated with debug suffix `d` in `-release` mode and without the suffix in `-debug` or `-debug-and-release`. This can be worked around by `CONIFG-=debug_and_release`, however, a more predictable and consistent naming approach would be preferable. This change mimics the *.prl file and lib conventions: -release: creates normal *.pc files and lib names -release -force-debug-info: normal as above -debug: creates *d.pc and *d lib names -debug-and-release: creates both -default: creates both (default link: debug) and should be unsurprising to users of `pkg-config`. At very least, it's deterministic and easily incorporated into build systems. Task-number: 30898 Change-Id: If75336ec7d21a7ec0cb6d245fe87c64afcb5a644 diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index 1111111..2222222 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -242,6 +242,10 @@ load(qt_installs) load(qt_targets) +# Set TARGET towards the end but before pkgconfig setup to keep naming +# conventions consistent with *prl files +TARGET = $$qt5LibraryTarget($$TARGET$$QT_LIBINFIX) + # this builds on top of qt_common !internal_module:!lib_bundle:if(unix|mingw) { CONFIG += create_pc @@ -252,12 +256,12 @@ load(qt_targets) QMAKE_PKGCONFIG_LIBDIR = $$[QT_INSTALL_LIBS/raw] QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS/raw] QMAKE_PKGCONFIG_CFLAGS = -I${includedir}/$$MODULE_INCNAME - QMAKE_PKGCONFIG_NAME = $$replace(TARGET, ^Qt, "Qt$$QT_MAJOR_VERSION ") - QMAKE_PKGCONFIG_FILE = $$replace(TARGET, ^Qt, Qt$$QT_MAJOR_VERSION) + QMAKE_PKGCONFIG_NAME = $$replace(TARGET, ^Qt$$QT_MAJOR_VERSION, "Qt$$QT_MAJOR_VERSION ") + QMAKE_PKGCONFIG_FILE = $$TARGET for(i, MODULE_DEPENDS): \ - QMAKE_PKGCONFIG_REQUIRES += $$replace(QT.$${i}.name, ^Qt, Qt$$eval(QT.$${i}.MAJOR_VERSION)) + QMAKE_PKGCONFIG_REQUIRES += $$replace(QT.$${i}.name, ^Qt, Qt$$eval(QT.$${i}.MAJOR_VERSION))$$qtPlatformTargetSuffix() isEmpty(QMAKE_PKGCONFIG_DESCRIPTION): \ - QMAKE_PKGCONFIG_DESCRIPTION = $$replace(TARGET, ^Qt, "Qt ") module + QMAKE_PKGCONFIG_DESCRIPTION = $$replace(TARGET, ^Qt$$QT_MAJOR_VERSION, "Qt ") module pclib_replace.match = $$lib_replace.match !isEmpty(lib_replace.replace): \ pclib_replace.replace = $$QMAKE_PKGCONFIG_LIBDIR @@ -291,5 +295,3 @@ win32 { # On other platforms, Qt's own compilation goes needs to compile the Qt 5.0 API DEFINES *= QT_DISABLE_DEPRECATED_BEFORE=0x050000 } - -TARGET = $$qt5LibraryTarget($$TARGET$$QT_LIBINFIX) # Do this towards the end From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Wed, 24 Aug 2016 11:55:35 +0200 Subject: [PATCH] QLocale: Fix wrong assert The endptr from reading the exponent of a 'g' form snprintf result should not be past the end of the string we're reading from. It has nothing to do with the 'e' sign. Task-number: QTBUG-54482 Change-Id: I8bdee917b8d21fdc94c255548ad7e008431a07fa Reviewed-by: Simon Hausmann See https://github.com/mxe/mxe/issues/1572 Source: https://codereview.qt-project.org/#/c/168995 Source: https://github.com/qt/qtbase/commit/de7f281d7ad1bc8e3dc5a54943 Remove this patch when updating to Qt 5.7.1. diff --git a/src/corelib/tools/qlocale_tools.cpp b/src/corelib/tools/qlocale_tools.cpp index 1111111..2222222 100644 --- a/src/corelib/tools/qlocale_tools.cpp +++ b/src/corelib/tools/qlocale_tools.cpp @@ -224,7 +224,7 @@ void doubleToAscii(double d, QLocaleData::DoubleForm form, int precision, char * const char *endptr; decpt = qstrtoll(target.data() + eSign + 1, &endptr, 10, &ok) + 1; Q_ASSERT(ok); - Q_ASSERT(endptr - target.data() <= length - eSign -1); + Q_ASSERT(endptr - target.data() <= length); } else { // No 'e' found, so it's the 'f' form. Variants of snprintf generate numbers with // potentially multiple digits before the '.', but without decimal exponent then. So we