mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-09 05:56:58 +02:00
eclass/ruby-utils: Sync with Gentoo
It's from Gentoo commit d18249523bf04913d041c7b28e3104a76db14553.
This commit is contained in:
parent
aa498b3088
commit
07eb8266fe
@ -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
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
# @ECLASS: ruby-utils.eclass
|
# @ECLASS: ruby-utils.eclass
|
||||||
@ -22,8 +22,7 @@ esac
|
|||||||
|
|
||||||
if [[ ! ${_RUBY_UTILS} ]]; then
|
if [[ ! ${_RUBY_UTILS} ]]; then
|
||||||
|
|
||||||
|
# @ECLASS_VARIABLE: RUBY_TARGETS_PREFERENCE
|
||||||
# @ECLASS-VARIABLE: RUBY_TARGETS_PREFERENCE
|
|
||||||
# @INTERNAL
|
# @INTERNAL
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# This variable lists all the known ruby targets in preference of use as
|
# 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.
|
# provide for a better first installation experience.
|
||||||
|
|
||||||
# All stable RUBY_TARGETS
|
# All stable RUBY_TARGETS
|
||||||
RUBY_TARGETS_PREFERENCE="ruby26 "
|
RUBY_TARGETS_PREFERENCE="ruby31 "
|
||||||
|
|
||||||
# All other active ruby targets
|
# All other active ruby targets
|
||||||
RUBY_TARGETS_PREFERENCE+="ruby27 ruby30"
|
RUBY_TARGETS_PREFERENCE+="ruby32 ruby33"
|
||||||
|
|
||||||
|
|
||||||
_ruby_implementation_depend() {
|
_ruby_implementation_depend() {
|
||||||
local rubypn=
|
local rubypn=
|
||||||
local rubyslot=
|
local rubyslot=
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
ruby18)
|
ruby1[89]|ruby2[0-7]|ruby3[0-3])
|
||||||
rubypn="dev-lang/ruby"
|
rubypn="dev-lang/ruby"
|
||||||
rubyslot=":1.8"
|
rubyslot=":${1:4:1}.${1:5}"
|
||||||
;;
|
|
||||||
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"
|
|
||||||
;;
|
;;
|
||||||
ree18)
|
ree18)
|
||||||
rubypn="dev-lang/ruby-enterprise"
|
rubypn="dev-lang/ruby-enterprise"
|
||||||
@ -106,7 +64,5 @@ _ruby_implementation_depend() {
|
|||||||
echo "$2${rubypn}$3${rubyslot}"
|
echo "$2${rubypn}$3${rubyslot}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
_RUBY_UTILS=1
|
_RUBY_UTILS=1
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user