commit:     304dc792926107c9a646f9c4be5c81ab301f5580
Author:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 18 12:40:38 2025 +0000
Commit:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
CommitDate: Sat Jan 18 12:41:31 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=304dc792

net-irc/rbot: enable ruby33

Revert a 2012 patch for gettext/rubygems compatibility that is no longer
valid syntax in ruby33 and that was fixed in ruby-gettext 2.2.0 in 2012.

Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>

 net-irc/rbot/files/rbot-gettext-rubygems.patch | 45 ++++++++++++++++++++++++++
 net-irc/rbot/rbot-0.9.15_p20210609.ebuild      |  5 +--
 2 files changed, 48 insertions(+), 2 deletions(-)

diff --git a/net-irc/rbot/files/rbot-gettext-rubygems.patch 
b/net-irc/rbot/files/rbot-gettext-rubygems.patch
new file mode 100644
index 000000000000..4286573d3394
--- /dev/null
+++ b/net-irc/rbot/files/rbot-gettext-rubygems.patch
@@ -0,0 +1,45 @@
+From 7a6221adf24e81ef1e47441bd848241adfa02ba6 Mon Sep 17 00:00:00 2001
+From: Giuseppe Bilotta <[email protected]>
+Date: Sun, 4 Mar 2012 21:16:46 +0100
+Subject: [PATCH] RubyGems obsoleted *and* b0rked all_load_path, try to work
+ around it
+
+---
+ lib/rbot/load-gettext.rb | 24 +++++++++++++++++++++++-
+ 1 file changed, 23 insertions(+), 1 deletion(-)
+
+diff --git a/lib/rbot/load-gettext.rb b/lib/rbot/load-gettext.rb
+index d45263e1..ba9b09ba 100644
+--- b/lib/rbot/load-gettext.rb
++++ a/lib/rbot/load-gettext.rb
+@@ -43,29 +43,7 @@
+   else
+     warning 'This version of ruby-gettext does not support non-cached mode; 
mo files are not reloaded when setting language'
+   end
+-
+-  begin
+-    bindtextdomain 'rbot'
+-  rescue NoMethodError => e
+-    error e
+-    warning 'Trying to work around RubyGems/GetText incompatibility'
+-    module ::Gem
+-      def self.all_load_paths
+-        result = []
+-
+-        Gem.path.each do |gemdir|
+-          each_load_path all_partials(gemdir) do |load_path|
+-            result << load_path
+-          end
+-        end
+-
+-        result
+-      end
+-    end
+-    retry
+-  end
+-
+-
++  bindtextdomain 'rbot'
+ 
+   module GetText
+     # patch for ruby-gettext 1.x to cope with anonymous modules used by rbot.

diff --git a/net-irc/rbot/rbot-0.9.15_p20210609.ebuild 
b/net-irc/rbot/rbot-0.9.15_p20210609.ebuild
index fda274cc6b6a..fd41e8820810 100644
--- a/net-irc/rbot/rbot-0.9.15_p20210609.ebuild
+++ b/net-irc/rbot/rbot-0.9.15_p20210609.ebuild
@@ -1,8 +1,8 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
-USE_RUBY="ruby30 ruby31 ruby32"
+USE_RUBY="ruby31 ruby32 ruby33"
 
 GITHUB_COMMIT="3ace72d5642284665fce2c33c99dfeb1b931b2c6"
 inherit ruby-ng strip-linguas
@@ -57,6 +57,7 @@ ruby_add_rdepend "
 
 all_ruby_prepare() {
        eapply -p0 "${FILESDIR}"/rbot-rakefile-gettext.patch
+       eapply "${FILESDIR}/rbot-gettext-rubygems.patch"
 
        # Avoid tests that are only compatible with ruby22
        rm -f test/test_journal.rb || die

Reply via email to