blob: 292e3fec4c2add75e1a900264a48f4502af2d34a (
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
40
41
42
43
44
45
46
  | 
require 'formula'
# TODO de-version the include and lib directories
class Ruby <Formula
  @url='http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p376.tar.gz'
  @homepage='http://www.ruby-lang.org/en/'
  @md5='ebb20550a11e7f1a2fbd6fdec2a3e0a3'
  depends_on 'readline'
  
  def options
    [
      ["--with-suffix", "Add a 19 suffix to commands"],
    ]
  end
  
  def install
    ENV.gcc_4_2
    args = [ "--prefix=#{prefix}",
            "--disable-debug",
            "--disable-dependency-tracking",
            "--enable-shared" ]
    args << "--program-suffix=19" if ARGV.include? "--with-suffix"
    system "./configure", *args
    system "make"
    system "make install"
  end
  
  def caveats; <<-EOS
If you install gems with the RubyGems installed with this formula they will
to this formula's prefix. This needs to be fixed, as for example, upgrading
Ruby will lose all your gems.
    EOS
  end
  
  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
  end
end
  |