4310
|
1 This file is part of MXE. See LICENSE.md for licensing information. |
4222
|
2 |
4310
|
3 From 62efa18a61560a7757acffbd4ac6ca7b153155cc Mon Sep 17 00:00:00 2001 |
4222
|
4 From: Mark Brand <mabrand@mabrand.nl> |
|
5 Date: Thu, 6 Aug 2015 23:35:08 +0200 |
|
6 Subject: [PATCH 1/8] fix qwindows plugin linking with system-freetype (MXE |
|
7 specific) |
|
8 |
|
9 Change-Id: I8783e3ab2d19011b083dd3c471107298a17293c4 |
|
10 |
|
11 diff --git a/src/3rdparty/freetype_dependency.pri b/src/3rdparty/freetype_dependency.pri |
|
12 index 39280de..e152b0d 100644 |
|
13 --- a/src/3rdparty/freetype_dependency.pri |
|
14 +++ b/src/3rdparty/freetype_dependency.pri |
|
15 @@ -4,4 +4,5 @@ contains(QT_CONFIG, freetype) { |
|
16 } else:contains(QT_CONFIG, system-freetype) { |
|
17 # pull in the proper freetype2 include directory |
|
18 include($$QT_SOURCE_TREE/config.tests/unix/freetype/freetype.pri) |
|
19 + win32:shared:LIBS_PRIVATE += -lfreetype |
|
20 } |
|
21 -- |
4310
|
22 2.9.3 |
4222
|
23 |
|
24 |
4310
|
25 From 5a15e0374758b7786204d98b66f49b4fd3daea79 Mon Sep 17 00:00:00 2001 |
4222
|
26 From: Mark Brand <mabrand@mabrand.nl> |
|
27 Date: Sat, 21 Jun 2014 13:12:49 +0200 |
|
28 Subject: [PATCH 2/8] use pkg-config for harfbuzz (MXE specific) |
|
29 |
|
30 Change-Id: Id4e4c37d68b63c9f480d72a561d95d4d2a5ded50 |
|
31 |
|
32 diff --git a/config.tests/unix/harfbuzz/harfbuzz.pro b/config.tests/unix/harfbuzz/harfbuzz.pro |
|
33 index 32edd6e..a7f2c28 100644 |
|
34 --- a/config.tests/unix/harfbuzz/harfbuzz.pro |
|
35 +++ b/config.tests/unix/harfbuzz/harfbuzz.pro |
|
36 @@ -1,3 +1,4 @@ |
|
37 SOURCES = harfbuzz.cpp |
|
38 CONFIG -= qt dylib |
|
39 -LIBS += -lharfbuzz |
|
40 +CONFIG += link_pkgconfig |
|
41 +PKGCONFIG += harfbuzz |
|
42 diff --git a/src/3rdparty/harfbuzz_dependency.pri b/src/3rdparty/harfbuzz_dependency.pri |
|
43 index 7443368..c24e684 100644 |
|
44 --- a/src/3rdparty/harfbuzz_dependency.pri |
|
45 +++ b/src/3rdparty/harfbuzz_dependency.pri |
|
46 @@ -2,5 +2,6 @@ contains(QT_CONFIG, harfbuzz) { |
|
47 INCLUDEPATH += $$PWD/harfbuzz-ng/include |
|
48 LIBS_PRIVATE += -L$$QT_BUILD_TREE/lib -lqtharfbuzzng$$qtPlatformTargetSuffix() |
|
49 } else:contains(QT_CONFIG, system-harfbuzz) { |
|
50 - LIBS_PRIVATE += -lharfbuzz |
|
51 + CONFIG += link_pkgconfig |
|
52 + PKGCONFIG += harfbuzz |
|
53 } |
|
54 -- |
4310
|
55 2.9.3 |
4222
|
56 |
|
57 |
4310
|
58 From bc002ee2a8418c7afcba362d155ba1a591bc3d1a Mon Sep 17 00:00:00 2001 |
4222
|
59 From: Mark Brand <mabrand@mabrand.nl> |
|
60 Date: Mon, 8 Dec 2014 14:15:12 +0100 |
|
61 Subject: [PATCH 3/8] fix oci config test on windows |
|
62 |
|
63 Change-Id: If1ce2241682259ca495b0ba68bf18410f8548922 |
|
64 |
|
65 diff --git a/config.tests/unix/oci/oci.pro b/config.tests/unix/oci/oci.pro |
|
66 index 3ffda1d..39b6f3759 100644 |
|
67 --- a/config.tests/unix/oci/oci.pro |
|
68 +++ b/config.tests/unix/oci/oci.pro |
|
69 @@ -1,3 +1,3 @@ |
|
70 SOURCES = oci.cpp |
|
71 CONFIG -= qt dylib |
|
72 -LIBS += -lclntsh |
|
73 +!win32:LIBS += -lclntsh |
|
74 -- |
4310
|
75 2.9.3 |
4222
|
76 |
|
77 |
4310
|
78 From 92d2ae7b6eb175b4f15e5f0f231a9c29824d6f57 Mon Sep 17 00:00:00 2001 |
4222
|
79 From: Mark Brand <mabrand@mabrand.nl> |
|
80 Date: Thu, 6 Aug 2015 13:24:56 +0200 |
|
81 Subject: [PATCH 4/8] configure: don't set QT_NO_SYSTEMSEMAPHORE for Windows |
|
82 |
|
83 Change-Id: I53c110ef40e3d14cc49fa23aa5d294611cac2ffa |
|
84 |
|
85 diff --git a/configure b/configure |
4310
|
86 index ba94d08..50e6dfb 100755 |
4222
|
87 --- a/configure |
|
88 +++ b/configure |
4310
|
89 @@ -4677,7 +4677,7 @@ fi |
|
90 [ "$XPLATFORM_ANDROID" != "no" ] && QMakeVar add styles "android" |
4222
|
91 |
|
92 # check IPC support |
|
93 -if ! compileTest unix/ipc_sysv "ipc_sysv" ; then |
|
94 +if [ "$XPLATFORM_MINGW" = "no" ] && ! compileTest unix/ipc_sysv "ipc_sysv" ; then |
|
95 # SYSV IPC is not supported - check POSIX IPC |
|
96 if compileTest unix/ipc_posix "ipc_posix" ; then |
|
97 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_POSIX_IPC" |
|
98 -- |
4310
|
99 2.9.3 |
4222
|
100 |
|
101 |
4310
|
102 From f0054e940467a64dffc0c3cc070233fdf2848d43 Mon Sep 17 00:00:00 2001 |
|
103 From: Mark Brand <mabrand@mabrand.nl> |
|
104 Date: Tue, 6 Oct 2015 09:53:20 +0200 |
|
105 Subject: [PATCH 5/8] fix building mysql driver under mingw |
|
106 |
|
107 Change-Id: I9c4e821d5b3a6919566c6b684cb4916827feb6a9 |
|
108 |
|
109 diff --git a/src/sql/drivers/mysql/qsql_mysql.pri b/src/sql/drivers/mysql/qsql_mysql.pri |
|
110 index 3cfb614..8b7063f 100644 |
|
111 --- a/src/sql/drivers/mysql/qsql_mysql.pri |
|
112 +++ b/src/sql/drivers/mysql/qsql_mysql.pri |
|
113 @@ -4,7 +4,7 @@ SOURCES += $$PWD/qsql_mysql.cpp |
|
114 QMAKE_CXXFLAGS *= $$QT_CFLAGS_MYSQL |
|
115 LIBS += $$QT_LFLAGS_MYSQL |
|
116 |
|
117 -unix { |
|
118 +if (unix|mingw) { |
|
119 isEmpty(QT_LFLAGS_MYSQL) { |
|
120 !contains(LIBS, .*mysqlclient.*):!contains(LIBS, .*mysqld.*) { |
|
121 use_libmysqlclient_r:LIBS += -lmysqlclient_r |
|
122 -- |
|
123 2.9.3 |
|
124 |
|
125 |
|
126 From 26229596fbb711bc222c831eca3a9e5b62c7acc6 Mon Sep 17 00:00:00 2001 |
4222
|
127 From: Ray Donnelly <mingw.android@gmail.com> |
|
128 Date: Wed, 26 Aug 2015 12:45:43 +0100 |
|
129 Subject: [PATCH 6/8] cmake: Rearrange STATIC vs INTERFACE targets |
|
130 |
|
131 Otherwise we attempt to add_library(Qt5::UiPlugin STATIC IMPORTED) |
|
132 for header-only modules when building Qt5 statically. |
|
133 |
|
134 Source: https://git.io/vzWJz |
|
135 See also: https://github.com/mxe/mxe/issues/1185 |
|
136 |
|
137 diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in |
|
138 index d2358ca..6b1dc95 100644 |
|
139 --- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in |
|
140 +++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in |
|
141 @@ -222,13 +222,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) |
|
142 endif() |
|
143 !!ENDIF |
|
144 |
|
145 +!!IF equals(TEMPLATE, aux) |
|
146 + add_library(Qt5::$${CMAKE_MODULE_NAME} INTERFACE IMPORTED) |
|
147 +!!ELSE |
|
148 !!IF !isEmpty(CMAKE_STATIC_TYPE) |
|
149 add_library(Qt5::$${CMAKE_MODULE_NAME} STATIC IMPORTED) |
|
150 set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY IMPORTED_LINK_INTERFACE_LANGUAGES "CXX") |
|
151 !!ELSE |
|
152 -!!IF equals(TEMPLATE, aux) |
|
153 - add_library(Qt5::$${CMAKE_MODULE_NAME} INTERFACE IMPORTED) |
|
154 -!!ELSE |
|
155 add_library(Qt5::$${CMAKE_MODULE_NAME} SHARED IMPORTED) |
|
156 !!ENDIF |
|
157 !!ENDIF |
|
158 -- |
4310
|
159 2.9.3 |
4222
|
160 |
|
161 |
4310
|
162 From 59fd7fdff5bf0cda3c7a11982ee96f50d8eddec1 Mon Sep 17 00:00:00 2001 |
4222
|
163 From: Tony Theodore <tonyt@logyst.com> |
|
164 Date: Sat, 16 Jul 2016 20:31:07 +1000 |
4310
|
165 Subject: [PATCH 7/8] Fix pkgconfig file and library naming |
4222
|
166 |
|
167 See: https://codereview.qt-project.org/#/c/165394/ |
|
168 https://bugreports.qt.io/browse/QTBUG-30898 |
|
169 |
|
170 Currently, *.pc files are generated with debug suffix `d` in `-release` |
|
171 mode and without the suffix in `-debug` or `-debug-and-release`. This |
|
172 can be worked around by `CONIFG-=debug_and_release`, however, a more |
|
173 predictable and consistent naming approach would be preferable. |
|
174 |
|
175 This change mimics the *.prl file and lib conventions: |
|
176 |
|
177 -release: creates normal *.pc files and lib names |
|
178 -release -force-debug-info: normal as above |
|
179 -debug: creates *d.pc and *d lib names |
|
180 -debug-and-release: creates both |
|
181 -default: creates both (default link: debug) |
|
182 |
|
183 and should be unsurprising to users of `pkg-config`. At very least, |
|
184 it's deterministic and easily incorporated into build systems. |
|
185 |
|
186 Task-number: 30898 |
|
187 Change-Id: If75336ec7d21a7ec0cb6d245fe87c64afcb5a644 |
|
188 |
|
189 diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf |
4310
|
190 index d9011f5..1993a7f 100644 |
4222
|
191 --- a/mkspecs/features/qt_module.prf |
|
192 +++ b/mkspecs/features/qt_module.prf |
|
193 @@ -244,6 +244,10 @@ load(qt_installs) |
|
194 |
|
195 load(qt_targets) |
|
196 |
|
197 +# Set TARGET towards the end but before pkgconfig setup to keep naming |
|
198 +# conventions consistent with *prl files |
|
199 +TARGET = $$qt5LibraryTarget($$TARGET$$QT_LIBINFIX) |
|
200 + |
|
201 # this builds on top of qt_common |
|
202 !internal_module:!lib_bundle:if(unix|mingw) { |
|
203 CONFIG += create_pc |
|
204 @@ -254,12 +258,12 @@ load(qt_targets) |
|
205 QMAKE_PKGCONFIG_LIBDIR = $$[QT_INSTALL_LIBS/raw] |
|
206 QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS/raw] |
|
207 QMAKE_PKGCONFIG_CFLAGS = -I${includedir}/$$MODULE_INCNAME |
|
208 - QMAKE_PKGCONFIG_NAME = $$replace(TARGET, ^Qt, "Qt$$QT_MAJOR_VERSION ") |
|
209 - QMAKE_PKGCONFIG_FILE = $$replace(TARGET, ^Qt, Qt$$QT_MAJOR_VERSION) |
|
210 + QMAKE_PKGCONFIG_NAME = $$replace(TARGET, ^Qt$$QT_MAJOR_VERSION, "Qt$$QT_MAJOR_VERSION ") |
|
211 + QMAKE_PKGCONFIG_FILE = $$TARGET |
|
212 for(i, MODULE_DEPENDS): \ |
|
213 - QMAKE_PKGCONFIG_REQUIRES += $$replace(QT.$${i}.name, ^Qt, Qt$$eval(QT.$${i}.MAJOR_VERSION)) |
|
214 + QMAKE_PKGCONFIG_REQUIRES += $$replace(QT.$${i}.name, ^Qt, Qt$$eval(QT.$${i}.MAJOR_VERSION))$$qtPlatformTargetSuffix() |
|
215 isEmpty(QMAKE_PKGCONFIG_DESCRIPTION): \ |
|
216 - QMAKE_PKGCONFIG_DESCRIPTION = $$replace(TARGET, ^Qt, "Qt ") module |
|
217 + QMAKE_PKGCONFIG_DESCRIPTION = $$replace(TARGET, ^Qt$$QT_MAJOR_VERSION, "Qt ") module |
|
218 pclib_replace.match = $$lib_replace.match |
|
219 !isEmpty(lib_replace.replace): \ |
|
220 pclib_replace.replace = $$QMAKE_PKGCONFIG_LIBDIR |
|
221 @@ -293,5 +297,3 @@ win32 { |
|
222 # On other platforms, Qt's own compilation goes needs to compile the Qt 5.0 API |
|
223 DEFINES *= QT_DISABLE_DEPRECATED_BEFORE=0x050000 |
|
224 } |
|
225 - |
|
226 -TARGET = $$qt5LibraryTarget($$TARGET$$QT_LIBINFIX) # Do this towards the end |
4310
|
227 -- |
|
228 2.9.3 |
|
229 |
|
230 |
|
231 From a2ed2c9fe74b549cb163f89a56df6eec3af553fa Mon Sep 17 00:00:00 2001 |
|
232 From: Mark Brand <mabrand@mabrand.nl> |
|
233 Date: Thu, 15 Dec 2016 17:20:56 +0100 |
|
234 Subject: [PATCH 8/8] fix mysql config test |
|
235 |
|
236 The config test already gets link flags which should include |
|
237 the library. Blindly adding it to the end of the list can break |
|
238 static linking. |
|
239 |
|
240 Change-Id: Ief71c4ad64cbbb1b141b0ef5549f42a36bbd125b |
|
241 |
|
242 diff --git a/config.tests/unix/mysql/mysql.pro b/config.tests/unix/mysql/mysql.pro |
|
243 index 06d1880..ca6d6aa 100644 |
|
244 --- a/config.tests/unix/mysql/mysql.pro |
|
245 +++ b/config.tests/unix/mysql/mysql.pro |
|
246 @@ -1,3 +1,3 @@ |
|
247 SOURCES = mysql.cpp |
|
248 CONFIG -= qt dylib |
|
249 -LIBS += -lmysqlclient |
|
250 +LIBS *= -lmysqlclient |
|
251 -- |
|
252 2.9.3 |
|
253 |