eclass/meson: Sync with Gentoo

It's from Gentoo commit 89fa08dd8703bfd854d6a77a60bbd270ae8d803d.
This commit is contained in:
Flatcar Buildbot 2023-08-07 07:12:20 +00:00 committed by Krzesimir Nowak
parent 3497926308
commit 41942b21eb

View File

@ -3,8 +3,7 @@
# @ECLASS: meson.eclass
# @MAINTAINER:
# William Hubbs <williamh@gentoo.org>
# Mike Gilbert <floppym@gentoo.org>
# base-system@gentoo.org
# @SUPPORTED_EAPIS: 7 8
# @BLURB: common ebuild functions for meson-based packages
# @DESCRIPTION:
@ -55,6 +54,12 @@ BDEPEND=">=dev-util/meson-0.62.2
# Build directory, location where all generated files should be placed.
# If this isn't set, it defaults to ${WORKDIR}/${P}-build.
# @ECLASS_VARIABLE: MESON_VERBOSE
# @USER_VARIABLE
# @DESCRIPTION:
# Set to OFF to disable verbose messages during compilation
: "${MESON_VERBOSE:=ON}"
# @ECLASS_VARIABLE: EMESON_BUILDTYPE
# @DESCRIPTION:
# The buildtype value to pass to meson setup.
@ -385,10 +390,15 @@ meson_src_compile() {
-C "${BUILD_DIR}"
--jobs "$(makeopts_jobs "${MAKEOPTS}" 0)"
--load-average "$(makeopts_loadavg "${MAKEOPTS}" 0)"
--verbose
"$@"
)
case ${MESON_VERBOSE} in
OFF) ;;
*) mesoncompileargs+=( --verbose ) ;;
esac
mesoncompileargs+=( "$@" )
set -- meson compile "${mesoncompileargs[@]}"
echo "$@" >&2
"$@" || die "compile failed"