summaryrefslogtreecommitdiff
path: root/devel/ruby-setup/patches/patch-aa
blob: 1a9cadfa8556310b2f726e000765fc609ed51d23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
$NetBSD: patch-aa,v 1.2 2014/03/17 14:08:41 taca Exp $

* Add shbang path and use vendordir.
* Don't use obsolete Config.

--- setup.rb.orig	2005-11-20 11:54:27.000000000 +0000
+++ setup.rb
@@ -1,3 +1,4 @@
+#!env ruby
 #
 # setup.rb
 #
@@ -168,6 +169,9 @@ class ConfigTable
       siteruby        = c['sitedir']
       siterubyver     = c['sitelibdir']
       siterubyverarch = c['sitearchdir']
+      vendorruby	= c['vendordir']
+      vendorrubyver	= c['vendorlibdir']
+      vendorrubyverarch	= c['vendorarchdir']
     elsif newpath_p
       # 1.4.4 <= V <= 1.6.3
       libruby         = "#{c['prefix']}/lib/ruby"
@@ -204,8 +208,8 @@ class ConfigTable
               table['rbdir'] = '$librubyver'
               table['sodir'] = '$librubyverarch'
             when 'site'
-              table['rbdir'] = '$siterubyver'
-              table['sodir'] = '$siterubyverarch'
+              table['rbdir'] = '$vendorrubyver'
+              table['sodir'] = '$vendorrubyverarch'
             when 'home'
               setup_rb_error '$HOME was not set' unless ENV['HOME']
               table['prefix'] = ENV['HOME']
@@ -239,9 +243,15 @@ class ConfigTable
                    'the directory for aux ruby libraries'),
       PathItem.new('siterubyverarch', 'path', siterubyverarch,
                    'the directory for aux ruby binaries'),
-      PathItem.new('rbdir', 'path', '$siterubyver',
+      PathItem.new('vendorruby', 'path', vendorruby,
+          'the directory for version-independent aux ruby libraries'),
+      PathItem.new('vendorrubyver', 'path', vendorrubyver,
+                   'the directory for aux ruby libraries'),
+      PathItem.new('vendorrubyverarch', 'path', vendorrubyverarch,
+                   'the directory for aux ruby binaries'),
+      PathItem.new('rbdir', 'path', '$vendorrubyver',
                    'the directory for ruby scripts'),
-      PathItem.new('sodir', 'path', '$siterubyverarch',
+      PathItem.new('sodir', 'path', '$vendorrubyverarch',
                    'the directory for ruby extentions'),
       PathItem.new('rubypath', 'path', rubypath,
                    'the path to set to #! line'),
@@ -785,7 +795,7 @@ class ToplevelInstaller
     else
       require 'rbconfig'
     end
-    ::Config::CONFIG
+    ::RbConfig::CONFIG
   end
 
   def initialize(ardir_root, config)