diff options
| author | Ross Burton <ross.burton@arm.com> | 2025-05-10 09:43:54 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-05-12 22:01:55 +0100 |
| commit | 5c194e28b9363955f518889a2843e16c8e1123bc (patch) | |
| tree | 0fb12e208eb20ba6001700d9749e2c64c98578bd | |
| parent | e07389d1be646e6eeb3dbbb63beb39ef83c78e96 (diff) | |
| download | poky-5c194e28b9363955f518889a2843e16c8e1123bc.tar.gz | |
meson: split template generation
Split the template generation function into two functions, one for cross
and another for native.
(From OE-Core rev: 3c4d2fc7ef38042737f64e9e44355839ab551b55)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-devtools/meson/meson_1.8.0.bb | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/meta/recipes-devtools/meson/meson_1.8.0.bb b/meta/recipes-devtools/meson/meson_1.8.0.bb index eb88890cd7..1d1011597b 100644 --- a/meta/recipes-devtools/meson/meson_1.8.0.bb +++ b/meta/recipes-devtools/meson/meson_1.8.0.bb | |||
| @@ -65,7 +65,7 @@ def generate_native_link_template(d): | |||
| 65 | 65 | ||
| 66 | return repr(val) | 66 | return repr(val) |
| 67 | 67 | ||
| 68 | install_templates() { | 68 | install_native_template() { |
| 69 | install -d ${D}${datadir}/meson | 69 | install -d ${D}${datadir}/meson |
| 70 | 70 | ||
| 71 | cat >${D}${datadir}/meson/meson.native.template <<EOF | 71 | cat >${D}${datadir}/meson/meson.native.template <<EOF |
| @@ -83,9 +83,14 @@ c_args = ['-isystem@{OECORE_NATIVE_SYSROOT}${includedir_native}' , ${@var_list2s | |||
| 83 | c_link_args = ${@generate_native_link_template(d)} | 83 | c_link_args = ${@generate_native_link_template(d)} |
| 84 | cpp_args = ['-isystem@{OECORE_NATIVE_SYSROOT}${includedir_native}' , ${@var_list2str('BUILD_OPTIMIZATION', d)}] | 84 | cpp_args = ['-isystem@{OECORE_NATIVE_SYSROOT}${includedir_native}' , ${@var_list2str('BUILD_OPTIMIZATION', d)}] |
| 85 | cpp_link_args = ${@generate_native_link_template(d)} | 85 | cpp_link_args = ${@generate_native_link_template(d)} |
| 86 | |||
| 86 | [properties] | 87 | [properties] |
| 87 | sys_root = '@OECORE_NATIVE_SYSROOT' | 88 | sys_root = '@OECORE_NATIVE_SYSROOT' |
| 88 | EOF | 89 | EOF |
| 90 | } | ||
| 91 | |||
| 92 | install_cross_template() { | ||
| 93 | install -d ${D}${datadir}/meson | ||
| 89 | 94 | ||
| 90 | cat >${D}${datadir}/meson/meson.cross.template <<EOF | 95 | cat >${D}${datadir}/meson/meson.cross.template <<EOF |
| 91 | [binaries] | 96 | [binaries] |
| @@ -115,7 +120,8 @@ EOF | |||
| 115 | } | 120 | } |
| 116 | 121 | ||
| 117 | do_install:append:class-nativesdk() { | 122 | do_install:append:class-nativesdk() { |
| 118 | install_templates | 123 | install_native_template |
| 124 | install_cross_template | ||
| 119 | 125 | ||
| 120 | install -d ${D}${SDKPATHNATIVE}/post-relocate-setup.d | 126 | install -d ${D}${SDKPATHNATIVE}/post-relocate-setup.d |
| 121 | install -m 0755 ${UNPACKDIR}/meson-setup.py ${D}${SDKPATHNATIVE}/post-relocate-setup.d/ | 127 | install -m 0755 ${UNPACKDIR}/meson-setup.py ${D}${SDKPATHNATIVE}/post-relocate-setup.d/ |
| @@ -128,7 +134,8 @@ do_install:append:class-nativesdk() { | |||
| 128 | FILES:${PN}:append:class-nativesdk = "${datadir}/meson ${SDKPATHNATIVE}" | 134 | FILES:${PN}:append:class-nativesdk = "${datadir}/meson ${SDKPATHNATIVE}" |
| 129 | 135 | ||
| 130 | do_install:append:class-native() { | 136 | do_install:append:class-native() { |
| 131 | install_templates | 137 | install_native_template |
| 138 | install_cross_template | ||
| 132 | 139 | ||
| 133 | install -d ${D}${datadir}/post-relocate-setup.d | 140 | install -d ${D}${datadir}/post-relocate-setup.d |
| 134 | install -m 0755 ${UNPACKDIR}/meson-setup.py ${D}${datadir}/post-relocate-setup.d/ | 141 | install -m 0755 ${UNPACKDIR}/meson-setup.py ${D}${datadir}/post-relocate-setup.d/ |
