qtbase: Fix prefix substitution from OE to QT variable

In recent commit c0cc4ff882
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
<sysroot>/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 <raj.khem@gmail.com>
Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
Khem Raj
2015-08-27 15:59:14 +00:00
committed by Martin Jansa
parent c16b932be3
commit c7db26d146

View File

@@ -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
}