ruby 2.0.0-p0
Closes Homebrew/homebrew#18054. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
parent
b3b766bdfc
commit
2a48039815
1 changed files with 14 additions and 5 deletions
|
@ -2,15 +2,15 @@ require 'formula'
|
|||
|
||||
class Ruby < Formula
|
||||
homepage 'http://www.ruby-lang.org/en/'
|
||||
url 'http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p392.tar.bz2'
|
||||
sha256 '5a7334dfdf62966879bf539b8a9f0b889df6f3b3824fb52a9303c3c3d3a58391'
|
||||
url 'http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.bz2'
|
||||
sha256 'c680d392ccc4901c32067576f5b474ee186def2fcd3fcbfa485739168093295f'
|
||||
|
||||
head 'http://svn.ruby-lang.org/repos/ruby/trunk/'
|
||||
|
||||
env :std
|
||||
|
||||
option :universal
|
||||
option 'with-suffix', 'Suffix commands with "19"'
|
||||
option 'with-suffix', 'Suffix commands with "20"'
|
||||
option 'with-doc', 'Install documentation'
|
||||
option 'with-tcltk', 'Install with Tcl/Tk support'
|
||||
|
||||
|
@ -24,6 +24,7 @@ class Ruby < Formula
|
|||
depends_on 'readline'
|
||||
depends_on 'gdbm'
|
||||
depends_on 'libyaml'
|
||||
depends_on 'openssl' if MacOS.version >= :mountain_lion
|
||||
depends_on :x11 if build.include? 'with-tcltk'
|
||||
|
||||
fails_with :llvm do
|
||||
|
@ -36,11 +37,20 @@ class Ruby < Formula
|
|||
args = ["--prefix=#{prefix}",
|
||||
"--enable-shared"]
|
||||
|
||||
args << "--program-suffix=19" if build.include? "with-suffix"
|
||||
args << "--program-suffix=20" if build.include? "with-suffix"
|
||||
args << "--with-arch=x86_64,i386" if build.universal?
|
||||
args << "--disable-tcltk-framework" << "--with-out-ext=tcl" << "--with-out-ext=tk" unless build.include? "with-tcltk"
|
||||
args << "--disable-install-doc" unless build.include? "with-doc"
|
||||
|
||||
# OpenSSL is deprecated on OS X 10.8 and Ruby can't find the outdated
|
||||
# version (0.9.8r 8 Feb 2011) that ships with the system.
|
||||
# See discussion https://github.com/sstephenson/ruby-build/issues/304
|
||||
# and https://github.com/mxcl/homebrew/pull/18054
|
||||
if MacOS.version >= :mountain_lion
|
||||
openssl = Formula.factory('openssl')
|
||||
args << "--with-openssl-dir=#{openssl.opt_prefix}"
|
||||
end
|
||||
|
||||
# Put gem, site and vendor folders in the HOMEBREW_PREFIX
|
||||
ruby_lib = HOMEBREW_PREFIX/"lib/ruby"
|
||||
(ruby_lib/'site_ruby').mkpath
|
||||
|
@ -55,7 +65,6 @@ class Ruby < Formula
|
|||
system "make"
|
||||
system "make install"
|
||||
system "make install-doc" if build.include? "with-doc"
|
||||
|
||||
end
|
||||
|
||||
def caveats; <<-EOS.undent
|
||||
|
|
Loading…
Reference in a new issue