rbinstall.rb: always make gem directories

* tool/rbinstall.rb (gem): always make gem directories regardless
  of zlib.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-01-16 04:35:18 +00:00
Родитель 9e32277356
Коммит 51e7d0efb2
1 изменённых файлов: 8 добавлений и 8 удалений

Просмотреть файл

@ -707,17 +707,17 @@ install?(:ext, :comm, :gem) do
end
install?(:ext, :comm, :gem) do
gem_dir = Gem.default_dir
directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode)
prepare "bundle gems", gem_dir, directories
install_dir = with_destdir(gem_dir)
begin
require "zlib"
rescue LoadError
end
if defined?(Zlib)
require 'pathname'
gem_dir = Gem.default_dir
directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode)
prepare "bundle gems", gem_dir, directories
options = {
:install_dir => with_destdir(gem_dir),
:install_dir => install_dir,
:domain => :local,
:ignore_dependencies => true,
:dir_mode => $dir_mode,
@ -726,14 +726,14 @@ install?(:ext, :comm, :gem) do
}
Dir.glob(srcdir+'/gems/*.gem').each do |gem|
Gem.install(gem, Gem::Requirement.default, options)
gemname = Pathname(gem).basename
gemname = File.basename(gem)
puts "#{" "*30}#{gemname}"
end
# fix directory permissions
# TODO: Gem.install should accept :dir_mode option or something
File.chmod($dir_mode, *Dir.glob(with_destdir(gem_dir)+"/**/"))
File.chmod($dir_mode, *Dir.glob(install_dir+"/**/"))
# fix .gemspec permissions
File.chmod($data_mode, *Dir.glob(with_destdir(gem_dir)+"/specifications/*.gemspec"))
File.chmod($data_mode, *Dir.glob(install_dir+"/specifications/*.gemspec"))
else
puts "skip installing bundle gems because of lacking zlib"
end