summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authornagachika <nagachika@ruby-lang.org>2022-10-15 16:26:46 +0900
committernagachika <nagachika@ruby-lang.org>2022-10-15 16:26:46 +0900
commit2d26e45135af8b427d9ccc6d47082c21be8b9c74 (patch)
tree1ab39aa069c26c6d9b589b20bd0c940677bcd711 /ext
parent4a986a11e2b2d7037f1e95b0317aa012dc0ee5fb (diff)
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(+)
Diffstat (limited to 'ext')
-rwxr-xr-xext/extmk.rb11
1 files changed, 11 insertions, 0 deletions
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::
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)