ruby-changes:74009
From: nagachika <ko1@a...>
Date: Sat, 15 Oct 2022 17:28:42 +0900 (JST)
Subject: [ruby-changes:74009] 2d26e45135 (ruby_3_1): merge revision(s) a2c66f52f402cb58372e271226f3341065561e53:
https://git.ruby-lang.org/ruby.git/commit/?id=2d26e45135 From 2d26e45135af8b427d9ccc6d47082c21be8b9c74 Mon Sep 17 00:00:00 2001 From: nagachika <nagachika@r...> Date: Sat, 15 Oct 2022 16:26:46 +0900 Subject: merge revision(s) a2c66f52f402cb58372e271226f3341065561e53: Make dependency-free gemspec files The default gems have not been installed yet in the build directory, bundled gems depending on them can not work. As those dependencies should be usable there even without rubygems, make temporary gemspec files without the dependencies, and use them in the build directory. --- ext/extmk.rb | 11 +++++++++++ tool/gem-unpack.rb | 4 ++++ 2 files changed, 15 insertions(+) --- ext/extmk.rb | 11 +++++++++++ tool/gem-unpack.rb | 4 ++++ version.h | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ext/extmk.rb b/ext/extmk.rb index d4f1815769..868c1a504d 100755 --- a/ext/extmk.rb +++ b/ext/extmk.rb @@ -560,6 +560,17 @@ clean-so:: https://github.com/ruby/ruby/blob/trunk/ext/extmk.rb#L560 end } +if @gemname + gemdir = File.join($top_srcdir, ext_prefix, @gemname) + if File.exist?(spec_file = File.join(gemdir, ".bundled.#{@gemname}.gemspec")) or + File.exist?(spec_file = File.join(gemdir, "#{@gemname}.gemspec")) + dest = "#{File.dirname(ext_prefix)}/specifications" + FileUtils.mkdir_p(dest) + File.copy_stream(spec_file, "#{dest}/#{@gemname}.gemspec") + puts "copied #{@gemname}.gemspec" + end +end + dir = Dir.pwd FileUtils::makedirs(ext_prefix) Dir::chdir(ext_prefix) diff --git a/tool/gem-unpack.rb b/tool/gem-unpack.rb index 16ee89f62d..0ba23ef4d3 100644 --- a/tool/gem-unpack.rb +++ b/tool/gem-unpack.rb @@ -18,5 +18,9 @@ def Gem.unpack(file, dir = nil, spec_dir = nil) https://github.com/ruby/ruby/blob/trunk/tool/gem-unpack.rb#L18 end FileUtils.mkdir_p(spec_dir) File.binwrite(File.join(spec_dir, "#{spec.name}-#{spec.version}.gemspec"), spec.to_ruby) + unless spec.extensions.empty? or spec.dependencies.empty? + spec.dependencies.clear + end + File.binwrite(File.join(spec_dir, ".bundled.#{spec.name}-#{spec.version}.gemspec"), spec.to_ruby) puts "Unpacked #{file}" end diff --git a/version.h b/version.h index 797a418baa..a28e5ffaec 100644 --- a/version.h +++ b/version.h @@ -11,7 +11,7 @@ https://github.com/ruby/ruby/blob/trunk/version.h#L11 # define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR #define RUBY_VERSION_TEENY 3 #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR -#define RUBY_PATCHLEVEL 77 +#define RUBY_PATCHLEVEL 78 #define RUBY_RELEASE_YEAR 2022 #define RUBY_RELEASE_MONTH 10 -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/