summaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt5/qtbase-git/0003-Add-external-hostbindir-option.patch
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2013-04-03 13:08:50 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2013-04-26 00:05:07 +0200
commit6fb40c8d03266f647dfd71c50b18fb3086e47392 (patch)
tree41e0a9f326a460893541bccae607c0e84458de2f /recipes-qt/qt5/qtbase-git/0003-Add-external-hostbindir-option.patch
parent42ab168449bda4610a9c02b7560b56682316c63e (diff)
downloadmeta-qt5-6fb40c8d03266f647dfd71c50b18fb3086e47392.tar.gz
qt5-git: bump revision in git recipes to latest stable branch
* there are important fixes in qtbase bootstrapping * create also own directory for patches, easier for many versions to coexist for now Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'recipes-qt/qt5/qtbase-git/0003-Add-external-hostbindir-option.patch')
-rw-r--r--recipes-qt/qt5/qtbase-git/0003-Add-external-hostbindir-option.patch219
1 files changed, 219 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtbase-git/0003-Add-external-hostbindir-option.patch b/recipes-qt/qt5/qtbase-git/0003-Add-external-hostbindir-option.patch
new file mode 100644
index 00000000..b99eb1cf
--- /dev/null
+++ b/recipes-qt/qt5/qtbase-git/0003-Add-external-hostbindir-option.patch
@@ -0,0 +1,219 @@
1From e8fe1934151a47fd3ec86fb0054e137237fa69b7 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Sat, 6 Apr 2013 13:15:07 +0200
4Subject: [PATCH 3/6] 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
11Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
12---
13 configure | 15 ++++++++++++++-
14 mkspecs/features/qt_functions.prf | 5 ++++-
15 mkspecs/features/qt_tool.prf | 2 +-
16 qmake/property.cpp | 1 +
17 qtbase.pro | 15 +++++++++++----
18 src/corelib/global/qlibraryinfo.cpp | 3 ++-
19 src/corelib/global/qlibraryinfo.h | 1 +
20 tools/configure/configureapp.cpp | 8 ++++++++
21 8 files changed, 42 insertions(+), 8 deletions(-)
22
23diff --git a/configure b/configure
24index 666576f..93dbfab 100755
25--- a/configure
26+++ b/configure
27@@ -1034,6 +1034,7 @@ CFG_GCC_SYSROOT="yes"
28 QT_HOST_PREFIX=
29 QT_HOST_BINS=
30 QT_HOST_DATA=
31+QT_EXTERNAL_HOST_BINS=
32
33 #flags for SQL drivers
34 QT_CFLAGS_PSQL=
35@@ -1141,7 +1142,7 @@ while [ "$#" -gt 0 ]; do
36 VAL=no
37 ;;
38 #Qt style options that pass an argument
39- -prefix|-docdir|-headerdir|-plugindir|-importdir|-qmldir|-archdatadir|-datadir|-libdir|-bindir|-libexecdir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-skip|-platform|-xplatform|-device|-device-option|-sdk|-arch|-host-arch|-mysql_config|-sysroot|-hostdatadir|-hostbindir|-qpa|-qconfig|-android-sdk|-android-ndk|-android-ndk-platform|-android-ndk-host|-android-arch|-android-toolchain-version)
40+ -prefix|-docdir|-headerdir|-plugindir|-importdir|-qmldir|-archdatadir|-datadir|-libdir|-bindir|-libexecdir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-skip|-platform|-xplatform|-device|-device-option|-sdk|-arch|-host-arch|-mysql_config|-sysroot|-hostdatadir|-hostbindir|-qpa|-qconfig|-android-sdk|-android-ndk|-android-ndk-platform|-android-ndk-host|-android-arch|-android-toolchain-version|-external-hostbindir)
41 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
42 shift
43 VAL="$1"
44@@ -1326,6 +1327,9 @@ while [ "$#" -gt 0 ]; do
45 hostbindir)
46 QT_HOST_BINS="$VAL"
47 ;;
48+ external-hostbindir)
49+ QT_EXTERNAL_HOST_BINS="$VAL"
50+ ;;
51 pkg-config)
52 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
53 CFG_PKGCONFIG="$VAL"
54@@ -3180,6 +3184,11 @@ else
55 QT_HOST_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_DATA"`
56 fi
57
58+# default is empty, don't call makeabs if it is empty
59+if [ ! -z "$QT_EXTERNAL_HOST_BINS" ]; then
60+ QT_EXTERNAL_HOST_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_EXTERNAL_HOST_BINS"`
61+fi
62+
63 #-------------------------------------------------------------------------------
64 # help - interactive parts of the script _after_ this section please
65 #-------------------------------------------------------------------------------
66@@ -3346,6 +3355,9 @@ Installation options:
67 -hostdatadir <dir> . Data used by qmake will be installed to <dir>
68 (default HOSTPREFIX)
69
70+ -external-hostbindir <dir> Use external host executables instead of building them
71+ (not used by defaut)
72+
73 Configure options:
74
75 The defaults (*) are usually acceptable. A plus (+) denotes a default value
76@@ -3855,6 +3867,7 @@ static const char qt_configure_prefix_path_strs[][256 + 12] = {
77 "qt_hpfxpath=$QT_HOST_PREFIX",
78 "qt_hbinpath=$QT_HOST_BINS",
79 "qt_hdatpath=$QT_HOST_DATA",
80+ "qt_ebinpath=$QT_EXTERNAL_HOST_BINS",
81 "qt_targspec=$shortxspec",
82 "qt_hostspec=$shortspec",
83 #endif
84diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
85index 8cd2473..876f657 100644
86--- a/mkspecs/features/qt_functions.prf
87+++ b/mkspecs/features/qt_functions.prf
88@@ -193,7 +193,10 @@ defineTest(qtAddRpathLink) {
89 defineTest(qtPrepareTool) {
90 $$1 = $$eval(QT_TOOL.$${2}.command)
91 isEmpty($$1) {
92- $$1 = $$[QT_HOST_BINS]/$$2
93+ $$1 = $$[QT_EXTERNAL_HOST_BINS]/$$2
94+ isEmpty($$[QT_EXTERNAL_HOST_BINS]) {
95+ $$1 = $$[QT_HOST_BINS]/$$2
96+ }
97 contains(QMAKE_HOST.os, Windows):!contains($$1, .*\\.(exe|bat)$) {
98 exists($$eval($$1).bat) {
99 $$1 = $$eval($$1).bat
100diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf
101index 46d031f..5758604 100644
102--- a/mkspecs/features/qt_tool.prf
103+++ b/mkspecs/features/qt_tool.prf
104@@ -37,7 +37,7 @@ load(qt_common)
105 # If we are doing a prefix build, create a "module" pri which enables
106 # qtPrepareTool() to work with the non-installed build.
107 # Non-bootstrapped tools always need this because of the environment setup.
108-!build_pass:if(!host_build|!force_bootstrap|force_independent) {
109+!build_pass:if(!host_build|!force_bootstrap|force_independent):isEmpty($$[QT_EXTERNAL_HOST_BINS]) {
110 isEmpty(MODULE):MODULE = $$TARGET
111
112 MODULE_DEPENDS = $$replace(QT, -private$, )
113diff --git a/qmake/property.cpp b/qmake/property.cpp
114index c4fbcd6..c1b7a9f 100644
115--- a/qmake/property.cpp
116+++ b/qmake/property.cpp
117@@ -74,6 +74,7 @@ static const struct {
118 { "QT_HOST_PREFIX", QLibraryInfo::HostPrefixPath, true },
119 { "QT_HOST_DATA", QLibraryInfo::HostDataPath, true },
120 { "QT_HOST_BINS", QLibraryInfo::HostBinariesPath, true },
121+ { "QT_EXTERNAL_HOST_BINS", QLibraryInfo::ExternalHostBinariesPath, true },
122 { "QMAKE_SPEC", QLibraryInfo::HostSpecPath, true },
123 { "QMAKE_XSPEC", QLibraryInfo::TargetSpecPath, true },
124 };
125diff --git a/qtbase.pro b/qtbase.pro
126index 4c41cff..997ea6d 100644
127--- a/qtbase.pro
128+++ b/qtbase.pro
129@@ -68,17 +68,24 @@ CONFIG -= qt
130
131 #qmake
132 qmake.path = $$[QT_HOST_BINS]
133+qmake.files = $$OUT_PWD/bin/qmake
134+!isEmpty($$[QT_EXTERNAL_HOST_BINS]) {
135+ qmake.files = $$[QT_EXTERNAL_HOST_BINS]/bin/qmake
136+}
137 equals(QMAKE_HOST.os, Windows) {
138- qmake.files = $$OUT_PWD/bin/qmake.exe
139-} else {
140- qmake.files = $$OUT_PWD/bin/qmake
141+ qmake.files = $${qmake.files}.exe
142 }
143 INSTALLS += qmake
144
145 #syncqt
146 syncqt.path = $$[QT_HOST_BINS]
147 syncqt.files = $$PWD/bin/syncqt
148-equals(QMAKE_HOST.os, Windows):syncqt.files += $$PWD/bin/syncqt.bat
149+!isEmpty($$[QT_EXTERNAL_HOST_BINS]) {
150+ syncqt.files = $$[QT_EXTERNAL_HOST_BINS]/bin/syncqt
151+}
152+equals(QMAKE_HOST.os, Windows) {
153+ syncqt.files = $${syncqt.files}.bat
154+}
155 INSTALLS += syncqt
156
157 # If we are doing a prefix build, create a "module" pri which enables
158diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
159index acd11f5..bba0861 100644
160--- a/src/corelib/global/qlibraryinfo.cpp
161+++ b/src/corelib/global/qlibraryinfo.cpp
162@@ -272,7 +272,7 @@ QLibraryInfo::isDebugBuild()
163 */
164
165 static const struct {
166- char key[19], value[13];
167+ char key[21], value[13];
168 } qtConfEntries[] = {
169 { "Prefix", "." },
170 { "Documentation", "doc" }, // should be ${Data}/doc
171@@ -297,6 +297,7 @@ static const struct {
172 { "HostPrefix", "" },
173 { "HostBinaries", "bin" },
174 { "HostData", "." },
175+ { "ExternalHostBinaries", "" },
176 { "TargetSpec", "" },
177 { "HostSpec", "" },
178 #endif
179diff --git a/src/corelib/global/qlibraryinfo.h b/src/corelib/global/qlibraryinfo.h
180index 1a00a14..7e4829c 100644
181--- a/src/corelib/global/qlibraryinfo.h
182+++ b/src/corelib/global/qlibraryinfo.h
183@@ -83,6 +83,7 @@ public:
184 HostPrefixPath,
185 HostBinariesPath,
186 HostDataPath,
187+ ExternalHostBinariesPath,
188 TargetSpecPath,
189 HostSpecPath,
190 LastHostPath = HostSpecPath,
191diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
192index dc11c0d..6d79631 100644
193--- a/tools/configure/configureapp.cpp
194+++ b/tools/configure/configureapp.cpp
195@@ -1167,6 +1167,13 @@ void Configure::parseCmdLine()
196 dictionary[ "QT_HOST_DATA" ] = configCmdLine.at(i);
197 }
198
199+ else if (configCmdLine.at(i) == "-external-hostbindir") {
200+ ++i;
201+ if (i == argCount)
202+ break;
203+ dictionary[ "QT_EXTERNAL_HOST_BINS" ] = configCmdLine.at(i);
204+ }
205+
206 else if (configCmdLine.at(i) == "-make-tool") {
207 ++i;
208 if (i == argCount)
209@@ -3763,6 +3770,7 @@ void Configure::generateQConfigCpp()
210 << " \"qt_hpfxpath=" << formatPath(dictionary["QT_HOST_PREFIX"]) << "\"," << endl
211 << " \"qt_hbinpath=" << formatPath(dictionary["QT_HOST_BINS"]) << "\"," << endl
212 << " \"qt_hdatpath=" << formatPath(dictionary["QT_HOST_DATA"]) << "\"," << endl
213+ << " \"qt_ebinpath=" << formatPath(dictionary["QT_EXTERNAL_HOST_BINS"]) << "\"," << endl
214 << " \"qt_targspec=" << targSpec << "\"," << endl
215 << " \"qt_hostspec=" << hostSpec << "\"," << endl
216 << "#endif" << endl
217--
2181.8.2.1
219