From 4dc6b2793755c8bca1b2a3c1123aa8401a74eed6 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Sun, 28 Apr 2013 02:24:17 +0200 Subject: [PATCH] qtbase: Override all paths and export sysroot * otherwise sysroot from native build can leak to target build * missing paths like Qml2Imports were defaulting to devault /usr/qml * synchronize values between qt.conf and configure params Signed-off-by: Patrick Ohly --- meta-qt5/classes/qmake5_base.bbclass | 16 +++++++--- meta-qt5/recipes-qt/qt5/qtbase.inc | 62 +++++++++++++++++++++++------------- 2 files changed, 51 insertions(+), 27 deletions(-) diff --git a/meta-qt5/classes/qmake5_base.bbclass b/meta-qt5/classes/qmake5_base.bbclass index 604397b..fa6f316 100644 --- a/meta-qt5/classes/qmake5_base.bbclass +++ b/meta-qt5/classes/qmake5_base.bbclass @@ -1,7 +1,8 @@ # This is useful for target recipes to reference native mkspecs -QMAKE_MKSPEC_PATH_NATIVE = "${STAGING_LIBDIR_NATIVE}" +QMAKE_MKSPEC_PATH_NATIVE = "${STAGING_LIBDIR_NATIVE}/${QT_DIR_NAME}" +QMAKE_MKSPEC_PATH_TARGET = "${STAGING_LIBDIR}/${QT_DIR_NAME}" -QMAKE_MKSPEC_PATH = "${STAGING_LIBDIR}" +QMAKE_MKSPEC_PATH = "${QMAKE_MKSPEC_PATH_TARGET}" QMAKE_MKSPEC_PATH_class-native = "${QMAKE_MKSPEC_PATH_NATIVE}" # hardcode linux, because that's what 0001-Add-linux-oe-g-platform.patch adds @@ -46,13 +47,20 @@ Libraries = ${libdir} Headers = ${includedir}/${QT_DIR_NAME} Data = ${datadir}/${QT_DIR_NAME} ArchData = ${libdir}/${QT_DIR_NAME} +LibraryExecutables = ${libdir}/${QT_DIR_NAME}/libexec +Imports = ${libdir}/${QT_DIR_NAME}/imports +Qml2Imports = ${libdir}/${QT_DIR_NAME}/qml Plugins = ${libdir}/${QT_DIR_NAME}/plugins Documentation = ${docdir}/${QT_DIR_NAME} -HostData = ${QMAKE_MKSPEC_PATH} +HostData = ${QMAKE_MKSPEC_PATH_TARGET} +HostBinaries = ${bindir}/${QT_DIR_NAME} +HostSpec = ${OE_QMAKESPEC} +TartgetSpec = ${OE_XQMAKESPEC} ExternalHostBinaries = ${STAGING_BINDIR_NATIVE}/${QT_DIR_NAME} +Sysroot = ${STAGING_DIR_TARGET} EOF } - +# # Allows to override following values (as in version 5.0.1) # Prefix The default prefix for all paths. # Documentation The location for documentation upon install. diff --git a/meta-qt5/recipes-qt/qt5/qtbase.inc b/meta-qt5/recipes-qt/qt5/qtbase.inc index 5b41bde..c119847 100644 --- a/meta-qt5/recipes-qt/qt5/qtbase.inc +++ b/meta-qt5/recipes-qt/qt5/qtbase.inc @@ -29,40 +29,43 @@ INC_PR = "r0" QT_BASE_NAME = "qt5" QT_DIR_NAME = "qt5" +SSTATE_SCAN_FILES += "*.pri *.prl" + # Qt uses atomic instructions not supported in thumb mode ARM_INSTRUCTION_SET = "arm" inherit qmake5 +do_generate_qt_config_file_append() { + UNDO_SYSROOT_PREFIX=`echo ${STAGING_DIR_TARGET} | sed 's#/[^/]*#../#g'` + cat >> ${WORKDIR}/qt.conf < ${WORKDIR}/qt.conf <