aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/node.rb
diff options
context:
space:
mode:
authorCharlie Sharpsteen2012-09-13 17:24:45 -0700
committerCharlie Sharpsteen2012-09-13 17:24:45 -0700
commit7dd3e04c371fa4687d292a8fd82fe816ae2f7529 (patch)
tree9efc8dd7b18b54bb4a72b7245d1a94522235241e /Library/Formula/node.rb
parenteb8b6330d3022ede760eced0a73da4b7fc148d58 (diff)
downloadhomebrew-7dd3e04c371fa4687d292a8fd82fe816ae2f7529.tar.bz2
node: Better workaround for CLT-only systems
Instead of requiring a full XCode install, we can use the `DEVELOPER_PATH` environment variable to lie to `xcode-select` in a way that should restrict any consequences to the Node build.
Diffstat (limited to 'Library/Formula/node.rb')
-rw-r--r--Library/Formula/node.rb17
1 files changed, 7 insertions, 10 deletions
diff --git a/Library/Formula/node.rb b/Library/Formula/node.rb
index a42f515fd..8fe993874 100644
--- a/Library/Formula/node.rb
+++ b/Library/Formula/node.rb
@@ -54,16 +54,6 @@ class Node < Formula
depends_on NpmNotInstalled.new unless build.include? 'without-npm'
depends_on PythonVersion.new
- # There is a bug with the GYP buildsystem that prevents Node from compiling
- # on CLT-only systems with unset `xcode-select` paths:
- #
- # http://code.google.com/p/gyp/issues/detail?id=292
- #
- # See the following issue for more info:
- #
- # joyent/node#3681
- depends_on :xcode
-
option 'enable-debug', 'Build with debugger hooks'
option 'without-npm', 'npm will not be installed'
@@ -72,6 +62,13 @@ class Node < Formula
end
def install
+ # Lie to `xcode-select` for now to work around a GYP bug that affects
+ # CLT-only systems:
+ #
+ # http://code.google.com/p/gyp/issues/detail?id=292
+ # joyent/node#3681
+ ENV['DEVELOPER_DIR'] = MacOS.dev_tools_path unless MacOS.xcode_installed?
+
args = %W{--prefix=#{prefix}}
args << "--debug" if build.include? 'enable-debug'
args << "--without-npm" if build.include? 'without-npm'