All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-qt5][PATCH] qmake5_base.bbclass: Add install support for native builds
@ 2014-05-01 20:01 Donald R. Poole, Jr.
  2014-05-01 21:03 ` Martin Jansa
  2014-05-04 21:28 ` Martin Jansa
  0 siblings, 2 replies; 12+ messages in thread
From: Donald R. Poole, Jr. @ 2014-05-01 20:01 UTC (permalink / raw)
  To: openembedded-devel

From: "Donald R. Poole, Jr" <donald (dot) poole (at) swri (dot) org>

Currently, if you are building native applications with Qt5, the current qmake5_base_do_install() method assumes an install into the image folder for the target. Since the native builds handle this a little differently, this patch should account for the native install scenario.
---
 classes/qmake5_base.bbclass |   37 ++++++++++++++++++++++---------------
 1 file changed, 22 insertions(+), 15 deletions(-)

diff --git a/classes/qmake5_base.bbclass b/classes/qmake5_base.bbclass
index 18fdb2a..df8a59a 100644
--- a/classes/qmake5_base.bbclass
+++ b/classes/qmake5_base.bbclass
@@ -163,23 +163,30 @@ qmake5_base_do_configure () {
 
 qmake5_base_do_install() {
     # Fix install paths for all
-    find -name "Makefile*" | xargs sed -i "s,(INSTALL_ROOT)${STAGING_DIR_TARGET},(INSTALL_ROOT),g"
+    if [ "${BUILD_SYS}" = "${HOST_SYS}" ] ; then
+        find -name "Makefile*" | xargs sed -i "s,(INSTALL_ROOT),(INSTALL_ROOT)${STAGING_DIR_NATIVE},g"
+    else
+        find -name "Makefile*" | xargs sed -i "s,(INSTALL_ROOT)${STAGING_DIR_TARGET},(INSTALL_ROOT),g"
+    fi
 
     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
-    # In some cases like QtQmlDevTools in qtdeclarative, the sed above does not work,
-    # fix them manually
-    if [ -d ${D}${STAGING_DIR_TARGET} ] && [ -n "${STAGING_DIR_TARGET}" ] ; then
-        echo "Some files are installed in wrong directory ${D}${STAGING_DIR_TARGET}"
-        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
+    # Only do this for target builds. Native install work a little differently
+    if [ "${BUILD_SYS}" != "${HOST_SYS}" ] ; then
+        # everything except HostData and HostBinaries is prefixed with sysroot value,
+        # but we cannot remove sysroot override, because that's useful for pkg-config etc
+        # In some cases like QtQmlDevTools in qtdeclarative, the sed above does not work,
+        # fix them manually
+        if [ -d ${D}${STAGING_DIR_TARGET} ] && [ -n "${STAGING_DIR_TARGET}" ] ; then
+            echo "Some files are installed in wrong directory ${D}${STAGING_DIR_TARGET}"
+            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
     fi
 }
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 12+ messages in thread
* [meta-qt5][PATCH] qmake5_base.bbclass: Add install support for native builds
@ 2014-05-06 18:34 Donald R. Poole, Jr.
  2014-05-06 18:34 ` Donald R. Poole, Jr.
  0 siblings, 1 reply; 12+ messages in thread
From: Donald R. Poole, Jr. @ 2014-05-06 18:34 UTC (permalink / raw)
  To: openembedded-devel


Martin,
I have updated the patch per you last message and confirmed that it still works for my use-case.


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-05-09 22:24 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-01 20:01 [meta-qt5][PATCH] qmake5_base.bbclass: Add install support for native builds Donald R. Poole, Jr.
2014-05-01 21:03 ` Martin Jansa
2014-05-01 21:14   ` Donald Poole
2014-05-02 18:44   ` Poole Jr, Donald R.
2014-05-02 20:46     ` Otavio Salvador
2014-05-02 20:49       ` Poole Jr, Donald R.
2014-05-04 21:28 ` Martin Jansa
  -- strict thread matches above, loose matches on Subject: below --
2014-05-06 18:34 Donald R. Poole, Jr.
2014-05-06 18:34 ` Donald R. Poole, Jr.
2014-05-09 12:50   ` Martin Jansa
2014-05-09 16:36     ` Poole Jr, Donald R.
2014-05-09 22:25       ` Martin Jansa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.