| SRC_URI += "file://meson-setup.py \ |
| # 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 |
| # - 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 |
| install -d ${D}${datadir}/meson |
| cat >${D}${datadir}/meson/meson.cross.template <<EOF |
| sys_root = @OECORE_TARGET_SYSROOT |
| cpu_family = '${@meson_cpu_family("SDK_ARCH", d)}' |
| endian = '${@meson_endian("SDK", d)}' |
| 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 |
| nativesdk-python3-setuptools \ |
| FILES:${PN} += "${datadir}/meson ${SDKPATHNATIVE}" |