diff options
| author | Dominyk Tiller | 2014-10-23 21:19:31 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2014-10-27 08:10:12 +0000 |
| commit | 253c543bd78331607cb57ea333a29981e45510e3 (patch) | |
| tree | 29d9b0783e198d23129f1f38ac99db0e947693d4 /Library/Formula/node.rb | |
| parent | b8918a1b035db48d1b413690a8cdb540fe0d9300 (diff) | |
| download | homebrew-253c543bd78331607cb57ea333a29981e45510e3.tar.bz2 | |
node 0.10.33
Version bump, and merging in some of the changes from #33017.
Diffstat (limited to 'Library/Formula/node.rb')
| -rw-r--r-- | Library/Formula/node.rb | 39 |
1 files changed, 29 insertions, 10 deletions
diff --git a/Library/Formula/node.rb b/Library/Formula/node.rb index f9abeaccd..58de02988 100644 --- a/Library/Formula/node.rb +++ b/Library/Formula/node.rb @@ -3,8 +3,8 @@ require "formula" # Note that x.even are stable releases, x.odd are devel releases class Node < Formula homepage "http://nodejs.org/" - url "http://nodejs.org/dist/v0.10.32/node-v0.10.32.tar.gz" - sha256 "c2120d0e3d2d191654cb11dbc0a33a7216d53732173317681da9502be0030f10" + url "http://nodejs.org/dist/v0.10.33/node-v0.10.33.tar.gz" + sha256 "75dc26c33144e6d0dc91cb0d68aaf0570ed0a7e4b0c35f3a7a726b500edd081e" bottle do revision 5 @@ -26,18 +26,24 @@ class Node < Formula depends_on :python => :build + # Once we kill off SSLv3 in our OpenSSL consider forcing our OpenSSL + # over Node's shipped version with --shared-openssl. + # Would allow us quicker security fixes than Node's release schedule. + fails_with :llvm do build 2326 end + # Bumping this may cause `brew test` to fail. resource "npm" do - url "https://registry.npmjs.org/npm/-/npm-1.4.24.tgz" - sha1 "78125bb55dc592b9cbf4aff44e33d5d81c9471af" + url "https://registry.npmjs.org/npm/-/npm-1.4.28.tgz" + sha256 "df3c620cfe1664d45fb5f1948ca0ef1c8b3384acff31648557caac3a9ac2d459" end def install args = %W{--prefix=#{prefix} --without-npm} args << "--debug" if build.include? "enable-debug" + args << "--without-ssl2" << "--without-ssl3" if build.stable? system "./configure", *args system "make", "install" @@ -61,7 +67,8 @@ class Node < Formula ENV["NPM_CONFIG_USERCONFIG"] = npmrc npm_root.cd { system "make", "VERBOSE=1", "install" } - system "#{HOMEBREW_PREFIX}/bin/npm", "install", "--global", "npm@latest", + system "#{HOMEBREW_PREFIX}/bin/npm", "install", "--verbose", "--global", + "npm@latest", "--prefix", HOMEBREW_PREFIX Pathname.glob(npm_root/"man/*") do |man| @@ -77,12 +84,23 @@ class Node < Formula end def caveats - if build.without? "npm"; <<-end.undent - Homebrew has NOT installed npm. If you later install it, you should supplement - your NODE_PATH with the npm module folder: - #{HOMEBREW_PREFIX}/lib/node_modules - end + s = "" + + if build.with? "npm" + s += <<-EOS.undent + If you update npm do NOT use the npm upgrade command + Instead execute: + npm install -g npm@latest + EOS + else + s += <<-EOS.undent + Homebrew has NOT installed npm. If you later install it, you should supplement + your NODE_PATH with the npm module folder: + #{HOMEBREW_PREFIX}/lib/node_modules + EOS end + + s end test do @@ -97,6 +115,7 @@ class Node < Formula # make sure npm can find node ENV.prepend_path "PATH", opt_bin assert_equal which("node"), opt_bin/"node" + assert (HOMEBREW_PREFIX/"bin/npm").exist?, "npm must exist" assert (HOMEBREW_PREFIX/"bin/npm").executable?, "npm must be executable" system "#{HOMEBREW_PREFIX}/bin/npm", "--verbose", "install", "npm@latest" end |
