From 07eb8266fec77a60dc822b511b61a9e2afbc0c0d Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 30 Jan 2024 14:39:01 +0100 Subject: [PATCH] eclass/ruby-utils: Sync with Gentoo It's from Gentoo commit d18249523bf04913d041c7b28e3104a76db14553. --- .../portage-stable/eclass/ruby-utils.eclass | 56 ++----------------- 1 file changed, 6 insertions(+), 50 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/ruby-utils.eclass b/sdk_container/src/third_party/portage-stable/eclass/ruby-utils.eclass index 2506aee255..789f57ce25 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/ruby-utils.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/ruby-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: ruby-utils.eclass @@ -22,8 +22,7 @@ esac if [[ ! ${_RUBY_UTILS} ]]; then - -# @ECLASS-VARIABLE: RUBY_TARGETS_PREFERENCE +# @ECLASS_VARIABLE: RUBY_TARGETS_PREFERENCE # @INTERNAL # @DESCRIPTION: # This variable lists all the known ruby targets in preference of use as @@ -33,60 +32,19 @@ if [[ ! ${_RUBY_UTILS} ]]; then # provide for a better first installation experience. # All stable RUBY_TARGETS -RUBY_TARGETS_PREFERENCE="ruby26 " +RUBY_TARGETS_PREFERENCE="ruby31 " # All other active ruby targets -RUBY_TARGETS_PREFERENCE+="ruby27 ruby30" - +RUBY_TARGETS_PREFERENCE+="ruby32 ruby33" _ruby_implementation_depend() { local rubypn= local rubyslot= case $1 in - ruby18) + ruby1[89]|ruby2[0-7]|ruby3[0-3]) rubypn="dev-lang/ruby" - rubyslot=":1.8" - ;; - ruby19) - rubypn="dev-lang/ruby" - rubyslot=":1.9" - ;; - ruby20) - rubypn="dev-lang/ruby" - rubyslot=":2.0" - ;; - ruby21) - rubypn="dev-lang/ruby" - rubyslot=":2.1" - ;; - ruby22) - rubypn="dev-lang/ruby" - rubyslot=":2.2" - ;; - ruby23) - rubypn="dev-lang/ruby" - rubyslot=":2.3" - ;; - ruby24) - rubypn="dev-lang/ruby" - rubyslot=":2.4" - ;; - ruby25) - rubypn="dev-lang/ruby" - rubyslot=":2.5" - ;; - ruby26) - rubypn="dev-lang/ruby" - rubyslot=":2.6" - ;; - ruby27) - rubypn="dev-lang/ruby" - rubyslot=":2.7" - ;; - ruby30) - rubypn="dev-lang/ruby" - rubyslot=":3.0" + rubyslot=":${1:4:1}.${1:5}" ;; ree18) rubypn="dev-lang/ruby-enterprise" @@ -106,7 +64,5 @@ _ruby_implementation_depend() { echo "$2${rubypn}$3${rubyslot}" } - - _RUBY_UTILS=1 fi