From: Martin Jansa <martin.jansa@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: Re: [meta-qt5][PATCH] qmake5_base.bbclass: Add install support for native builds
Date: Fri, 9 May 2014 14:50:43 +0200 [thread overview]
Message-ID: <20140509125043.GT30955@jama> (raw)
In-Reply-To: <1399401265-29167-2-git-send-email-donald.poole@swri.org>
[-- Attachment #1: Type: text/plain, Size: 4549 bytes --]
On Tue, May 06, 2014 at 01:34:24PM -0500, Donald R. Poole, Jr. wrote:
> 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.
Add SOB line.
> ---
> classes/qmake5.bbclass | 8 ++++++--
> classes/qmake5_base.bbclass | 46 +++++++++++++++++++++----------------------
> 2 files changed, 29 insertions(+), 25 deletions(-)
>
> diff --git a/classes/qmake5.bbclass b/classes/qmake5.bbclass
> index e1dda0d..01454f3 100644
> --- a/classes/qmake5.bbclass
> +++ b/classes/qmake5.bbclass
> @@ -19,6 +19,10 @@ do_configure() {
> qmake5_base_do_configure
> }
>
> -do_install() {
> - qmake5_base_do_install
> +do_install_class-target() {
> + qmake5_base_do_install_target
> +}
> +
> +do_install_class-native() {
> + qmake5_base_do_install_native
> }
> diff --git a/classes/qmake5_base.bbclass b/classes/qmake5_base.bbclass
> index df8a59a..5a380d0 100644
> --- a/classes/qmake5_base.bbclass
> +++ b/classes/qmake5_base.bbclass
> @@ -161,32 +161,32 @@ qmake5_base_do_configure () {
> ${OE_QMAKE_QMAKE} -makefile -o Makefile ${OE_QMAKE_DEBUG_OUTPUT} -r $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST || die "Error calling $CMD"
> }
>
> -qmake5_base_do_install() {
> +qmake5_base_do_install_target() {
> # Fix install paths for all
> - 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
> + find -name "Makefile*" | xargs sed -i "s,(INSTALL_ROOT)${STAGING_DIR_TARGET},(INSTALL_ROOT),g"
This looks like incremental patch from your v1, please rebase and send
v3.
>
> oe_runmake install INSTALL_ROOT=${D}
>
> - # 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
> + # 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} ] ; 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
> }
> +
> +qmake5_base_do_install_native() {
Why don't you use
qmake5_base_do_install_class-native() {
here and leave qmake5.bbclass and qmake5_base_do_install as it is?
> + # Fix install paths for all
> + find -name "Makefile*" | xargs sed -i "s,(INSTALL_ROOT),(INSTALL_ROOT)${STAGING_DIR_NATIVE},g"
> +
> + oe_runmake install INSTALL_ROOT=${D}
> +}
> --
> 1.7.9.5
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
next prev parent reply other threads:[~2014-05-09 12:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-06 18:34 [meta-qt5][PATCH] qmake5_base.bbclass: Add install support for native builds Donald R. Poole, Jr.
2014-05-06 18:34 ` Donald R. Poole, Jr.
2014-05-09 12:50 ` Martin Jansa [this message]
2014-05-09 16:36 ` Poole Jr, Donald R.
2014-05-09 22:25 ` Martin Jansa
-- strict thread matches above, loose matches on Subject: below --
2014-05-01 20:01 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140509125043.GT30955@jama \
--to=martin.jansa@gmail.com \
--cc=openembedded-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox