2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-28 14:40:53 +00:00
|
|
|
|
|
|
|
class RubyEnterpriseEdition <Formula
|
2011-02-21 17:21:20 +00:00
|
|
|
url 'http://rubyenterpriseedition.googlecode.com/files/ruby-enterprise-1.8.7-2011.02.tar.gz'
|
|
|
|
md5 '8c5faa11c1ddaed3f44b7294711980cc'
|
2009-09-28 14:40:53 +00:00
|
|
|
homepage 'http://rubyenterpriseedition.com/'
|
|
|
|
|
2010-04-05 23:24:39 +00:00
|
|
|
depends_on 'readline'
|
|
|
|
|
2009-10-14 21:43:55 +00:00
|
|
|
skip_clean 'bin/ruby'
|
|
|
|
|
2010-08-10 20:05:20 +00:00
|
|
|
def options
|
|
|
|
[['--enable-shared', "Compile shared, but see caveats."]]
|
|
|
|
end
|
|
|
|
|
2009-09-28 14:40:53 +00:00
|
|
|
def install
|
2011-01-22 17:21:44 +00:00
|
|
|
readline = Formula.factory('readline').prefix
|
|
|
|
|
2010-06-16 18:50:36 +00:00
|
|
|
fails_with_llvm "fails with LLVM"
|
2009-12-10 22:57:16 +00:00
|
|
|
args = ['./installer', "--auto", prefix, '--no-tcmalloc']
|
2010-08-10 20:05:20 +00:00
|
|
|
args << '-c' << '--enable-shared' if ARGV.include? '--enable-shared'
|
2011-01-22 17:21:44 +00:00
|
|
|
# Configure will complain that this is an unknown option, but it is actually OK
|
|
|
|
args << '-c' << "--with-readline-dir=#{readline}"
|
2009-11-15 19:16:01 +00:00
|
|
|
system *args
|
|
|
|
end
|
|
|
|
|
2010-02-27 17:26:27 +00:00
|
|
|
def caveats; <<-EOS.undent
|
2010-10-26 04:05:28 +00:00
|
|
|
Consider using RVM or Cinderella to manage Ruby environments:
|
2010-07-18 19:31:09 +00:00
|
|
|
* RVM: http://rvm.beginrescueend.com/
|
2010-10-26 04:05:28 +00:00
|
|
|
* Cinderella: http://www.atmos.org/cinderella/
|
2010-07-18 19:31:09 +00:00
|
|
|
|
2010-02-27 17:26:27 +00:00
|
|
|
By default we don't compile REE as a shared library. From their documentation:
|
|
|
|
Please note that enabling --enable-shared will make the Ruby interpreter
|
|
|
|
about 20% slower.
|
2009-11-15 19:16:01 +00:00
|
|
|
|
2010-02-27 17:26:27 +00:00
|
|
|
For desktop environments (particularly ones requiring RubyCocoa) this is
|
|
|
|
acceptable and even desirable.
|
2009-11-15 19:16:01 +00:00
|
|
|
|
2010-02-27 17:26:27 +00:00
|
|
|
If you need REE to be compiled as a shared library, you can re-compile like so:
|
|
|
|
brew install ruby-enterprise-edition --force --enable-shared
|
2009-11-15 19:16:01 +00:00
|
|
|
EOS
|
2009-09-28 14:40:53 +00:00
|
|
|
end
|
|
|
|
end
|