Use gemspec that keeps original dependencies

This commit is contained in:
Hiroshi SHIBATA 2023-02-16 17:23:19 +09:00
parent 9b7a7e9cef
commit 3eea85963b
Notes: git 2023-03-27 08:46:04 +00:00

View File

@ -1027,9 +1027,12 @@ install?(:ext, :comm, :gem, :'bundled-gems') do
next if /^\s*(?:#|$)/ =~ name
next unless /^(\S+)\s+(\S+).*/ =~ name
gem_name = "#$1-#$2"
path = "#{srcdir}/.bundle/specifications/#{gem_name}.gemspec"
# Try to find the gemspec file for C ext gems
# ex .bundle/gems/debug-1.7.1/debug-1.7.1.gemspec
# This gemspec keep the original dependencies
path = "#{srcdir}/.bundle/gems/#{gem_name}/#{gem_name}.gemspec"
unless File.exist?(path)
path = "#{srcdir}/.bundle/gems/#{gem_name}/#{gem_name}.gemspec"
path = "#{srcdir}/.bundle/specifications/#{gem_name}.gemspec"
unless File.exist?(path)
skipped[gem_name] = "gemspec not found"
next