From 2cba2db27919bc449ed2a7bf7ed3259c6b96e65f Mon Sep 17 00:00:00 2001 From: David Seifert Date: Fri, 17 Mar 2023 23:04:31 +0100 Subject: eclass: standardize prologue/epilogue Closes: https://github.com/gentoo/gentoo/pull/30061 Signed-off-by: David Seifert --- eclass/ruby-ng.eclass | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) (limited to 'eclass/ruby-ng.eclass') diff --git a/eclass/ruby-ng.eclass b/eclass/ruby-ng.eclass index d6b3d2a0669a..67c22d518a31 100644 --- a/eclass/ruby-ng.eclass +++ b/eclass/ruby-ng.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: ruby-ng.eclass @@ -67,26 +67,19 @@ # passed to "grep -E" to remove reporting of these shared objects. case ${EAPI} in - 6) - inherit eqawarn estack toolchain-funcs - ;; - *) - inherit estack - ;; + 6|7|8) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac -inherit multilib ruby-utils +if [[ -z ${_RUBY_NG_ECLASS} ]]; then +_RUBY_NG_ECLASS=1 -EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_test src_install pkg_setup +[[ ${EAPI} == 6 ]] && inherit eqawarn toolchain-funcs +inherit estack multilib ruby-utils # S is no longer automatically assigned when it doesn't exist. S="${WORKDIR}" -case ${EAPI} in - 6|7|8) ;; - *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; -esac - # @FUNCTION: ruby_implementation_depend # @USAGE: target [comparator [version]] # @RETURN: Package atom of a Ruby implementation to be used in dependencies. @@ -799,3 +792,7 @@ ruby-ng_testrb-2() { ${RUBY} -S testrb-2 ${testrb_params} "$@" || die "testrb-2 failed" } + +fi + +EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_test src_install pkg_setup -- cgit v1.2.3