Skip to contentSkip to conversation

qtbase: remove absolute binary paths from mkspec files

PATCH New Daniel Mack 1 participant 1 message Feb 23, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qtbase: remove absolute binary paths from mkspec files

When running 'bitbake -c populate_sdk' on an image that has qt5webkit enabled, the uikit feature is enabled in qtbase, which then fails to install with

error: qtbase-mkspecs-5.8.0+git0+49dc9aa409-r0 conflicts with /usr/bin/perl

The culprit for this is /usr/lib/qt5/mkspecs/features/uikit/devices.pl, which has #!/usr/bin/perl hardcoded. Fix this in a similar way other recipes do it as well and strip out these bits at install time.

---
 recipes-qt/qt5/qtbase_git.bb | 4 ++++
 1 file changed, 4 insertions(+)
recipes-qt/qt5/qtbase_git.bb +4 -0
index 4e1ab72..803c3f6 100644
@@ -178,6 +178,10 @@ do_install_append() {
     sed -i -e 's|${STAGING_DIR_NATIVE}${prefix_native}|$$[QT_HOST_PREFIX/get]|g' \
         -e 's|${STAGING_DIR_HOST}|$$[QT_SYSROOT]|g' \
         ${D}/${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs/*.pri
+
+    # Fix up absolute paths in scripts
+    grep -lr /usr/bin/perl ${D}${OE_QMAKE_PATH_QT_ARCHDATA}/ | \
+        xargs -r sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,'
 }
 
 # mkspecs have mac specific scripts that depend on perl and bash
Signature · 1 line
2.9.3