From b2132686b0be71e5c57eb1214bb7f125b936f9c1 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 30 Jan 2024 14:38:21 +0100 Subject: [PATCH] eclass/lua-utils: Sync with Gentoo It's from Gentoo commit 2cba2db27919bc449ed2a7bf7ed3259c6b96e65f. --- .../portage-stable/eclass/lua-utils.eclass | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/lua-utils.eclass b/sdk_container/src/third_party/portage-stable/eclass/lua-utils.eclass index 3b24f383d7..0ff36734dc 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/lua-utils.eclass +++ b/sdk_container/src/third_party/portage-stable/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,16 +18,16 @@ # 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 -# @ECLASS-VARIABLE: _LUA_ALL_IMPLS +# @ECLASS_VARIABLE: _LUA_ALL_IMPLS # @INTERNAL # @DESCRIPTION: # All supported Lua implementations, most preferred last @@ -39,7 +39,7 @@ _LUA_ALL_IMPLS=( ) readonly _LUA_ALL_IMPLS -# @ECLASS-VARIABLE: _LUA_HISTORICAL_IMPLS +# @ECLASS_VARIABLE: _LUA_HISTORICAL_IMPLS # @INTERNAL # @DESCRIPTION: # All historical Lua implementations that are no longer supported. @@ -171,7 +171,7 @@ _lua_wrapper_setup() { export PATH PKG_CONFIG_PATH } -# @ECLASS-VARIABLE: ELUA +# @ECLASS_VARIABLE: ELUA # @DEFAULT_UNSET # @DESCRIPTION: # The executable name of the current Lua interpreter. This variable is set @@ -182,7 +182,7 @@ _lua_wrapper_setup() { # lua5.1 # @CODE -# @ECLASS-VARIABLE: LUA +# @ECLASS_VARIABLE: LUA # @DEFAULT_UNSET # @DESCRIPTION: # The absolute path to the current Lua interpreter. This variable is set @@ -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} ]]; then - if [[ ! ${_LUA_SINGLE_R0} ]]; then + if [[ ! ${_LUA_SINGLE_ECLASS} ]]; then test_deps+=" ${test_pkg}[${LUA_USEDEP}]" else test_deps+=" $(lua_gen_cond_dep " @@ -536,5 +536,4 @@ lua_get_version() { echo "${LUA_VERSION}" } -_LUA_UTILS_R0=1 fi