2e1860a66f
Please refer detail for: http://svn.ruby-lang.org/repos/ruby/tags/v1_9_3_0/NEWS http://svn.ruby-lang.org/repos/ruby/tags/v1_9_3_0/ChangeLog Short summary from NEWS: * Ruby's License is changed from a dual license with GPLv2 to a dual license with 2-clause BSDL. * Encoding * new encodings: CP950, CP951, UTF-16 and UTF-32 * change alias: * SJIS is Windows-31J * Regexps now support Unicode 6.0. (new characters and scripts) * builtin classes * ARGF * new methods: ARGF.read_nonblock and so on. * Array * extended method: Array#pack supports endian modifiers * String * extended method: String#unpack supports endian modifiers * new method: String#prepend and String#byteslice * Bignum * Multiplication algorithm for Bignums with a large number of digits over 150 BDIGITs is changed in order to reduce its calculation time. Now such large Bignums are multiplied by using Toom-3 algorithm. * File * new constant: File::NULL and File::DIRECT * IO * extended method: IO#putc supports multibyte characters * new methods: * IO#advise, IO.write and IO.binwrite * Kernel * move #__id__ to BasicObject * extended method: Kernel#rand supports range argument * Module * new methods: Module#private_constant and Module#public_constant * Random * extended method: Random.rand supports range argument * Time * extended method: Time#strftime supports %:z and %::z * Process * Process#maxgroups and Process#maxgroups= now raise NotImplementedError if the platform don't support supplementary groups concept
49 lines
2.1 KiB
Ruby
49 lines
2.1 KiB
Ruby
$NetBSD: patch-lib_rubygems_installer.rb,v 1.1.1.1 2011/11/08 16:10:51 taca Exp $
|
|
|
|
Add install_root option for pkgsrc's rubygems support.
|
|
|
|
--- lib/rubygems/installer.rb.orig 2011-08-04 22:39:35.000000000 +0000
|
|
+++ lib/rubygems/installer.rb
|
|
@@ -85,6 +85,9 @@ class Gem::Installer
|
|
# for a signed-gems-only policy.
|
|
# :ignore_dependencies:: Don't raise if a dependency is missing.
|
|
# :install_dir:: The directory to install the gem into.
|
|
+ # :install_root:: The directory to use as a buildroot for "destdir"-style
|
|
+ # installation. All paths during installation are relative
|
|
+ # to the buildroot.
|
|
# :format_executable:: Format the executable the same as the ruby executable.
|
|
# If your ruby is ruby18, foo_exec will be installed as
|
|
# foo_exec18.
|
|
@@ -283,7 +286,11 @@ class Gem::Installer
|
|
# If the user has asked for the gem to be installed in a directory that is
|
|
# the system gem directory, then use the system bin directory, else create
|
|
# (or use) a new bin dir under the gem_home.
|
|
- bindir = @bin_dir || Gem.bindir(gem_home)
|
|
+ bindir = @bin_dir ? @bin_dir : (Gem.bindir @gem_home, @install_root)
|
|
+
|
|
+ unless @install_root.nil? or @install_root == ""
|
|
+ bindir = File.join(@install_root, bindir)
|
|
+ end
|
|
|
|
Dir.mkdir bindir unless File.exist? bindir
|
|
raise Gem::FilePermissionError.new(bindir) unless File.writable? bindir
|
|
@@ -416,6 +423,7 @@ class Gem::Installer
|
|
:exec_format => false,
|
|
:force => false,
|
|
:install_dir => Gem.dir,
|
|
+ :install_root => nil,
|
|
}.merge options
|
|
|
|
@env_shebang = options[:env_shebang]
|
|
@@ -425,6 +433,11 @@ class Gem::Installer
|
|
@format_executable = options[:format_executable]
|
|
@security_policy = options[:security_policy]
|
|
@wrappers = options[:wrappers]
|
|
+ install_root = options[:install_root]
|
|
+ unless install_root.nil? or install_root == ""
|
|
+ @install_root = File.expand_path install_root
|
|
+ @gem_home = File.join(@install_root, @gem_home)
|
|
+ end
|
|
@bin_dir = options[:bin_dir]
|
|
@development = options[:development]
|
|
|