qt5: move do_install modifications to shared qt5.inc and reuse do_configure
authorMartin Jansa <Martin.Jansa@gmail.com>
Sun, 28 Apr 2013 13:16:18 +0000 (15:16 +0200)
committerPatrick Ohly <patrick.ohly@intel.com>
Fri, 9 Jan 2015 16:44:05 +0000 (08:44 -0800)
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
meta-qt5/recipes-qt/qt5/qt5.inc
meta-qt5/recipes-qt/qt5/qtbase.inc
meta-qt5/recipes-qt/qt5/qtdeclarative.inc
meta-qt5/recipes-qt/qt5/qtjsbackend.inc

index a45c0aa..a4ac90b 100644 (file)
@@ -81,6 +81,19 @@ do_compile() {
 
 do_install() {
     oe_runmake install INSTALL_ROOT=${D}
+
+    # everything except HostData and HostBinaries is prefixed with sysroot value,
+    # but we cannot remove sysroot override, because that's useful for pkg-config etc
+    if [ -d ${D}${STAGING_DIR_TARGET} ] ; then
+        cp -ra ${D}${STAGING_DIR_TARGET}/* ${D}
+        rm -rf ${D}${STAGING_DIR_TARGET}
+        # remove empty dirs
+        TMP=`dirname ${D}/${STAGING_DIR_TARGET}`
+        while test ${TMP} != ${D}; do
+            rmdir ${TMP}
+            TMP=`dirname ${TMP}`;
+        done
+    fi
 }
 
 PACKAGES =. "${PN}-tools-dbg ${PN}-plugins-dbg ${PN}-tools ${PN}-plugins ${PN}-mkspecs "
index b3791ed..0a8b739 100644 (file)
@@ -105,17 +105,6 @@ do_install_append() {
     # qemu built on host breaks do_package, remove it here (will be replaces with right qemu when do_compile is fixed
     # ERROR: objcopy failed with exit code 1 (cmd was 'arm-oe-linux-gnueabi-objcopy' --only-keep-debug '/OE/oe-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/qtbase/5.0.1-r0.0/package/usr/bin/qmake' '/OE/oe-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/qtbase/5.0.1-r0.0/package/usr/bin/.debug/qmake')
     rm -f ${D}/${bindir}/${QT_DIR_NAME}/qmake
-
-    # everything except HostData and HostBinaries is prefixed with sysroot value, 
-    # but we cannot remove sysroot override, because that's useful for pkg-config etc
-    cp -ra ${D}${STAGING_DIR_TARGET}/* ${D}
-    rm -rf ${D}${STAGING_DIR_TARGET}
-    # remove empty dirs
-    TMP=`dirname ${D}/${STAGING_DIR_TARGET}`
-    while test ${TMP} != ${D}; do
-        rmdir ${TMP}
-        TMP=`dirname ${TMP}`;
-    done
 }
 
 PACKAGES =. "${PN}-fonts "
index d77c484..9b82b22 100644 (file)
@@ -6,27 +6,10 @@ INC_PR = "r0"
 
 inherit qmake5
 
-do_configure () {
-    # Avoid setting QMAKE_LINK from LD (since we want the linker to be g++)
-    unset LD
-
+do_configure_append () {
     ${OE_QMAKE_QMAKE} ${OE_QMAKE_DEBUG_OUTPUT} -r ${S}
 }
 
-do_install() {
-    oe_runmake install INSTALL_ROOT=${D}
-    # everything except HostData and HostBinaries is prefixed with sysroot value,
-    # but we cannot remove sysroot override, because that's useful for pkg-config etc
-    cp -ra ${D}${STAGING_DIR_TARGET}/* ${D}
-    rm -rf ${D}${STAGING_DIR_TARGET}
-    # remove empty dirs
-    TMP=`dirname ${D}/${STAGING_DIR_TARGET}`
-    while test ${TMP} != ${D}; do
-        rmdir ${TMP}
-        TMP=`dirname ${TMP}`;
-    done
-}
-
 FILES_${PN}-qmlplugins-dbg = " \
     ${libdir}/${QT_DIR_NAME}/qml/*/.debug \
     ${libdir}/${QT_DIR_NAME}/qml/*/*/.debug \
index 7d0dafd..66ab57b 100644 (file)
@@ -17,22 +17,6 @@ SRC_URI += " \
     file://0002-v8.pro-respect-external-host-bindir-when-set.patch \
 "
 
-do_configure () {
-    # Avoid setting QMAKE_LINK from LD (since we want the linker to be g++)
-    unset LD
-
+do_configure_append () {
     ${OE_QMAKE_QMAKE} ${OE_QMAKE_DEBUG_OUTPUT} -r ${S}
 }
-
-do_install_append () {
-    # everything except HostData and HostBinaries is prefixed with sysroot value,
-    # but we cannot remove sysroot override, because that's useful for pkg-config etc
-    cp -ra ${D}${STAGING_DIR_TARGET}/* ${D}
-    rm -rf ${D}${STAGING_DIR_TARGET}
-    # remove empty dirs
-    TMP=`dirname ${D}/${STAGING_DIR_TARGET}`
-    while test ${TMP} != ${D}; do
-        rmdir ${TMP}
-        TMP=`dirname ${TMP}`;
-    done
-}