diff options
Diffstat (limited to 'recipes-qt/qt5/qtbase/0014-Add-external-hostbindir-option-native.patch')
-rw-r--r-- | recipes-qt/qt5/qtbase/0014-Add-external-hostbindir-option-native.patch | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtbase/0014-Add-external-hostbindir-option-native.patch b/recipes-qt/qt5/qtbase/0014-Add-external-hostbindir-option-native.patch new file mode 100644 index 00000000..08a1cbd3 --- /dev/null +++ b/recipes-qt/qt5/qtbase/0014-Add-external-hostbindir-option-native.patch | |||
@@ -0,0 +1,106 @@ | |||
1 | From f2d51e50a7fbdf485696d1b8b2d29e64c729c76b 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/11] 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 | qmake/property.cpp | 1 + | ||
28 | tools/configure/configureapp.cpp | 8 ++++++++ | ||
29 | src/corelib/global/qlibraryinfo.cpp | 3 ++- | ||
30 | src/corelib/global/qlibraryinfo.h | 1 + | ||
31 | 1 files changed, 50 insertions(+), 13 deletions(-) | ||
32 | |||
33 | diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp | ||
34 | index 92422c2..d0a62c8 100644 | ||
35 | --- a/tools/configure/configureapp.cpp | ||
36 | +++ b/tools/configure/configureapp.cpp | ||
37 | @@ -1191,6 +1191,13 @@ void Configure::parseCmdLine() | ||
38 | dictionary[ "QT_EXT_PREFIX" ] = configCmdLine.at(i); | ||
39 | } | ||
40 | |||
41 | + else if (configCmdLine.at(i) == "-external-hostbindir") { | ||
42 | + ++i; | ||
43 | + if (i == argCount) | ||
44 | + break; | ||
45 | + dictionary[ "QT_EXTERNAL_HOST_BINS" ] = configCmdLine.at(i); | ||
46 | + } | ||
47 | + | ||
48 | else if (configCmdLine.at(i) == "-make-tool") { | ||
49 | ++i; | ||
50 | if (i == argCount) | ||
51 | @@ -3995,6 +4002,7 @@ void Configure::generateQConfigCpp() | ||
52 | << " \"qt_hbinpath=" << formatPath(dictionary["QT_HOST_BINS"]) << "\"," << endl | ||
53 | << " \"qt_hlibpath=" << formatPath(dictionary["QT_HOST_LIBS"]) << "\"," << endl | ||
54 | << " \"qt_hdatpath=" << formatPath(dictionary["QT_HOST_DATA"]) << "\"," << endl | ||
55 | + << " \"qt_ebinpath=" << formatPath(dictionary["QT_EXTERNAL_HOST_BINS"]) << "\"," << endl | ||
56 | << " \"qt_targspec=" << targSpec << "\"," << endl | ||
57 | << " \"qt_hostspec=" << hostSpec << "\"," << endl | ||
58 | << "#endif" << endl | ||
59 | diff --git a/qmake/property.cpp b/qmake/property.cpp | ||
60 | index 051e056..50da6ed 100644 | ||
61 | --- a/qmake/property.cpp | ||
62 | +++ b/qmake/property.cpp | ||
63 | @@ -67,6 +67,7 @@ static const struct { | ||
64 | { "QT_HOST_DATA", QLibraryInfo::HostDataPath, true }, | ||
65 | { "QT_HOST_BINS", QLibraryInfo::HostBinariesPath, true }, | ||
66 | { "QT_HOST_LIBS", QLibraryInfo::HostLibrariesPath, true }, | ||
67 | + { "QT_EXTERNAL_HOST_BINS", QLibraryInfo::ExternalHostBinariesPath, true }, | ||
68 | { "QMAKE_SPEC", QLibraryInfo::HostSpecPath, true }, | ||
69 | { "QMAKE_XSPEC", QLibraryInfo::TargetSpecPath, true }, | ||
70 | }; | ||
71 | diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp | ||
72 | index d68c51b..7191159 100644 | ||
73 | --- a/src/corelib/global/qlibraryinfo.cpp | ||
74 | +++ b/src/corelib/global/qlibraryinfo.cpp | ||
75 | @@ -349,7 +349,7 @@ QLibraryInfo::isDebugBuild() | ||
76 | */ | ||
77 | |||
78 | static const struct { | ||
79 | - char key[19], value[13]; | ||
80 | + char key[21], value[13]; | ||
81 | } qtConfEntries[] = { | ||
82 | { "Prefix", "." }, | ||
83 | { "Documentation", "doc" }, // should be ${Data}/doc | ||
84 | @@ -375,6 +375,7 @@ static const struct { | ||
85 | { "HostBinaries", "bin" }, | ||
86 | { "HostLibraries", "lib" }, | ||
87 | { "HostData", "." }, | ||
88 | + { "ExternalHostBinaries", "" }, | ||
89 | { "TargetSpec", "" }, | ||
90 | { "HostSpec", "" }, | ||
91 | #endif | ||
92 | diff --git a/src/corelib/global/qlibraryinfo.h b/src/corelib/global/qlibraryinfo.h | ||
93 | index 543c4b3..a02e03a 100644 | ||
94 | --- a/src/corelib/global/qlibraryinfo.h | ||
95 | +++ b/src/corelib/global/qlibraryinfo.h | ||
96 | @@ -80,6 +80,7 @@ public: | ||
97 | HostBinariesPath, | ||
98 | HostLibrariesPath, | ||
99 | HostDataPath, | ||
100 | + ExternalHostBinariesPath, | ||
101 | TargetSpecPath, | ||
102 | HostSpecPath, | ||
103 | LastHostPath = HostSpecPath, | ||
104 | -- | ||
105 | 2.1.3 | ||
106 | |||