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 | 233 |
1 files changed, 233 insertions, 0 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 new file mode 100644 index 00000000..779ea918 --- /dev/null +++ b/recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch | |||
| @@ -0,0 +1,233 @@ | |||
| 1 | From cf4e996876e0b467b7aae124c7cb285f677bf6b0 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/12] 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 | configure | 15 +++++++++++++++ | ||
| 28 | mkspecs/features/qt_functions.prf | 6 +++++- | ||
| 29 | mkspecs/features/qt_tool.prf | 4 ++-- | ||
| 30 | qtbase.pro | 13 ++++++++++--- | ||
| 31 | src/corelib/Qt5CoreConfigExtras.cmake.in | 6 +++--- | ||
| 32 | src/dbus/Qt5DBusConfigExtras.cmake.in | 4 ++-- | ||
| 33 | src/widgets/Qt5WidgetsConfigExtras.cmake.in | 2 +- | ||
| 34 | 7 files changed, 38 insertions(+), 12 deletions(-) | ||
| 35 | |||
| 36 | diff --git a/configure b/configure | ||
| 37 | index 0a00d6d..ad5f4cd 100755 | ||
| 38 | --- a/configure | ||
| 39 | +++ b/configure | ||
| 40 | @@ -770,6 +770,7 @@ QT_HOST_BINS= | ||
| 41 | QT_HOST_LIBS= | ||
| 42 | QT_HOST_DATA= | ||
| 43 | QT_EXT_PREFIX= | ||
| 44 | +QT_EXTERNAL_HOST_BINS= | ||
| 45 | |||
| 46 | #flags for SQL drivers | ||
| 47 | QT_CFLAGS_PSQL= | ||
| 48 | @@ -889,6 +890,7 @@ while [ "$#" -gt 0 ]; do | ||
| 49 | -testsdir| \ | ||
| 50 | -hostdatadir| \ | ||
| 51 | -hostbindir| \ | ||
| 52 | + -external-hostbindir| \ | ||
| 53 | -hostlibdir| \ | ||
| 54 | -extprefix| \ | ||
| 55 | -sysroot| \ | ||
| 56 | @@ -1107,6 +1109,9 @@ while [ "$#" -gt 0 ]; do | ||
| 57 | extprefix) | ||
| 58 | QT_EXT_PREFIX="$VAL" | ||
| 59 | ;; | ||
| 60 | + external-hostbindir) | ||
| 61 | + QT_EXTERNAL_HOST_BINS="$VAL" | ||
| 62 | + ;; | ||
| 63 | pkg-config) | ||
| 64 | if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then | ||
| 65 | CFG_PKGCONFIG="$VAL" | ||
| 66 | @@ -2270,6 +2275,10 @@ 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 | + | ||
| 74 | Configure options: | ||
| 75 | |||
| 76 | The defaults (*) are usually acceptable. A plus (+) denotes a default value | ||
| 77 | @@ -2949,6 +2958,11 @@ fi | ||
| 78 | # command line and environment validation | ||
| 79 | #------------------------------------------------------------------------------- | ||
| 80 | |||
| 81 | +# default is empty, don't call makeabs if it is empty | ||
| 82 | +if [ ! -z "$QT_EXTERNAL_HOST_BINS" ]; then | ||
| 83 | + QT_EXTERNAL_HOST_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_EXTERNAL_HOST_BINS"` | ||
| 84 | +fi | ||
| 85 | + | ||
| 86 | # update QT_CONFIG to show our current predefined configuration | ||
| 87 | CFG_QCONFIG_PATH=$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h | ||
| 88 | case "$CFG_QCONFIG" in | ||
| 89 | @@ -3649,6 +3663,7 @@ static const char qt_configure_prefix_path_strs[][256 + 12] = { | ||
| 90 | "qt_hbinpath=$QT_HOST_BINS", | ||
| 91 | "qt_hlibpath=$QT_HOST_LIBS", | ||
| 92 | "qt_hdatpath=$QT_HOST_DATA", | ||
| 93 | + "qt_ebinpath=$QT_EXTERNAL_HOST_BINS", | ||
| 94 | "qt_targspec=$shortxspec", | ||
| 95 | "qt_hostspec=$shortspec", | ||
| 96 | #endif | ||
| 97 | diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf | ||
| 98 | index 79b4eab..8c6913e 100644 | ||
| 99 | --- a/mkspecs/features/qt_functions.prf | ||
| 100 | +++ b/mkspecs/features/qt_functions.prf | ||
| 101 | @@ -198,7 +198,11 @@ defineTest(qtAddRpathLink) { | ||
| 102 | defineTest(qtPrepareTool) { | ||
| 103 | cmd = $$eval(QT_TOOL.$${2}.binary) | ||
| 104 | isEmpty(cmd) { | ||
| 105 | - cmd = $$[QT_HOST_BINS]/$$2 | ||
| 106 | + QT_EXTERNAL_HOST_BINS = $$[QT_EXTERNAL_HOST_BINS] | ||
| 107 | + isEmpty(QT_EXTERNAL_HOST_BINS): \ | ||
| 108 | + cmd = $$[QT_HOST_BINS]/$$2 | ||
| 109 | + else: \ | ||
| 110 | + cmd = $$[QT_EXTERNAL_HOST_BINS]/$$2 | ||
| 111 | exists($${cmd}.pl) { | ||
| 112 | cmd = perl -w $$system_path($${cmd}.pl) | ||
| 113 | } else: contains(QMAKE_HOST.os, Windows) { | ||
| 114 | diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf | ||
| 115 | index 1d3e88c..9b26adf 100644 | ||
| 116 | --- a/mkspecs/features/qt_tool.prf | ||
| 117 | +++ b/mkspecs/features/qt_tool.prf | ||
| 118 | @@ -12,11 +12,11 @@ | ||
| 119 | load(qt_app) | ||
| 120 | |||
| 121 | CONFIG += console | ||
| 122 | +QT_EXTERNAL_HOST_BINS = $$[QT_EXTERNAL_HOST_BINS] | ||
| 123 | |||
| 124 | # If we are doing a prefix build, create a "module" pri which enables | ||
| 125 | # qtPrepareTool() to work with the non-installed build. | ||
| 126 | -# Non-bootstrapped tools always need this because of the environment setup. | ||
| 127 | -!build_pass:if(!host_build|!force_bootstrap|force_independent) { | ||
| 128 | +!build_pass:if(!host_build|!force_bootstrap|force_independent):isEmpty(QT_EXTERNAL_HOST_BINS) { | ||
| 129 | isEmpty(MODULE):MODULE = $$TARGET | ||
| 130 | |||
| 131 | !host_build|!force_bootstrap: MODULE_DEPENDS = $$replace(QT, -private$, _private) | ||
| 132 | diff --git a/qtbase.pro b/qtbase.pro | ||
| 133 | index 6d0de44..ddf7478 100644 | ||
| 134 | --- a/qtbase.pro | ||
| 135 | +++ b/qtbase.pro | ||
| 136 | @@ -69,18 +69,25 @@ CONFIG -= qt | ||
| 137 | |||
| 138 | ### installations #### | ||
| 139 | |||
| 140 | +QT_EXTERNAL_HOST_BINS = $$[QT_EXTERNAL_HOST_BINS] | ||
| 141 | + | ||
| 142 | #qmake | ||
| 143 | qmake.path = $$[QT_HOST_BINS] | ||
| 144 | +qmake.files = $$OUT_PWD/bin/qmake | ||
| 145 | +!isEmpty(QT_EXTERNAL_HOST_BINS) { | ||
| 146 | + qmake.files = $$[QT_EXTERNAL_HOST_BINS]/qmake | ||
| 147 | +} | ||
| 148 | equals(QMAKE_HOST.os, Windows) { | ||
| 149 | - qmake.files = $$OUT_PWD/bin/qmake.exe | ||
| 150 | -} else { | ||
| 151 | - qmake.files = $$OUT_PWD/bin/qmake | ||
| 152 | + qmake.files = $${qmake.files}.exe | ||
| 153 | } | ||
| 154 | INSTALLS += qmake | ||
| 155 | |||
| 156 | #syncqt | ||
| 157 | syncqt.path = $$[QT_HOST_BINS] | ||
| 158 | syncqt.files = $$PWD/bin/syncqt.pl | ||
| 159 | +!isEmpty(QT_EXTERNAL_HOST_BINS) { | ||
| 160 | + syncqt.files = $$[QT_EXTERNAL_HOST_BINS]/syncqt.pl | ||
| 161 | +} | ||
| 162 | INSTALLS += syncqt | ||
| 163 | |||
| 164 | # If we are doing a prefix build, create a "module" pri which enables | ||
| 165 | diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in | ||
| 166 | index 7213a84..a977417 100644 | ||
| 167 | --- a/src/corelib/Qt5CoreConfigExtras.cmake.in | ||
| 168 | +++ b/src/corelib/Qt5CoreConfigExtras.cmake.in | ||
| 169 | @@ -5,7 +5,7 @@ if (NOT TARGET Qt5::qmake) | ||
| 170 | !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) | ||
| 171 | set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\") | ||
| 172 | !!ELSE | ||
| 173 | - set(imported_location \"$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\") | ||
| 174 | + set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/qmake$$CMAKE_BIN_SUFFIX\") | ||
| 175 | !!ENDIF | ||
| 176 | _qt5_Core_check_file_exists(${imported_location}) | ||
| 177 | |||
| 178 | @@ -20,7 +20,7 @@ if (NOT TARGET Qt5::moc) | ||
| 179 | !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) | ||
| 180 | set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\") | ||
| 181 | !!ELSE | ||
| 182 | - set(imported_location \"$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\") | ||
| 183 | + set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/moc$$CMAKE_BIN_SUFFIX\") | ||
| 184 | !!ENDIF | ||
| 185 | _qt5_Core_check_file_exists(${imported_location}) | ||
| 186 | |||
| 187 | @@ -37,7 +37,7 @@ if (NOT TARGET Qt5::rcc) | ||
| 188 | !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) | ||
| 189 | set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\") | ||
| 190 | !!ELSE | ||
| 191 | - set(imported_location \"$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\") | ||
| 192 | + set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/rcc$$CMAKE_BIN_SUFFIX\") | ||
| 193 | !!ENDIF | ||
| 194 | _qt5_Core_check_file_exists(${imported_location}) | ||
| 195 | |||
| 196 | diff --git a/src/dbus/Qt5DBusConfigExtras.cmake.in b/src/dbus/Qt5DBusConfigExtras.cmake.in | ||
| 197 | index 1d94715..301af8f 100644 | ||
| 198 | --- a/src/dbus/Qt5DBusConfigExtras.cmake.in | ||
| 199 | +++ b/src/dbus/Qt5DBusConfigExtras.cmake.in | ||
| 200 | @@ -5,7 +5,7 @@ if (NOT TARGET Qt5::qdbuscpp2xml) | ||
| 201 | !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) | ||
| 202 | set(imported_location \"${_qt5DBus_install_prefix}/$${CMAKE_BIN_DIR}qdbuscpp2xml$$CMAKE_BIN_SUFFIX\") | ||
| 203 | !!ELSE | ||
| 204 | - set(imported_location \"$${CMAKE_BIN_DIR}qdbuscpp2xml$$CMAKE_BIN_SUFFIX\") | ||
| 205 | + set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/qdbuscpp2xml$$CMAKE_BIN_SUFFIX\") | ||
| 206 | !!ENDIF | ||
| 207 | _qt5_DBus_check_file_exists(${imported_location}) | ||
| 208 | |||
| 209 | @@ -20,7 +20,7 @@ if (NOT TARGET Qt5::qdbusxml2cpp) | ||
| 210 | !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) | ||
| 211 | set(imported_location \"${_qt5DBus_install_prefix}/$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\") | ||
| 212 | !!ELSE | ||
| 213 | - set(imported_location \"$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\") | ||
| 214 | + set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/qdbusxml2cpp$$CMAKE_BIN_SUFFIX\") | ||
| 215 | !!ENDIF | ||
| 216 | _qt5_DBus_check_file_exists(${imported_location}) | ||
| 217 | |||
| 218 | diff --git a/src/widgets/Qt5WidgetsConfigExtras.cmake.in b/src/widgets/Qt5WidgetsConfigExtras.cmake.in | ||
| 219 | index 99d87e2..5621dc0 100644 | ||
| 220 | --- a/src/widgets/Qt5WidgetsConfigExtras.cmake.in | ||
| 221 | +++ b/src/widgets/Qt5WidgetsConfigExtras.cmake.in | ||
| 222 | @@ -5,7 +5,7 @@ if (NOT TARGET Qt5::uic) | ||
| 223 | !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) | ||
| 224 | set(imported_location \"${_qt5Widgets_install_prefix}/$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\") | ||
| 225 | !!ELSE | ||
| 226 | - set(imported_location \"$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\") | ||
| 227 | + set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/uic$$CMAKE_BIN_SUFFIX\") | ||
| 228 | !!ENDIF | ||
| 229 | _qt5_Widgets_check_file_exists(${imported_location}) | ||
| 230 | |||
| 231 | -- | ||
| 232 | 2.3.5 | ||
| 233 | |||
