public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH] ruby-utils.eclass: Simplify _ruby_implementation_depend
@ 2023-07-14  8:34 Sam James
  2023-07-14  8:37 ` [gentoo-dev] " Sam James
  0 siblings, 1 reply; 4+ messages in thread
From: Sam James @ 2023-07-14  8:34 UTC (permalink / raw
  To: gentoo-dev; +Cc: ruby, konsolebox, Sam James

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



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-07-14 16:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-14  8:34 [gentoo-dev] [PATCH] ruby-utils.eclass: Simplify _ruby_implementation_depend Sam James
2023-07-14  8:37 ` [gentoo-dev] " Sam James
2023-07-14 16:16   ` Hans de Graaff
2023-07-14 16:19   ` Arthur Zamarin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox