summaryrefslogtreecommitdiff
path: root/lang/ruby31-base/patches/patch-lib_rubygems_install__update__options.rb
blob: 4dad803e7bd12420092840c32910549a9c8fa51b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
$NetBSD: patch-lib_rubygems_install__update__options.rb,v 1.2 2022/11/26 13:02:49 taca Exp $

* Add install_root option for pkgsrc's rubygems support.
* Tweak build_info directory with destdir to store build_args.

--- lib/rubygems/install_update_options.rb.orig	2022-11-24 10:20:31.000000000 +0000
+++ lib/rubygems/install_update_options.rb
@@ -18,6 +18,12 @@ module Gem::InstallUpdateOptions
   # Add the install/update options to the option parser.
 
   def add_install_update_options
+    add_option(:"Install/Update", "-B", "--install-root DIR",
+               "Root directory for gem files on install") do |value, options|
+      options[:install_root] = File.expand_path(value)
+      Gem.ensure_gem_subdirectories File.join options[:install_root], Gem.dir
+    end
+
     add_option(:"Install/Update", "-i", "--install-dir DIR",
                "Gem repository directory to get installed",
                "gems") do |value, options|