Files
MINGW-packages/mingw-w64-nodejs/0013-Revert-to-FHS-installation-paths-on-Windows-tests-no.patch
Johannes Schindelin 87a0b47b97 Upgrade node.js to v8.11.1 (#3646)
* 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>
2018-04-29 10:35:19 +03:00

129 lines
4.6 KiB
Diff

From bcee3d1a11b3cfdb3e2cf970674b10829b9cf293 Mon Sep 17 00:00:00 2001
From: Mateusz Mikula <mati865@gmail.com>
Date: Sat, 24 Jun 2017 13:59:32 +0200
Subject: [PATCH 13/23] Revert to FHS installation paths on Windows (tests not
fixed)
Author: Mateusz Mikula <mati865@gmail.com>
---
deps/npm/bin/npm | 4 ++--
deps/npm/bin/npm.cmd | 4 ++--
deps/npm/lib/config/defaults.js | 7 ++-----
deps/npm/lib/npm.js | 6 ++----
deps/npm/lib/unbuild.js | 1 -
deps/npm/node_modules/bin-links/index.js | 2 +-
6 files changed, 9 insertions(+), 15 deletions(-)
diff --git a/deps/npm/bin/npm b/deps/npm/bin/npm
index 5acd6fb6..dc01687e 100755
--- a/deps/npm/bin/npm
+++ b/deps/npm/bin/npm
@@ -12,12 +12,12 @@ if ! [ -x "$NODE_EXE" ]; then
NODE_EXE=node
fi
-NPM_CLI_JS="$basedir/node_modules/npm/bin/npm-cli.js"
+NPM_CLI_JS="$basedir/../lib/node_modules/npm/bin/npm-cli.js"
case `uname` in
*MINGW*)
NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g`
- NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js"
+ NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/../lib/node_modules/npm/bin/npm-cli.js"
if [ -f "$NPM_PREFIX_NPM_CLI_JS" ]; then
NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS"
fi
diff --git a/deps/npm/bin/npm.cmd b/deps/npm/bin/npm.cmd
index 880554dc..12507ba1 100644
--- a/deps/npm/bin/npm.cmd
+++ b/deps/npm/bin/npm.cmd
@@ -8,9 +8,9 @@ IF NOT EXIST "%NODE_EXE%" (
SET "NODE_EXE=node"
)
-SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js"
+SET "NPM_CLI_JS=%~dp0\..\lib\node_modules\npm\bin\npm-cli.js"
FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO (
- SET "NPM_PREFIX_NPM_CLI_JS=%%F\node_modules\npm\bin\npm-cli.js"
+ SET "NPM_PREFIX_NPM_CLI_JS=%%F\..\lib\node_modules\npm\bin\npm-cli.js"
)
IF EXIST "%NPM_PREFIX_NPM_CLI_JS%" (
SET "NPM_CLI_JS=%NPM_PREFIX_NPM_CLI_JS%"
diff --git a/deps/npm/lib/config/defaults.js b/deps/npm/lib/config/defaults.js
index c049f213..d1654b7c 100644
--- a/deps/npm/lib/config/defaults.js
+++ b/deps/npm/lib/config/defaults.js
@@ -81,8 +81,8 @@ var uidOrPid = process.getuid ? process.getuid() : process.pid
if (home) process.env.HOME = home
else home = path.resolve(temp, 'npm-' + uidOrPid)
-var cacheExtra = process.platform === 'win32' ? 'npm-cache' : '.npm'
-var cacheRoot = process.platform === 'win32' && process.env.APPDATA || home
+var cacheExtra = '.npm'
+var cacheRoot = home
var cache = path.resolve(cacheRoot, cacheExtra)
var globalPrefix
@@ -91,9 +91,6 @@ Object.defineProperty(exports, 'defaults', {get: function () {
if (process.env.PREFIX) {
globalPrefix = process.env.PREFIX
- } else if (process.platform === 'win32') {
- // c:\node\node.exe --> prefix=c:\node\
- globalPrefix = path.dirname(process.execPath)
} else {
// /usr/local/bin/node --> prefix=/usr/local
globalPrefix = path.dirname(path.dirname(process.execPath))
diff --git a/deps/npm/lib/npm.js b/deps/npm/lib/npm.js
index e5871260..ad9ed251 100644
--- a/deps/npm/lib/npm.js
+++ b/deps/npm/lib/npm.js
@@ -393,7 +393,7 @@
{
get: function () {
var b = npm.globalPrefix
- if (process.platform !== 'win32') b = path.resolve(b, 'bin')
+ b = path.resolve(b, 'bin')
return b
}
})
@@ -410,9 +410,7 @@
Object.defineProperty(npm, 'globalDir',
{
get: function () {
- return (process.platform !== 'win32')
- ? path.resolve(npm.globalPrefix, 'lib', 'node_modules')
- : path.resolve(npm.globalPrefix, 'node_modules')
+ return path.resolve(npm.globalPrefix, 'lib', 'node_modules')
},
enumerable: true
})
diff --git a/deps/npm/lib/unbuild.js b/deps/npm/lib/unbuild.js
index 78293c9c..0360b8c6 100644
--- a/deps/npm/lib/unbuild.js
+++ b/deps/npm/lib/unbuild.js
@@ -92,7 +92,6 @@ function rmBins (pkg, folder, parent, top, cb) {
function rmMans (pkg, folder, parent, top, cb) {
if (!pkg.man ||
!top ||
- process.platform === 'win32' ||
!npm.config.get('global')) {
return cb()
}
diff --git a/deps/npm/node_modules/bin-links/index.js b/deps/npm/node_modules/bin-links/index.js
index e6370aca..759daee6 100644
--- a/deps/npm/node_modules/bin-links/index.js
+++ b/deps/npm/node_modules/bin-links/index.js
@@ -149,7 +149,7 @@ function linkBin (from, to, opts, cb) {
}
function linkMans (pkg, folder, parent, gtop, opts, cb) {
- if (!pkg.man || !gtop || process.platform === 'win32') return cb()
+ if (!pkg.man || !gtop) return cb()
var manRoot = path.resolve(opts.prefix, 'share', 'man')
opts.log.verbose('linkMans', 'man files are', pkg.man, 'in', manRoot)
--
2.17.0.windows.1