From c7db26d146a4a9f7ea2b325d426dc770e88ac152 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 27 Aug 2015 15:59:14 +0000 Subject: qtbase: Fix prefix substitution from OE to QT variable In recent commit c0cc4ff88292d1ddd9d30007e4947342d71ae77d it was changed to replace STAGING_DIR_NATIVE and STAGING_DIR_HOST with qmake variables, however there is a little difference between them and they are not one to one mapped, OE sysroot variable does not contain prefix (/usr) at the end but QT_INSTALL_PREFIX and QT_HOST_PREFIX does, so we need to take care of substituting the full string, so qmake can formulate the header and library search paths correctly. It fixes the issue where qmake started to have wrong search paths with duplicated /usr/usr/include/... added to compiler commandline and which meant that compiler did not find the headers in sysroot while building components like qtwebkit * replace ${STAGING_DIR_HOST} instead of ${STAGING_EXECPREFIXDIR} Replacing ${STAGING_EXECPREFIXDIR} with the $$[QT_INSTALL_PREFIX] qmake built-in variable only covers ${STAGING_DIR_HOST}/usr and misses the following additional host paths: ${STAGING_DIR_HOST}/lib ${STAGING_DIR_HOST} Replace ${STAGING_DIR_HOST} instead with $$[QT_SYSROOT] so that sed replaces all the host paths contained in qconfig.pri instead of only some of them. This avoids host paths being referenced on the SDK host when using the Qt SDK. Signed-off-by: Khem Raj Signed-off-by: Jonathan Liu Signed-off-by: Martin Jansa --- recipes-qt/qt5/qtbase_git.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-qt/qt5/qtbase_git.bb b/recipes-qt/qt5/qtbase_git.bb index 44579c62..f4287cc1 100644 --- a/recipes-qt/qt5/qtbase_git.bb +++ b/recipes-qt/qt5/qtbase_git.bb @@ -238,8 +238,8 @@ do_install_append() { rm -rf ${D}/${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs/macx-ios-clang # Replace host paths with qmake built-in properties - sed -i -e 's| ${STAGING_DIR_NATIVE}| $$[QT_HOST_PREFIX]|g' \ - -e 's| ${STAGING_DIR_HOST}| $$[QT_INSTALL_PREFIX]|g' \ + sed -i -e 's| ${STAGING_DIR_NATIVE}${prefix_native}| $$[QT_HOST_PREFIX]|g' \ + -e 's| ${STAGING_DIR_HOST}| $$[QT_SYSROOT]|g' \ ${D}/${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs/qconfig.pri } -- cgit v1.2.3-54-g00ecf