summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/meson/nativesdk-meson_0.51.1.bb
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2019-07-30 17:54:25 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-08-03 23:56:00 +0100
commit0aa7a34141807ea73d31374e1431bb0bc78b8f11 (patch)
tree05be17d5b1882bbe10778d729194103c3fe37174 /meta/recipes-devtools/meson/nativesdk-meson_0.51.1.bb
parenta76b6b317c9b9d8aef348f4639de8b0224d27a4d (diff)
downloadpoky-0aa7a34141807ea73d31374e1431bb0bc78b8f11.tar.gz
meson: update 0.50.1 -> 0.51.1
Drop backports. Rebase other patches. (From OE-Core rev: 3251ce439ea164fcf230dcede06da1a05b5c6775) 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.51.1.bb')
-rw-r--r--meta/recipes-devtools/meson/nativesdk-meson_0.51.1.bb66
1 files changed, 66 insertions, 0 deletions
diff --git a/meta/recipes-devtools/meson/nativesdk-meson_0.51.1.bb b/meta/recipes-devtools/meson/nativesdk-meson_0.51.1.bb
new file mode 100644
index 0000000000..1756f342ce
--- /dev/null
+++ b/meta/recipes-devtools/meson/nativesdk-meson_0.51.1.bb
@@ -0,0 +1,66 @@
1include meson.inc
2
3inherit nativesdk
4inherit siteinfo
5
6SRC_URI += "file://meson-setup.py \
7 file://meson-wrapper"
8
9def meson_endian(prefix, d):
10 arch, os = d.getVar(prefix + "_ARCH"), d.getVar(prefix + "_OS")
11 sitedata = siteinfo_data_for_machine(arch, os, d)
12 if "endian-little" in sitedata:
13 return "little"
14 elif "endian-big" in sitedata:
15 return "big"
16 else:
17 bb.fatal("Cannot determine endianism for %s-%s" % (arch, os))
18
19# The cross file logic is similar but not identical to that in meson.bbclass,
20# since it's generating for an SDK rather than a cross-compile. Important
21# differences are:
22# - We can't set vars like CC, CXX, etc. yet because they will be filled in with
23# real paths by meson-setup.sh when the SDK is extracted.
24# - Some overrides aren't needed, since the SDK injects paths that take care of
25# them.
26do_install_append() {
27 install -d ${D}${datadir}/meson
28 cat >${D}${datadir}/meson/meson.cross.template <<EOF
29[binaries]
30c = @CC
31cpp = @CXX
32ar = @AR
33nm = @NM
34ld = @LD
35strip = @STRIP
36pkgconfig = 'pkg-config'
37
38[properties]
39needs_exe_wrapper = true
40c_args = @CFLAGS
41c_link_args = @LDFLAGS
42cpp_args = @CPPFLAGS
43cpp_link_args = @LDFLAGS
44
45[host_machine]
46system = '${SDK_OS}'
47cpu_family = '${SDK_ARCH}'
48cpu = '${SDK_ARCH}'
49endian = '${@meson_endian("SDK", d)}'
50EOF
51
52 install -d ${D}${SDKPATHNATIVE}/post-relocate-setup.d
53 install -m 0755 ${WORKDIR}/meson-setup.py ${D}${SDKPATHNATIVE}/post-relocate-setup.d/
54
55 # We need to wrap the real meson with a thin env setup wrapper.
56 mv ${D}${bindir}/meson ${D}${bindir}/meson.real
57 install -m 0755 ${WORKDIR}/meson-wrapper ${D}${bindir}/meson
58}
59
60RDEPENDS_${PN} += "\
61 nativesdk-ninja \
62 nativesdk-python3 \
63 nativesdk-python3-setuptools \
64 "
65
66FILES_${PN} += "${datadir}/meson ${SDKPATHNATIVE}"