* nodejs: re-generate patchset Git's `format-patch` now uses a narrower diffstat, longer abbreviated hashes in the index lines, and a different Git version, of course. Besides, the patches started out as an 11-strong patch series (and is now 13-strong, which is reflected in the [PATCH k/13] prefix of the Subject: lines), and the 12th patch even lacked attribution and a commit message. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> * nodejs: adjust patches for v6.14.1 The code base changed enough that some patches are obsolete, and others need to be applied to a different file, yet others simply do not apply cleanly. Note: this does not yet allow building v6.14.1, but *only* adjusts the existing patches as required, for ease of reviewing. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> * nodejs: do not link to the shared (stale) libuv Node.js v6.14.1 relies on libuv to be up to date. In particular, it requires the uv_os_getppid() function to be available. The version of libuv shipped in MSYS2 is too old and does not provide that. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> * nodejs: update to v6.14.1 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> * nodejs: prepare for packaging v6.14.1 Long path problems... Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> * nodejs: adjust patches for v8.11.1 Sadly, v6.14.1 would not be able to package because of too-long paths inside npm's nested node_modules/ directories. Let's hope that v8.11.1 works better. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> * nodejs: prepare for v8.11.1 It needs quite a bit more patching. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> * mingw-w64-nodejs: upgrade to v8.11.1 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
55 lines
2.0 KiB
Diff
55 lines
2.0 KiB
Diff
From 94d3d4f85a245f474091a5e241e249ecbc2c12a1 Mon Sep 17 00:00:00 2001
|
|
From: Alexey Pavlov <alexpux@gmail.com>
|
|
Date: Thu, 12 Apr 2018 10:20:30 +0200
|
|
Subject: [PATCH 12/23] Use shell wrapper script for npm on MSYS2 mingw-w64
|
|
|
|
---
|
|
tools/install.py | 24 ++++++++++++++++++++++--
|
|
1 file changed, 22 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/tools/install.py b/tools/install.py
|
|
index be2bab54..20dfee30 100755
|
|
--- a/tools/install.py
|
|
+++ b/tools/install.py
|
|
@@ -95,7 +95,17 @@ def npm_files(action):
|
|
if action == uninstall:
|
|
action([link_path], 'bin/npm')
|
|
elif action == install:
|
|
- try_symlink('../lib/node_modules/npm/bin/npm-cli.js', link_path)
|
|
+ # Use MSYS2 shell script wrapper.
|
|
+ if ((os.name == 'nt' and 'GCC' in sys.version) or
|
|
+ (os.name == 'posix' and 'NT' in platform.system())):
|
|
+ # Copy the wrapper shell script
|
|
+ try_copy('deps/npm/bin/npm', link_path)
|
|
+ # deps/npm/bin/npm is a shell script so the shebang must run sh, not node
|
|
+ s = open(link_path, 'r').read()
|
|
+ s = re.sub(r'#!.*\n', '#!' + '/usr/bin/env sh' + '\n', s)
|
|
+ open(link_path, 'w').write(s)
|
|
+ else:
|
|
+ try_symlink('../lib/node_modules/npm/bin/npm-cli.js', link_path)
|
|
else:
|
|
assert(0) # unhandled action type
|
|
|
|
@@ -104,7 +114,17 @@ def npm_files(action):
|
|
if action == uninstall:
|
|
action([link_path], 'bin/npx')
|
|
elif action == install:
|
|
- try_symlink('../lib/node_modules/npm/bin/npx-cli.js', link_path)
|
|
+ # Use MSYS2 shell script wrapper.
|
|
+ if ((os.name == 'nt' and 'GCC' in sys.version) or
|
|
+ (os.name == 'posix' and 'NT' in platform.system())):
|
|
+ # Copy the wrapper shell script
|
|
+ try_copy('deps/npm/bin/npx', link_path)
|
|
+ # deps/npm/bin/npm is a shell script so the shebang must run sh, not node
|
|
+ s = open(link_path, 'r').read()
|
|
+ s = re.sub(r'#!.*\n', '#!' + '/usr/bin/env sh' + '\n', s)
|
|
+ open(link_path, 'w').write(s)
|
|
+ else:
|
|
+ try_symlink('../lib/node_modules/npm/bin/npx-cli.js', link_path)
|
|
else:
|
|
assert(0) # unhandled action type
|
|
|
|
--
|
|
2.17.0.windows.1
|
|
|