diff options
author | Samuli Piippo <samuli.piippo@theqtcompany.com> | 2016-03-15 13:07:11 +0200 |
---|---|---|
committer | Samuli Piippo <samuli.piippo@theqtcompany.com> | 2016-04-13 08:18:45 +0000 |
commit | fc91b16ed2a877412cd3a67023a6217e8671c3e4 (patch) | |
tree | 79e0af3098fc82423d36bfc25176f2b85f2607b3 /recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch | |
parent | e088f366191f9a4cadc815c3d72d85086619a184 (diff) | |
download | meta-qt5-fc91b16ed2a877412cd3a67023a6217e8671c3e4.tar.gz |
qt5: Add mingw support
Change-Id: Ibd6449396be71761e10c84bdb9a9b1888affc618
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Diffstat (limited to 'recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch')
-rw-r--r-- | recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch | 231 |
1 files changed, 0 insertions, 231 deletions
diff --git a/recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch b/recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch deleted file mode 100644 index 2059050a..00000000 --- a/recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch +++ /dev/null | |||
@@ -1,231 +0,0 @@ | |||
1 | From 8497c1671d7dfb531ff4db43b3ce4128066e3496 Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Jansa <Martin.Jansa@gmail.com> | ||
3 | Date: Sat, 6 Apr 2013 13:15:07 +0200 | ||
4 | Subject: [PATCH 03/10] Add -external-hostbindir option | ||
5 | |||
6 | * when cross-compiling it's sometimes useful to use existing tools from machine | ||
7 | (or in OpenEmbedded built with separate native recipe) when building for target | ||
8 | |||
9 | * this way we can skip bootstraping tools we already have | ||
10 | |||
11 | * qt_functions: temporary remove isEmpty check | ||
12 | * now we assume that every build will provide QT_EXTERNAL_HOST_BINS value | ||
13 | * isEmpty works correctly only with qmake variables (e.g. $$FOO - | ||
14 | isEmpty(FOO)), but doesn't work with system properties like $$[FOO]. | ||
15 | |||
16 | * cmake: Use OE_QMAKE_PATH_EXTERNAL_HOST_BINS to determine path to host binaries | ||
17 | |||
18 | Upstream-Status: Pending | ||
19 | is a lot better for upstreaming (and it was already sort of approved by | ||
20 | Oswald) but in 5.2.0 I've noticed that he added something similar for | ||
21 | android builds | ||
22 | |||
23 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
24 | Signed-off-by: Simon Busch <morphis@gravedo.de> | ||
25 | Signed-off-by: Jonathan Liu <net147@gmail.com> | ||
26 | |||
27 | Conflicts: | ||
28 | configure | ||
29 | |||
30 | Change-Id: Iacaa1c5531cd6dcc094891610c351673db55d7b2 | ||
31 | --- | ||
32 | configure | 14 ++++++++++++++ | ||
33 | mkspecs/features/qt_functions.prf | 6 +++++- | ||
34 | mkspecs/features/qt_tool.prf | 4 +++- | ||
35 | qtbase.pro | 16 ++++++++++++++++ | ||
36 | src/corelib/Qt5CoreConfigExtras.cmake.in | 6 +++--- | ||
37 | src/dbus/Qt5DBusConfigExtras.cmake.in | 4 ++-- | ||
38 | src/widgets/Qt5WidgetsConfigExtras.cmake.in | 2 +- | ||
39 | 7 files changed, 44 insertions(+), 8 deletions(-) | ||
40 | |||
41 | diff --git a/configure b/configure | ||
42 | index a53638a..440d09d 100755 | ||
43 | --- a/configure | ||
44 | +++ b/configure | ||
45 | @@ -822,6 +822,7 @@ QT_HOST_BINS= | ||
46 | QT_HOST_LIBS= | ||
47 | QT_HOST_DATA= | ||
48 | QT_EXT_PREFIX= | ||
49 | +QT_EXTERNAL_HOST_BINS= | ||
50 | |||
51 | #flags for SQL drivers | ||
52 | QT_CFLAGS_PSQL= | ||
53 | @@ -941,6 +942,7 @@ while [ "$#" -gt 0 ]; do | ||
54 | -testsdir| \ | ||
55 | -hostdatadir| \ | ||
56 | -hostbindir| \ | ||
57 | + -external-hostbindir| \ | ||
58 | -hostlibdir| \ | ||
59 | -extprefix| \ | ||
60 | -sysroot| \ | ||
61 | @@ -1173,6 +1175,9 @@ while [ "$#" -gt 0 ]; do | ||
62 | extprefix) | ||
63 | QT_EXT_PREFIX="$VAL" | ||
64 | ;; | ||
65 | + external-hostbindir) | ||
66 | + QT_EXTERNAL_HOST_BINS="$VAL" | ||
67 | + ;; | ||
68 | pkg-config) | ||
69 | if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then | ||
70 | CFG_PKGCONFIG="$VAL" | ||
71 | @@ -2435,6 +2440,10 @@ Installation options: | ||
72 | -hostdatadir <dir> . Data used by qmake will be installed to <dir> | ||
73 | (default HOSTPREFIX) | ||
74 | |||
75 | + -external-hostbindir <dir> Use external host executables instead of building them | ||
76 | + (not used by defaut) | ||
77 | + | ||
78 | + | ||
79 | Configure options: | ||
80 | |||
81 | The defaults (*) are usually acceptable. A plus (+) denotes a default value | ||
82 | @@ -3190,6 +3199,11 @@ fi | ||
83 | # command line and environment validation | ||
84 | #------------------------------------------------------------------------------- | ||
85 | |||
86 | +# default is empty, don't call makeabs if it is empty | ||
87 | +if [ ! -z "$QT_EXTERNAL_HOST_BINS" ]; then | ||
88 | + QT_EXTERNAL_HOST_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_EXTERNAL_HOST_BINS"` | ||
89 | +fi | ||
90 | + | ||
91 | # update QT_CONFIG to show our current predefined configuration | ||
92 | CFG_QCONFIG_PATH=$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h | ||
93 | case "$CFG_QCONFIG" in | ||
94 | diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf | ||
95 | index 2756f90..5d09175 100644 | ||
96 | --- a/mkspecs/features/qt_functions.prf | ||
97 | +++ b/mkspecs/features/qt_functions.prf | ||
98 | @@ -58,7 +58,11 @@ defineTest(qtHaveModule) { | ||
99 | defineTest(qtPrepareTool) { | ||
100 | cmd = $$eval(QT_TOOL.$${2}.binary) | ||
101 | isEmpty(cmd) { | ||
102 | - cmd = $$[QT_HOST_BINS]/$$2 | ||
103 | + QT_EXTERNAL_HOST_BINS = $$[QT_EXTERNAL_HOST_BINS] | ||
104 | + isEmpty(QT_EXTERNAL_HOST_BINS): \ | ||
105 | + cmd = $$[QT_HOST_BINS]/$$2 | ||
106 | + else: \ | ||
107 | + cmd = $$[QT_EXTERNAL_HOST_BINS]/$$2 | ||
108 | exists($${cmd}.pl) { | ||
109 | cmd = perl -w $$system_path($${cmd}.pl) | ||
110 | } else: contains(QMAKE_HOST.os, Windows) { | ||
111 | diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf | ||
112 | index bdeb59c..b8c539f 100644 | ||
113 | --- a/mkspecs/features/qt_tool.prf | ||
114 | +++ b/mkspecs/features/qt_tool.prf | ||
115 | @@ -14,10 +14,12 @@ load(qt_app) | ||
116 | CONFIG += console | ||
117 | DEFINES *= QT_USE_QSTRINGBUILDER | ||
118 | |||
119 | +QT_EXTERNAL_HOST_BINS = $$[QT_EXTERNAL_HOST_BINS] | ||
120 | + | ||
121 | # If we are doing a prefix build, create a "module" pri which enables | ||
122 | # qtPrepareTool() to work with the non-installed build. | ||
123 | # Non-bootstrapped tools always need this because of the environment setup. | ||
124 | -!build_pass:if(!host_build|!force_bootstrap|force_independent|!isEmpty(HOST_QT_TOOLS)) { | ||
125 | +!build_pass:if(!host_build|!force_bootstrap|force_independent|!isEmpty(HOST_QT_TOOLS)):isEmpty(QT_EXTERNAL_HOST_BINS) { | ||
126 | isEmpty(MODULE):MODULE = $$TARGET | ||
127 | |||
128 | load(qt_build_paths) | ||
129 | diff --git a/qtbase.pro b/qtbase.pro | ||
130 | index 663ff87..590741a 100644 | ||
131 | --- a/qtbase.pro | ||
132 | +++ b/qtbase.pro | ||
133 | @@ -37,6 +37,19 @@ CONFIG -= qt | ||
134 | |||
135 | ### installations #### | ||
136 | |||
137 | +QT_EXTERNAL_HOST_BINS = $$[QT_EXTERNAL_HOST_BINS] | ||
138 | + | ||
139 | +#qmake | ||
140 | +qmake.path = $$[QT_HOST_BINS] | ||
141 | +qmake.files = $$OUT_PWD/bin/qmake | ||
142 | +!isEmpty(QT_EXTERNAL_HOST_BINS) { | ||
143 | + qmake.files = $$[QT_EXTERNAL_HOST_BINS]/qmake | ||
144 | +} | ||
145 | +equals(QMAKE_HOST.os, Windows) { | ||
146 | + qmake.files = $${qmake.files}.exe | ||
147 | +} | ||
148 | +INSTALLS += qmake | ||
149 | + | ||
150 | #licheck | ||
151 | licheck.path = $$[QT_HOST_BINS] | ||
152 | licheck.files = $$PWD/bin/$$QT_LICHECK | ||
153 | @@ -50,6 +63,9 @@ INSTALLS += fixqt4headers | ||
154 | #syncqt | ||
155 | syncqt.path = $$[QT_HOST_BINS] | ||
156 | syncqt.files = $$PWD/bin/syncqt.pl | ||
157 | +!isEmpty(QT_EXTERNAL_HOST_BINS) { | ||
158 | + syncqt.files = $$[QT_EXTERNAL_HOST_BINS]/syncqt.pl | ||
159 | +} | ||
160 | INSTALLS += syncqt | ||
161 | |||
162 | # If we are doing a prefix build, create a "module" pri which enables | ||
163 | diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in | ||
164 | index a5ed8b2..0e11a1e 100644 | ||
165 | --- a/src/corelib/Qt5CoreConfigExtras.cmake.in | ||
166 | +++ b/src/corelib/Qt5CoreConfigExtras.cmake.in | ||
167 | @@ -5,7 +5,7 @@ if (NOT TARGET Qt5::qmake) | ||
168 | !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) | ||
169 | set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\") | ||
170 | !!ELSE | ||
171 | - set(imported_location \"$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\") | ||
172 | + set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/qmake$$CMAKE_BIN_SUFFIX\") | ||
173 | !!ENDIF | ||
174 | _qt5_Core_check_file_exists(${imported_location}) | ||
175 | |||
176 | @@ -20,7 +20,7 @@ if (NOT TARGET Qt5::moc) | ||
177 | !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) | ||
178 | set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\") | ||
179 | !!ELSE | ||
180 | - set(imported_location \"$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\") | ||
181 | + set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/moc$$CMAKE_BIN_SUFFIX\") | ||
182 | !!ENDIF | ||
183 | _qt5_Core_check_file_exists(${imported_location}) | ||
184 | |||
185 | @@ -37,7 +37,7 @@ if (NOT TARGET Qt5::rcc) | ||
186 | !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) | ||
187 | set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\") | ||
188 | !!ELSE | ||
189 | - set(imported_location \"$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\") | ||
190 | + set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/rcc$$CMAKE_BIN_SUFFIX\") | ||
191 | !!ENDIF | ||
192 | _qt5_Core_check_file_exists(${imported_location}) | ||
193 | |||
194 | diff --git a/src/dbus/Qt5DBusConfigExtras.cmake.in b/src/dbus/Qt5DBusConfigExtras.cmake.in | ||
195 | index 1d94715..301af8f 100644 | ||
196 | --- a/src/dbus/Qt5DBusConfigExtras.cmake.in | ||
197 | +++ b/src/dbus/Qt5DBusConfigExtras.cmake.in | ||
198 | @@ -5,7 +5,7 @@ if (NOT TARGET Qt5::qdbuscpp2xml) | ||
199 | !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) | ||
200 | set(imported_location \"${_qt5DBus_install_prefix}/$${CMAKE_BIN_DIR}qdbuscpp2xml$$CMAKE_BIN_SUFFIX\") | ||
201 | !!ELSE | ||
202 | - set(imported_location \"$${CMAKE_BIN_DIR}qdbuscpp2xml$$CMAKE_BIN_SUFFIX\") | ||
203 | + set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/qdbuscpp2xml$$CMAKE_BIN_SUFFIX\") | ||
204 | !!ENDIF | ||
205 | _qt5_DBus_check_file_exists(${imported_location}) | ||
206 | |||
207 | @@ -20,7 +20,7 @@ if (NOT TARGET Qt5::qdbusxml2cpp) | ||
208 | !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) | ||
209 | set(imported_location \"${_qt5DBus_install_prefix}/$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\") | ||
210 | !!ELSE | ||
211 | - set(imported_location \"$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\") | ||
212 | + set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/qdbusxml2cpp$$CMAKE_BIN_SUFFIX\") | ||
213 | !!ENDIF | ||
214 | _qt5_DBus_check_file_exists(${imported_location}) | ||
215 | |||
216 | diff --git a/src/widgets/Qt5WidgetsConfigExtras.cmake.in b/src/widgets/Qt5WidgetsConfigExtras.cmake.in | ||
217 | index 99d87e2..5621dc0 100644 | ||
218 | --- a/src/widgets/Qt5WidgetsConfigExtras.cmake.in | ||
219 | +++ b/src/widgets/Qt5WidgetsConfigExtras.cmake.in | ||
220 | @@ -5,7 +5,7 @@ if (NOT TARGET Qt5::uic) | ||
221 | !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) | ||
222 | set(imported_location \"${_qt5Widgets_install_prefix}/$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\") | ||
223 | !!ELSE | ||
224 | - set(imported_location \"$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\") | ||
225 | + set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/uic$$CMAKE_BIN_SUFFIX\") | ||
226 | !!ENDIF | ||
227 | _qt5_Widgets_check_file_exists(${imported_location}) | ||
228 | |||
229 | -- | ||
230 | 2.7.1 | ||
231 | |||