$NetBSD: patch-ag,v 1.8 2011/03/23 14:35:05 taca Exp $

Add install_root option for pkgsrc's rubygems support.

--- lib/rubygems/uninstaller.rb.orig	2011-03-04 00:01:24.000000000 +0000
+++ lib/rubygems/uninstaller.rb
@@ -52,6 +52,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]
