Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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.
  • Loading branch information...
commit 50a1b38efd070a2d4b010d99e2010b4a474e706f 1 parent 6ba5311
@Sharpie Sharpie authored Dennis Luxen committed
Showing with 7 additions and 10 deletions.
  1. +7 −10 Library/Formula/node.rb
View
17 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'
Please sign in to comment.
Something went wrong with that request. Please try again.