summaryrefslogtreecommitdiff
path: root/misc/rubygems/patches/patch-ag
blob: d7e92a55540600aae9bd1b5eecb47487a43a63c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$NetBSD: patch-ag,v 1.9 2011/08/12 15:50:44 taca Exp $

Add install_root option for pkgsrc's rubygems support.

--- lib/rubygems/uninstaller.rb.orig	2011-05-26 04:01:53.000000000 +0000
+++ lib/rubygems/uninstaller.rb
@@ -51,6 +51,12 @@ class Gem::Uninstaller
     @bin_dir           = options[:bin_dir]
     @format_executable = options[:format_executable]
 
+    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
     @user_install = options[:user_install] unless options[:install_dir]