[oe] making qt5 package machine specific

Martin Jansa martin.jansa at gmail.com
Thu Nov 21 17:28:04 UTC 2013


On Thu, Nov 21, 2013 at 04:11:00PM +0100, Nicolas Dechesne wrote:
> On Thu, Nov 21, 2013 at 1:39 PM, Martin Jansa <martin.jansa at gmail.com>wrote:
> 
> > There are 2 ways and I'm using both in different scenarios (different
> > builds)
> >
> > 1) .inc file with
> > PACKAGE_ARCH_pn-qtbase = "${MACHINE_ARCH}"
> > PACKAGE_ARCH_pn-qtdeclarative = "${MACHINE_ARCH}"
> > ...
> > for whole qt* stack (use sstate-diff-machines.sh script to see that you
> > get them all).
> >
> > 2) SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS
> > # Depending on MACHINE_ARCH GL/GLES binaries (or mesa)
> > SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "\
> >     qtbase->other-gl-gles-provider \
> >     qtbase->mesa \
> > "
> >
> > 2) doesn't solve your MACHINE specific patches of course
> >
> 
> thanks. how about getting something like this merged? i believe our
> situation is going to be an issue for others as well, so perhaps it's nice
> to build the infrastructure to make it simpler for people to use

Looks useful, would you mind sending it with send-email so that it
correctly shows up in patchwork (now it breaks author and commit
message).

I'll let other reviewers some time to comment, but can merge it later.

> 
> =========
> 
> From c562d011f196b1ee8ceced76833dc80e48dd599f Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik at linaro.org>
> Date: Thu, 21 Nov 2013 13:48:45 +0000
> Subject: [PATCH] qmake5_base.bbclass: allow to set the package arch globally
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
> 
> Packages built using a (machine) specific qmake, will also be
> machine specific.
> Since it is not feasible to add PACKAGE_ARCH=... to each and every
> recipe that is built using qmake, we introduce a new variable,
> QMAKE_PACKAGE_ARCH, that can be set by the machine configuration as
> needed.
> 
> We have to be careful though to only change the architecture of the
> resulting packages if we're not compiling a 'native' package.
> 
> Signed-off-by: André Draszik <andre.draszik at linaro.org>
> ---
>  classes/qmake5_base.bbclass | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/classes/qmake5_base.bbclass b/classes/qmake5_base.bbclass
> index 2db0fa3..e77dd73 100644
> --- a/classes/qmake5_base.bbclass
> +++ b/classes/qmake5_base.bbclass
> @@ -1,3 +1,15 @@
> +python __anonymous() {
> +    barch = d.getVar("BUILD_ARCH", True) or ''
> +    tarch = d.getVar("TARGET_ARCH", True) or ''
> +    # do not do anything if we are building a native package
> +    if barch == tarch:
> +        True
> +    else:
> +        tarch = d.getVar("QMAKE_PACKAGE_ARCH", True) or ''
> +        if tarch:
> +            d.setVar("PACKAGE_ARCH", tarch)
> +}
> +
>  # This is useful for target recipes to reference native mkspecs
>  QMAKE_MKSPEC_PATH_NATIVE = "${STAGING_LIBDIR_NATIVE}/${QT_DIR_NAME}"
>  QMAKE_MKSPEC_PATH_TARGET = "${STAGING_LIBDIR}/${QT_DIR_NAME}"
> -- 
> 1.8.2
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20131121/e515addc/attachment-0002.sig>


More information about the Openembedded-devel mailing list