diff options
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 | 154 |
1 files changed, 6 insertions, 148 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 381cde29..8224171a 100644 --- a/recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch +++ b/recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch | |||
@@ -1,165 +1,23 @@ | |||
1 | From c1dc6165d6a085f162ed32ef5697f645019f9ee0 Mon Sep 17 00:00:00 2001 | 1 | From 502b95b840a5f79e5a68e9bd5b10dbdc92485f1f Mon Sep 17 00:00:00 2001 |
2 | From: Martin Jansa <Martin.Jansa@gmail.com> | 2 | From: Martin Jansa <Martin.Jansa@gmail.com> |
3 | Date: Sat, 6 Apr 2013 13:15:07 +0200 | 3 | Date: Sat, 6 Apr 2013 13:15:07 +0200 |
4 | Subject: [PATCH] Add -external-hostbindir option | 4 | Subject: [PATCH] Add -external-hostbindir option |
5 | 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 | 6 | * cmake: Use OE_QMAKE_PATH_EXTERNAL_HOST_BINS to determine path to host binaries |
17 | 7 | ||
18 | Upstream-Status: Pending | 8 | Upstream-Status: Inappropriate [OE specific] |
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 | 9 | ||
23 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | 10 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> |
24 | Signed-off-by: Simon Busch <morphis@gravedo.de> | 11 | Signed-off-by: Simon Busch <morphis@gravedo.de> |
25 | Signed-off-by: Jonathan Liu <net147@gmail.com> | 12 | Signed-off-by: Jonathan Liu <net147@gmail.com> |
26 | 13 | ||
27 | Conflicts: | ||
28 | configure | ||
29 | |||
30 | Change-Id: Iacaa1c5531cd6dcc094891610c351673db55d7b2 | 14 | Change-Id: Iacaa1c5531cd6dcc094891610c351673db55d7b2 |
31 | --- | 15 | --- |
32 | configure | 14 ++++++++++++++ | 16 | src/corelib/Qt5CoreConfigExtras.cmake.in | 6 +++--- |
33 | mkspecs/features/qt_functions.prf | 6 +++++- | 17 | src/dbus/Qt5DBusConfigExtras.cmake.in | 4 ++-- |
34 | mkspecs/features/qt_tool.prf | 4 +++- | 18 | src/widgets/Qt5WidgetsConfigExtras.cmake.in | 2 +- |
35 | qtbase.pro | 16 ++++++++++++++++ | 19 | 3 files changed, 6 insertions(+), 6 deletions(-) |
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 | 20 | ||
41 | diff --git a/configure b/configure | ||
42 | index 052872e..1fcbb3a 100755 | ||
43 | --- a/configure | ||
44 | +++ b/configure | ||
45 | @@ -834,6 +834,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 | @@ -953,6 +954,7 @@ while [ "$#" -gt 0 ]; do | ||
54 | -testsdir| \ | ||
55 | -hostdatadir| \ | ||
56 | -hostbindir| \ | ||
57 | + -external-hostbindir| \ | ||
58 | -hostlibdir| \ | ||
59 | -extprefix| \ | ||
60 | -sysroot| \ | ||
61 | @@ -1185,6 +1187,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 | @@ -2447,6 +2452,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 | @@ -3209,6 +3218,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 54641ce..7d7baa4 100644 | ||
96 | --- a/mkspecs/features/qt_functions.prf | ||
97 | +++ b/mkspecs/features/qt_functions.prf | ||
98 | @@ -71,7 +71,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 | $${1}_EXE = $${cmd}.pl | ||
110 | cmd = perl -w $$system_path($${cmd}.pl) | ||
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 11cff9e..ec03669 100644 | ||
131 | --- a/qtbase.pro | ||
132 | +++ b/qtbase.pro | ||
133 | @@ -38,6 +38,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 | @@ -51,6 +64,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 | 21 | diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in |
164 | index a5ed8b2..0e11a1e 100644 | 22 | index a5ed8b2..0e11a1e 100644 |
165 | --- a/src/corelib/Qt5CoreConfigExtras.cmake.in | 23 | --- a/src/corelib/Qt5CoreConfigExtras.cmake.in |