aboutsummarylogtreecommitdiffstats
path: root/qtbase-1-fixes.patch
blob: 561bad3dcc7eae3daa8fc48332f4e097ae0bc7af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
This file is part of MXE.
See index.html for further information.

Contains ad hoc patches for cross building.

From 54b168c305f54e60de0e32501b166faa7f5913e0 Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Thu, 6 Aug 2015 23:35:08 +0200
Subject: [PATCH 1/8] 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 39280de..e152b0d 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
 }
-- 
2.5.0


From 26b89d11b4e51d3aa2aab14dd52216ef8b1c7950 Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Sat, 21 Jun 2014 13:12:49 +0200
Subject: [PATCH 2/8] 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 32edd6e..a7f2c28 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 7443368..c24e684 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
 }
-- 
2.5.0


From fa5ca49b4ffc1911a597b294ef2d4b5ecb983cad Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Mon, 8 Dec 2014 14:15:12 +0100
Subject: [PATCH 3/8] 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 3ffda1d..39b6f3759 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
-- 
2.5.0


From 7fd641a032c7b4ce1b14d7ca02da646b0a0c34d5 Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Thu, 6 Aug 2015 13:24:56 +0200
Subject: [PATCH 4/8] configure: don't set QT_NO_SYSTEMSEMAPHORE for Windows

Change-Id: I53c110ef40e3d14cc49fa23aa5d294611cac2ffa

diff --git a/configure b/configure
index 7651e29..4a4b478 100755
--- a/configure
+++ b/configure
@@ -4575,7 +4575,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"
-- 
2.5.0


From 959d3a71bced8c00967a16f23c6f9305e56fafcd Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Tue, 6 Oct 2015 09:53:20 +0200
Subject: [PATCH 5/8] 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 3cfb614..8b7063f 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
-- 
2.5.0


From a6f45e15cf19e29afc5f42d1e87feb2b4f7e9532 Mon Sep 17 00:00:00 2001
From: Boris Nagaev <bnagaev@gmail.com>
Date: Sun, 18 Oct 2015 23:11:28 +0300
Subject: [PATCH 6/8] configure: fix log corruption with option -v

This bug occurs if ./configure is called with -v on systems on
which fd proc entries point to the files/devices they are open
on instead of being magic nodes which would basically dup() the
actual fds (e.g., Linux).

In this case, the command "tee $tty" appends to /dev/stderr, which
may be already opened by the parent process. This breaks the log file.

Normally, the log file starts with

 This is the Qt Open Source Edition.
 ...

but with `-v` flag it would start with output of awkprog and maybe
some zero bytes. Zero bytes are observed on Debian Wheezy.

 DEFAULT_INCDIRS=...
 ...
 ^@^@^@^@^@^@^@^@^@^@^@^@...
 Done running configuration tests.
 ...

To fix this problem, the output of `...` is saved to a variable, and
then eval'd and echo'd (if -v).

This solution was found by Tony Theodore.
https://github.com/mxe/mxe/issues/938#issuecomment-149770348

Change-Id: Id0c28598890e813774cc92f38ee46a0697b34e77
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 45fe3f1cde1e516d1ddccddb5e33ea4316497c36)

diff --git a/configure b/configure
index 4a4b478..a5c0fd5 100755
--- a/configure
+++ b/configure
@@ -3639,10 +3639,9 @@ END {
         print "DEFAULT_LIBDIRS=\"/lib\n/usr/lib\"\n";
 }'
 
-unset tty
-[ "$OPT_VERBOSE" = "yes" ] && tty=/dev/stderr
-eval "`LC_ALL=C $TEST_COMPILER $SYSROOT_FLAG $TEST_COMPILER_CXXFLAGS -xc++ -E -v - < /dev/null 2>&1 > /dev/null | $AWK "$awkprog" | tee $tty`"
-unset tty
+awkprog_result=`LC_ALL=C $TEST_COMPILER $SYSROOT_FLAG $TEST_COMPILER_CXXFLAGS -xc++ -E -v - < /dev/null 2>&1 > /dev/null | $AWK "$awkprog"`
+eval "$awkprog_result"
+[ "$OPT_VERBOSE" = "yes" ] && echo "$awkprog_result"
 
 echo "Done running configuration tests."
 
-- 
2.5.0


From 6064564099df17f7cddded8ec0c68d9e57d29ae9 Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Wed, 26 Aug 2015 12:45:43 +0100
Subject: [PATCH 7/8] 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 d2358ca..6b1dc95 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
-- 
2.5.0