[OE-core] [PATCH 1/9] meson: add a recipe and class from meta-oe

Peter Kjellerstedt peter.kjellerstedt at axis.com
Thu Dec 7 15:06:08 UTC 2017


> -----Original Message-----
> From: openembedded-core-bounces at lists.openembedded.org [mailto:openembedded-core-bounces at lists.openembedded.org] On Behalf Of Alexander Kanavin
> Sent: den 17 november 2017 13:03
> To: openembedded-core at lists.openembedded.org
> Subject: [OE-core] [PATCH 1/9] meson: add a recipe and class from meta-oe
> 
> The original recipe has been provided and improved by:
> 
> Ross Burton <ross.burton at intel.com>
> Ricardo Ribalda Delgado <ricardo.ribalda at gmail.com>
> Adam C. Foltzer <acfoltzer at galois.com>
> Peter Kjellerstedt <peter.kjellerstedt at axis.com>
> Linus Svensson <linussn at axis.com>
> 
> I have added  patches to fix up gtk-doc and
> gobject-introspection in cross-compilation environments,
> and also change the order of linker arguments to replicate
> autotools more closely (and fix linking errors in some corner
> cases).
> 
> Signed-off-by: Alexander Kanavin <alexander.kanavin at linux.intel.com>
> ---
>  meta/classes/meson.bbclass                         | 107 +++++++++++++++++++
>  ...s-move-cross_args-in-front-of-output_args.patch |  30 ++++++
>  ...ix-issues-that-arise-when-cross-compiling.patch | 113 +++++++++++++++++++++
>  ...rospection-determine-g-ir-scanner-and-g-i.patch |  41 ++++++++
>  meta/recipes-devtools/meson/meson_0.43.0.bb        |  20 ++++
>  5 files changed, 311 insertions(+)
>  create mode 100644 meta/classes/meson.bbclass
>  create mode 100644 meta/recipes-devtools/meson/meson/0001-Linker-rules-move-cross_args-in-front-of-output_args.patch
>  create mode 100644 meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
>  create mode 100644 meta/recipes-devtools/meson/meson/0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch
>  create mode 100644 meta/recipes-devtools/meson/meson_0.43.0.bb
> 
> diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass
> new file mode 100644
> index 00000000000..64553cd8f3d
> --- /dev/null
> +++ b/meta/classes/meson.bbclass
> @@ -0,0 +1,107 @@
> +inherit python3native
> +
> +DEPENDS_append = " meson-native ninja-native"
> +
> +# As Meson enforces out-of-tree builds we can just use cleandirs
> +B = "${WORKDIR}/build"
> +do_configure[cleandirs] = "${B}"
> +
> +# Where the meson.build build configuration is
> +MESON_SOURCEPATH = "${S}"
> +
> +# These variables in the environment override meson's *native* tools settings.
> +# We have to unset them, so that meson doesn't pick up the cross tools and
> +# use them for native builds.
> +unset CC
> +unset CXX
> +unset AR
> +
> +def noprefix(var, d):
> +    return d.getVar(var, True).replace(d.getVar('prefix', True) + '/', '', 1)

Remove the True argument to d.getVar().

> +
> +MESONOPTS = " --prefix ${prefix} \
> +              --bindir ${@noprefix('bindir', d)} \
> +              --sbindir ${@noprefix('sbindir', d)} \
> +              --datadir ${@noprefix('datadir', d)} \
> +              --libdir ${@noprefix('libdir', d)} \
> +              --libexecdir ${@noprefix('libexecdir', d)} \
> +              --includedir ${@noprefix('includedir', d)} \
> +              --mandir ${@noprefix('mandir', d)} \
> +              --infodir ${@noprefix('infodir', d)} \
> +              --sysconfdir ${sysconfdir} \
> +              --localstatedir ${localstatedir} \
> +              --sharedstatedir ${sharedstatedir}"
> +
> +MESON_C_ARGS = "${TARGET_CC_ARCH}${TOOLCHAIN_OPTIONS}"
> +MESON_LINK_ARGS = "${MESON_C_ARGS} ${LDFLAGS}"
> +
> +MESON_HOST_ENDIAN = "${@bb.utils.contains('SITEINFO_ENDIANNESS', 'be','big', 'little', d)}"
> +MESON_TARGET_ENDIAN = "${@bb.utils.contains('TUNE_FEATURES', 'bigendian', 'big', 'little', d)}"
> +
> +EXTRA_OEMESON += "${PACKAGECONFIG_CONFARGS}"
> +
> +MESON_CROSS_FILE = ""
> +MESON_CROSS_FILE_class-target = "--cross-file ${WORKDIR}/meson.cross"
> +
> +def meson_array(var, d):
> +    return "', '".join(d.getVar(var, True).split()).join(("'", "'"))

Remove True here as well.

//Peter




More information about the Openembedded-core mailing list