public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Sam James <sam@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: ruby@gentoo.org, konsolebox <konsolebox@gmail.com>,
	Sam James <sam@gentoo.org>
Subject: [gentoo-dev] [PATCH] ruby-utils.eclass: Simplify _ruby_implementation_depend
Date: Fri, 14 Jul 2023 09:34:26 +0100	[thread overview]
Message-ID: <20230714083427.467176-1-sam@gentoo.org> (raw)

From: konsolebox <konsolebox@gmail.com>

Closes: https://bugs.gentoo.org/909529
Signed-off-by: Sam James <sam@gentoo.org>
---
 eclass/ruby-utils.eclass | 52 ++--------------------------------------
 1 file changed, 2 insertions(+), 50 deletions(-)

diff --git a/eclass/ruby-utils.eclass b/eclass/ruby-utils.eclass
index c4b6f1502f8a9..8a2b7720c951a 100644
--- a/eclass/ruby-utils.eclass
+++ b/eclass/ruby-utils.eclass
@@ -44,57 +44,9 @@ _ruby_implementation_depend() {
 	local rubyslot=
 
 	case $1 in
-		ruby18)
+		ruby1[89]|ruby2[0-7]|ruby3[0-2])
 			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"
-			;;
-		ruby31)
-			rubypn="dev-lang/ruby"
-			rubyslot=":3.1"
-			;;
-		ruby32)
-			rubypn="dev-lang/ruby"
-			rubyslot=":3.2"
+			rubyslot=":${1:4:1}.${1:5}"
 			;;
 		ree18)
 			rubypn="dev-lang/ruby-enterprise"
-- 
2.41.0



             reply	other threads:[~2023-07-14  8:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-14  8:34 Sam James [this message]
2023-07-14  8:37 ` [gentoo-dev] Re: [PATCH] ruby-utils.eclass: Simplify _ruby_implementation_depend Sam James
2023-07-14 16:16   ` Hans de Graaff
2023-07-14 16:19   ` Arthur Zamarin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230714083427.467176-1-sam@gentoo.org \
    --to=sam@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    --cc=konsolebox@gmail.com \
    --cc=ruby@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox