2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-10-10 23:16:57 +00:00
|
|
|
|
|
|
|
class Node <Formula
|
2010-04-10 04:27:02 +00:00
|
|
|
url 'http://nodejs.org/dist/node-v0.1.90.tar.gz'
|
2009-12-20 12:47:19 +00:00
|
|
|
head 'git://github.com/ry/node.git'
|
2009-10-10 23:16:57 +00:00
|
|
|
homepage 'http://nodejs.org/'
|
2010-04-10 04:27:02 +00:00
|
|
|
md5 '37467ff3ad0c822e0a190c3d1746d70b'
|
2009-10-10 23:16:57 +00:00
|
|
|
|
2009-12-12 16:24:04 +00:00
|
|
|
aka 'node.js'
|
2010-02-05 13:48:52 +00:00
|
|
|
|
|
|
|
depends_on 'gnutls' => :recommended
|
|
|
|
|
2009-10-19 00:31:51 +00:00
|
|
|
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
|
|
|
|
|
2009-10-10 23:16:57 +00:00
|
|
|
def install
|
2010-03-13 04:15:58 +00:00
|
|
|
ENV.gcc_4_2
|
2010-03-06 07:40:55 +00:00
|
|
|
inreplace %w{wscript configure} do |s|
|
|
|
|
s.gsub! '/usr/local', HOMEBREW_PREFIX
|
|
|
|
s.gsub! '/opt/local/lib', '/usr/lib'
|
2010-02-19 15:56:52 +00:00
|
|
|
end
|
2009-10-10 23:16:57 +00:00
|
|
|
system "./configure", "--prefix=#{prefix}"
|
|
|
|
system "make install"
|
|
|
|
end
|
2010-03-13 04:15:58 +00:00
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
If you:
|
|
|
|
brew install rlwrap
|
|
|
|
then you can:
|
|
|
|
rlwrap node-repl
|
|
|
|
for a nicer command-line interface.
|
|
|
|
EOS
|
|
|
|
end
|
2009-10-10 23:16:57 +00:00
|
|
|
end
|