Mercurial > mxe-octave
annotate src/qtbase-1-fixes.patch @ 4801:206f76f1b59c
qt: update to version 5.11.1
This change fixes an initialization problem for Linux builds that
appeared with the update to Qt 5.11.0. At startup, the Octave GUI
would hang after displaying a black main window.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 17 Aug 2018 11:21:08 -0400 |
parents | 4cea16af20b4 |
children | 22937c7fe60d |
rev | line source |
---|---|
4310 | 1 This file is part of MXE. See LICENSE.md for licensing information. |
4222 | 2 |
4735 | 3 Contains ad hoc patches for cross building. |
4222 | 4 |
4801
206f76f1b59c
qt: update to version 5.11.1
John W. Eaton <jwe@octave.org>
parents:
4735
diff
changeset
|
5 From 68d6fb331d75a6fc23be38861866da8c3fc6fd6d Mon Sep 17 00:00:00 2001 |
4222 | 6 From: Ray Donnelly <mingw.android@gmail.com> |
7 Date: Wed, 26 Aug 2015 12:45:43 +0100 | |
4801
206f76f1b59c
qt: update to version 5.11.1
John W. Eaton <jwe@octave.org>
parents:
4735
diff
changeset
|
8 Subject: [PATCH 1/6] cmake: Rearrange STATIC vs INTERFACE targets |
4222 | 9 |
10 Otherwise we attempt to add_library(Qt5::UiPlugin STATIC IMPORTED) | |
11 for header-only modules when building Qt5 statically. | |
12 | |
13 Source: https://git.io/vzWJz | |
14 See also: https://github.com/mxe/mxe/issues/1185 | |
15 | |
16 diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in | |
4735 | 17 index 27f4c277d6..84ff9ae0ef 100644 |
4222 | 18 --- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in |
19 +++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in | |
4735 | 20 @@ -214,12 +214,12 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) |
21 list(APPEND _Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES \"$${CMAKE_INTERFACE_QT5_MODULE_DEPS}\") | |
4222 | 22 !!ENDIF |
23 | |
24 +!!IF equals(TEMPLATE, aux) | |
25 + add_library(Qt5::$${CMAKE_MODULE_NAME} INTERFACE IMPORTED) | |
26 +!!ELSE | |
27 !!IF !isEmpty(CMAKE_STATIC_TYPE) | |
28 add_library(Qt5::$${CMAKE_MODULE_NAME} STATIC IMPORTED) | |
29 set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY IMPORTED_LINK_INTERFACE_LANGUAGES "CXX") | |
4735 | 30 -!!ELSE |
4222 | 31 -!!IF equals(TEMPLATE, aux) |
32 - add_library(Qt5::$${CMAKE_MODULE_NAME} INTERFACE IMPORTED) | |
4735 | 33 !!ELSE |
4222 | 34 add_library(Qt5::$${CMAKE_MODULE_NAME} SHARED IMPORTED) |
35 !!ENDIF | |
36 -- | |
4801
206f76f1b59c
qt: update to version 5.11.1
John W. Eaton <jwe@octave.org>
parents:
4735
diff
changeset
|
37 2.17.1 |
4222 | 38 |
39 | |
4801
206f76f1b59c
qt: update to version 5.11.1
John W. Eaton <jwe@octave.org>
parents:
4735
diff
changeset
|
40 From 1d10513c2b03761addf96010ce9da8dd93d714fb Mon Sep 17 00:00:00 2001 |
4222 | 41 From: Tony Theodore <tonyt@logyst.com> |
42 Date: Sat, 16 Jul 2016 20:31:07 +1000 | |
4801
206f76f1b59c
qt: update to version 5.11.1
John W. Eaton <jwe@octave.org>
parents:
4735
diff
changeset
|
43 Subject: [PATCH 2/6] Fix pkgconfig file and library naming |
4222 | 44 |
45 See: https://codereview.qt-project.org/#/c/165394/ | |
46 https://bugreports.qt.io/browse/QTBUG-30898 | |
47 | |
48 Currently, *.pc files are generated with debug suffix `d` in `-release` | |
49 mode and without the suffix in `-debug` or `-debug-and-release`. This | |
50 can be worked around by `CONIFG-=debug_and_release`, however, a more | |
51 predictable and consistent naming approach would be preferable. | |
52 | |
53 This change mimics the *.prl file and lib conventions: | |
54 | |
55 -release: creates normal *.pc files and lib names | |
56 -release -force-debug-info: normal as above | |
57 -debug: creates *d.pc and *d lib names | |
58 -debug-and-release: creates both | |
59 -default: creates both (default link: debug) | |
60 | |
61 and should be unsurprising to users of `pkg-config`. At very least, | |
62 it's deterministic and easily incorporated into build systems. | |
63 | |
64 Task-number: 30898 | |
65 Change-Id: If75336ec7d21a7ec0cb6d245fe87c64afcb5a644 | |
66 | |
67 diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf | |
4735 | 68 index f8729de947..e7f6e3651d 100644 |
4222 | 69 --- a/mkspecs/features/qt_module.prf |
70 +++ b/mkspecs/features/qt_module.prf | |
4735 | 71 @@ -264,6 +264,10 @@ load(qt_installs) |
4222 | 72 |
73 load(qt_targets) | |
74 | |
75 +# Set TARGET towards the end but before pkgconfig setup to keep naming | |
76 +# conventions consistent with *prl files | |
77 +TARGET = $$qt5LibraryTarget($$TARGET$$QT_LIBINFIX) | |
78 + | |
79 # this builds on top of qt_common | |
80 !internal_module:!lib_bundle:if(unix|mingw) { | |
81 CONFIG += create_pc | |
4735 | 82 @@ -274,12 +278,12 @@ load(qt_targets) |
4222 | 83 QMAKE_PKGCONFIG_LIBDIR = $$[QT_INSTALL_LIBS/raw] |
84 QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS/raw] | |
4735 | 85 QMAKE_PKGCONFIG_CFLAGS = -D$$MODULE_DEFINE -I${includedir}/$$MODULE_INCNAME |
4222 | 86 - QMAKE_PKGCONFIG_NAME = $$replace(TARGET, ^Qt, "Qt$$QT_MAJOR_VERSION ") |
87 - QMAKE_PKGCONFIG_FILE = $$replace(TARGET, ^Qt, Qt$$QT_MAJOR_VERSION) | |
88 + QMAKE_PKGCONFIG_NAME = $$replace(TARGET, ^Qt$$QT_MAJOR_VERSION, "Qt$$QT_MAJOR_VERSION ") | |
89 + QMAKE_PKGCONFIG_FILE = $$TARGET | |
90 for(i, MODULE_DEPENDS): \ | |
4735 | 91 - QMAKE_PKGCONFIG_REQUIRES += $$replace(QT.$${i}.name, ^Qt, Qt$$section(QT.$${i}.VERSION, ., 0, 0)) |
92 + QMAKE_PKGCONFIG_REQUIRES += $$replace(QT.$${i}.name, ^Qt, Qt$$section(QT.$${i}.VERSION, ., 0, 0))$$qtPlatformTargetSuffix() | |
4222 | 93 isEmpty(QMAKE_PKGCONFIG_DESCRIPTION): \ |
94 - QMAKE_PKGCONFIG_DESCRIPTION = $$replace(TARGET, ^Qt, "Qt ") module | |
95 + QMAKE_PKGCONFIG_DESCRIPTION = $$replace(TARGET, ^Qt$$QT_MAJOR_VERSION, "Qt ") module | |
96 pclib_replace.match = $$lib_replace.match | |
97 !isEmpty(lib_replace.replace): \ | |
98 pclib_replace.replace = $$QMAKE_PKGCONFIG_LIBDIR | |
4735 | 99 @@ -313,5 +317,3 @@ win32 { |
4222 | 100 # On other platforms, Qt's own compilation goes needs to compile the Qt 5.0 API |
101 DEFINES *= QT_DISABLE_DEPRECATED_BEFORE=0x050000 | |
102 } | |
103 - | |
104 -TARGET = $$qt5LibraryTarget($$TARGET$$QT_LIBINFIX) # Do this towards the end | |
4310 | 105 -- |
4801
206f76f1b59c
qt: update to version 5.11.1
John W. Eaton <jwe@octave.org>
parents:
4735
diff
changeset
|
106 2.17.1 |
4735 | 107 |
108 | |
4801
206f76f1b59c
qt: update to version 5.11.1
John W. Eaton <jwe@octave.org>
parents:
4735
diff
changeset
|
109 From 31c615cd57701f2e4b99bb7fcdd023565a081257 Mon Sep 17 00:00:00 2001 |
4735 | 110 From: Mark Brand <mabrand@mabrand.nl> |
111 Date: Sun, 29 Jan 2017 13:02:16 +0100 | |
4801
206f76f1b59c
qt: update to version 5.11.1
John W. Eaton <jwe@octave.org>
parents:
4735
diff
changeset
|
112 Subject: [PATCH 3/6] reenable fontconfig for win32 (MXE-specific) |
4735 | 113 |
114 Change-Id: I05b036366bd402e43309742412bcf8ca91fe125f | |
115 | |
116 diff --git a/src/gui/configure.json b/src/gui/configure.json | |
117 index 219385a108..eee90b5b20 100644 | |
118 --- a/src/gui/configure.json | |
119 +++ b/src/gui/configure.json | |
120 @@ -973,7 +973,7 @@ | |
121 "fontconfig": { | |
122 "label": "Fontconfig", | |
123 "autoDetect": "!config.darwin", | |
124 - "condition": "!config.win32 && features.system-freetype && libs.fontconfig", | |
125 + "condition": "features.system-freetype && libs.fontconfig", | |
126 "output": [ "privateFeature", "feature" ] | |
127 }, | |
128 "gbm": { | |
129 diff --git a/src/plugins/platforms/minimal/qminimalintegration.cpp b/src/plugins/platforms/minimal/qminimalintegration.cpp | |
130 index 0c04608fca..a26e02fbf3 100644 | |
131 --- a/src/plugins/platforms/minimal/qminimalintegration.cpp | |
132 +++ b/src/plugins/platforms/minimal/qminimalintegration.cpp | |
133 @@ -161,7 +161,11 @@ QPlatformFontDatabase *QMinimalIntegration::fontDatabase() const | |
134 | |
135 if (!m_fontDatabase) { | |
136 #if QT_CONFIG(fontconfig) | |
137 - m_fontDatabase = new QGenericUnixFontDatabase; | |
138 +#ifdef Q_OS_WIN | |
139 + m_fontDatabase = new QFreeTypeFontDatabase; | |
140 +#else | |
141 + m_fontDatabase = new QGenericUnixFontDatabase; | |
142 +#endif | |
143 #else | |
144 m_fontDatabase = QPlatformIntegration::fontDatabase(); | |
145 #endif | |
146 -- | |
4801
206f76f1b59c
qt: update to version 5.11.1
John W. Eaton <jwe@octave.org>
parents:
4735
diff
changeset
|
147 2.17.1 |
4735 | 148 |
149 | |
4801
206f76f1b59c
qt: update to version 5.11.1
John W. Eaton <jwe@octave.org>
parents:
4735
diff
changeset
|
150 From f881ea1a1010939a4fe7c2c74f01d3e54d2c7c96 Mon Sep 17 00:00:00 2001 |
4735 | 151 From: Mark Brand <mabrand@mabrand.nl> |
152 Date: Sun, 29 Jan 2017 16:22:03 +0100 | |
4801
206f76f1b59c
qt: update to version 5.11.1
John W. Eaton <jwe@octave.org>
parents:
4735
diff
changeset
|
153 Subject: [PATCH 4/6] fix treatment of SYBASE_LIBS |
4735 | 154 |
155 Change-Id: I4c9914cf7ef9d91feb0718a57f2551c1eeed47e0 | |
156 | |
157 diff --git a/src/plugins/sqldrivers/configure.pri b/src/plugins/sqldrivers/configure.pri | |
158 index b69b51b679..d37423adbd 100644 | |
159 --- a/src/plugins/sqldrivers/configure.pri | |
160 +++ b/src/plugins/sqldrivers/configure.pri | |
161 @@ -92,7 +92,7 @@ defineTest(qtConfLibrary_sybaseEnv) { | |
162 libs += "-L$${sybase}/lib" | |
163 libs += $$getenv(SYBASE_LIBS) | |
164 !isEmpty(libs) { | |
165 - $${1}.libs = "$$val_escape(libs)" | |
166 + $${1}.libs = $$libs | |
167 export($${1}.libs) | |
168 } | |
169 return(true) | |
170 -- | |
4801
206f76f1b59c
qt: update to version 5.11.1
John W. Eaton <jwe@octave.org>
parents:
4735
diff
changeset
|
171 2.17.1 |
4735 | 172 |
173 | |
4801
206f76f1b59c
qt: update to version 5.11.1
John W. Eaton <jwe@octave.org>
parents:
4735
diff
changeset
|
174 From 9e31811ee08a69d21f19dc7a0a86581c2d71a8c1 Mon Sep 17 00:00:00 2001 |
4735 | 175 From: Mark Brand <mabrand@mabrand.nl> |
176 Date: Sun, 11 Jun 2017 00:27:41 +0200 | |
4801
206f76f1b59c
qt: update to version 5.11.1
John W. Eaton <jwe@octave.org>
parents:
4735
diff
changeset
|
177 Subject: [PATCH 5/6] use pkg-config for harfbuzz |
4735 | 178 |
179 Change-Id: Ia65cbb90fd180f1bc10ce077a9a8323a48e51421 | |
180 | |
181 diff --git a/src/gui/configure.json b/src/gui/configure.json | |
182 index eee90b5b20..6c6745b1dd 100644 | |
183 --- a/src/gui/configure.json | |
184 +++ b/src/gui/configure.json | |
185 @@ -215,7 +215,8 @@ | |
186 ] | |
187 }, | |
188 "sources": [ | |
189 - "-lharfbuzz" | |
190 + { "type": "pkgConfig", "args": "harfbuzz" }, | |
191 + "-lharfbuzz" | |
192 ] | |
193 }, | |
194 "imf": { | |
195 -- | |
4801
206f76f1b59c
qt: update to version 5.11.1
John W. Eaton <jwe@octave.org>
parents:
4735
diff
changeset
|
196 2.17.1 |
4735 | 197 |
198 | |
4801
206f76f1b59c
qt: update to version 5.11.1
John W. Eaton <jwe@octave.org>
parents:
4735
diff
changeset
|
199 From c3de4dbd709d1f8c33d46ed12506444685e3db0e Mon Sep 17 00:00:00 2001 |
4735 | 200 From: Mark Brand <mabrand@mabrand.nl> |
201 Date: Thu, 23 Nov 2017 11:28:47 +0200 | |
4801
206f76f1b59c
qt: update to version 5.11.1
John W. Eaton <jwe@octave.org>
parents:
4735
diff
changeset
|
202 Subject: [PATCH 6/6] disable qt_random_cpu for i686-w64-mingw32 |
4735 | 203 |
204 Workaround for gcc internal error compiling for mingw32: | |
205 global/qrandom.cpp: In function 'qsizetype qt_random_cpu(void*, qsizetype)': | |
206 global/qrandom.cpp:123:1: internal compiler error: in | |
207 ix86_compute_frame_layout, at config/i386/i386.c:10145 | |
208 } | |
209 ^ | |
210 | |
211 global/qrandom.cpp:123:1: internal compiler error: Segmentation fault | |
212 i686-w64-mingw32.static-g++: internal compiler error: Segmentation fault | |
213 (program cc1plus) | |
214 | |
215 Based on https://codereview.qt-project.org/#/c/212360/ | |
216 | |
217 Change-Id: Ia1c902e7b147bdda2b8d7904b40a3b968b8d0369 | |
218 | |
219 diff --git a/src/corelib/global/qrandom.cpp b/src/corelib/global/qrandom.cpp | |
220 index ebf9864b15..9a31933975 100644 | |
221 --- a/src/corelib/global/qrandom.cpp | |
222 +++ b/src/corelib/global/qrandom.cpp | |
223 @@ -90,7 +90,7 @@ DECLSPEC_IMPORT BOOLEAN WINAPI SystemFunction036(PVOID RandomBuffer, ULONG Rando | |
224 | |
225 QT_BEGIN_NAMESPACE | |
226 | |
227 -#if defined(Q_PROCESSOR_X86) && QT_COMPILER_SUPPORTS_HERE(RDRND) | |
228 +#if defined(Q_PROCESSOR_X86) && !defined(Q_PROCESSOR_X86_32) && QT_COMPILER_SUPPORTS_HERE(RDRND) | |
229 static qsizetype qt_random_cpu(void *buffer, qsizetype count) Q_DECL_NOTHROW; | |
230 | |
231 # ifdef Q_PROCESSOR_X86_64 | |
232 -- | |
4801
206f76f1b59c
qt: update to version 5.11.1
John W. Eaton <jwe@octave.org>
parents:
4735
diff
changeset
|
233 2.17.1 |
4310 | 234 |
4735 | 235 diff -ur qtbase-everywhere-src-5.11.0.orig/mkspecs/common/gcc-base.conf qtbase-everywhere-src-5.11.0/mkspecs/common/gcc-base.conf |
236 --- qtbase-everywhere-src-5.11.0.orig/mkspecs/common/gcc-base.conf 2018-06-12 07:47:54.488874295 -0400 | |
237 +++ qtbase-everywhere-src-5.11.0/mkspecs/common/gcc-base.conf 2018-06-12 07:48:46.550096817 -0400 | |
238 @@ -46,7 +46,7 @@ | |
239 QMAKE_CFLAGS_SHLIB += $$QMAKE_CFLAGS_PIC | |
240 QMAKE_CFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_PIC | |
241 QMAKE_CFLAGS_APP += $$QMAKE_CFLAGS_PIC | |
242 -QMAKE_CFLAGS_ISYSTEM = -isystem | |
243 +QMAKE_CFLAGS_ISYSTEM = -I | |
244 QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses | |
245 QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden | |
246 QMAKE_CFLAGS_EXCEPTIONS_OFF += -fno-exceptions |