summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2024-01-06 08:59:21 +0100
committerHans de Graaff <graaff@gentoo.org>2024-01-06 09:02:10 +0100
commit898f132966984a80f18a505598181052156f6d57 (patch)
tree920db922c703e0dc77fff07377c05f648857f22c /dev-ruby
parentsys-devel/lld: ixup zlib, zstd handling (diff)
downloadgentoo-898f132966984a80f18a505598181052156f6d57.tar.gz
gentoo-898f132966984a80f18a505598181052156f6d57.tar.bz2
gentoo-898f132966984a80f18a505598181052156f6d57.zip
dev-ruby/tzinfo: enable ruby33
Signed-off-by: Hans de Graaff <graaff@gentoo.org>
Diffstat (limited to 'dev-ruby')
-rw-r--r--dev-ruby/tzinfo/files/tzinfo-2.0.6-ruby33.patch35
-rw-r--r--dev-ruby/tzinfo/tzinfo-2.0.6.ebuild6
2 files changed, 39 insertions, 2 deletions
diff --git a/dev-ruby/tzinfo/files/tzinfo-2.0.6-ruby33.patch b/dev-ruby/tzinfo/files/tzinfo-2.0.6-ruby33.patch
new file mode 100644
index 000000000000..91a9843aab22
--- /dev/null
+++ b/dev-ruby/tzinfo/files/tzinfo-2.0.6-ruby33.patch
@@ -0,0 +1,35 @@
+From 9e04c58ce10920538dc55ba6e547aa15cff39a84 Mon Sep 17 00:00:00 2001
+From: Phil Ross <phil.ross@gmail.com>
+Date: Sat, 16 Dec 2023 19:14:20 +0000
+Subject: [PATCH] Fix loading the gemspec file from rake with Ruby 3.3.
+
+Calculating the current directory name from within the gemspec would
+fail.
+
+`__FILE__` was '(eval)' with Ruby < 3.3. `File.dirname(__FILE__)` is
+'.'.
+
+`__FILE__` is '(eval at /path/Rakefile:linenumber)' with Ruby >= 3.3.
+`File.dirname(__FILE__)` is '(eval at /path'.
+---
+ Rakefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Rakefile b/Rakefile
+index 8a34fa33..69bee7b5 100644
+--- a/Rakefile
++++ b/Rakefile
+@@ -11,11 +11,11 @@ rescue LoadError, RuntimeError
+ end
+
+ BASE_DIR = File.expand_path(File.dirname(__FILE__))
++GEMSPEC_PATH = File.join(BASE_DIR, 'tzinfo.gemspec')
++spec = TOPLEVEL_BINDING.eval(File.read(GEMSPEC_PATH), GEMSPEC_PATH)
+
+ task default: [:test]
+
+-spec = eval(File.read('tzinfo.gemspec'))
+-
+ class TZInfoPackageTask < Gem::PackageTask
+ alias_method :orig_sh, :sh
+ private :orig_sh
diff --git a/dev-ruby/tzinfo/tzinfo-2.0.6.ebuild b/dev-ruby/tzinfo/tzinfo-2.0.6.ebuild
index 9c78b15dae64..aebdb3e76137 100644
--- a/dev-ruby/tzinfo/tzinfo-2.0.6.ebuild
+++ b/dev-ruby/tzinfo/tzinfo-2.0.6.ebuild
@@ -1,8 +1,8 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-USE_RUBY="ruby27 ruby30 ruby31 ruby32"
+USE_RUBY="ruby31 ruby32 ruby33"
RUBY_FAKEGEM_TASK_TEST="test_zoneinfo"
@@ -25,6 +25,8 @@ IUSE=""
RDEPEND="sys-libs/timezone-data"
DEPEND="test? ( sys-libs/timezone-data )"
+PATCHES=( "${FILESDIR}/${P}-ruby33.patch" )
+
ruby_add_rdepend "dev-ruby/concurrent-ruby:1"
ruby_add_bdepend "test? ( dev-ruby/bundler dev-ruby/minitest:5 )"