[Pkg-javascript-commits] [node-gyp] 27/82: Imported Upstream version 0.9.5

Ximin Luo infinity0 at debian.org
Mon Aug 31 00:40:55 UTC 2015


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository node-gyp.

commit 9f50f4f16faad9ad58aefcd8cc68ccb3d75fe607
Author: Jérémy Lal <kapouer at melix.org>
Date:   Sat Apr 27 16:37:33 2013 +0200

    Imported Upstream version 0.9.5
---
 gyp/pylib/gyp/generator/make.py  |  2 +-
 gyp/pylib/gyp/generator/ninja.py |  2 +-
 lib/build.js                     | 29 ++++++++++++++++++++---------
 package.json                     |  2 +-
 4 files changed, 23 insertions(+), 12 deletions(-)

diff --git a/gyp/pylib/gyp/generator/make.py b/gyp/pylib/gyp/generator/make.py
index 6949ad5..133d8f8 100644
--- a/gyp/pylib/gyp/generator/make.py
+++ b/gyp/pylib/gyp/generator/make.py
@@ -351,7 +351,7 @@ cmd_touch = touch $@
 
 quiet_cmd_copy = COPY $@
 # send stderr to /dev/null to ignore messages when linking directories.
-cmd_copy = ln -f "$<" "$@" 2>/dev/null || (rm -rf "$@" && cp -af "$<" "$@")
+cmd_copy = rm -rf "$@" && cp -af "$<" "$@"
 
 %(link_commands)s
 """
diff --git a/gyp/pylib/gyp/generator/ninja.py b/gyp/pylib/gyp/generator/ninja.py
index c12f223..f15b473 100644
--- a/gyp/pylib/gyp/generator/ninja.py
+++ b/gyp/pylib/gyp/generator/ninja.py
@@ -1679,7 +1679,7 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params,
     master_ninja.rule(
       'copy',
       description='COPY $in $out',
-      command='ln -f $in $out 2>/dev/null || (rm -rf $out && cp -af $in $out)')
+      command='rm -rf $out && cp -af $in $out')
   master_ninja.newline()
 
   all_targets = set()
diff --git a/lib/build.js b/lib/build.js
index ec3b9e0..bf27169 100644
--- a/lib/build.js
+++ b/lib/build.js
@@ -119,22 +119,33 @@ function build (gyp, argv, callback) {
   function findMsbuild () {
     log.verbose('could not find "msbuild.exe" in PATH - finding location in registry')
     var notfoundErr = new Error('Can\'t find "msbuild.exe". Do you have Microsoft Visual Studio C++ 2008+ installed?')
-    exec('reg query "HKLM\\Software\\Microsoft\\MSBuild\\ToolsVersions" /s', function (err, stdout, stderr) {
-      var reVers = /Software\\Microsoft\\MSBuild\\ToolsVersions\\([^\r]+)\r\n\s+MSBuildToolsPath\s+REG_SZ\s+([^\r]+)/gi
+    var cmd = 'reg query "HKLM\\Software\\Microsoft\\MSBuild\\ToolsVersions" /s'
+    if (process.arch !== 'ia32')
+      cmd += ' /reg:32'
+    exec(cmd, function (err, stdout, stderr) {
+      var reVers = /ToolsVersions\\([^\\]+)$/i
+        , rePath = /\r\n[ \t]+MSBuildToolsPath[ \t]+REG_SZ[ \t]+([^\r]+)/i
         , msbuilds = []
         , r
         , msbuildPath
       if (err) {
         return callback(notfoundErr)
       }
-      while (r = reVers.exec(stdout)) {
-        if (parseFloat(r[1], 10) >= 3.5) {
-          msbuilds.push({
-            version: parseFloat(r[1], 10),
-            path: r[2]
-          })
+      stdout.split('\r\n\r\n').forEach(function(l) {
+        if (!l) return
+        l = l.trim()
+        if (r = reVers.exec(l.substring(0, l.indexOf('\r\n')))) {
+          var ver = parseFloat(r[1], 10)
+          if (ver >= 3.5) {
+            if (r = rePath.exec(l)) {
+              msbuilds.push({
+                version: ver,
+                path: r[1]
+              })
+            }
+          }
         }
-      }
+      })
       msbuilds.sort(function (x, y) {
         return (x.version < y.version ? -1 : 1)
       })
diff --git a/package.json b/package.json
index eeeaf06..c963bf1 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
 { "name": "node-gyp"
 , "description": "Node.js native addon build tool"
 , "keywords": [ "native", "addon", "module", "c", "c++", "bindings", "gyp" ]
-, "version": "0.9.2"
+, "version": "0.9.5"
 , "installVersion": 9
 , "author": "Nathan Rajlich <nathan at tootallnate.net> (http://tootallnate.net)"
 , "repository": { "type": "git", "url": "git://github.com/TooTallNate/node-gyp.git" }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-gyp.git



More information about the Pkg-javascript-commits mailing list