• [gentoo-dev] [PATCH 22/22] eclass: standardize prologue/epilogue (2/2)

    From David Seifert@21:1/5 to All on Tue Mar 14 21:10:02 2023
    [continued from previous message]

    diff --git a/eclass/lua-utils.eclass b/eclass/lua-utils.eclass
    index 475bd993894b..0ff36734dc8f 100644
    --- a/eclass/lua-utils.eclass
    +++ b/eclass/lua-utils.eclass
    @@ -1,4 +1,4 @@
    -# Copyright 1999-2021 Gentoo Authors
    +# Copyright 1999-2023 Gentoo Authors
    # Distributed under the terms of the GNU General Public License v2

    # @ECLASS: lua-utils.eclass
    @@ -18,12 +18,12 @@
    # functions. It can be inherited safely.

    case ${EAPI} in
    - 7|8)
    - ;;
    + 7|8) ;;
    *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
    esac

    -if [[ ! ${_LUA_UTILS_R0} ]]; then
    +if [[ -z ${_LUA_UTILS_ECLASS} ]]; then
    +_LUA_UTILS_ECLASS=1

    inherit toolchain-funcs

    @@ -384,7 +384,7 @@ lua_enable_tests() {
    busted)
    test_directory="${2:-spec}"
    test_pkg="dev-lua/busted"
    - if [[ ! ${_LUA_SINGLE_R0} ]]; then
    + if [[ ! ${_LUA_SINGLE_ECLASS} ]]; then
    eval "lua_src_test() {
    busted --lua=\"\${ELUA}\" --output=\"plainTerminal\" \"${test_directory}\" || die \"Tests fail with \${ELUA}\"
    }"
    @@ -403,7 +403,7 @@ lua_enable_tests() {

    local test_deps=${RDEPEND}
    if [[ -n ${test_pkg} ]]; the