aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/node.rb
blob: 259d3fc060356ffeebe5142dad9033c708081a01 (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
require 'formula'

class Node <Formula
  url 'http://nodejs.org/dist/node-v0.1.30.tar.gz'
  head 'git://github.com/ry/node.git'
  homepage 'http://nodejs.org/'
  md5 '479204b564aa1b956d9c28c3969dd545'

  aka 'node.js'
  
  depends_on 'gnutls' => :recommended
  
  def skip_clean? path
    # TODO: at some point someone should tweak this so it only skips clean
    # for the bits that break the build otherwise
    true
  end

  def install
    inreplace %w{wscript configure} do |wscript|
      wscript.gsub! '/usr/local', HOMEBREW_PREFIX
      wscript.gsub! '/opt/local/lib', '/usr/lib'
    end
    ENV.gcc_4_2
    system "./configure", "--prefix=#{prefix}"
    system "make install"
  end
end