This was requested to allow users to pass aribtrary arguments to meson.
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
# Optional meson test arguments as Bash array; this should be defined before
# calling meson_src_test.
+# @VARIABLE: MYMESONARGS
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# User-controlled environment variable containing arguments to be passed to
+# meson in meson_src_configure.
read -d '' __MESON_ARRAY_PARSER <<"EOF"
import shlex
BUILD_DIR="${BUILD_DIR:-${WORKDIR}/${P}-build}"
+ # Handle quoted whitespace
+ eval "local -a MYMESONARGS=( ${MYMESONARGS} )"
+
mesonargs+=(
# Arguments from ebuild
"${emesonargs[@]}"
# Arguments passed to this function
"$@"
+ # Arguments from user
+ "${MYMESONARGS[@]}"
+
# Source directory
"${EMESON_SOURCE:-${S}}"