summaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch
diff options
context:
space:
mode:
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.patch144
1 files changed, 106 insertions, 38 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
index f8253ecf..66903a32 100644
--- a/recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch
+++ b/recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch
@@ -1,7 +1,7 @@
1From 5c2a17167e89f8f6cf26cbc289e57fa466678d2d Mon Sep 17 00:00:00 2001 1From 1fd06315781ada843e473ba2c28c594e05808ca2 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com> 2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Sat, 6 Apr 2013 13:15:07 +0200 3Date: Sat, 6 Apr 2013 13:15:07 +0200
4Subject: [PATCH 03/17] Add -external-hostbindir option 4Subject: [PATCH 03/12] Add -external-hostbindir option
5 5
6* when cross-compiling it's sometimes useful to use existing tools from machine 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 7 (or in OpenEmbedded built with separate native recipe) when building for target
@@ -13,25 +13,34 @@ Subject: [PATCH 03/17] Add -external-hostbindir option
13* isEmpty works correctly only with qmake variables (e.g. $$FOO - 13* isEmpty works correctly only with qmake variables (e.g. $$FOO -
14 isEmpty(FOO)), but doesn't work with system properties like $$[FOO]. 14 isEmpty(FOO)), but doesn't work with system properties like $$[FOO].
15 15
16* cmake: Use OE_QMAKE_PATH_EXTERNAL_HOST_BINS to determine path to host binaries
17
16Upstream-Status: Pending 18Upstream-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
17 22
18Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> 23Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
24Signed-off-by: Simon Busch <morphis@gravedo.de>
19--- 25---
20 configure | 15 +++++++++++++++ 26 configure | 15 +++++++++++++++
21 mkspecs/features/qt_functions.prf | 9 ++++++++- 27 mkspecs/features/qt_functions.prf | 2 +-
22 mkspecs/features/qt_tool.prf | 3 +-- 28 mkspecs/features/qt_tool.prf | 3 +--
23 qmake/property.cpp | 1 + 29 qmake/property.cpp | 1 +
24 qtbase.pro | 12 +++++++++--- 30 qtbase.pro | 12 +++++++++---
25 src/corelib/global/qlibraryinfo.cpp | 3 ++- 31 src/corelib/Qt5CoreConfigExtras.cmake.in | 6 +++---
26 src/corelib/global/qlibraryinfo.h | 1 + 32 src/corelib/global/qlibraryinfo.cpp | 3 ++-
27 tools/configure/configureapp.cpp | 8 ++++++++ 33 src/corelib/global/qlibraryinfo.h | 1 +
28 8 files changed, 45 insertions(+), 7 deletions(-) 34 src/dbus/Qt5DBusConfigExtras.cmake.in | 4 ++--
35 src/widgets/Qt5WidgetsConfigExtras.cmake.in | 2 +-
36 tools/configure/configureapp.cpp | 8 ++++++++
37 11 files changed, 44 insertions(+), 13 deletions(-)
29 38
30diff --git a/configure b/configure 39diff --git a/configure b/configure
31index eaa4092..43ad8df 100755 40index 4eae0d3..48d5119 100755
32--- a/configure 41--- a/configure
33+++ b/configure 42+++ b/configure
34@@ -791,6 +791,7 @@ QT_HOST_BINS= 43@@ -777,6 +777,7 @@ QT_HOST_BINS=
35 QT_HOST_LIBS= 44 QT_HOST_LIBS=
36 QT_HOST_DATA= 45 QT_HOST_DATA=
37 QT_EXT_PREFIX= 46 QT_EXT_PREFIX=
@@ -39,7 +48,7 @@ index eaa4092..43ad8df 100755
39 48
40 #flags for SQL drivers 49 #flags for SQL drivers
41 QT_CFLAGS_PSQL= 50 QT_CFLAGS_PSQL=
42@@ -910,6 +911,7 @@ while [ "$#" -gt 0 ]; do 51@@ -896,6 +897,7 @@ while [ "$#" -gt 0 ]; do
43 -testsdir| \ 52 -testsdir| \
44 -hostdatadir| \ 53 -hostdatadir| \
45 -hostbindir| \ 54 -hostbindir| \
@@ -47,7 +56,7 @@ index eaa4092..43ad8df 100755
47 -hostlibdir| \ 56 -hostlibdir| \
48 -extprefix| \ 57 -extprefix| \
49 -sysroot| \ 58 -sysroot| \
50@@ -1124,6 +1126,9 @@ while [ "$#" -gt 0 ]; do 59@@ -1110,6 +1112,9 @@ while [ "$#" -gt 0 ]; do
51 extprefix) 60 extprefix)
52 QT_EXT_PREFIX="$VAL" 61 QT_EXT_PREFIX="$VAL"
53 ;; 62 ;;
@@ -68,7 +77,7 @@ index eaa4092..43ad8df 100755
68 Configure options: 77 Configure options:
69 78
70 The defaults (*) are usually acceptable. A plus (+) denotes a default value 79 The defaults (*) are usually acceptable. A plus (+) denotes a default value
71@@ -2906,6 +2915,11 @@ fi 80@@ -2915,6 +2924,11 @@ fi
72 # command line and environment validation 81 # command line and environment validation
73 #------------------------------------------------------------------------------- 82 #-------------------------------------------------------------------------------
74 83
@@ -80,7 +89,7 @@ index eaa4092..43ad8df 100755
80 # update QT_CONFIG to show our current predefined configuration 89 # update QT_CONFIG to show our current predefined configuration
81 CFG_QCONFIG_PATH=$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h 90 CFG_QCONFIG_PATH=$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h
82 case "$CFG_QCONFIG" in 91 case "$CFG_QCONFIG" in
83@@ -3593,6 +3607,7 @@ static const char qt_configure_prefix_path_strs[][256 + 12] = { 92@@ -3595,6 +3609,7 @@ static const char qt_configure_prefix_path_strs[][256 + 12] = {
84 "qt_hbinpath=$QT_HOST_BINS", 93 "qt_hbinpath=$QT_HOST_BINS",
85 "qt_hlibpath=$QT_HOST_LIBS", 94 "qt_hlibpath=$QT_HOST_LIBS",
86 "qt_hdatpath=$QT_HOST_DATA", 95 "qt_hdatpath=$QT_HOST_DATA",
@@ -89,27 +98,20 @@ index eaa4092..43ad8df 100755
89 "qt_hostspec=$shortspec", 98 "qt_hostspec=$shortspec",
90 #endif 99 #endif
91diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf 100diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
92index 1dacfed..7229845 100644 101index 9a4d80e..e60ce37 100644
93--- a/mkspecs/features/qt_functions.prf 102--- a/mkspecs/features/qt_functions.prf
94+++ b/mkspecs/features/qt_functions.prf 103+++ b/mkspecs/features/qt_functions.prf
95@@ -193,7 +193,14 @@ defineTest(qtAddRpathLink) { 104@@ -193,7 +193,7 @@ defineTest(qtAddRpathLink) {
96 defineTest(qtPrepareTool) { 105 defineTest(qtPrepareTool) {
97 $$1 = $$eval(QT_TOOL.$${2}.binary) 106 cmd = $$eval(QT_TOOL.$${2}.binary)
98 isEmpty($$1) { 107 isEmpty(cmd) {
99- $$1 = $$[QT_HOST_BINS]/$$2 108- cmd = $$[QT_HOST_BINS]/$$2
100+ $$1 = $$[QT_EXTERNAL_HOST_BINS]/$$2 109+ cmd = $$[QT_EXTERNAL_HOST_BINS]/$$2
101+ # for some reason isEmpty does not work here, FIXME before submitting upstream 110 exists($${cmd}.pl) {
102+ # DEBUG 1: mkspecs/features/qt_functions.prf:198: calling built-in isEmpty(/OE/oe-core/tmp-eglibc/sysroots/x86_64-linux/usr/bin/qt5) 111 cmd = perl -w $$system_path($${cmd}.pl)
103+ # DEBUG 1: mkspecs/features/qt_functions.prf:198: test function returned true
104+ # DEBUG 1: mkspecs/features/qt_functions.prf:198: taking 'then' branch
105+ !exists($$[QT_EXTERNAL_HOST_BINS]/$$2) {
106+ $$1 = $$[QT_HOST_BINS]/$$2
107+ }
108 exists($$eval($$1).pl) {
109 $$1 = perl -w $$eval($$1).pl
110 } else: contains(QMAKE_HOST.os, Windows) { 112 } else: contains(QMAKE_HOST.os, Windows) {
111diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf 113diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf
112index f0864f9..50bfac8 100644 114index 1d3e88c..bd44754 100644
113--- a/mkspecs/features/qt_tool.prf 115--- a/mkspecs/features/qt_tool.prf
114+++ b/mkspecs/features/qt_tool.prf 116+++ b/mkspecs/features/qt_tool.prf
115@@ -15,8 +15,7 @@ CONFIG += console 117@@ -15,8 +15,7 @@ CONFIG += console
@@ -135,7 +137,7 @@ index e50485c..71291ad 100644
135 { "QMAKE_XSPEC", QLibraryInfo::TargetSpecPath, true }, 137 { "QMAKE_XSPEC", QLibraryInfo::TargetSpecPath, true },
136 }; 138 };
137diff --git a/qtbase.pro b/qtbase.pro 139diff --git a/qtbase.pro b/qtbase.pro
138index ed6fc39..2421f41 100644 140index d6861cf..92e6a83 100644
139--- a/qtbase.pro 141--- a/qtbase.pro
140+++ b/qtbase.pro 142+++ b/qtbase.pro
141@@ -71,16 +71,22 @@ CONFIG -= qt 143@@ -71,16 +71,22 @@ CONFIG -= qt
@@ -164,8 +166,39 @@ index ed6fc39..2421f41 100644
164 INSTALLS += syncqt 166 INSTALLS += syncqt
165 167
166 # If we are doing a prefix build, create a "module" pri which enables 168 # If we are doing a prefix build, create a "module" pri which enables
169diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in
170index 9bda70e..6e3605a 100644
171--- a/src/corelib/Qt5CoreConfigExtras.cmake.in
172+++ b/src/corelib/Qt5CoreConfigExtras.cmake.in
173@@ -5,7 +5,7 @@ if (NOT TARGET Qt5::qmake)
174 !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
175 set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\")
176 !!ELSE
177- set(imported_location \"$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\")
178+ set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/qmake$$CMAKE_BIN_SUFFIX\")
179 !!ENDIF
180 _qt5_Core_check_file_exists(${imported_location})
181
182@@ -20,7 +20,7 @@ if (NOT TARGET Qt5::moc)
183 !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
184 set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\")
185 !!ELSE
186- set(imported_location \"$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\")
187+ set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/moc$$CMAKE_BIN_SUFFIX\")
188 !!ENDIF
189 _qt5_Core_check_file_exists(${imported_location})
190
191@@ -37,7 +37,7 @@ if (NOT TARGET Qt5::rcc)
192 !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
193 set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\")
194 !!ELSE
195- set(imported_location \"$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\")
196+ set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/rcc$$CMAKE_BIN_SUFFIX\")
197 !!ENDIF
198 _qt5_Core_check_file_exists(${imported_location})
199
167diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp 200diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
168index 80e0f30..89e13cf 100644 201index 69e614f..a95ca35 100644
169--- a/src/corelib/global/qlibraryinfo.cpp 202--- a/src/corelib/global/qlibraryinfo.cpp
170+++ b/src/corelib/global/qlibraryinfo.cpp 203+++ b/src/corelib/global/qlibraryinfo.cpp
171@@ -336,7 +336,7 @@ QLibraryInfo::isDebugBuild() 204@@ -336,7 +336,7 @@ QLibraryInfo::isDebugBuild()
@@ -197,11 +230,46 @@ index 0b573c2..b5535ee 100644
197 TargetSpecPath, 230 TargetSpecPath,
198 HostSpecPath, 231 HostSpecPath,
199 LastHostPath = HostSpecPath, 232 LastHostPath = HostSpecPath,
233diff --git a/src/dbus/Qt5DBusConfigExtras.cmake.in b/src/dbus/Qt5DBusConfigExtras.cmake.in
234index 1d94715..301af8f 100644
235--- a/src/dbus/Qt5DBusConfigExtras.cmake.in
236+++ b/src/dbus/Qt5DBusConfigExtras.cmake.in
237@@ -5,7 +5,7 @@ if (NOT TARGET Qt5::qdbuscpp2xml)
238 !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
239 set(imported_location \"${_qt5DBus_install_prefix}/$${CMAKE_BIN_DIR}qdbuscpp2xml$$CMAKE_BIN_SUFFIX\")
240 !!ELSE
241- set(imported_location \"$${CMAKE_BIN_DIR}qdbuscpp2xml$$CMAKE_BIN_SUFFIX\")
242+ set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/qdbuscpp2xml$$CMAKE_BIN_SUFFIX\")
243 !!ENDIF
244 _qt5_DBus_check_file_exists(${imported_location})
245
246@@ -20,7 +20,7 @@ if (NOT TARGET Qt5::qdbusxml2cpp)
247 !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
248 set(imported_location \"${_qt5DBus_install_prefix}/$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\")
249 !!ELSE
250- set(imported_location \"$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\")
251+ set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/qdbusxml2cpp$$CMAKE_BIN_SUFFIX\")
252 !!ENDIF
253 _qt5_DBus_check_file_exists(${imported_location})
254
255diff --git a/src/widgets/Qt5WidgetsConfigExtras.cmake.in b/src/widgets/Qt5WidgetsConfigExtras.cmake.in
256index 99d87e2..5621dc0 100644
257--- a/src/widgets/Qt5WidgetsConfigExtras.cmake.in
258+++ b/src/widgets/Qt5WidgetsConfigExtras.cmake.in
259@@ -5,7 +5,7 @@ if (NOT TARGET Qt5::uic)
260 !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
261 set(imported_location \"${_qt5Widgets_install_prefix}/$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\")
262 !!ELSE
263- set(imported_location \"$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\")
264+ set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/uic$$CMAKE_BIN_SUFFIX\")
265 !!ENDIF
266 _qt5_Widgets_check_file_exists(${imported_location})
267
200diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp 268diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
201index fe2caa2..eb472db 100644 269index b756509..7e61845 100644
202--- a/tools/configure/configureapp.cpp 270--- a/tools/configure/configureapp.cpp
203+++ b/tools/configure/configureapp.cpp 271+++ b/tools/configure/configureapp.cpp
204@@ -1208,6 +1208,13 @@ void Configure::parseCmdLine() 272@@ -1213,6 +1213,13 @@ void Configure::parseCmdLine()
205 dictionary[ "QT_EXT_PREFIX" ] = configCmdLine.at(i); 273 dictionary[ "QT_EXT_PREFIX" ] = configCmdLine.at(i);
206 } 274 }
207 275
@@ -215,7 +283,7 @@ index fe2caa2..eb472db 100644
215 else if (configCmdLine.at(i) == "-make-tool") { 283 else if (configCmdLine.at(i) == "-make-tool") {
216 ++i; 284 ++i;
217 if (i == argCount) 285 if (i == argCount)
218@@ -3957,6 +3964,7 @@ void Configure::generateQConfigCpp() 286@@ -3983,6 +3990,7 @@ void Configure::generateQConfigCpp()
219 << " \"qt_hbinpath=" << formatPath(dictionary["QT_HOST_BINS"]) << "\"," << endl 287 << " \"qt_hbinpath=" << formatPath(dictionary["QT_HOST_BINS"]) << "\"," << endl
220 << " \"qt_hlibpath=" << formatPath(dictionary["QT_HOST_LIBS"]) << "\"," << endl 288 << " \"qt_hlibpath=" << formatPath(dictionary["QT_HOST_LIBS"]) << "\"," << endl
221 << " \"qt_hdatpath=" << formatPath(dictionary["QT_HOST_DATA"]) << "\"," << endl 289 << " \"qt_hdatpath=" << formatPath(dictionary["QT_HOST_DATA"]) << "\"," << endl