aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--classes/qmake5_base.bbclass19
-rw-r--r--recipes-qt/qt5/qtbase_git.bb5
2 files changed, 14 insertions, 10 deletions
diff --git a/classes/qmake5_base.bbclass b/classes/qmake5_base.bbclass
index 48da05e8..20ff33d4 100644
--- a/classes/qmake5_base.bbclass
+++ b/classes/qmake5_base.bbclass
@@ -240,9 +240,18 @@ qmake5_base_do_install() {
qmake5_base_fix_install ${STAGING_DIR_HOST}
qmake5_base_fix_install ${STAGING_DIR_NATIVE}
- if ls ${D}${libdir}/pkgconfig/*.pc >/dev/null 2>/dev/null; then
- sed -i ${D}${libdir}/pkgconfig/*.pc \
- -e "s@-L${STAGING_LIBDIR}@-L\${libdir}@g" \
- -e "s@${STAGING_DIR_TARGET}@@g"
- fi
+ # Replace host paths with qmake built-in properties
+ find ${D} \( -name *.pri -or -name *.prl \) -exec \
+ sed -i -e 's|${STAGING_DIR_NATIVE}|$$[QT_HOST_PREFIX/get]|g' \
+ -e 's|${STAGING_DIR_HOST}|$$[QT_SYSROOT]|g' {} \;
+
+ # Replace host paths with pkg-config built-in variable
+ find ${D} -name *.pc -exec \
+ sed -i -e 's|prefix=${STAGING_DIR_HOST}|prefix=|g' \
+ -e 's|${STAGING_DIR_HOST}|${pc_sysrootdir}|g' {} \;
+
+ # Replace resolved lib path with the lib name
+ find ${D} -name *.cmake -exec \
+ sed -i -e 's@/[^;]*/lib\([^;]*\)\.\(so\|a\)@\1@g' {} \;
+
}
diff --git a/recipes-qt/qt5/qtbase_git.bb b/recipes-qt/qt5/qtbase_git.bb
index c023e4fc..836f57fa 100644
--- a/recipes-qt/qt5/qtbase_git.bb
+++ b/recipes-qt/qt5/qtbase_git.bb
@@ -229,11 +229,6 @@ do_install_append() {
# Avoid qmake error "Cannot read [...]/usr/lib/qt5/mkspecs/oe-device-extra.pri: No such file or directory"
touch ${D}/${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs/oe-device-extra.pri
- # Replace host paths with qmake built-in properties
- sed -i -e 's|${STAGING_DIR_NATIVE}|$$[QT_HOST_PREFIX/get]|g' \
- -e 's|${STAGING_DIR_HOST}|$$[QT_SYSROOT]|g' \
- ${D}/${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs/*.pri
-
# Update the mkspecs to include the default OE toolchain config for the target
conf=${D}/${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs/${XPLATFORM}/qmake.conf