2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-28 14:40:53 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class RubyEnterpriseEdition < Formula
|
2012-08-27 05:07:54 +00:00
|
|
|
homepage 'http://rubyenterpriseedition.com/'
|
2011-02-24 19:50:57 +00:00
|
|
|
url 'http://rubyenterpriseedition.googlecode.com/files/ruby-enterprise-1.8.7-2011.03.tar.gz'
|
2012-09-03 18:33:56 +00:00
|
|
|
sha1 '662f37afbe04f3a55ac3b119227a2cd4e53745bf'
|
2009-09-28 14:40:53 +00:00
|
|
|
|
2012-09-14 16:07:47 +00:00
|
|
|
env :std
|
2010-04-05 23:24:39 +00:00
|
|
|
|
2012-08-27 05:07:54 +00:00
|
|
|
option 'enable-shared', "Compile shared, but see caveats"
|
2011-03-21 21:24:22 +00:00
|
|
|
|
2012-08-27 05:07:54 +00:00
|
|
|
depends_on 'readline'
|
2009-10-14 21:43:55 +00:00
|
|
|
|
2012-08-27 05:07:54 +00:00
|
|
|
fails_with :llvm
|
2010-08-10 20:05:20 +00:00
|
|
|
|
2009-09-28 14:40:53 +00:00
|
|
|
def install
|
2011-01-22 17:21:44 +00:00
|
|
|
readline = Formula.factory('readline').prefix
|
|
|
|
|
2012-08-27 05:07:54 +00:00
|
|
|
args = ["--auto", prefix, '--no-tcmalloc']
|
|
|
|
args << '-c' << '--enable-shared' if build.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}"
|
2012-08-27 05:07:54 +00:00
|
|
|
system './installer', *args
|
2009-11-15 19:16:01 +00:00
|
|
|
end
|
|
|
|
|
2010-02-27 17:26:27 +00:00
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
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
|