eclass/ruby-utils: Sync with gentoo

It's from gentoo commit f6895087a05c4aea59adf2cfdf8294d4e0cf7b37.
This commit is contained in:
Krzesimir Nowak 2022-03-02 18:22:00 +01:00
parent 5dc536f2bc
commit ec56f1174a

View File

@ -1,4 +1,4 @@
# Copyright 1999-2018 Gentoo Authors # Copyright 1999-2021 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
@ -6,6 +6,7 @@
# Ruby team <ruby@gentoo.org> # Ruby team <ruby@gentoo.org>
# @AUTHOR: # @AUTHOR:
# Author: Hans de Graaff <graaff@gentoo.org> # Author: Hans de Graaff <graaff@gentoo.org>
# @SUPPORTED_EAPIS: 5 6 7 8
# @BLURB: An eclass for supporting ruby scripts and bindings in non-ruby packages # @BLURB: An eclass for supporting ruby scripts and bindings in non-ruby packages
# @DESCRIPTION: # @DESCRIPTION:
# The ruby-utils eclass is designed to allow an easier installation of # The ruby-utils eclass is designed to allow an easier installation of
@ -14,6 +15,10 @@
# This eclass does not set any metadata variables nor export any phase # This eclass does not set any metadata variables nor export any phase
# functions. It can be inherited safely. # functions. It can be inherited safely.
case ${EAPI:-0} in
[5678]) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
if [[ ! ${_RUBY_UTILS} ]]; then if [[ ! ${_RUBY_UTILS} ]]; then
@ -28,10 +33,10 @@ 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="ruby24 ruby23 " RUBY_TARGETS_PREFERENCE="ruby26 "
# All other active ruby targets # All other active ruby targets
RUBY_TARGETS_PREFERENCE+="ruby25 ruby26" RUBY_TARGETS_PREFERENCE+="ruby27 ruby30"
_ruby_implementation_depend() { _ruby_implementation_depend() {
@ -75,6 +80,14 @@ _ruby_implementation_depend() {
rubypn="dev-lang/ruby" rubypn="dev-lang/ruby"
rubyslot=":2.6" 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"
rubyslot=":1.8" rubyslot=":1.8"