[oe] [PATCH] nativesdk-qtbase: do qmake replacement in ${D} instead of ${B}

Denys Dmytriyenko denis at denix.org
Mon Feb 17 21:05:02 UTC 2014


From: Denys Dmytriyenko <denys at ti.com>

This way we don't mangle ${B} and can repeat do_install if necessary. And
previously it would require running do_compile again to restore the proper
state of ${B}.

Signed-off-by: Denys Dmytriyenko <denys at ti.com>
---
 recipes-qt/qt5/nativesdk-qtbase.inc | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/recipes-qt/qt5/nativesdk-qtbase.inc b/recipes-qt/qt5/nativesdk-qtbase.inc
index a7809d3..14a3cbe 100644
--- a/recipes-qt/qt5/nativesdk-qtbase.inc
+++ b/recipes-qt/qt5/nativesdk-qtbase.inc
@@ -189,14 +189,12 @@ do_install() {
     # Fix install paths for all
     find -name "Makefile*" | xargs sed -i "s,(INSTALL_ROOT)${STAGING_DIR_NATIVE}${STAGING_DIR_NATIVE},(INSTALL_ROOT)${STAGING_DIR_NATIVE},g"
 
-    # switch back the proper qmake
-    if [ -e ${B}/bin/qmake-real ]; then
-        rm ${B}/bin/qmake
-        mv ${B}/bin/qmake-real ${B}/bin/qmake
-    fi
-
     oe_runmake install INSTALL_ROOT=${D}
 
+    # replace the native qmake installed above with nativesdk version
+    rm -rf ${D}${bindir}/qmake
+    install -m 755 ${B}/bin/qmake-real ${D}${bindir}/qmake
+
     # for modules which are still using syncqt and call qtPrepareTool(QMAKE_SYNCQT, syncqt)
     # e.g. qt3d, qtwayland
     ln -sf syncqt.pl ${D}${OE_QMAKE_PATH_QT_BINS}/syncqt
-- 
1.8.3.2




More information about the Openembedded-devel mailing list