]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
classes/meson: clean up path arguments
authorRoss Burton <ross.burton@arm.com>
Thu, 11 Dec 2025 17:55:44 +0000 (17:55 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 15 Dec 2025 18:00:31 +0000 (18:00 +0000)
The --bindir (etc.) arguments can be absolute paths, so there's no need
to work out the relative paths and we can instead pass them directly.

Also re-order the options to match the order in the Meson manual, for
ease of checking that we pass all the paths that Meson uses.

Notably, we don't set --licensedir, but we handle license manifests
ourselves.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/meson.bbclass

index 4cf5de6753e87245bd2adea04132caebf21edcc2..0709a1313a4c7cbf661e7e8e5a762ff2ae301775 100644 (file)
@@ -25,24 +25,22 @@ MESON_TARGET ?= ""
 # Since 0.60.0 you can specify custom tags to install
 MESON_INSTALL_TAGS ?= ""
 
-def noprefix(var, d):
-    return d.getVar(var).replace(d.getVar('prefix') + '/', '', 1)
-
 MESON_BUILDTYPE ?= "${@oe.utils.vartrue('DEBUG_BUILD', 'debug', 'plain', d)}"
 MESON_BUILDTYPE[vardeps] += "DEBUG_BUILD"
-MESONOPTS = " --prefix ${prefix} \
-              --buildtype ${MESON_BUILDTYPE} \
-              --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} \
+
+MESONOPTS = " --buildtype ${MESON_BUILDTYPE} \
+              --prefix ${prefix} \
+              --bindir ${bindir} \
+              --datadir ${datadir} \
+              --includedir ${includedir} \
+              --infodir ${infodir} \
+              --libdir ${libdir} \
+              --libexecdir ${libexecdir} \
               --localstatedir ${localstatedir} \
+              --mandir ${mandir} \
+              --sbindir ${sbindir} \
               --sharedstatedir ${sharedstatedir} \
+              --sysconfdir ${sysconfdir} \
               --wrap-mode nodownload \
               --native-file ${WORKDIR}/meson.native"