• [gentoo-dev] [PATCH 1/2] meson.eclass: use edo

    From Sam James@21:1/5 to All on Sun Apr 6 07:40:01 2025
    Noticed this when looking to add something else to meson_src_test. I don't think the ${rv} bits can really be cleaned up (at least to a useful degree) because we want the return value of the function to be ${rv}.

    (We broke that in the past too so would rather be careful; see afe0521495aeed0a22a3656e7bad193fba39805e).

    Signed-off-by: Sam James <sam@gentoo.org>
    ---
    eclass/meson.eclass | 15 +++++----------
    1 file changed, 5 insertions(+), 10 deletions(-)

    diff --git a/eclass/meson.eclass b/eclass/meson.eclass
    index a2bc5537e4589..382c80ec08214 100644
    --- a/eclass/meson.eclass
    +++ b/eclass/meson.eclass
    @@ -1,4 +1,4 @@
    -# Copyright 2017-2024 Gentoo Authors
    +# Copyright 2017-2025 Gentoo Authors
    # Distributed under the terms of the GNU General Public License v2

    # @ECLASS: meson.eclass
    @@ -41,7 +41,7 @@ esac
    if [[ -z ${_MESON_ECLASS} ]]; then
    _MESON_ECLASS=1

    -inherit flag-o-matic multiprocessing ninja-utils python-utils-r1 toolchain-funcs
    +inherit edo flag-o-matic multiprocessing ninja-utils python-utils-r1 toolchain-funcs

    BDEPEND=">=dev-build/meson-1.2.3
    ${NINJA_DEPEND}
    @@ -423,8 +423,7 @@ meson_src_configure() {
    )

    export -n {C,CPP,CXX,F,OBJC,OBJCXX,LD}FLAGS PKG_CONFIG_{LIBDIR,PATH}
    - echo meson setup "${MESONARGS[@]}" >&2
    - meson setup "${MESONARGS[@]}"
    + nonfatal edo meson setup "${MESONARGS[@]}"
    )
    local rv=$?