homebrew-core/Formula/node.rb
Adam Vandenberg e1bb919734 Add "fails_with_llvm" to formula to document LLVM build breaks.
Replaced ENV.gcc_4_2 + comments with calls to "fails_with_llvm",
to specifically message to the user when a formula is known or suspected
to not build with LLVM. If the user specifies "--use-llvm", the message
will be displayed, but compilation will be tried anyway.

Since using LLVM is now an advanced/hidden feature instead of the
default on 10.6, we'll let the user try anyway (and submit patches
if things are now working.)
2010-06-16 11:50:36 -07:00

35 lines
805 B
Ruby

require 'formula'
class Node <Formula
url 'http://nodejs.org/dist/node-v0.1.98.tar.gz'
head 'git://github.com/ry/node.git'
homepage 'http://nodejs.org/'
md5 'd8a75cb5c18ce20e0206ced95a8c1544'
aka 'node.js'
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
fails_with_llvm
inreplace %w{wscript configure} do |s|
s.gsub! '/usr/local', HOMEBREW_PREFIX
s.gsub! '/opt/local/lib', '/usr/lib'
end
system "./configure", "--prefix=#{prefix}"
system "make install"
end
def caveats; <<-EOS.undent
If you:
brew install rlwrap
then you can:
rlwrap node-repl
for a nicer command-line interface.
EOS
end
end