summaryrefslogtreecommitdiff
path: root/lang/ruby30/files
diff options
context:
space:
mode:
authorPo-Chuan Hsieh <sunpoet@FreeBSD.org>2021-04-26 04:32:52 +0800
committerPo-Chuan Hsieh <sunpoet@FreeBSD.org>2021-04-26 04:36:32 +0800
commit95fa9913f79cd0c31f0cc4df2294d934f5368bc5 (patch)
treef07de383777c5a4530c5825e3a524a1756a51e4e /lang/ruby30/files
parentlang/v8: Remove outdated patch after r563570 (a7d2ae454e62240f7349c94e02e45b5... (diff)
lang/ruby30: Update to 3.0.1
Changes: https://www.ruby-lang.org/en/news/2020/12/25/ruby-3-0-0-released/ https://www.ruby-lang.org/en/news/2021/04/05/ruby-3-0-1-released/ PR: 251741 Reported by: Yasuhiro Kimura <yasu@utahime.org>
Diffstat (limited to 'lang/ruby30/files')
-rw-r--r--lang/ruby30/files/patch-tool_rbinstall.rb33
-rw-r--r--lang/ruby30/files/patch-upstream-bug1719143
2 files changed, 25 insertions, 51 deletions
diff --git a/lang/ruby30/files/patch-tool_rbinstall.rb b/lang/ruby30/files/patch-tool_rbinstall.rb
index 9e02a2c30733..18faf8e5f498 100644
--- a/lang/ruby30/files/patch-tool_rbinstall.rb
+++ b/lang/ruby30/files/patch-tool_rbinstall.rb
@@ -1,6 +1,6 @@
---- tool/rbinstall.rb.orig 2020-10-02 17:47:07 UTC
+--- tool/rbinstall.rb.orig 2020-12-08 09:02:31 UTC
+++ tool/rbinstall.rb
-@@ -864,147 +864,6 @@ end
+@@ -864,164 +864,6 @@ end
# :startdoc:
@@ -11,16 +11,28 @@
- install_default_gem('ext', srcdir)
-end
-
--def load_gemspec(file)
+-def load_gemspec(file, expanded = false)
- file = File.realpath(file)
- code = File.read(file, encoding: "utf-8:-")
-- code.gsub!(/`git.*?`/m, '""')
-- code.gsub!(/%x\[git.*?\]/m, '""')
+- code.gsub!(/(?:`git[^\`]*`|%x\[git[^\]]*\])\.split\([^\)]*\)/m) do
+- files = []
+- if expanded
+- base = File.dirname(file)
+- Dir.glob("**/*", File::FNM_DOTMATCH, base: base) do |n|
+- case File.basename(n); when ".", ".."; next; end
+- next if File.directory?(File.join(base, n))
+- files << n.dump
+- end
+- end
+- "[" + files.join(", ") + "]"
+- end
- spec = eval(code, binding, file)
- unless Gem::Specification === spec
- raise TypeError, "[#{file}] isn't a Gem::Specification (#{spec.class} instead)."
- end
- spec.loaded_from = file
+- spec.files.reject! {|n| n.end_with?(".gemspec") or n.start_with?(".git")}
+-
- spec
-end
-
@@ -93,9 +105,14 @@
- next if /^\s*(?:#|$)/ =~ name
- next unless /^(\S+)\s+(\S+).*/ =~ name
- gem_name = "#$1-#$2"
-- path = "#{srcdir}/.bundle/gems/#{gem_name}/#$1.gemspec"
-- next unless File.exist?(path)
-- spec = load_gemspec(path)
+- path = "#{srcdir}/.bundle/gems/#{gem_name}/#{gem_name}.gemspec"
+- if File.exist?(path)
+- spec = load_gemspec(path)
+- else
+- path = "#{srcdir}/.bundle/gems/#{gem_name}/#$1.gemspec"
+- next unless File.exist?(path)
+- spec = load_gemspec(path, true)
+- end
- next unless spec.platform == Gem::Platform::RUBY
- next unless spec.full_name == gem_name
- spec.extension_dir = "#{extensions_dir}/#{spec.full_name}"
diff --git a/lang/ruby30/files/patch-upstream-bug17191 b/lang/ruby30/files/patch-upstream-bug17191
deleted file mode 100644
index 0de7aa99a73b..000000000000
--- a/lang/ruby30/files/patch-upstream-bug17191
+++ /dev/null
@@ -1,43 +0,0 @@
-From a9ff39087092b21059fca046ace9ca87770692a4 Mon Sep 17 00:00:00 2001
-From: Nobuyoshi Nakada <nobu@ruby-lang.org>
-Date: Tue, 29 Sep 2020 13:41:59 +0900
-Subject: [PATCH] Fixed installation failure [Bug #17191]
-
-Try update and extract bundled gems only when baseruby is
-available. It should be done only when installing from
-developemental build and not from the tarball, but it is not
-obvious to differentiate them.
----
- common.mk | 2 +-
- defs/gmake.mk | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git common.mk common.mk
-index 603429bd35..509f09c1fe 100644
---- common.mk
-+++ common.mk
-@@ -1296,7 +1296,7 @@ update-config_files: PHONY
- config.guess config.sub
-
- refresh-gems: update-bundled_gems prepare-gems
--prepare-gems: update-gems extract-gems
-+prepare-gems: $(HAVE_BASERUBY:yes=update-gems) $(HAVE_BASERUBY:yes=extract-gems)
-
- update-gems$(gnumake:yes=-nongnumake): PHONY
- $(ECHO) Downloading bundled gem files...
-diff --git defs/gmake.mk defs/gmake.mk
-index 7e9566fee6..31af44a4f1 100644
---- defs/gmake.mk
-+++ defs/gmake.mk
-@@ -246,7 +246,7 @@ HELP_EXTRA_TASKS = \
- " update-github: merge master branch and push it to Pull Request [PR=1234]" \
- ""
-
--extract-gems: update-gems
-+extract-gems: $(HAVE_BASERUBY:yes=update-gems)
-
- BUNDLED_GEMS := $(shell sed '/^[ ]*\#/d;/^[ ]*$$/d;s/[ ][ ]*/-/;s/[ ].*//' $(srcdir)/gems/bundled_gems)
-
---
-2.28.0
-