summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/meson/nativesdk-meson_0.50.0.bb
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2019-04-15 12:54:49 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-04-16 11:05:50 +0100
commit3f9a0f0c6c99364eb128ffc2db704e957f1c0bce (patch)
tree790bc4fb9c3ce338aa5e5b1b1073e37d5db33b80 /meta/recipes-devtools/meson/nativesdk-meson_0.50.0.bb
parent382a024d81c6f31556b9c7e548ff5f2d262f033e (diff)
downloadopenembedded-core-contrib-3f9a0f0c6c99364eb128ffc2db704e957f1c0bce.tar.gz
meson: update to 0.50.0
Remove 0001-Linker-rules-move-cross_args-in-front-of-output_args.patch as the upstream code has been completely reworked; if the issues pops up again, we need to re-write the fix. Rebase: 0001-Make-CPU-family-warnings-fatal.patch 0001-environment.py-detect-windows-also-if-the-system-str.patch 0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch 0002-Support-building-allarch-recipes-again.patch Add 0001-mesonbuild-environment.py-check-environment-for-vari.patch as particularly we set windows resource compiler through an environment variable WINDRES. This has replaced the 0001-modules-windows-split-WINDRES-env-variable.patch as the code has been refactored. Add 0001-mesonbuild-environment.py-do-not-determine-whether-a.patch for a more robust detection of cross builds. Replace many-cross.patch with corresponding backports from upcoming 0.50.1: 0007-mesonbuild-allow-multiple-cross-file-options.patch load-configs-generalise-search-path.patch Drop cross-libdir.patch as it has been merged upstream. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/meson/nativesdk-meson_0.50.0.bb')
-rw-r--r--meta/recipes-devtools/meson/nativesdk-meson_0.50.0.bb71
1 files changed, 71 insertions, 0 deletions
diff --git a/meta/recipes-devtools/meson/nativesdk-meson_0.50.0.bb b/meta/recipes-devtools/meson/nativesdk-meson_0.50.0.bb
new file mode 100644
index 0000000000..1549357a55
--- /dev/null
+++ b/meta/recipes-devtools/meson/nativesdk-meson_0.50.0.bb
@@ -0,0 +1,71 @@
+include meson.inc
+
+inherit nativesdk
+inherit siteinfo
+
+SRC_URI += "file://meson-setup.py \
+ file://meson-wrapper"
+
+def meson_endian(prefix, d):
+ arch, os = d.getVar(prefix + "_ARCH"), d.getVar(prefix + "_OS")
+ sitedata = siteinfo_data_for_machine(arch, os, d)
+ if "endian-little" in sitedata:
+ return "little"
+ elif "endian-big" in sitedata:
+ return "big"
+ else:
+ bb.fatal("Cannot determine endianism for %s-%s" % (arch, os))
+
+MESON_TOOLCHAIN_ARGS = "${BUILDSDK_CC_ARCH}${TOOLCHAIN_OPTIONS}"
+MESON_C_ARGS = "${MESON_TOOLCHAIN_ARGS} ${BUILDSDK_CFLAGS}"
+MESON_CPP_ARGS = "${MESON_TOOLCHAIN_ARGS} ${BUILDSDK_CXXFLAGS}"
+MESON_LINK_ARGS = "${MESON_TOOLCHAIN_ARGS} ${BUILDSDK_LDFLAGS}"
+
+# The cross file logic is similar but not identical to that in meson.bbclass,
+# since it's generating for an SDK rather than a cross-compile. Important
+# differences are:
+# - We can't set vars like CC, CXX, etc. yet because they will be filled in with
+# real paths by meson-setup.sh when the SDK is extracted.
+# - Some overrides aren't needed, since the SDK injects paths that take care of
+# them.
+do_install_append() {
+ install -d ${D}${datadir}/meson
+ cat >${D}${datadir}/meson/meson.cross.template <<EOF
+[binaries]
+c = @CC
+cpp = @CXX
+ar = @AR
+nm = @NM
+ld = @LD
+strip = @STRIP
+pkgconfig = 'pkg-config'
+
+[properties]
+needs_exe_wrapper = true
+c_args = @CFLAGS
+c_link_args = @LDFLAGS
+cpp_args = @CPPFLAGS
+cpp_link_args = @LDFLAGS
+
+[host_machine]
+system = '${SDK_OS}'
+cpu_family = '${SDK_ARCH}'
+cpu = '${SDK_ARCH}'
+endian = '${@meson_endian("SDK", d)}'
+EOF
+
+ install -d ${D}${SDKPATHNATIVE}/post-relocate-setup.d
+ install -m 0755 ${WORKDIR}/meson-setup.py ${D}${SDKPATHNATIVE}/post-relocate-setup.d/
+
+ # We need to wrap the real meson with a thin env setup wrapper.
+ mv ${D}${bindir}/meson ${D}${bindir}/meson.real
+ install -m 0755 ${WORKDIR}/meson-wrapper ${D}${bindir}/meson
+}
+
+RDEPENDS_${PN} += "\
+ nativesdk-ninja \
+ nativesdk-python3 \
+ nativesdk-python3-setuptools \
+ "
+
+FILES_${PN} += "${datadir}/meson ${SDKPATHNATIVE}"