aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/ruby-enterprise-edition.rb
blob: 2ef6347a56493f92b997c5a773dbed0dae9951cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
require 'formula'

class RubyEnterpriseEdition <Formula
  url 'http://rubyforge.org/frs/download.php/71096/ruby-enterprise-1.8.7-2010.02.tar.gz'
  md5 '4df7b09c01adfd711b0ab76837611542'
  homepage 'http://rubyenterpriseedition.com/'

  depends_on 'readline'

  skip_clean 'bin/ruby'

  def options
    [['--enable-shared', "Compile shared, but see caveats."]]
  end

  def install
    fails_with_llvm "fails with LLVM"
    args = ['./installer', "--auto", prefix, '--no-tcmalloc']
    args << '-c' << '--enable-shared' if ARGV.include? '--enable-shared'
    system *args
  end

  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

    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.

    For desktop environments (particularly ones requiring RubyCocoa) this is
    acceptable and even desirable.

    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
    EOS
  end
end