forked from lotia/homebrew-versions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnode04.rb
50 lines (39 loc) · 1.32 KB
/
node04.rb
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
47
48
49
50
class Node04 < Formula
homepage "https://nodejs.org/"
url "https://nodejs.org/dist/node-v0.4.12.tar.gz"
sha256 "c01af05b933ad4d2ca39f63cac057f54f032a4d83cff8711e42650ccee24fce4"
revision 1
bottle do
revision 1
sha256 "30c8b596cf0184fd7608b5370b5e10c3adf453e899fa90dfa72215837eaf499a" => :mountain_lion
end
option "with-debug", "Build with debugger hooks"
deprecated_option "enable-debug" => "with-debug"
depends_on "openssl"
depends_on MaximumMacOSRequirement => :mountain_lion
fails_with :llvm do
build 2326
end
# Fixes the build on 10.8, but 10.9 onwards is dead.
# https://github.com/Homebrew/homebrew-versions/pull/665
env :std
conflicts_with "node",
:because => "Differing versions of the same formulae."
def install
inreplace "wscript" do |s|
s.gsub! "/usr/local", HOMEBREW_PREFIX
s.gsub! "/opt/local/lib", "/usr/lib"
end
args = ["--prefix=#{prefix}"]
args << "--debug" if build.with? "debug"
args << "--openssl-includes=#{Formula["openssl"].include}"
args << "--openssl-libpath=#{Formula["openssl"].lib}"
system "./configure", *args
system "make", "install"
end
def caveats; <<-EOS.undent
For node to pick up installed libraries, add this to your profile:
export NODE_PATH=#{HOMEBREW_PREFIX}/lib/node_modules
EOS
end
end