aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndré Draszik <andre.draszik@linaro.org>2013-12-03 16:20:55 +0100
committerMartin Jansa <Martin.Jansa@gmail.com>2013-12-21 19:48:14 +0100
commit57709a4ee2213a3c352b9cedce1d4b16a1b35042 (patch)
treed21317a3993dc08563193ecf1b28139bd85da954
parent72ca958ebfb61640c614ec865196d68fba2576c2 (diff)
qt5.inc: allow to set the package arch globally
If Qt5 (qtbase) is machine specific, then all packages depending on qtbase will also be machine specific, because the (initial) qtbase configuration becomes part of Qt5/qmake, thus affecting builds of packages built against this specific version of qtbase. Since it is not feasible to add PACKAGE_ARCH=... to each and every recipe that is built using qmake and depends on Qt5, we introduce a new variable, QT_PACKAGES_ARCH, that can be set by the machine configuration as needed. We have to be careful though to only change the architecture of the resulting packages if we're not compiling a 'native' package. Signed-off-by: André Draszik <andre.draszik@linaro.org> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--recipes-qt/qt5/qt5.inc12
1 files changed, 12 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qt5.inc b/recipes-qt/qt5/qt5.inc
index 268ddd7b..426ed555 100644
--- a/recipes-qt/qt5/qt5.inc
+++ b/recipes-qt/qt5/qt5.inc
@@ -20,6 +20,18 @@ OE_QMAKE_PATH_SETTINGS = "${OE_QMAKE_PATH_QT_SETTINGS}"
OE_QMAKE_PATH_EXAMPLES = "${OE_QMAKE_PATH_QT_EXAMPLES}"
OE_QMAKE_PATH_TESTS = "${OE_QMAKE_PATH_QT_TESTS}"
+# If Qt5 (qtbase) is machine specific, then everything will be,
+# because the (initial) qtbase configuration becomes part of Qt5/qmake
+python __anonymous() {
+ barch = d.getVar("BUILD_ARCH", True) or ''
+ tarch = d.getVar("TARGET_ARCH", True) or ''
+ # do not do anything if we are building a native package
+ if barch != tarch:
+ tarch = d.getVar("QT_PACKAGES_ARCH", True) or ''
+ if tarch:
+ d.setVar("PACKAGE_ARCH", tarch)
+}
+
PACKAGES =. "${PN}-qmlplugins-dbg ${PN}-tools-dbg ${PN}-plugins-dbg ${PN}-qmlplugins ${PN}-tools ${PN}-plugins ${PN}-mkspecs ${PN}-examples-dev ${PN}-examples-staticdev ${PN}-examples-dbg ${PN}-examples "
# extra -dbg packages