summaryrefslogtreecommitdiff
path: root/lang/ruby19-base/patches/patch-aq
diff options
context:
space:
mode:
Diffstat (limited to 'lang/ruby19-base/patches/patch-aq')
-rw-r--r--lang/ruby19-base/patches/patch-aq31
1 files changed, 31 insertions, 0 deletions
diff --git a/lang/ruby19-base/patches/patch-aq b/lang/ruby19-base/patches/patch-aq
new file mode 100644
index 00000000000..c0efb41eb7e
--- /dev/null
+++ b/lang/ruby19-base/patches/patch-aq
@@ -0,0 +1,31 @@
+$NetBSD: patch-aq,v 1.1.1.1 2010/09/12 03:50:06 taca Exp $
+
+Add install_root option for pkgsrc's rubygems support.
+
+--- lib/rubygems/uninstaller.rb.orig 2010-02-22 02:52:35.000000000 +0000
++++ lib/rubygems/uninstaller.rb
+@@ -50,6 +50,11 @@ class Gem::Uninstaller
+ @force_all = options[:all]
+ @force_ignore = options[:ignore]
+ @bin_dir = options[:bin_dir]
++ 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
+
+ # only add user directory if install_dir is not set
+ @user_install = false
+@@ -124,7 +129,11 @@ class Gem::Uninstaller
+ return if spec.nil?
+
+ unless spec.executables.empty? then
+- bindir = @bin_dir ? @bin_dir : Gem.bindir(spec.installation_path)
++ 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
+
+ list = @source_index.find_name(spec.name).delete_if { |s|
+ s.version == spec.version