summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2023-03-17 23:04:31 +0100
committerDavid Seifert <soap@gentoo.org>2023-03-17 23:04:31 +0100
commit2cba2db27919bc449ed2a7bf7ed3259c6b96e65f (patch)
treec89a0929ca3e7cc95c737085614214e89450c999 /eclass/lua-utils.eclass
parentxdg.eclass: remove EAPI 5 (diff)
downloadgentoo-2cba2db27919bc449ed2a7bf7ed3259c6b96e65f.tar.gz
gentoo-2cba2db27919bc449ed2a7bf7ed3259c6b96e65f.tar.bz2
gentoo-2cba2db27919bc449ed2a7bf7ed3259c6b96e65f.zip
eclass: standardize prologue/epilogue
Closes: https://github.com/gentoo/gentoo/pull/30061 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'eclass/lua-utils.eclass')
-rw-r--r--eclass/lua-utils.eclass13
1 files changed, 6 insertions, 7 deletions
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} ]]; 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