diff options
author | David Seifert <soap@gentoo.org> | 2024-10-08 17:31:32 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2024-10-08 17:31:32 +0200 |
commit | 177a7f4ab73cddf91f2e9f19d97510bf027e0d0c (patch) | |
tree | 67246aea7d9d4aa186a6e0b74129f48763b5e45e /eclass | |
parent | ruby-fakegem.eclass: drop support for EAPI 5 and 6 (diff) | |
download | gentoo-177a7f4ab73cddf91f2e9f19d97510bf027e0d0c.tar.gz gentoo-177a7f4ab73cddf91f2e9f19d97510bf027e0d0c.tar.bz2 gentoo-177a7f4ab73cddf91f2e9f19d97510bf027e0d0c.zip |
ruby-ng.eclass: drop support for EAPI 6
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/ruby-ng.eclass | 81 |
1 files changed, 17 insertions, 64 deletions
diff --git a/eclass/ruby-ng.eclass b/eclass/ruby-ng.eclass index 2ef6d2247435..2a552094f60f 100644 --- a/eclass/ruby-ng.eclass +++ b/eclass/ruby-ng.eclass @@ -8,7 +8,7 @@ # Author: Diego E. Pettenò <flameeyes@gentoo.org> # Author: Alex Legler <a3li@gentoo.org> # Author: Hans de Graaff <graaff@gentoo.org> -# @SUPPORTED_EAPIS: 6 7 8 +# @SUPPORTED_EAPIS: 7 8 # @BLURB: An eclass for installing Ruby packages with proper support for multiple Ruby slots. # @DESCRIPTION: # The Ruby eclass is designed to allow an easier installation of Ruby packages @@ -66,19 +66,14 @@ # (e.g. selenium's firefox driver extension). When set this argument is # passed to "grep -E" to remove reporting of these shared objects. +if [[ -z ${_RUBY_NG_ECLASS} ]]; then +_RUBY_NG_ECLASS=1 + case ${EAPI} in - 6) - ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!" - ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI." - ;; 7|8) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac -if [[ -z ${_RUBY_NG_ECLASS} ]]; then -_RUBY_NG_ECLASS=1 - -[[ ${EAPI} == 6 ]] && inherit eqawarn toolchain-funcs inherit multilib ruby-utils # S is no longer automatically assigned when it doesn't exist. @@ -222,16 +217,7 @@ ruby_add_rdepend() { case $# in 1) ;; 2) - case ${EAPI} in - 6) - [[ "${GENTOO_DEV}" == "yes" ]] && eqawarn "You can now use the usual syntax in ruby_add_rdepend for $CATEGORY/$PF" - ruby_add_rdepend "$(_ruby_wrap_conditions "$1" "$2")" - return - ;; - *) - die "Use the usual depend syntax with a single argument in ruby_add_rdepend" - ;; - esac + die "Use the usual depend syntax with a single argument in ruby_add_rdepend" ;; *) die "bad number of arguments to $0" @@ -245,10 +231,7 @@ ruby_add_rdepend() { # Add the dependency as a test-dependency since we're going to # execute the code during test phase. - case ${EAPI} in - 6) DEPEND+=" test? ( ${_RUBY_ATOMS_SAMELIB_RESULT} )" ;; - *) BDEPEND+=" test? ( ${_RUBY_ATOMS_SAMELIB_RESULT} )" ;; - esac + BDEPEND+=" test? ( ${_RUBY_ATOMS_SAMELIB_RESULT} )" if ! has test "$IUSE"; then IUSE+=" test" RESTRICT+=" !test? ( test )" @@ -258,8 +241,8 @@ ruby_add_rdepend() { # @FUNCTION: ruby_add_bdepend # @USAGE: dependencies # @DESCRIPTION: -# Adds the specified dependencies, with use condition(s) to DEPEND (or -# BDEPEND in EAPI7), taking the current set of ruby targets into +# Adds the specified dependencies, with use condition(s) to BDEPEND, +# taking the current set of ruby targets into # account. This makes sure that all ruby dependencies of the package are # installed for the same ruby targets. Use this function for all ruby # dependencies instead of setting DEPEND or BDEPEND yourself. The list @@ -270,16 +253,7 @@ ruby_add_bdepend() { case $# in 1) ;; 2) - case ${EAPI} in - 6) - [[ "${GENTOO_DEV}" == "yes" ]] && eqawarn "You can now use the usual syntax in ruby_add_bdepend for $CATEGORY/$PF" - ruby_add_bdepend "$(_ruby_wrap_conditions "$1" "$2")" - return - ;; - *) - die "Use the usual depend syntax with a single argument in ruby_add_bdepend" - ;; - esac + die "Use the usual depend syntax with a single argument in ruby_add_bdepend" ;; *) die "bad number of arguments to $0" @@ -289,25 +263,16 @@ ruby_add_bdepend() { _ruby_set_globals_invalidate_if_stale _ruby_atoms_samelib "$1" - case ${EAPI} in - 6) DEPEND+=" ${_RUBY_ATOMS_SAMELIB_RESULT}" ;; - *) BDEPEND+=" ${_RUBY_ATOMS_SAMELIB_RESULT}" ;; - esac + BDEPEND+=" ${_RUBY_ATOMS_SAMELIB_RESULT}" } # @FUNCTION: ruby_add_depend # @USAGE: dependencies # @DESCRIPTION: -# Adds the specified dependencies to DEPEND in EAPI7, similar to -# ruby_add_bdepend. +# Adds the specified dependencies to DEPEND, similar to ruby_add_bdepend. ruby_add_depend() { debug-print-function ${FUNCNAME} "${@}" - case ${EAPI} in - 6) die "only available in EAPI 7 and newer" ;; - *) ;; - esac - case $# in 1) ;; *) die "bad number of arguments to $0" ;; @@ -369,7 +334,7 @@ _ruby_get_use_targets() { # confuse this function with ruby_implementation_depend(). # # @EXAMPLE: -# EAPI=7 +# EAPI=8 # RUBY_OPTIONAL=yes # # inherit ruby-ng @@ -421,10 +386,7 @@ if [[ ${RUBY_OPTIONAL} != yes ]]; then DEPEND+=" ${_RUBY_IMPLEMENTATIONS_DEPEND}" RDEPEND+=" ${_RUBY_IMPLEMENTATIONS_DEPEND}" REQUIRED_USE+=" || ( ${_RUBY_GET_USE_TARGETS} )" - case ${EAPI} in - 6) ;; - *) BDEPEND+=" ${_RUBY_IMPLEMENTATIONS_DEPEND}" ;; - esac + BDEPEND+=" ${_RUBY_IMPLEMENTATIONS_DEPEND}" fi _ruby_invoke_environment() { @@ -538,18 +500,9 @@ ruby-ng_src_unpack() { } _ruby_apply_patches() { - case ${EAPI} in - 6) - if [[ -n ${RUBY_PATCHES[@]} ]]; then - eqawarn "RUBY_PATCHES is no longer supported, use PATCHES instead" - fi - ;; - *) - if [[ -n ${RUBY_PATCHES[@]} ]]; then - die "RUBY_PATCHES is no longer supported, use PATCHES instead" - fi - ;; - esac + if [[ -n ${RUBY_PATCHES[@]} ]]; then + die "RUBY_PATCHES is no longer supported, use PATCHES instead" + fi # This is a special case: instead of executing just in the special # "all" environment, this will actually copy the effects on _all_ @@ -699,7 +652,7 @@ doruby() { insinto "${sitelibdir#${EPREFIX}}" insopts -m 0644 doins "$@" - ) || die "failed to install $@" + ) } # @FUNCTION: ruby_get_libruby |