[oe-commits] [openembedded-core] 09/23: meson.bbclass: add MESON_CROSS_EXTRA_PROPS to inject properties into meson.cross

git at git.openembedded.org git at git.openembedded.org
Wed May 8 22:37:07 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 670b899d9fa03b40f1bc8633c4931a02039c8297
Author: Andreas Müller <schnitzeltony at gmail.com>
AuthorDate: Wed May 8 22:13:35 2019 +0200

    meson.bbclass: add MESON_CROSS_EXTRA_PROPS to inject properties into meson.cross
    
    Some projects rely on (cross)specific properties e.g [1]. By setting
    
    MESON_CROSS_EXTRA_PROPS="var1='value1' var2=true"
    
    the required properties can be passed to meson.build. The contents of
    MESON_CROSS_EXTRA_PROPS behave same as known by e.g EXTRA_OEMESON.
    
    [1] https://gitlab.gnome.org/GNOME/tracker/blob/master/meson.build#L91
    
    Signed-off-by: Andreas Müller <schnitzeltony at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/meson.bbclass | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass
index 115d1ae..b9cd1de 100644
--- a/meta/classes/meson.bbclass
+++ b/meta/classes/meson.bbclass
@@ -45,6 +45,11 @@ def meson_array(var, d):
     items = d.getVar(var).split()
     return repr(items[0] if len(items) == 1 else items)
 
+def meson_cross_extra_properties(d):
+    cross_properties = "\n"
+    cross_properties = cross_properties.join((d.getVar('MESON_CROSS_EXTRA_PROPS') or '').split())
+    return cross_properties
+
 # Map our ARCH values to what Meson expects:
 # http://mesonbuild.com/Reference-tables.html#cpu-families
 def meson_cpu_family(var, d):
@@ -76,7 +81,7 @@ def meson_endian(prefix, d):
         bb.fatal("Cannot determine endianism for %s-%s" % (arch, os))
 
 addtask write_config before do_configure
-do_write_config[vardeps] += "MESON_C_ARGS MESON_CPP_ARGS MESON_LINK_ARGS CC CXX LD AR NM STRIP READELF"
+do_write_config[vardeps] += "MESON_C_ARGS MESON_CPP_ARGS MESON_LINK_ARGS MESON_CROSS_EXTRA_PROPS CC CXX LD AR NM STRIP READELF"
 do_write_config() {
     # This needs to be Py to split the args into single-element lists
     cat >${WORKDIR}/meson.cross <<EOF
@@ -98,6 +103,7 @@ c_link_args = ${@meson_array('MESON_LINK_ARGS', d)}
 cpp_args = ${@meson_array('MESON_CPP_ARGS', d)}
 cpp_link_args = ${@meson_array('MESON_LINK_ARGS', d)}
 gtkdoc_exe_wrapper = '${B}/gtkdoc-qemuwrapper'
+${@meson_cross_extra_properties(d)}
 
 [host_machine]
 system = '${HOST_OS}'

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list