public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH] lua*.eclass: standardize the guard variables
@ 2021-07-06 21:59 William Hubbs
  2021-07-06 22:04 ` Sam James
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: William Hubbs @ 2021-07-06 21:59 UTC (permalink / raw
  To: gentoo-dev; +Cc: sam, William Hubbs

Change the _R0 suffix on these variable names to _ECLASS.
Signed-off-by: William Hubbs <williamh@gentoo.org>
---
 eclass/lua-single.eclass | 8 ++++----
 eclass/lua-utils.eclass  | 8 ++++----
 eclass/lua.eclass        | 8 ++++----
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/eclass/lua-single.eclass b/eclass/lua-single.eclass
index ab4fdb3c75a..8b3692b2f18 100644
--- a/eclass/lua-single.eclass
+++ b/eclass/lua-single.eclass
@@ -68,9 +68,9 @@ case ${EAPI} in
 	*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
-if [[ ! ${_LUA_SINGLE_R0} ]]; then
+if [[ ! ${_LUA_SINGLE_ECLASS} ]]; then
 
-if [[ ${_LUA_R0} ]]; then
+if [[ ${_LUA_ECLASS} ]]; then
 	die 'lua-single.eclass cannot be used with lua.eclass.'
 fi
 
@@ -275,7 +275,7 @@ _lua_single_set_globals() {
 _lua_single_set_globals
 unset -f _lua_single_set_globals
 
-if [[ ! ${_LUA_SINGLE_R0} ]]; then
+if [[ ! ${_LUA_SINGLE_ECLASS} ]]; then
 
 # @FUNCTION: _lua_gen_usedep
 # @USAGE: [<pattern>...]
@@ -531,5 +531,5 @@ lua-single_pkg_setup() {
 	[[ ${MERGE_TYPE} != binary ]] && lua_setup
 }
 
-_LUA_SINGLE_R0=1
+_LUA_SINGLE_ECLASS=1
 fi
diff --git a/eclass/lua-utils.eclass b/eclass/lua-utils.eclass
index 278bbca58a3..52ba290e544 100644
--- a/eclass/lua-utils.eclass
+++ b/eclass/lua-utils.eclass
@@ -23,7 +23,7 @@ case ${EAPI} in
 	*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
-if [[ ! ${_LUA_UTILS_R0} ]]; then
+if [[ ! ${_LUA_UTILS_ECLASS} ]]; then
 
 inherit toolchain-funcs
 
@@ -376,7 +376,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}\"
 				}"
@@ -395,7 +395,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 "
@@ -528,5 +528,5 @@ lua_get_version() {
 	echo "${LUA_VERSION}"
 }
 
-_LUA_UTILS_R0=1
+_LUA_UTILS_ECLASS=1
 fi
diff --git a/eclass/lua.eclass b/eclass/lua.eclass
index e9a5c117560..d6fe7201779 100644
--- a/eclass/lua.eclass
+++ b/eclass/lua.eclass
@@ -56,9 +56,9 @@ case ${EAPI} in
 	*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
-if [[ ! ${_LUA_R0} ]]; then
+if [[ ! ${_LUA_ECLASS} ]]; then
 
-if [[ ${_LUA_SINGLE_R0} ]]; then
+if [[ ${_LUA_SINGLE_ECLASS} ]]; then
 	die 'lua.eclass cannot be used with lua-single.eclass.'
 fi
 
@@ -196,7 +196,7 @@ fi
 # lua_targets_lua5-1(-)?,lua_targets_lua5-2(-)?
 # @CODE
 
-if [[ ! ${_LUA_R0} ]]; then
+if [[ ! ${_LUA_ECLASS} ]]; then
 
 # @FUNCTION: _lua_validate_useflags
 # @INTERNAL
@@ -313,7 +313,7 @@ lua_foreach_impl() {
 	multibuild_foreach_variant _lua_multibuild_wrapper "${@}"
 }
 
-_LUA_R0=1
+_LUA_ECLASS=1
 fi
 
 # @FUNCTION: _lua_set_globals
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [gentoo-dev] [PATCH] lua*.eclass: standardize the guard variables
@ 2021-07-10 21:55 William Hubbs
  2021-07-12 10:24 ` Marek Szuba
  0 siblings, 1 reply; 8+ messages in thread
From: William Hubbs @ 2021-07-10 21:55 UTC (permalink / raw
  To: gentoo-dev; +Cc: William Hubbs

Change the _R0 suffix on these variable names to _ECLASS.
Signed-off-by: William Hubbs <williamh@gentoo.org>
---
 eclass/lua-single.eclass | 10 +++-------
 eclass/lua-utils.eclass  |  8 ++++----
 eclass/lua.eclass        | 12 +++++-------
 3 files changed, 12 insertions(+), 18 deletions(-)

diff --git a/eclass/lua-single.eclass b/eclass/lua-single.eclass
index ab4fdb3c75a..5e1ee936c12 100644
--- a/eclass/lua-single.eclass
+++ b/eclass/lua-single.eclass
@@ -68,16 +68,15 @@ case ${EAPI} in
 	*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
-if [[ ! ${_LUA_SINGLE_R0} ]]; then
+if [[ ! ${_LUA_SINGLE_ECLASS} ]]; then
+_LUA_SINGLE_ECLASS=1
 
-if [[ ${_LUA_R0} ]]; then
+if [[ ${_LUA_ECLASS} ]]; then
 	die 'lua-single.eclass cannot be used with lua.eclass.'
 fi
 
 inherit lua-utils
 
-fi
-
 EXPORT_FUNCTIONS pkg_setup
 
 # @ECLASS-VARIABLE: LUA_COMPAT
@@ -275,8 +274,6 @@ _lua_single_set_globals() {
 _lua_single_set_globals
 unset -f _lua_single_set_globals
 
-if [[ ! ${_LUA_SINGLE_R0} ]]; then
-
 # @FUNCTION: _lua_gen_usedep
 # @USAGE: [<pattern>...]
 # @INTERNAL
@@ -531,5 +528,4 @@ lua-single_pkg_setup() {
 	[[ ${MERGE_TYPE} != binary ]] && lua_setup
 }
 
-_LUA_SINGLE_R0=1
 fi
diff --git a/eclass/lua-utils.eclass b/eclass/lua-utils.eclass
index 278bbca58a3..52ba290e544 100644
--- a/eclass/lua-utils.eclass
+++ b/eclass/lua-utils.eclass
@@ -23,7 +23,7 @@ case ${EAPI} in
 	*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
-if [[ ! ${_LUA_UTILS_R0} ]]; then
+if [[ ! ${_LUA_UTILS_ECLASS} ]]; then
 
 inherit toolchain-funcs
 
@@ -376,7 +376,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}\"
 				}"
@@ -395,7 +395,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 "
@@ -528,5 +528,5 @@ lua_get_version() {
 	echo "${LUA_VERSION}"
 }
 
-_LUA_UTILS_R0=1
+_LUA_UTILS_ECLASS=1
 fi
diff --git a/eclass/lua.eclass b/eclass/lua.eclass
index e9a5c117560..3b0816f9834 100644
--- a/eclass/lua.eclass
+++ b/eclass/lua.eclass
@@ -56,9 +56,10 @@ case ${EAPI} in
 	*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
-if [[ ! ${_LUA_R0} ]]; then
+if [[ ! ${_LUA_ECLASS} ]]; then
+_LUA_ECLASS=1
 
-if [[ ${_LUA_SINGLE_R0} ]]; then
+if [[ ${_LUA_SINGLE_ECLASS} ]]; then
 	die 'lua.eclass cannot be used with lua-single.eclass.'
 fi
 
@@ -196,8 +197,6 @@ fi
 # lua_targets_lua5-1(-)?,lua_targets_lua5-2(-)?
 # @CODE
 
-if [[ ! ${_LUA_R0} ]]; then
-
 # @FUNCTION: _lua_validate_useflags
 # @INTERNAL
 # @DESCRIPTION:
@@ -313,9 +312,6 @@ lua_foreach_impl() {
 	multibuild_foreach_variant _lua_multibuild_wrapper "${@}"
 }
 
-_LUA_R0=1
-fi
-
 # @FUNCTION: _lua_set_globals
 # @INTERNAL
 # @DESCRIPTION:
@@ -374,3 +370,5 @@ _lua_set_globals() {
 
 _lua_set_globals
 unset -f _lua_set_globals
+
+fi
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-07-14 11:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-06 21:59 [gentoo-dev] [PATCH] lua*.eclass: standardize the guard variables William Hubbs
2021-07-06 22:04 ` Sam James
2021-07-07  6:31 ` Ulrich Mueller
2021-07-07 12:34 ` Marek Szuba
  -- strict thread matches above, loose matches on Subject: below --
2021-07-10 21:55 William Hubbs
2021-07-12 10:24 ` Marek Szuba
2021-07-13 17:35   ` William Hubbs
2021-07-14 11:18     ` Marek Szuba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox