2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-07 04:08:00 +00:00
|
|
|
|
2009-12-02 12:37:21 +00:00
|
|
|
# TODO de-version the include and lib directories
|
|
|
|
|
2009-09-07 04:08:00 +00:00
|
|
|
class Ruby <Formula
|
2010-05-28 21:19:27 +00:00
|
|
|
url 'http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p378.tar.gz'
|
|
|
|
homepage 'http://www.ruby-lang.org/en/'
|
|
|
|
head 'http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_2/', :using => :svn
|
2010-07-09 19:40:41 +00:00
|
|
|
md5 '9fc5941bda150ac0a33b299e1e53654c'
|
2009-10-15 18:59:18 +00:00
|
|
|
|
|
|
|
depends_on 'readline'
|
2010-07-09 19:40:41 +00:00
|
|
|
|
2010-01-19 11:41:37 +00:00
|
|
|
def options
|
|
|
|
[
|
|
|
|
["--with-suffix", "Add a 19 suffix to commands"],
|
2010-05-16 23:29:32 +00:00
|
|
|
["--with-doc", "Install with the Ruby documentation"],
|
2010-01-19 11:41:37 +00:00
|
|
|
]
|
|
|
|
end
|
2010-07-09 19:40:41 +00:00
|
|
|
|
2009-09-07 04:08:00 +00:00
|
|
|
def install
|
2010-06-16 18:50:36 +00:00
|
|
|
fails_with_llvm
|
2010-01-19 11:41:37 +00:00
|
|
|
|
|
|
|
args = [ "--prefix=#{prefix}",
|
|
|
|
"--disable-debug",
|
|
|
|
"--disable-dependency-tracking",
|
|
|
|
"--enable-shared" ]
|
|
|
|
|
|
|
|
args << "--program-suffix=19" if ARGV.include? "--with-suffix"
|
|
|
|
|
2010-05-28 21:19:27 +00:00
|
|
|
system "autoconf" unless File.exists? 'configure'
|
|
|
|
|
2010-01-19 11:41:37 +00:00
|
|
|
system "./configure", *args
|
2009-09-07 04:08:00 +00:00
|
|
|
system "make"
|
|
|
|
system "make install"
|
2010-05-16 23:29:32 +00:00
|
|
|
|
|
|
|
system "make install-doc" if ARGV.include? "--with-doc"
|
2009-09-07 04:08:00 +00:00
|
|
|
end
|
2010-07-09 19:40:41 +00:00
|
|
|
|
2010-07-18 19:31:09 +00:00
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
Consider using RVM or Cider to manage Ruby environments:
|
|
|
|
* RVM: http://rvm.beginrescueend.com/
|
|
|
|
* Cider: http://www.atmos.org/cider/intro.html
|
|
|
|
|
|
|
|
If you install gems with the RubyGems installed with this formula they will
|
|
|
|
be installed to this formula's prefix. This needs to be fixed, as for example,
|
|
|
|
upgrading Ruby will lose all your gems.
|
2009-12-02 12:41:23 +00:00
|
|
|
EOS
|
|
|
|
end
|
2010-07-09 19:40:41 +00:00
|
|
|
|
2009-12-02 12:37:21 +00:00
|
|
|
def skip_clean? path
|
|
|
|
# TODO only skip the clean for the files that need it, we didn't get a
|
|
|
|
# comment about why we're skipping the clean, so you'll need to figure
|
|
|
|
# that out first --mxcl
|
|
|
|
true
|
2009-09-07 04:08:00 +00:00
|
|
|
end
|
|
|
|
end
|