diff options
Diffstat (limited to 'misc/rubygems/patches/patch-an')
-rw-r--r-- | misc/rubygems/patches/patch-an | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/misc/rubygems/patches/patch-an b/misc/rubygems/patches/patch-an new file mode 100644 index 00000000000..dbd9311748c --- /dev/null +++ b/misc/rubygems/patches/patch-an @@ -0,0 +1,27 @@ +$NetBSD: patch-an,v 1.1 2010/09/10 03:48:40 taca Exp $ + +Add install_root option for pkgsrc's rubygems support. + +--- lib/rubygems/commands/unpack_command.rb.orig 2009-06-22 22:54:36.000000000 +0000 ++++ lib/rubygems/commands/unpack_command.rb +@@ -12,6 +12,10 @@ class Gem::Commands::UnpackCommand < Gem + :version => Gem::Requirement.default, + :target => Dir.pwd + ++ add_option('--install-root DIR', 'Root directory for gem files on extract') do |value, options| ++ options[:install_root] = value ++ end ++ + add_option('--target=DIR', 'target directory for unpacking') do |value, options| + options[:target] = value + end +@@ -44,7 +48,8 @@ class Gem::Commands::UnpackCommand < Gem + basename = File.basename(path).sub(/\.gem$/, '') + target_dir = File.expand_path File.join(options[:target], basename) + FileUtils.mkdir_p target_dir +- Gem::Installer.new(path, :unpack => true).unpack target_dir ++ Gem::Installer.new(path, :unpack => true, ++ :install_root => options[:install_root]).unpack target_dir + say "Unpacked gem: '#{target_dir}'" + else + alert_error "Gem '#{name}' not installed." |