aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/ruby.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula/ruby.rb')
-rw-r--r--Library/Formula/ruby.rb25
1 files changed, 5 insertions, 20 deletions
diff --git a/Library/Formula/ruby.rb b/Library/Formula/ruby.rb
index 98de87a66..22d33e96c 100644
--- a/Library/Formula/ruby.rb
+++ b/Library/Formula/ruby.rb
@@ -38,7 +38,11 @@ class Ruby < Formula
def install
system "autoconf" if build.head?
- args = %W[--prefix=#{prefix} --enable-shared --disable-silent-rules]
+ args = %W[
+ --prefix=#{prefix} --enable-shared --disable-silent-rules
+ --with-sitedir=#{HOMEBREW_PREFIX}/lib/ruby/site_ruby
+ --with-vendordir=#{HOMEBREW_PREFIX}/lib/ruby/vendor_ruby
+ ]
args << "--program-suffix=21" if build.with? "suffix"
args << "--with-arch=#{Hardware::CPU.universal_archs.join(',')}" if build.universal?
args << "--with-out-ext=tk" if build.without? "tcltk"
@@ -66,25 +70,6 @@ class Ruby < Formula
(lib/"ruby/2.1.0/rubygems/defaults/operating_system.rb").write rubygems_config
end
- def post_install
- # Preserve site and vendor folders on upgrade/reinstall
- # by placing them in HOMEBREW_PREFIX and symlinking
- ruby_lib = HOMEBREW_PREFIX/"lib/ruby"
-
- # These directories are empty on install
- ["site_ruby", "vendor_ruby"].each do |name|
- link = lib/"ruby"/name
- real = ruby_lib/name
-
- # only overwrite invalid (mutually dependent) links
- real.unlink if real.symlink? && real.readlink == link
- real.mkpath
-
- link.unlink if link.exist?
- link.make_symlink real
- end
- end
-
def rubygems_config; <<-EOS.undent
module Gem
def self.default_dir