diff --git a/mingw-w64-http-parser/PKGBUILD b/mingw-w64-http-parser/PKGBUILD index c3b0a7cb09..4b7c5efab8 100644 --- a/mingw-w64-http-parser/PKGBUILD +++ b/mingw-w64-http-parser/PKGBUILD @@ -1,33 +1,32 @@ # Maintainer: Martell Malone +# Contributor: Alethea Rose _realname=http-parser pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") -pkgver=2.5.0 +pkgver=2.7.1 pkgrel=1 pkgdesc='Parser for HTTP Request/Response written in C (mingw-w64)' arch=('any') url='https://github.com/joyent/http-parser' license=('MIT') -source=(${_realname}-${pkgver}.tar.gz::"https://github.com/joyent/http-parser/archive/v${pkgver}.tar.gz" - makefile.patch) -sha256sums=('e3b4ba58f4e6ee5fbec781df020e5cb74c3a799a07f059e1e125127a0b801481' - '3c20f0ce48b04faaffdd32ca88431e2ff54f597dc7193f3ffc67225d73ea3731') +source=(${_realname}-${pkgver}.tar.gz::"https://github.com/joyent/http-parser/archive/v${pkgver}.tar.gz") options=('strip' 'staticlibs') -prepare() { - cd ${srcdir}/${_realname}-${pkgver} - patch -p0 -i ${srcdir}/makefile.patch -} - build() { cd ${srcdir}/${_realname}-${pkgver} CC=gcc \ AR=ar \ + SONAME=libhttp_parser-2.dll \ make -j1 \ library package } +check() { + cd ${srcdir}/${_realname}-${pkgver} + make test +} + package() { cd ${srcdir}/${_realname}-${pkgver} @@ -36,3 +35,5 @@ package() { cp *.a ${pkgdir}/${MINGW_PREFIX}/lib/ cp *.dll ${pkgdir}/${MINGW_PREFIX}/bin/ } + +sha256sums=('70409ad324e5de2da6a0f39e859e566d497c1ff0a249c0c38a5012df91b386b3') diff --git a/mingw-w64-http-parser/makefile.patch b/mingw-w64-http-parser/makefile.patch deleted file mode 100644 index b0ec0f5852..0000000000 --- a/mingw-w64-http-parser/makefile.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- Makefile.orig 2014-03-13 13:18:11.000000000 +0400 -+++ Makefile 2014-07-24 11:44:56.382400000 +0400 -@@ -19,7 +19,7 @@ - # IN THE SOFTWARE. - - PLATFORM ?= $(shell sh -c 'uname -s | tr "[A-Z]" "[a-z]"') --SONAME ?= libhttp_parser.so.2.5.0 -+SONAME ?= libhttp_parser-2.dll - - CC?=gcc - AR?=ar -@@ -33,9 +33,7 @@ - CFLAGS_DEBUG = $(CFLAGS) -O0 -g $(CFLAGS_DEBUG_EXTRA) - CFLAGS_FAST = $(CFLAGS) -O3 $(CFLAGS_FAST_EXTRA) - CFLAGS_BENCH = $(CFLAGS_FAST) -Wno-unused-parameter --CFLAGS_LIB = $(CFLAGS_FAST) -fPIC -- --LDFLAGS_LIB = $(LDFLAGS) -shared -+LDFLAGS_LIB = $(LDFLAGS) -shared -Wl,--out-implib=libhttp_parser.dll.a - - INSTALL ?= install - PREFIX ?= $(DESTDIR)/usr/local diff --git a/mingw-w64-nodejs/0001-fix-python-2-shebang.patch b/mingw-w64-nodejs/0001-Fix-python-invocation-to-python2.patch similarity index 51% rename from mingw-w64-nodejs/0001-fix-python-2-shebang.patch rename to mingw-w64-nodejs/0001-Fix-python-invocation-to-python2.patch index 6806e85790..b83ae625ac 100644 --- a/mingw-w64-nodejs/0001-fix-python-2-shebang.patch +++ b/mingw-w64-nodejs/0001-Fix-python-invocation-to-python2.patch @@ -1,42 +1,16 @@ -From 6f873bddb7f8696eca6790dc7a0f8d4a27fa0c93 Mon Sep 17 00:00:00 2001 -From: mati865 -Date: Thu, 8 Sep 2016 13:58:08 +0200 -Subject: [PATCH 01/13] fix python 2 shebang +From 7c8fca2e86111cd5e8b47a591f266b1e67a476b0 Mon Sep 17 00:00:00 2001 +From: Alethea Rose +Date: Tue, 14 Feb 2017 20:56:17 -0500 +Subject: [PATCH 1/8] Fix python invocation to python2 --- common.gypi | 2 +- configure | 2 +- deps/cares/build/gcc_version.py | 2 +- + deps/cares/common.gypi | 2 +- deps/cares/gyp_cares | 2 +- - .../node-gyp/gyp/buildbot/buildbot_run.py | 2 +- - deps/npm/node_modules/node-gyp/gyp/gyp | 2 +- - deps/npm/node_modules/node-gyp/gyp/gyp_main.py | 2 +- - deps/npm/node_modules/node-gyp/gyp/gyptest.py | 2 +- - .../node-gyp/gyp/pylib/gyp/MSVSSettings_test.py | 2 +- - .../node-gyp/gyp/pylib/gyp/__init__.py | 2 +- - .../node-gyp/gyp/pylib/gyp/common_test.py | 2 +- - .../node-gyp/gyp/pylib/gyp/easy_xml_test.py | 2 +- - .../node-gyp/gyp/pylib/gyp/flock_tool.py | 2 +- - .../node-gyp/gyp/pylib/gyp/generator/msvs_test.py | 2 +- - .../node-gyp/gyp/pylib/gyp/generator/ninja.py | 2 +- - .../node-gyp/gyp/pylib/gyp/generator/ninja_test.py | 2 +- - .../node-gyp/gyp/pylib/gyp/generator/xcode.py | 2 +- - .../node-gyp/gyp/pylib/gyp/generator/xcode_test.py | 2 +- - .../node-gyp/gyp/pylib/gyp/input_test.py | 2 +- - .../node-gyp/gyp/pylib/gyp/mac_tool.py | 2 +- - .../node-gyp/gyp/pylib/gyp/win_tool.py | 4 ++-- - deps/npm/node_modules/node-gyp/gyp/samples/samples | 2 +- - deps/npm/node_modules/node-gyp/gyp/setup.py | 2 +- - .../node-gyp/gyp/tools/emacs/testdata/media.gyp | 2 +- - .../gyp/tools/emacs/testdata/media.gyp.fontified | 2 +- - .../node_modules/node-gyp/gyp/tools/graphviz.py | 2 +- - .../node_modules/node-gyp/gyp/tools/pretty_gyp.py | 2 +- - .../node_modules/node-gyp/gyp/tools/pretty_sln.py | 2 +- - .../node-gyp/gyp/tools/pretty_vcproj.py | 2 +- - deps/npm/node_modules/node-gyp/lib/configure.js | 4 ++-- - .../node_modules/node-gyp/test/test-find-python.js | 2 +- deps/uv/gyp_uv.py | 2 +- - deps/v8/DEPS | 14 ++++++------- + deps/v8/DEPS | 16 +++++++-------- deps/v8/Makefile | 2 +- deps/v8/Makefile.android | 2 +- deps/v8/Makefile.nacl | 2 +- @@ -49,7 +23,7 @@ Subject: [PATCH 01/13] fix python 2 shebang deps/v8/build/isolate.gypi | 2 +- deps/v8/build/landmines.py | 2 +- deps/v8/build/shim_headers.gypi | 2 +- - deps/v8/build/standalone.gypi | 2 +- + deps/v8/build/standalone.gypi | 4 ++-- deps/v8/build/toolchain.gypi | 2 +- deps/v8/build/vs_toolchain.py | 2 +- deps/v8/src/d8.gyp | 2 +- @@ -59,9 +33,11 @@ Subject: [PATCH 01/13] fix python 2 shebang deps/v8/tools/eval_gc_nvp.py | 2 +- deps/v8/tools/external-reference-check.py | 2 +- deps/v8/tools/find-commit-for-patch.py | 2 +- + deps/v8/tools/fuzz-harness.sh | 2 +- deps/v8/tools/gc-nvp-to-csv.py | 2 +- deps/v8/tools/gc-nvp-trace-processor.py | 2 +- deps/v8/tools/gcmole/download_gcmole_tools.py | 2 +- + deps/v8/tools/gcmole/gcmole.lua | 2 +- deps/v8/tools/gcmole/parallel.py | 2 +- deps/v8/tools/gcmole/run-gcmole.py | 2 +- deps/v8/tools/gen-postmortem-metadata.py | 2 +- @@ -72,6 +48,7 @@ Subject: [PATCH 01/13] fix python 2 shebang deps/v8/tools/isolate_driver.py | 2 +- deps/v8/tools/js2c.py | 2 +- deps/v8/tools/jsfunfuzz/download_jsfunfuzz.py | 2 +- + deps/v8/tools/jsfunfuzz/fuzz-harness.sh | 2 +- deps/v8/tools/jsmin.py | 2 +- deps/v8/tools/ll_prof.py | 2 +- deps/v8/tools/mingw-generate-makefiles.sh | 2 +- @@ -110,58 +87,10 @@ Subject: [PATCH 01/13] fix python 2 shebang deps/v8/tools/try_perf.py | 2 +- deps/v8/tools/unittests/run_perf_test.py | 2 +- deps/v8/tools/verify_source_deps.py | 2 +- - .../third_party/jinja2/scripts/jinja2-debug.py | 2 +- - .../third_party/jinja2/scripts/make-release.py | 2 +- - .../third_party/markupsafe/bench/runbench.py | 2 +- - .../generate-inspector-protocol-version | 2 +- - .../platform/v8_inspector/build/rjsmin.py | 2 +- - .../platform/v8_inspector/v8_inspector.gyp | 8 ++++---- - node.gyp | 4 ++-- - test/gc/node_modules/weak/build/gyp-mac-tool | 2 +- - test/parallel/test-child-process-set-blocking.js | 2 +- - test/pummel/test-child-process-spawn-loop.js | 2 +- - test/pummel/test-exec.js | 2 +- - tools/check-imports.py | 2 +- - tools/configure.d/nodedownload.py | 2 +- - tools/genv8constants.py | 2 +- - tools/gyp/buildbot/buildbot_run.py | 2 +- - tools/gyp/gyp | 2 +- - tools/gyp/gyp_main.py | 2 +- - tools/gyp/gyptest.py | 2 +- - tools/gyp/pylib/gyp/MSVSSettings_test.py | 2 +- - tools/gyp/pylib/gyp/__init__.py | 2 +- - tools/gyp/pylib/gyp/common_test.py | 2 +- - tools/gyp/pylib/gyp/easy_xml_test.py | 2 +- - tools/gyp/pylib/gyp/flock_tool.py | 2 +- - tools/gyp/pylib/gyp/generator/msvs_test.py | 2 +- - tools/gyp/pylib/gyp/generator/ninja.py | 2 +- - tools/gyp/pylib/gyp/generator/ninja_test.py | 2 +- - tools/gyp/pylib/gyp/generator/xcode.py | 2 +- - tools/gyp/pylib/gyp/generator/xcode_test.py | 2 +- - tools/gyp/pylib/gyp/input_test.py | 2 +- - tools/gyp/pylib/gyp/mac_tool.py | 2 +- - tools/gyp/pylib/gyp/win_tool.py | 4 ++-- - tools/gyp/samples/samples | 2 +- - tools/gyp/setup.py | 2 +- - tools/gyp/tools/emacs/testdata/media.gyp | 2 +- - tools/gyp/tools/emacs/testdata/media.gyp.fontified | 2 +- - tools/gyp/tools/graphviz.py | 2 +- - tools/gyp/tools/pretty_gyp.py | 2 +- - tools/gyp/tools/pretty_sln.py | 2 +- - tools/gyp/tools/pretty_vcproj.py | 2 +- - tools/gyp_node.py | 2 +- - tools/icu/icu-generic.gyp | 4 ++-- - tools/icu/icutrim.py | 2 +- - tools/icu/shrink-icu-src.py | 2 +- - tools/install.py | 2 +- - tools/js2c.py | 2 +- - tools/mkssldef.py | 2 +- - tools/specialize_node_d.py | 2 +- - tools/test.py | 2 +- - 154 files changed, 180 insertions(+), 180 deletions(-) + 83 files changed, 103 insertions(+), 103 deletions(-) diff --git a/common.gypi b/common.gypi -index 01ab2de..5ff1292 100644 +index 8a3179d..81d34d0 100644 --- a/common.gypi +++ b/common.gypi @@ -9,7 +9,7 @@ @@ -174,15 +103,15 @@ index 01ab2de..5ff1292 100644 'node_shared%': 'false', 'force_dynamic_crt%': 0, diff --git a/configure b/configure -index 42dac5f..387ebe3 100644 +index 6a50e5e..e8441a5 100644 --- a/configure +++ b/configure @@ -1,4 +1,4 @@ -#!/usr/bin/env python -+#!/usr/bin/python2 ++#!/usr/bin/env python2 - import errno - import optparse + import sys + if sys.version_info[0] != 2 or sys.version_info[1] not in (6, 7): diff --git a/deps/cares/build/gcc_version.py b/deps/cares/build/gcc_version.py index da019e8..b4223af 100644 --- a/deps/cares/build/gcc_version.py @@ -193,6 +122,19 @@ index da019e8..b4223af 100644 import os import re +diff --git a/deps/cares/common.gypi b/deps/cares/common.gypi +index 609ad62..c187196 100644 +--- a/deps/cares/common.gypi ++++ b/deps/cares/common.gypi +@@ -139,7 +139,7 @@ + + [ 'OS in "linux freebsd openbsd solaris android aix"', { + 'variables': { +- 'gcc_version%': ')' ++ 'gcc_version%': ')' + }, + 'cflags': [ '-Wall' ], + 'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ], diff --git a/deps/cares/gyp_cares b/deps/cares/gyp_cares index d1f1640..ecd3f0a 100644 --- a/deps/cares/gyp_cares @@ -203,312 +145,6 @@ index d1f1640..ecd3f0a 100644 import glob import platform -diff --git a/deps/npm/node_modules/node-gyp/gyp/buildbot/buildbot_run.py b/deps/npm/node_modules/node-gyp/gyp/buildbot/buildbot_run.py -index 9a2b71f..d5a75fd 100644 ---- a/deps/npm/node_modules/node-gyp/gyp/buildbot/buildbot_run.py -+++ b/deps/npm/node_modules/node-gyp/gyp/buildbot/buildbot_run.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python2 - # Copyright (c) 2012 Google Inc. All rights reserved. - # Use of this source code is governed by a BSD-style license that can be - # found in the LICENSE file. -diff --git a/deps/npm/node_modules/node-gyp/gyp/gyp b/deps/npm/node_modules/node-gyp/gyp/gyp -index 1b8b9bd..7c01529 100644 ---- a/deps/npm/node_modules/node-gyp/gyp/gyp -+++ b/deps/npm/node_modules/node-gyp/gyp/gyp -@@ -5,4 +5,4 @@ - - set -e - base=$(dirname "$0") --exec python "${base}/gyp_main.py" "$@" -+exec python2 "${base}/gyp_main.py" "$@" -diff --git a/deps/npm/node_modules/node-gyp/gyp/gyp_main.py b/deps/npm/node_modules/node-gyp/gyp/gyp_main.py -index 25a6eba..98314a8 100644 ---- a/deps/npm/node_modules/node-gyp/gyp/gyp_main.py -+++ b/deps/npm/node_modules/node-gyp/gyp/gyp_main.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python2 - - # Copyright (c) 2009 Google Inc. All rights reserved. - # Use of this source code is governed by a BSD-style license that can be -diff --git a/deps/npm/node_modules/node-gyp/gyp/gyptest.py b/deps/npm/node_modules/node-gyp/gyp/gyptest.py -index 8e4fc47..2df4d3f 100644 ---- a/deps/npm/node_modules/node-gyp/gyp/gyptest.py -+++ b/deps/npm/node_modules/node-gyp/gyp/gyptest.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python2 - - # Copyright (c) 2012 Google Inc. All rights reserved. - # Use of this source code is governed by a BSD-style license that can be -diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py -index bf6ea6b..340fd57 100644 ---- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py -+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python2 - - # Copyright (c) 2012 Google Inc. All rights reserved. - # Use of this source code is governed by a BSD-style license that can be -diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py -index 668f38b..186c94a 100644 ---- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py -+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python2 - - # Copyright (c) 2012 Google Inc. All rights reserved. - # Use of this source code is governed by a BSD-style license that can be -diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/common_test.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/common_test.py -index ad6f9a1..bf0fa40 100644 ---- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/common_test.py -+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/common_test.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python2 - - # Copyright (c) 2012 Google Inc. All rights reserved. - # Use of this source code is governed by a BSD-style license that can be -diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py -index df64354..c8b594f 100644 ---- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py -+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python2 - - # Copyright (c) 2011 Google Inc. All rights reserved. - # Use of this source code is governed by a BSD-style license that can be -diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py -index b38d866..fdf9785 100644 ---- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py -+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python2 - # Copyright (c) 2011 Google Inc. All rights reserved. - # Use of this source code is governed by a BSD-style license that can be - # found in the LICENSE file. -diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py -index c0b021d..0eb53ea 100644 ---- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py -+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python2 - # Copyright (c) 2012 Google Inc. All rights reserved. - # Use of this source code is governed by a BSD-style license that can be - # found in the LICENSE file. -diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py -index 841067e..68ab4ca 100644 ---- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py -+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py -@@ -1754,7 +1754,7 @@ def _AddWinLinkRules(master_ninja, embed_manifest): - return '%(python)s gyp-win-tool link-with-manifests $arch %(embed)s ' \ - '%(out)s "%(ldcmd)s" %(resname)s $mt $rc "$intermediatemanifest" ' \ - '$manifests' % { -- 'python': sys.executable, -+ 'python2': sys.executable, - 'out': out, - 'ldcmd': ldcmd, - 'resname': resource_name, -diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py -index 1767b2f..5c75cc3 100644 ---- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py -+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python2 - - # Copyright (c) 2012 Google Inc. All rights reserved. - # Use of this source code is governed by a BSD-style license that can be -diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py -index 0e3fb93..22dc520 100644 ---- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py -+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py -@@ -283,7 +283,7 @@ class XcodeProject(object): - command_prefix = '' - if serialize_all_tests: - command_prefix = \ --"""python -c "import fcntl, subprocess, sys -+"""python2 -c "import fcntl, subprocess, sys - file = open('$TMPDIR/GYP_serialize_test_runs', 'a') - fcntl.flock(file.fileno(), fcntl.LOCK_EX) - sys.exit(subprocess.call(sys.argv[1:]))" """ -diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py -index 260324a..77a5687 100644 ---- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py -+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python2 - - # Copyright (c) 2013 Google Inc. All rights reserved. - # Use of this source code is governed by a BSD-style license that can be -diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input_test.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input_test.py -index 4234fbb..110627e 100644 ---- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input_test.py -+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input_test.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python2 - - # Copyright 2013 Google Inc. All rights reserved. - # Use of this source code is governed by a BSD-style license that can be -diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py -index eeeaceb..c83820a 100644 ---- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py -+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python2 - # Copyright (c) 2012 Google Inc. All rights reserved. - # Use of this source code is governed by a BSD-style license that can be - # found in the LICENSE file. -diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py -index bb6f1ea..e3d244a 100644 ---- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py -+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python2 - - # Copyright (c) 2012 Google Inc. All rights reserved. - # Use of this source code is governed by a BSD-style license that can be -@@ -144,7 +144,7 @@ class WinTool(object): - # first and only link. We still tell link to generate a manifest, but we - # only use that to assert that our simpler process did not miss anything. - variables = { -- 'python': sys.executable, -+ 'python2': sys.executable, - 'arch': arch, - 'out': out, - 'ldcmd': ldcmd, -diff --git a/deps/npm/node_modules/node-gyp/gyp/samples/samples b/deps/npm/node_modules/node-gyp/gyp/samples/samples -index 804b618..0139666 100644 ---- a/deps/npm/node_modules/node-gyp/gyp/samples/samples -+++ b/deps/npm/node_modules/node-gyp/gyp/samples/samples -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!/usr/bin/python2 - - # Copyright (c) 2009 Google Inc. All rights reserved. - # Use of this source code is governed by a BSD-style license that can be -diff --git a/deps/npm/node_modules/node-gyp/gyp/setup.py b/deps/npm/node_modules/node-gyp/gyp/setup.py -index 75a4255..e4ec8ba 100644 ---- a/deps/npm/node_modules/node-gyp/gyp/setup.py -+++ b/deps/npm/node_modules/node-gyp/gyp/setup.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python2 - - # Copyright (c) 2009 Google Inc. All rights reserved. - # Use of this source code is governed by a BSD-style license that can be -diff --git a/deps/npm/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp b/deps/npm/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp -index 29300fe..c10cdd1 100644 ---- a/deps/npm/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp -+++ b/deps/npm/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp -@@ -987,7 +987,7 @@ - '<(SHARED_INTERMEDIATE_DIR)/media/jni/media_player_listener_jni.h', - ], - 'action': [ -- 'python', -+ 'python2', - '<(DEPTH)/base/android/jni_generator/jni_generator.py', - '-o', - '<@(_inputs)', -diff --git a/deps/npm/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp.fontified b/deps/npm/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp.fontified -index 962b7b2..0ef99fc 100644 ---- a/deps/npm/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp.fontified -+++ b/deps/npm/node_modules/node-gyp/gyp/tools/emacs/testdata/media.gyp.fontified -@@ -988,7 +988,7 @@ - '<(SHARED_INTERMEDIATE_DIR)/media/jni/media_player_listener_jni.h', - ], - 'action': [ -- 'python', -+ 'python2', - '<(DEPTH)/base/android/jni_generator/jni_generator.py', - '-o', - '<@(_inputs)', -diff --git a/deps/npm/node_modules/node-gyp/gyp/tools/graphviz.py b/deps/npm/node_modules/node-gyp/gyp/tools/graphviz.py -index 326ae22..553a101 100644 ---- a/deps/npm/node_modules/node-gyp/gyp/tools/graphviz.py -+++ b/deps/npm/node_modules/node-gyp/gyp/tools/graphviz.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python2 - - # Copyright (c) 2011 Google Inc. All rights reserved. - # Use of this source code is governed by a BSD-style license that can be -diff --git a/deps/npm/node_modules/node-gyp/gyp/tools/pretty_gyp.py b/deps/npm/node_modules/node-gyp/gyp/tools/pretty_gyp.py -index c51d358..262a0b3 100644 ---- a/deps/npm/node_modules/node-gyp/gyp/tools/pretty_gyp.py -+++ b/deps/npm/node_modules/node-gyp/gyp/tools/pretty_gyp.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python2 - - # Copyright (c) 2012 Google Inc. All rights reserved. - # Use of this source code is governed by a BSD-style license that can be -diff --git a/deps/npm/node_modules/node-gyp/gyp/tools/pretty_sln.py b/deps/npm/node_modules/node-gyp/gyp/tools/pretty_sln.py -index ca8cf4a..13aef67 100644 ---- a/deps/npm/node_modules/node-gyp/gyp/tools/pretty_sln.py -+++ b/deps/npm/node_modules/node-gyp/gyp/tools/pretty_sln.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python2 - - # Copyright (c) 2012 Google Inc. All rights reserved. - # Use of this source code is governed by a BSD-style license that can be -diff --git a/deps/npm/node_modules/node-gyp/gyp/tools/pretty_vcproj.py b/deps/npm/node_modules/node-gyp/gyp/tools/pretty_vcproj.py -index 6099bd7..41530a8 100644 ---- a/deps/npm/node_modules/node-gyp/gyp/tools/pretty_vcproj.py -+++ b/deps/npm/node_modules/node-gyp/gyp/tools/pretty_vcproj.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python2 - - # Copyright (c) 2012 Google Inc. All rights reserved. - # Use of this source code is governed by a BSD-style license that can be -diff --git a/deps/npm/node_modules/node-gyp/lib/configure.js b/deps/npm/node_modules/node-gyp/lib/configure.js -index 4e06529..73eb0bd 100644 ---- a/deps/npm/node_modules/node-gyp/lib/configure.js -+++ b/deps/npm/node_modules/node-gyp/lib/configure.js -@@ -44,7 +44,7 @@ function configure (gyp, argv, callback) { - - function getNodeDir () { - -- // 'python' should be set by now -+ // 'python2' should be set by now - process.env.PYTHON = python - - if (gyp.opts.nodedir) { -@@ -321,7 +321,7 @@ function findPython (python, callback) { - if (err) { - log.verbose('`which` failed', python, err) - if (python === 'python2') { -- python = 'python' -+ python = 'python2' - return checkPython() - } - if (win) { -diff --git a/deps/npm/node_modules/node-gyp/test/test-find-python.js b/deps/npm/node_modules/node-gyp/test/test-find-python.js -index 7f5c394..7c83daa 100644 ---- a/deps/npm/node_modules/node-gyp/test/test-find-python.js -+++ b/deps/npm/node_modules/node-gyp/test/test-find-python.js -@@ -7,7 +7,7 @@ var execFile = require('child_process').execFile - test('find python executable', function (t) { - t.plan(4) - -- configure.test.findPython('python', function (err, found) { -+ configure.test.findPython('python2', function (err, found) { - t.strictEqual(err, null) - var proc = execFile(found, ['-V'], function (err, stdout, stderr) { - t.strictEqual(err, null) diff --git a/deps/uv/gyp_uv.py b/deps/uv/gyp_uv.py index bd37d95..297059b 100644 --- a/deps/uv/gyp_uv.py @@ -520,7 +156,7 @@ index bd37d95..297059b 100644 import os import platform diff --git a/deps/v8/DEPS b/deps/v8/DEPS -index 0559523..71aacbc 100644 +index 0559523..15cb213 100644 --- a/deps/v8/DEPS +++ b/deps/v8/DEPS @@ -64,7 +64,7 @@ hooks = [ @@ -568,7 +204,7 @@ index 0559523..71aacbc 100644 'v8/third_party/binutils/download.py', ], }, -@@ -208,14 +208,14 @@ hooks = [ +@@ -208,18 +208,18 @@ hooks = [ # Note: This must run before the clang update. 'name': 'gold_plugin', 'pattern': '.', @@ -585,6 +221,11 @@ index 0559523..71aacbc 100644 }, { # A change to a .gyp, .gypi, or to GYP itself should run the generator. + "pattern": ".", +- "action": ["python", "v8/build/gyp_v8"], ++ "action": ["python2", "v8/build/gyp_v8"], + }, + ] diff --git a/deps/v8/Makefile b/deps/v8/Makefile index a0c08a6..66af786 100644 --- a/deps/v8/Makefile @@ -730,10 +371,10 @@ index 940211c..7e21773 100644 '<@(generator_args)', '--generate', diff --git a/deps/v8/build/standalone.gypi b/deps/v8/build/standalone.gypi -index 6c88409..3507514 100644 +index a9123cb..1b0029a 100644 --- a/deps/v8/build/standalone.gypi +++ b/deps/v8/build/standalone.gypi -@@ -66,7 +66,7 @@ +@@ -67,7 +67,7 @@ }, 'host_arch%': '<(host_arch)', 'target_arch%': '<(host_arch)', @@ -742,8 +383,17 @@ index 6c88409..3507514 100644 # Instrument for code coverage and use coverage wrapper to exclude some # files. Uses gcov if clang=0 is set explicitly. Otherwise, +@@ -431,7 +431,7 @@ + # (defines are passed via the command line, and build systems rebuild + # things when their commandline changes). Nothing should ever read this + # define. +- 'defines': ['CR_CLANG_REVISION= +Date: Tue, 14 Feb 2017 21:43:31 -0500 +Subject: [PATCH 2/8] Fix system-icu build + +--- + deps/v8/tools/gyp/v8.gyp | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/deps/v8/tools/gyp/v8.gyp b/deps/v8/tools/gyp/v8.gyp +index e1ba0b1..8323075 100644 +--- a/deps/v8/tools/gyp/v8.gyp ++++ b/deps/v8/tools/gyp/v8.gyp +@@ -1637,11 +1637,6 @@ + '../../src/i18n.h', + ], + }], +- ['OS=="win" and v8_enable_i18n_support==1', { +- 'dependencies': [ +- '<(icu_gyp_path):icudata', +- ], +- }], + ['icu_use_data_file_flag==1', { + 'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE'], + }, { # else icu_use_data_file_flag !=1 +-- +2.11.0 + diff --git a/mingw-w64-nodejs/0002-Mat_Sutcliffe-node_mingw64-without-MSYS-path-convers.patch b/mingw-w64-nodejs/0002-Mat_Sutcliffe-node_mingw64-without-MSYS-path-convers.patch deleted file mode 100644 index fe4894616c..0000000000 --- a/mingw-w64-nodejs/0002-Mat_Sutcliffe-node_mingw64-without-MSYS-path-convers.patch +++ /dev/null @@ -1,145 +0,0 @@ -From 4a32209018ca0d1013d326d4233013ca1bc5a98a Mon Sep 17 00:00:00 2001 -From: mati865 -Date: Sun, 4 Sep 2016 12:56:33 +0200 -Subject: [PATCH 02/13] Mat_Sutcliffe-node_mingw64-without-MSYS-path-conversion - ---- - deps/cares/cares.gyp | 4 ++-- - deps/openssl/openssl.gypi | 14 +++++++------- - deps/uv/src/win/pipe.c | 4 ++++ - deps/uv/src/win/process.c | 3 +++ - deps/v8/tools/gyp/v8.gyp | 2 +- - node.gyp | 2 +- - src/node_main.cc | 8 +++++++- - 7 files changed, 25 insertions(+), 12 deletions(-) - -diff --git a/deps/cares/cares.gyp b/deps/cares/cares.gyp -index 158cef3..5e2a17c 100644 ---- a/deps/cares/cares.gyp -+++ b/deps/cares/cares.gyp -@@ -120,8 +120,8 @@ - 'src/ares_platform.c' - ], - 'libraries': [ -- '-lws2_32.lib', -- '-liphlpapi.lib' -+ '-lws2_32', -+ '-liphlpapi' - ], - }, { - # Not Windows i.e. POSIX -diff --git a/deps/openssl/openssl.gypi b/deps/openssl/openssl.gypi -index 3620e45..a472b12 100644 ---- a/deps/openssl/openssl.gypi -+++ b/deps/openssl/openssl.gypi -@@ -1225,11 +1225,11 @@ - '-lnsl', - ], - 'openssl_cli_libraries_win': [ -- '-lws2_32.lib', -- '-lgdi32.lib', -- '-ladvapi32.lib', -- '-lcrypt32.lib', -- '-luser32.lib', -+ '-lws2_32', -+ '-lgdi32', -+ '-ladvapi32', -+ '-lcrypt32', -+ '-luser32', - ], - #### Variables for Target Defaults #### - 'openssl_default_include_dirs': [ -@@ -1270,8 +1270,8 @@ - 'OPENSSL_SYSNAME_WIN32', - ], - 'openssl_default_libraries_win': [ -- '-lgdi32.lib', -- '-luser32.lib', -+ '-lgdi32', -+ '-luser32', - ], - 'openssl_default_defines_not_win': [ - # ENGINESDIR must be defined if OPENSSLDIR is. -diff --git a/deps/uv/src/win/pipe.c b/deps/uv/src/win/pipe.c -index a784325..6ab1fd4 100644 ---- a/deps/uv/src/win/pipe.c -+++ b/deps/uv/src/win/pipe.c -@@ -31,6 +31,10 @@ - #include "stream-inl.h" - #include "req-inl.h" - -+#ifndef FILE_FLAG_FIRST_PIPE_INSTANCE -+#define FILE_FLAG_FIRST_PIPE_INSTANCE 524288 -+#endif -+ - typedef struct uv__ipc_queue_item_s uv__ipc_queue_item_t; - - struct uv__ipc_queue_item_s { -diff --git a/deps/uv/src/win/process.c b/deps/uv/src/win/process.c -index 855c374..dd67b19 100644 ---- a/deps/uv/src/win/process.c -+++ b/deps/uv/src/win/process.c -@@ -33,6 +33,9 @@ - #include "handle-inl.h" - #include "req-inl.h" - -+#ifndef JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE -+#define JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE 0x2000 -+#endif - - #define SIGKILL 9 - -diff --git a/deps/v8/tools/gyp/v8.gyp b/deps/v8/tools/gyp/v8.gyp -index e1ba0b1..45c7c8f 100644 ---- a/deps/v8/tools/gyp/v8.gyp -+++ b/deps/v8/tools/gyp/v8.gyp -@@ -1915,7 +1915,7 @@ - ], - 'msvs_disabled_warnings': [4351, 4355, 4800], - 'link_settings': { -- 'libraries': [ '-lwinmm.lib', '-lws2_32.lib' ], -+ 'libraries': [ '-lwinmm', '-lws2_32' ], - }, - }], - ], -diff --git a/node.gyp b/node.gyp -index 1b5a23f..d098100 100644 ---- a/node.gyp -+++ b/node.gyp -@@ -504,7 +504,7 @@ - 'NODE_PLATFORM="win32"', - '_UNICODE=1', - ], -- 'libraries': [ '-lpsapi.lib' ] -+ 'libraries': [ '-municode', '-lpsapi' ] - }, { # POSIX - 'defines': [ '__POSIX__' ], - 'sources': [ 'src/backtrace_posix.cc' ], -diff --git a/src/node_main.cc b/src/node_main.cc -index bde3975..7acd7bc 100644 ---- a/src/node_main.cc -+++ b/src/node_main.cc -@@ -1,6 +1,9 @@ - #include "node.h" - --#ifdef _WIN32 -+#if defined(_MSC_VER) || defined(__MINGW64_VERSION_MAJOR) -+#if defined (__cplusplus) && defined(__MINGW64_VERSION_MAJOR) -+extern "C" { -+#endif - #include - - int wmain(int argc, wchar_t *wargv[]) { -@@ -47,6 +50,9 @@ int wmain(int argc, wchar_t *wargv[]) { - // Now that conversion is done, we can finally start. - return node::Start(argc, argv); - } -+#if defined (__cplusplus) && defined(__MINGW64_VERSION_MAJOR) -+} -+#endif - #else - // UNIX - int main(int argc, char *argv[]) { --- -2.9.1 - diff --git a/mingw-w64-nodejs/0003-Include-win32-headers.h-in-v8-atomicops.h.patch b/mingw-w64-nodejs/0003-Include-win32-headers.h-in-v8-atomicops.h.patch new file mode 100644 index 0000000000..cd8dfaaaa5 --- /dev/null +++ b/mingw-w64-nodejs/0003-Include-win32-headers.h-in-v8-atomicops.h.patch @@ -0,0 +1,27 @@ +From 035aaa413ba2d015da95154fcf00e8ba4a157a7a Mon Sep 17 00:00:00 2001 +From: Alethea Rose +Date: Tue, 14 Feb 2017 22:26:28 -0500 +Subject: [PATCH 3/8] Include win32-headers.h in v8/atomicops.h + +--- + deps/v8/src/base/atomicops.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/deps/v8/src/base/atomicops.h b/deps/v8/src/base/atomicops.h +index ea33e48..ac759ad 100644 +--- a/deps/v8/src/base/atomicops.h ++++ b/deps/v8/src/base/atomicops.h +@@ -28,6 +28,10 @@ + #include + #include "src/base/build_config.h" + ++#if defined(_WIN32) ++#include "win32-headers.h" ++#endif ++ + #if defined(_WIN32) && defined(V8_HOST_ARCH_64_BIT) + // windows.h #defines this (only on x64). This causes problems because the + // public API also uses MemoryBarrier at the public name for this fence. So, on +-- +2.11.0 + diff --git a/mingw-w64-nodejs/0003-include-win32-headers.h-for-v8.patch b/mingw-w64-nodejs/0003-include-win32-headers.h-for-v8.patch deleted file mode 100644 index b76cc51b0e..0000000000 --- a/mingw-w64-nodejs/0003-include-win32-headers.h-for-v8.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 5a4a3ec90efb354040f021874b85589c1566d44e Mon Sep 17 00:00:00 2001 -From: mati865 -Date: Sun, 4 Sep 2016 13:20:48 +0200 -Subject: [PATCH 03/13] include win32-headers.h for v8 - ---- - deps/v8/src/base/atomicops.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/deps/v8/src/base/atomicops.h b/deps/v8/src/base/atomicops.h -index ea33e48..5e1b82e 100644 ---- a/deps/v8/src/base/atomicops.h -+++ b/deps/v8/src/base/atomicops.h -@@ -34,6 +34,7 @@ - // X64, undef it, and call its documented - // (http://msdn.microsoft.com/en-us/library/windows/desktop/ms684208.aspx) - // implementation directly. -+#include "win32-headers.h" - #undef MemoryBarrier - #endif - --- -2.9.1 - diff --git a/mingw-w64-nodejs/0004-mingw-w64-defines-localtime_s.patch b/mingw-w64-nodejs/0004-Define-localtime_s-for-MinGW.patch similarity index 61% rename from mingw-w64-nodejs/0004-mingw-w64-defines-localtime_s.patch rename to mingw-w64-nodejs/0004-Define-localtime_s-for-MinGW.patch index 4a997294c7..61c48a4570 100644 --- a/mingw-w64-nodejs/0004-mingw-w64-defines-localtime_s.patch +++ b/mingw-w64-nodejs/0004-Define-localtime_s-for-MinGW.patch @@ -1,14 +1,14 @@ -From ef4b7a1cb73e1f99e0d0365ce046e665c14c4aca Mon Sep 17 00:00:00 2001 -From: mati865 -Date: Sun, 4 Sep 2016 13:22:28 +0200 -Subject: [PATCH 04/13] mingw-w64 defines localtime_s +From 86c142241b4aa2f2e526cb38bdd8ddcadd476a21 Mon Sep 17 00:00:00 2001 +From: Alethea Rose +Date: Tue, 14 Feb 2017 23:07:39 -0500 +Subject: [PATCH 4/8] Define localtime_s for MinGW --- - deps/v8/src/base/platform/platform-win32.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + deps/v8/src/base/platform/platform-win32.cc | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/deps/v8/src/base/platform/platform-win32.cc b/deps/v8/src/base/platform/platform-win32.cc -index 0076a35..2217009 100644 +index 0076a35..85c115e 100644 --- a/deps/v8/src/base/platform/platform-win32.cc +++ b/deps/v8/src/base/platform/platform-win32.cc @@ -42,8 +42,6 @@ inline void MemoryBarrier() { @@ -20,15 +20,14 @@ index 0076a35..2217009 100644 int localtime_s(tm* out_tm, const time_t* time) { tm* posix_local_time_struct = localtime(time); // NOLINT -@@ -52,6 +50,8 @@ int localtime_s(tm* out_tm, const time_t* time) { +@@ -52,6 +50,7 @@ int localtime_s(tm* out_tm, const time_t* time) { return 0; } +#endif // __MINGW64_VERSION_MAJOR -+ int fopen_s(FILE** pFile, const char* filename, const char* mode) { *pFile = fopen(filename, mode); -- -2.9.1 +2.11.0 diff --git a/mingw-w64-nodejs/0005-Remove-.lib-suffix-on-linked-libraries.patch b/mingw-w64-nodejs/0005-Remove-.lib-suffix-on-linked-libraries.patch new file mode 100644 index 0000000000..6c9a2b7326 --- /dev/null +++ b/mingw-w64-nodejs/0005-Remove-.lib-suffix-on-linked-libraries.patch @@ -0,0 +1,55 @@ +From 9d3da7597d7deabf41b9a7440f6e180b73483f8b Mon Sep 17 00:00:00 2001 +From: Alethea Rose +Date: Tue, 14 Feb 2017 23:11:03 -0500 +Subject: [PATCH 5/8] Remove .lib suffix on linked libraries + +--- + deps/v8/BUILD.gn | 4 ++-- + deps/v8/tools/gyp/v8.gyp | 2 +- + node.gyp | 2 +- + 3 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/deps/v8/BUILD.gn b/deps/v8/BUILD.gn +index 28aca24..c8d3537 100644 +--- a/deps/v8/BUILD.gn ++++ b/deps/v8/BUILD.gn +@@ -1902,8 +1902,8 @@ source_set("v8_libbase") { + defines += [ "_CRT_RAND_S" ] # for rand_s() + + libs = [ +- "winmm.lib", +- "ws2_32.lib", ++ "winmm", ++ "ws2_32", + ] + } + +diff --git a/deps/v8/tools/gyp/v8.gyp b/deps/v8/tools/gyp/v8.gyp +index 8323075..79de18f 100644 +--- a/deps/v8/tools/gyp/v8.gyp ++++ b/deps/v8/tools/gyp/v8.gyp +@@ -1910,7 +1910,7 @@ + ], + 'msvs_disabled_warnings': [4351, 4355, 4800], + 'link_settings': { +- 'libraries': [ '-lwinmm.lib', '-lws2_32.lib' ], ++ 'libraries': [ '-lwinmm', '-lws2_32' ], + }, + }], + ], +diff --git a/node.gyp b/node.gyp +index 23a71cc..bfc4202 100644 +--- a/node.gyp ++++ b/node.gyp +@@ -505,7 +505,7 @@ + 'NODE_PLATFORM="win32"', + '_UNICODE=1', + ], +- 'libraries': [ '-lpsapi.lib' ] ++ 'libraries': [ '-lpsapi' ] + }, { # POSIX + 'defines': [ '__POSIX__' ], + 'sources': [ 'src/backtrace_posix.cc' ], +-- +2.11.0 + diff --git a/mingw-w64-nodejs/0006-Define-_WIN32_WINNT-in-node.gyp.patch b/mingw-w64-nodejs/0006-Define-_WIN32_WINNT-in-node.gyp.patch new file mode 100644 index 0000000000..ee9d6ebcf9 --- /dev/null +++ b/mingw-w64-nodejs/0006-Define-_WIN32_WINNT-in-node.gyp.patch @@ -0,0 +1,28 @@ +From 8384795a7cb844ba2f118c9e28a6d1370386b280 Mon Sep 17 00:00:00 2001 +From: Alethea Rose +Date: Wed, 15 Feb 2017 02:03:24 -0500 +Subject: [PATCH 6/8] Define _WIN32_WINNT in node.gyp + +--- + node.gyp | 3 +++ + win32_winnt.py | 3 +++ + 2 files changed, 6 insertions(+) + create mode 100644 win32_winnt.py + +diff --git a/node.gyp b/node.gyp +index bfc4202..e4f633f 100644 +--- a/node.gyp ++++ b/node.gyp +@@ -236,6 +236,9 @@ + + + 'conditions': [ ++ [ 'OS=="win"', { ++ 'defines': [ '_WIN32_WINNT=0x0600' ], ++ }], + [ 'node_shared=="false"', { + 'msvs_settings': { + 'VCManifestTool': { +-- +2.11.0 + diff --git a/mingw-w64-nodejs/0006-fix-winnt-version.patch b/mingw-w64-nodejs/0006-fix-winnt-version.patch deleted file mode 100644 index ea67d0779f..0000000000 --- a/mingw-w64-nodejs/0006-fix-winnt-version.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 4eee9eef8c4ac97a9e5afc0fe4ad00f74de155c8 Mon Sep 17 00:00:00 2001 -From: mati865 -Date: Sun, 4 Sep 2016 18:14:37 +0200 -Subject: [PATCH 06/13] fix winnt version - -Define 0x0600 version to fix compilation ---- - node.gyp | 5 ++++- - src/cares_wrap.cc | 5 +++++ - 2 files changed, 9 insertions(+), 1 deletion(-) - -diff --git a/node.gyp b/node.gyp -index d098100..39acb6c 100644 ---- a/node.gyp -+++ b/node.gyp -@@ -448,7 +448,10 @@ - ] - } ], - [ 'node_use_perfctr=="true"', { -- 'defines': [ 'HAVE_PERFCTR=1' ], -+ 'defines': [ -+ 'HAVE_PERFCTR=1', -+ '_WIN32_WINNT=0x0600', -+ ], - 'dependencies': [ 'node_perfctr' ], - 'sources': [ - 'src/node_win32_perfctr_provider.h', -diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc -index 4a9c6f7..ffe33b0 100644 ---- a/src/cares_wrap.cc -+++ b/src/cares_wrap.cc -@@ -1,4 +1,9 @@ - #define CARES_STATICLIB -+/* TODO: find real fix; this code uses defines from ws2tcpip.h which require winnt 0x0600 */ -+#if _WIN32_WINNT < 0x0600 -+#undef _WIN32_WINNT -+#define _WIN32_WINNT 0x0600 -+#endif - #include "ares.h" - #include "async-wrap.h" - #include "async-wrap-inl.h" - -- -2.9.1 diff --git a/mingw-w64-nodejs/0007-MinGW-w64-add-platform-wintoolset-as-msvc-or-mingw-w.patch b/mingw-w64-nodejs/0007-MinGW-w64-add-platform-wintoolset-as-msvc-or-mingw-w.patch deleted file mode 100644 index 9a094a7ea4..0000000000 --- a/mingw-w64-nodejs/0007-MinGW-w64-add-platform-wintoolset-as-msvc-or-mingw-w.patch +++ /dev/null @@ -1,167 +0,0 @@ -From d0fee4e3178b5ee7d92346359b50635aad5a10e2 Mon Sep 17 00:00:00 2001 -From: mati865 -Date: Sun, 4 Sep 2016 18:17:15 +0200 -Subject: [PATCH 07/13] MinGW-w64 add platform wintoolset as msvc or mingw-w64 - for node-gyp - ---- - deps/npm/node_modules/node-gyp/lib/build.js | 22 +++++++++++----------- - deps/npm/node_modules/node-gyp/lib/configure.js | 10 +++++----- - src/node.cc | 11 +++++++++++ - 3 files changed, 27 insertions(+), 16 deletions(-) - -diff --git a/deps/npm/node_modules/node-gyp/lib/build.js b/deps/npm/node_modules/node-gyp/lib/build.js -index 3a3edcc..fed5042 100644 ---- a/deps/npm/node_modules/node-gyp/lib/build.js -+++ b/deps/npm/node_modules/node-gyp/lib/build.js -@@ -14,9 +14,9 @@ var fs = require('graceful-fs') - , mkdirp = require('mkdirp') - , exec = require('child_process').exec - , processRelease = require('./process-release') -- , win = process.platform == 'win32' -+ , winMsvc = process.platform == 'win32' && process.wintoolchain == 'msvc' - --exports.usage = 'Invokes `' + (win ? 'msbuild' : 'make') + '` and builds the module' -+exports.usage = 'Invokes `' + (winMsvc ? 'msbuild' : 'make') + '` and builds the module' - - function build (gyp, argv, callback) { - var platformMake = 'make' -@@ -28,7 +28,7 @@ function build (gyp, argv, callback) { - - var release = processRelease(argv, gyp, process.version, process.release) - , makeCommand = gyp.opts.make || process.env.MAKE || platformMake -- , command = win ? 'msbuild' : makeCommand -+ , command = winMsvc ? 'msbuild' : makeCommand - , buildDir = path.resolve('build') - , configPath = path.resolve(buildDir, 'config.gypi') - , jobs = gyp.opts.jobs || process.env.JOBS -@@ -73,7 +73,7 @@ function build (gyp, argv, callback) { - log.verbose('architecture', arch) - log.verbose('node dev dir', nodeDir) - -- if (win) { -+ if (winMsvc) { - findSolutionFile() - } else { - doWhich() -@@ -105,7 +105,7 @@ function build (gyp, argv, callback) { - // First make sure we have the build command in the PATH - which(command, function (err, execPath) { - if (err) { -- if (win && /not found/.test(err.message)) { -+ if (winMsvc && /not found/.test(err.message)) { - // On windows and no 'msbuild' found. Let's guess where it is - findMsbuild() - } else { -@@ -185,7 +185,7 @@ function build (gyp, argv, callback) { - */ - - function copyNodeLib () { -- if (!win || !copyDevLib) return doBuild() -+ if (!winMsvc || !copyDevLib) return doBuild() - - var buildDir = path.resolve(nodeDir, buildType) - , archNodeLibPath = path.resolve(nodeDir, arch, release.name + '.lib') -@@ -212,20 +212,20 @@ function build (gyp, argv, callback) { - - // Enable Verbose build - var verbose = log.levels[log.level] <= log.levels.verbose -- if (!win && verbose) { -+ if (!winMsvc && verbose) { - argv.push('V=1') - } -- if (win && !verbose) { -+ if (winMsvc && !verbose) { - argv.push('/clp:Verbosity=minimal') - } - -- if (win) { -+ if (winMsvc) { - // Turn off the Microsoft logo on Windows - argv.push('/nologo') - } - - // Specify the build type, Release by default -- if (win) { -+ if (winMsvc) { - var p = arch === 'x64' ? 'x64' : 'Win32' - argv.push('/p:Configuration=' + buildType + ';Platform=' + p) - if (jobs) { -@@ -253,7 +253,7 @@ function build (gyp, argv, callback) { - } - } - -- if (win) { -+ if (winMsvc) { - // did the user specify their own .sln file? - var hasSln = argv.some(function (arg) { - return path.extname(arg) == '.sln' -diff --git a/deps/npm/node_modules/node-gyp/lib/configure.js b/deps/npm/node_modules/node-gyp/lib/configure.js -index 73eb0bd..d21f555 100644 ---- a/deps/npm/node_modules/node-gyp/lib/configure.js -+++ b/deps/npm/node_modules/node-gyp/lib/configure.js -@@ -19,10 +19,10 @@ var fs = require('graceful-fs') - , processRelease = require('./process-release') - , spawn = cp.spawn - , execFile = cp.execFile -- , win = process.platform == 'win32' -+ , winMsvc = process.platform == 'win32' && process.wintoolchain == 'msvc' - , findNodeDirectory = require('./find-node-directory') - --exports.usage = 'Generates ' + (win ? 'MSVC project files' : 'a Makefile') + ' for the current module' -+exports.usage = 'Generates ' + (winMsvc ? 'MSVC project files' : 'a Makefile') + ' for the current module' - - function configure (gyp, argv, callback) { - -@@ -188,7 +188,7 @@ function configure (gyp, argv, callback) { - if (err) return callback(err) - - if (!~argv.indexOf('-f') && !~argv.indexOf('--format')) { -- if (win) { -+ if (winMsvc) { - log.verbose('gyp', 'gyp format was not specified; forcing "msvs"') - // force the 'make' target for non-Windows - argv.push('-f', 'msvs') -@@ -205,7 +205,7 @@ function configure (gyp, argv, callback) { - }) - } - -- if (win && !hasMsvsVersion()) { -+ if (winMsvc && !hasMsvsVersion()) { - if ('msvs_version' in gyp.opts) { - argv.push('-G', 'msvs_version=' + gyp.opts.msvs_version) - } else { -@@ -255,7 +255,7 @@ function configure (gyp, argv, callback) { - common_gypi = path.resolve(nodeDir, 'common.gypi') - - var output_dir = 'build' -- if (win) { -+ if (winMsvc) { - // Windows expects an absolute path - output_dir = buildDir - } -diff --git a/src/node.cc b/src/node.cc -index b5181c3..1e4a5e2 100644 ---- a/src/node.cc -+++ b/src/node.cc -@@ -3193,6 +3193,17 @@ void SetupProcessObject(Environment* env, - # endif - #endif - -+#if defined(_WIN32) -+ // distinguish between msvc and mingw-w64 for node-gyp -+ #if defined(_MSC_VER) -+ process->Set(String::NewFromUtf8(env->isolate(), "wintoolchain"), String::NewFromUtf8(env->isolate(), "msvc")); -+ #elif defined(__MINGW32__) -+ process->Set(String::NewFromUtf8(env->isolate(), "wintoolchain"), String::NewFromUtf8(env->isolate(), "mingw-w64")); -+ #else -+ #error "Cannot determine wintoolchain" -+ #endif -+#endif -+ - // process.argv - Local arguments = Array::New(env->isolate(), argc); - for (int i = 0; i < argc; ++i) { --- -2.9.1 - diff --git a/mingw-w64-nodejs/0005-skip-unneeded-includes.patch b/mingw-w64-nodejs/0007-Skip-sys-resource-and-unneeded-includes-in-node.cc.patch similarity index 62% rename from mingw-w64-nodejs/0005-skip-unneeded-includes.patch rename to mingw-w64-nodejs/0007-Skip-sys-resource-and-unneeded-includes-in-node.cc.patch index b188e89b5b..d028c7e1cb 100644 --- a/mingw-w64-nodejs/0005-skip-unneeded-includes.patch +++ b/mingw-w64-nodejs/0007-Skip-sys-resource-and-unneeded-includes-in-node.cc.patch @@ -1,14 +1,14 @@ -From b4191a55ea36530d8ac7478de72f5d7dc97967b1 Mon Sep 17 00:00:00 2001 -From: mati865 -Date: Sun, 4 Sep 2016 13:25:45 +0200 -Subject: [PATCH 05/13] skip unneeded includes +From c5e36c1e70bbc3b6a920fa83d94bcaca1f0c855b Mon Sep 17 00:00:00 2001 +From: Alethea Rose +Date: Wed, 15 Feb 2017 02:45:09 -0500 +Subject: [PATCH 7/8] Skip sys/resource and unneeded includes in node.cc --- src/node.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node.cc b/src/node.cc -index e1bfb66..b5181c3 100644 +index ce39cb4..0ff794a 100644 --- a/src/node.cc +++ b/src/node.cc @@ -76,7 +76,7 @@ @@ -21,5 +21,5 @@ index e1bfb66..b5181c3 100644 #include // getrlimit, setrlimit #include // setuid, getuid -- -2.9.1 +2.11.0 diff --git a/mingw-w64-nodejs/0008-Link-with-municode-and-extern-wmain-for-Unicode.patch b/mingw-w64-nodejs/0008-Link-with-municode-and-extern-wmain-for-Unicode.patch new file mode 100644 index 0000000000..26298cb810 --- /dev/null +++ b/mingw-w64-nodejs/0008-Link-with-municode-and-extern-wmain-for-Unicode.patch @@ -0,0 +1,55 @@ +From dadf7ba5860d6143e42310918cfe51e8feb3a280 Mon Sep 17 00:00:00 2001 +From: Alethea Rose +Date: Wed, 15 Feb 2017 19:11:53 -0500 +Subject: [PATCH 8/8] Link with -municode and extern wmain for Unicode + +--- + node.gyp | 3 ++- + src/node_main.cc | 9 +++++++++ + 2 files changed, 11 insertions(+), 1 deletion(-) + +diff --git a/node.gyp b/node.gyp +index e4f633f..ff9fc3f 100644 +--- a/node.gyp ++++ b/node.gyp +@@ -507,8 +507,9 @@ + # we need to use node's preferred "win32" rather than gyp's preferred "win" + 'NODE_PLATFORM="win32"', + '_UNICODE=1', ++ 'UNICODE', + ], +- 'libraries': [ '-lpsapi' ] ++ 'libraries': [ '-municode', '-lpsapi' ] + }, { # POSIX + 'defines': [ '__POSIX__' ], + 'sources': [ 'src/backtrace_posix.cc' ], +diff --git a/src/node_main.cc b/src/node_main.cc +index bde3975..85c5c48 100644 +--- a/src/node_main.cc ++++ b/src/node_main.cc +@@ -3,6 +3,10 @@ + #ifdef _WIN32 + #include + ++#if defined(__MINGW_VERSION_MAJOR) ++#extern "C" { ++#endif ++ + int wmain(int argc, wchar_t *wargv[]) { + if (!IsWindows7OrGreater()) { + fprintf(stderr, "This application is only supported on Windows 7, " +@@ -47,6 +51,11 @@ int wmain(int argc, wchar_t *wargv[]) { + // Now that conversion is done, we can finally start. + return node::Start(argc, argv); + } ++ ++#if defined(__MINGW_VERSION_MAJOR) ++} ++#endif ++ + #else + // UNIX + int main(int argc, char *argv[]) { +-- +2.11.0 + diff --git a/mingw-w64-nodejs/0008-Use-shell-wrapper-script-for-npm-on-MSYS2-MinGW-w64.patch b/mingw-w64-nodejs/0008-Use-shell-wrapper-script-for-npm-on-MSYS2-MinGW-w64.patch deleted file mode 100644 index 1aa651abc2..0000000000 --- a/mingw-w64-nodejs/0008-Use-shell-wrapper-script-for-npm-on-MSYS2-MinGW-w64.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 4af6870f9598d26c4d725b2d9fceb9b6e4205f2d Mon Sep 17 00:00:00 2001 -From: mati865 -Date: Sun, 4 Sep 2016 18:30:30 +0200 -Subject: [PATCH 08/13] Use shell wrapper script for npm on MSYS2 MinGW w64 - ---- - tools/install.py | 13 ++++++++++++- - 1 file changed, 12 insertions(+), 1 deletion(-) - -diff --git a/tools/install.py b/tools/install.py -index e61d71a..e6dfdf3 100644 ---- a/tools/install.py -+++ b/tools/install.py -@@ -2,6 +2,7 @@ - - import errno - import json -+import platform - import os - import re - import shutil -@@ -94,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 - --- -2.9.1 - diff --git a/mingw-w64-nodejs/0009-Remove-no_rand_screen-from-s_client-invocation.patch b/mingw-w64-nodejs/0009-Remove-no_rand_screen-from-s_client-invocation.patch new file mode 100644 index 0000000000..9f9211ce99 --- /dev/null +++ b/mingw-w64-nodejs/0009-Remove-no_rand_screen-from-s_client-invocation.patch @@ -0,0 +1,171 @@ +From 555afdbded5a73c5dcbe23b2f7d57197fe485a5d Mon Sep 17 00:00:00 2001 +From: Alethea Rose +Date: Wed, 15 Feb 2017 21:34:13 -0500 +Subject: [PATCH 9/9] Remove -no_rand_screen from s_client invocation + +--- + test/parallel/test-https-foafssl.js | 4 ---- + test/parallel/test-tls-alert.js | 4 ---- + test/parallel/test-tls-dhe.js | 4 ---- + test/parallel/test-tls-ecdh-disable.js | 4 ---- + test/parallel/test-tls-ecdh.js | 4 ---- + test/parallel/test-tls-no-sslv3.js | 4 ---- + test/parallel/test-tls-securepair-server.js | 4 ---- + test/parallel/test-tls-server-verify.js | 4 ---- + test/parallel/test-tls-session-cache.js | 4 ---- + test/parallel/test-tls-set-ciphers.js | 4 ---- + 10 files changed, 40 deletions(-) + +diff --git a/test/parallel/test-https-foafssl.js b/test/parallel/test-https-foafssl.js +index 5c9fb61..6d655f3 100644 +--- a/test/parallel/test-https-foafssl.js ++++ b/test/parallel/test-https-foafssl.js +@@ -57,10 +57,6 @@ server.listen(0, function() { + '-cert', join(common.fixturesDir, 'foafssl.crt'), + '-key', join(common.fixturesDir, 'foafssl.key')]; + +- // for the performance and stability issue in s_client on Windows +- if (common.isWindows) +- args.push('-no_rand_screen'); +- + var client = spawn(common.opensslCli, args); + + client.stdout.on('data', function(data) { +diff --git a/test/parallel/test-tls-alert.js b/test/parallel/test-tls-alert.js +index db22443..d563576 100644 +--- a/test/parallel/test-tls-alert.js ++++ b/test/parallel/test-tls-alert.js +@@ -34,10 +34,6 @@ var server = tls.Server({ + var args = ['s_client', '-quiet', '-tls1_1', + '-connect', `127.0.0.1:${this.address().port}`]; + +- // for the performance and stability issue in s_client on Windows +- if (common.isWindows) +- args.push('-no_rand_screen'); +- + var client = spawn(common.opensslCli, args); + var out = ''; + client.stderr.setEncoding('utf8'); +diff --git a/test/parallel/test-tls-dhe.js b/test/parallel/test-tls-dhe.js +index 92ab415..fb5c684 100644 +--- a/test/parallel/test-tls-dhe.js ++++ b/test/parallel/test-tls-dhe.js +@@ -44,10 +44,6 @@ function test(keylen, expectedCipher, cb) { + var args = ['s_client', '-connect', `127.0.0.1:${this.address().port}`, + '-cipher', ciphers]; + +- // for the performance and stability issue in s_client on Windows +- if (common.isWindows) +- args.push('-no_rand_screen'); +- + var client = spawn(common.opensslCli, args); + var out = ''; + client.stdout.setEncoding('utf8'); +diff --git a/test/parallel/test-tls-ecdh-disable.js b/test/parallel/test-tls-ecdh-disable.js +index a6ddb15..14638a0 100644 +--- a/test/parallel/test-tls-ecdh-disable.js ++++ b/test/parallel/test-tls-ecdh-disable.js +@@ -24,10 +24,6 @@ server.listen(0, '127.0.0.1', function() { + var cmd = '"' + common.opensslCli + '" s_client -cipher ' + options.ciphers + + ` -connect 127.0.0.1:${this.address().port}`; + +- // for the performance and stability issue in s_client on Windows +- if (common.isWindows) +- cmd += ' -no_rand_screen'; +- + exec(cmd, function(err, stdout, stderr) { + // Old versions of openssl will still exit with 0 so we + // can't just check if err is not null. +diff --git a/test/parallel/test-tls-ecdh.js b/test/parallel/test-tls-ecdh.js +index 99c6e10..bbd06bb 100644 +--- a/test/parallel/test-tls-ecdh.js ++++ b/test/parallel/test-tls-ecdh.js +@@ -28,10 +28,6 @@ server.listen(0, '127.0.0.1', common.mustCall(function() { + let cmd = '"' + common.opensslCli + '" s_client -cipher ' + options.ciphers + + ` -connect 127.0.0.1:${this.address().port}`; + +- // for the performance and stability issue in s_client on Windows +- if (common.isWindows) +- cmd += ' -no_rand_screen'; +- + exec(cmd, common.mustCall(function(err, stdout, stderr) { + if (err) throw err; + assert(stdout.includes(reply)); +diff --git a/test/parallel/test-tls-no-sslv3.js b/test/parallel/test-tls-no-sslv3.js +index 16a722e..cbf89c1 100644 +--- a/test/parallel/test-tls-no-sslv3.js ++++ b/test/parallel/test-tls-no-sslv3.js +@@ -28,10 +28,6 @@ server.listen(0, '127.0.0.1', function() { + '-ssl3', + '-connect', address]; + +- // for the performance and stability issue in s_client on Windows +- if (common.isWindows) +- args.push('-no_rand_screen'); +- + const client = spawn(common.opensslCli, args, { stdio: 'pipe' }); + client.stdout.pipe(process.stdout); + client.stderr.pipe(process.stderr); +diff --git a/test/parallel/test-tls-securepair-server.js b/test/parallel/test-tls-securepair-server.js +index 24ac217..1a41e7f 100644 +--- a/test/parallel/test-tls-securepair-server.js ++++ b/test/parallel/test-tls-securepair-server.js +@@ -93,10 +93,6 @@ server.listen(0, common.mustCall(function() { + + var args = ['s_client', '-connect', `127.0.0.1:${this.address().port}`]; + +- // for the performance and stability issue in s_client on Windows +- if (common.isWindows) +- args.push('-no_rand_screen'); +- + var client = spawn(common.opensslCli, args); + + +diff --git a/test/parallel/test-tls-server-verify.js b/test/parallel/test-tls-server-verify.js +index 04c1547..34bf278 100644 +--- a/test/parallel/test-tls-server-verify.js ++++ b/test/parallel/test-tls-server-verify.js +@@ -135,10 +135,6 @@ function runClient(prefix, port, options, cb) { + + const args = ['s_client', '-connect', '127.0.0.1:' + port]; + +- // for the performance issue in s_client on Windows +- if (common.isWindows) +- args.push('-no_rand_screen'); +- + console.log(prefix + ' connecting with', options.name); + + switch (options.name) { +diff --git a/test/parallel/test-tls-session-cache.js b/test/parallel/test-tls-session-cache.js +index 60a8570..c80cc8c 100644 +--- a/test/parallel/test-tls-session-cache.js ++++ b/test/parallel/test-tls-session-cache.js +@@ -82,10 +82,6 @@ function doTest(testOptions, callback) { + '-reconnect' + ].concat(testOptions.tickets ? [] : '-no_ticket'); + +- // for the performance and stability issue in s_client on Windows +- if (common.isWindows) +- args.push('-no_rand_screen'); +- + function spawnClient() { + const client = spawn(common.opensslCli, args, { + stdio: [ 0, 1, 'pipe' ] +diff --git a/test/parallel/test-tls-set-ciphers.js b/test/parallel/test-tls-set-ciphers.js +index 5a85e3b..9d3f587 100644 +--- a/test/parallel/test-tls-set-ciphers.js ++++ b/test/parallel/test-tls-set-ciphers.js +@@ -37,10 +37,6 @@ server.listen(0, '127.0.0.1', function() { + var cmd = '"' + common.opensslCli + '" s_client -cipher ' + options.ciphers + + ` -connect 127.0.0.1:${this.address().port}`; + +- // for the performance and stability issue in s_client on Windows +- if (common.isWindows) +- cmd += ' -no_rand_screen'; +- + exec(cmd, function(err, stdout, stderr) { + if (err) throw err; + response = stdout; +-- +2.11.1 + diff --git a/mingw-w64-nodejs/0009-Revert-to-FHS-installation-paths-on-Windows-tests-no.patch b/mingw-w64-nodejs/0009-Revert-to-FHS-installation-paths-on-Windows-tests-no.patch deleted file mode 100644 index a4bd9a4fcc..0000000000 --- a/mingw-w64-nodejs/0009-Revert-to-FHS-installation-paths-on-Windows-tests-no.patch +++ /dev/null @@ -1,127 +0,0 @@ -From ec4c67b9b2c7f6a0e04d7ba86c39d50fbd9607d2 Mon Sep 17 00:00:00 2001 -From: mati865 -Date: Sun, 4 Sep 2016 18:44:50 +0200 -Subject: [PATCH 09/13] Revert to FHS installation paths on Windows (tests not - fixed) - ---- - deps/npm/bin/npm | 4 ++-- - deps/npm/bin/npm.cmd | 4 ++-- - deps/npm/lib/build.js | 2 +- - deps/npm/lib/config/defaults.js | 7 ++----- - deps/npm/lib/npm.js | 6 ++---- - deps/npm/lib/unbuild.js | 1 - - 6 files changed, 9 insertions(+), 15 deletions(-) - -diff --git a/deps/npm/bin/npm b/deps/npm/bin/npm -index 5acd6fb..dc01687 100644 ---- 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 880554d..12507ba 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/build.js b/deps/npm/lib/build.js -index fbe78c7..202da86 100644 ---- a/deps/npm/lib/build.js -+++ b/deps/npm/lib/build.js -@@ -229,7 +229,7 @@ function linkBin (from, to, gently, cb) { - } - - function linkMans (pkg, folder, parent, gtop, cb) { -- if (!pkg.man || !gtop || process.platform === 'win32') return cb() -+ if (!pkg.man || !gtop) return cb() - - var manRoot = path.resolve(npm.config.get('prefix'), 'share', 'man') - log.verbose('linkMans', 'man files are', pkg.man, 'in', manRoot) -diff --git a/deps/npm/lib/config/defaults.js b/deps/npm/lib/config/defaults.js -index e93c1e5..b1a16d0 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 4f81015..b84e818 100644 ---- a/deps/npm/lib/npm.js -+++ b/deps/npm/lib/npm.js -@@ -332,7 +332,7 @@ - { - get: function () { - var b = npm.globalPrefix -- if (process.platform !== 'win32') b = path.resolve(b, 'bin') -+ b = path.resolve(b, 'bin') - return b - } - }) -@@ -349,9 +349,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 9ba5972..1915a5f 100644 ---- a/deps/npm/lib/unbuild.js -+++ b/deps/npm/lib/unbuild.js -@@ -90,7 +90,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() - } --- -2.9.1 - diff --git a/mingw-w64-nodejs/0010-Fix-incorrect-test-assumptions-for-MinGW.patch b/mingw-w64-nodejs/0010-Fix-incorrect-test-assumptions-for-MinGW.patch new file mode 100644 index 0000000000..a1112ed0b1 --- /dev/null +++ b/mingw-w64-nodejs/0010-Fix-incorrect-test-assumptions-for-MinGW.patch @@ -0,0 +1,117 @@ +From 80864f2a7ba0655f5631d7a1e5ab99c74c38486a Mon Sep 17 00:00:00 2001 +From: Alethea Rose +Date: Wed, 15 Feb 2017 22:21:51 -0500 +Subject: [PATCH 10/10] Fix incorrect test assumptions for MinGW + +--- + test/common.js | 5 +++++ + test/parallel/test-child-process-stdin.js | 2 +- + test/parallel/test-debugger-pid.js | 3 ++- + test/parallel/test-fs-symlink.js | 5 +++++ + test/parallel/test-https-foafssl.js | 6 +++++- + test/parallel/test-npm-install.js | 5 +++++ + 6 files changed, 23 insertions(+), 3 deletions(-) + +diff --git a/test/common.js b/test/common.js +index 7224d87..ee9f51c 100644 +--- a/test/common.js ++++ b/test/common.js +@@ -17,6 +17,8 @@ exports.tmpDirName = 'tmp'; + // PORT should match the definition in test/testpy/__init__.py. + exports.PORT = +process.env.NODE_COMMON_PORT || 12346; + exports.isWindows = process.platform === 'win32'; ++exports.isMinGW = (process.env.MSYSTEM === 'MINGW64') || ++ (process.env.MSYSTEM === 'MINGW32') + exports.isWOW64 = exports.isWindows && + (process.env.PROCESSOR_ARCHITEW6432 !== undefined); + exports.isAix = process.platform === 'aix'; +@@ -479,6 +481,9 @@ exports.nodeProcessAborted = function nodeProcessAborted(exitCode, signal) { + // which corresponds to exit code 3221225477 (0xC0000005) + if (exports.isWindows) + expectedExitCodes = [3221225477]; ++ ++ if (exports.isMinGW) ++ expectedExitCodes = [1]; + + // When using --abort-on-uncaught-exception, V8 will use + // base::OS::Abort to terminate the process. +diff --git a/test/parallel/test-child-process-stdin.js b/test/parallel/test-child-process-stdin.js +index eccced0..2340303 100644 +--- a/test/parallel/test-child-process-stdin.js ++++ b/test/parallel/test-child-process-stdin.js +@@ -33,7 +33,7 @@ cat.on('exit', common.mustCall(function(status) { + })); + + cat.on('close', common.mustCall(function() { +- if (common.isWindows) { ++ if (common.isWindows && !common.isMinGW) { + assert.strictEqual('hello world\r\n', response); + } else { + assert.strictEqual('hello world', response); +diff --git a/test/parallel/test-debugger-pid.js b/test/parallel/test-debugger-pid.js +index 2b81da7..da8dc35 100644 +--- a/test/parallel/test-debugger-pid.js ++++ b/test/parallel/test-debugger-pid.js +@@ -11,8 +11,9 @@ var interfacer = spawn(process.execPath, ['debug', '-p', '655555']); + console.error(process.execPath, 'debug', '-p', '655555'); + interfacer.stdout.setEncoding('utf-8'); + interfacer.stderr.setEncoding('utf-8'); ++var newline = common.isMinGW ? '\r\n' : '\n'; + var onData = function(data) { +- data = (buffer + data).split('\n'); ++ data = (buffer + data).split(newline); + buffer = data.pop(); + data.forEach(function(line) { + interfacer.emit('line', line); +diff --git a/test/parallel/test-fs-symlink.js b/test/parallel/test-fs-symlink.js +index ab52ba2..dd148d2 100644 +--- a/test/parallel/test-fs-symlink.js ++++ b/test/parallel/test-fs-symlink.js +@@ -8,6 +8,11 @@ const exec = require('child_process').exec; + var linkTime; + var fileTime; + ++if (common.isMinGW) { ++ common.skip('MinGW does not support symlinks'); ++ return; ++} ++ + if (common.isWindows) { + // On Windows, creating symlinks requires admin privileges. + // We'll only try to run symlink test if we have enough privileges. +diff --git a/test/parallel/test-https-foafssl.js b/test/parallel/test-https-foafssl.js +index 6d655f3..1be46dc 100644 +--- a/test/parallel/test-https-foafssl.js ++++ b/test/parallel/test-https-foafssl.js +@@ -66,7 +66,11 @@ server.listen(0, function() { + server.close(); + }); + +- client.stdin.write('GET /\n\n'); ++ if (common.isMinGW) { ++ client.stdin.write('GET /\r\n\r\n'); ++ } else { ++ client.stdin.write('GET /\n\n'); ++ } + + client.on('error', function(error) { + throw error; +diff --git a/test/parallel/test-npm-install.js b/test/parallel/test-npm-install.js +index e72e731..cbbb599 100644 +--- a/test/parallel/test-npm-install.js ++++ b/test/parallel/test-npm-install.js +@@ -6,6 +6,11 @@ const spawn = require('child_process').spawn; + const assert = require('assert'); + const fs = require('fs'); + ++if(common.isMinGW) { ++ common.skip('npm is split into its own package'); ++ return; ++} ++ + common.refreshTmpDir(); + const npmSandbox = path.join(common.tmpDir, 'npm-sandbox'); + fs.mkdirSync(npmSandbox); +-- +2.11.1 + diff --git a/mingw-w64-nodejs/0010-cygpath-conversion-in-npm-shell-wrapper.patch b/mingw-w64-nodejs/0010-cygpath-conversion-in-npm-shell-wrapper.patch deleted file mode 100644 index dc8c84feda..0000000000 --- a/mingw-w64-nodejs/0010-cygpath-conversion-in-npm-shell-wrapper.patch +++ /dev/null @@ -1,29 +0,0 @@ -From f9ba558f8ba7811821fc7ff959a5db3746108356 Mon Sep 17 00:00:00 2001 -From: mati865 -Date: Sun, 4 Sep 2016 20:02:20 +0200 -Subject: [PATCH 10/13] cygpath-conversion in npm-shell wrapper - ---- - deps/npm/bin/npm | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/deps/npm/bin/npm b/deps/npm/bin/npm -index dc01687..72bb12b 100644 ---- a/deps/npm/bin/npm -+++ b/deps/npm/bin/npm -@@ -3,9 +3,9 @@ - - basedir=`dirname "$0"` - --case `uname` in -- *CYGWIN*) basedir=`cygpath -w "$basedir"`;; --esac -+if [ -x "$(command -v cygpath)" ]; then -+ basedir=`cygpath -w "$basedir"` -+fi - - NODE_EXE="$basedir/node.exe" - if ! [ -x "$NODE_EXE" ]; then --- -2.9.1 - diff --git a/mingw-w64-nodejs/0011-fix-building-with-with-intl-system-icu.patch b/mingw-w64-nodejs/0011-fix-building-with-with-intl-system-icu.patch deleted file mode 100644 index 912e68ca69..0000000000 --- a/mingw-w64-nodejs/0011-fix-building-with-with-intl-system-icu.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 3ff6185ecacb81b747b95eba8441396e40989d21 Mon Sep 17 00:00:00 2001 -From: mati865 -Date: Thu, 8 Sep 2016 14:18:56 +0200 -Subject: [PATCH 11/13] fix building with --with-intl=system-icu - -'Linux doesn't need icudata, guess we don't need it either' ---- - deps/v8/BUILD.gn | 7 ++----- - deps/v8/src/d8.gyp | 5 ----- - deps/v8/tools/gyp/v8.gyp | 5 ----- - 3 files changed, 2 insertions(+), 15 deletions(-) - -diff --git a/deps/v8/BUILD.gn b/deps/v8/BUILD.gn -index 28aca24..e40c031 100644 ---- a/deps/v8/BUILD.gn -+++ b/deps/v8/BUILD.gn -@@ -238,7 +238,7 @@ config("toolchain") { - } - if (v8_target_arch == "s390") { - defines += [ "V8_TARGET_ARCH_S390" ] -- } -+ } - if (v8_target_arch == "s390x") { - defines += [ - "V8_TARGET_ARCH_S390", -@@ -251,7 +251,7 @@ config("toolchain") { - if (v8_target_arch == "x64") { - defines += [ "V8_TARGET_ARCH_X64" ] - } -- -+ - if (is_win) { - defines += [ "WIN32" ] - # TODO(jochen): Support v8_enable_prof. -@@ -1773,9 +1773,6 @@ source_set("v8_base") { - - if (v8_enable_i18n_support) { - deps += [ "//third_party/icu" ] -- if (is_win) { -- deps += [ "//third_party/icu:icudata" ] -- } - - # TODO(jochen): Add support for icu_use_data_file_flag - defines += [ "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE" ] -diff --git a/deps/v8/src/d8.gyp b/deps/v8/src/d8.gyp -index 7499d6d..9698212 100644 ---- a/deps/v8/src/d8.gyp -+++ b/deps/v8/src/d8.gyp -@@ -96,11 +96,6 @@ - '<(icu_gyp_path):icuuc', - ], - }], -- ['OS=="win" and v8_enable_i18n_support==1', { -- 'dependencies': [ -- '<(icu_gyp_path):icudata', -- ], -- }], - ], - }, - { -diff --git a/deps/v8/tools/gyp/v8.gyp b/deps/v8/tools/gyp/v8.gyp -index 45c7c8f..79de18f 100644 ---- a/deps/v8/tools/gyp/v8.gyp -+++ b/deps/v8/tools/gyp/v8.gyp -@@ -1637,11 +1637,6 @@ - '../../src/i18n.h', - ], - }], -- ['OS=="win" and v8_enable_i18n_support==1', { -- 'dependencies': [ -- '<(icu_gyp_path):icudata', -- ], -- }], - ['icu_use_data_file_flag==1', { - 'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE'], - }, { # else icu_use_data_file_flag !=1 --- -2.9.1 - diff --git a/mingw-w64-nodejs/0012-fixes-for-node-gyp-and-linking-to-node.patch b/mingw-w64-nodejs/0012-fixes-for-node-gyp-and-linking-to-node.patch deleted file mode 100644 index a205b95b50..0000000000 --- a/mingw-w64-nodejs/0012-fixes-for-node-gyp-and-linking-to-node.patch +++ /dev/null @@ -1,103 +0,0 @@ -From bd89fdc97bf565e8c6433b208a93f383df790b09 Mon Sep 17 00:00:00 2001 -From: mati865 -Date: Thu, 8 Sep 2016 15:24:24 +0200 -Subject: [PATCH 12/13] fixes for node-gyp and linking to node - ---- - common.gypi | 1 + - deps/npm/node_modules/node-gyp/addon.gypi | 28 +++++++++++----------- - .../node-gyp/gyp/pylib/gyp/generator/make.py | 6 ++++- - deps/npm/node_modules/node-gyp/lib/configure.js | 2 +- - 4 files changed, 21 insertions(+), 16 deletions(-) - -diff --git a/common.gypi b/common.gypi -index 5ff1292..9bcbeb3 100644 ---- a/common.gypi -+++ b/common.gypi -@@ -261,6 +261,7 @@ - 'BUILDING_V8_SHARED=1', - 'BUILDING_UV_SHARED=1', - ], -+ 'ldflags': [ '-Wl,--out-implib,node.dll.a' ], - }], - [ 'OS in "linux freebsd openbsd solaris aix"', { - 'cflags': [ '-pthread', ], -diff --git a/deps/npm/node_modules/node-gyp/addon.gypi b/deps/npm/node_modules/node-gyp/addon.gypi -index 552e474..90dd336 100644 ---- a/deps/npm/node_modules/node-gyp/addon.gypi -+++ b/deps/npm/node_modules/node-gyp/addon.gypi -@@ -1,7 +1,7 @@ - { - 'target_defaults': { - 'type': 'loadable_module', -- 'win_delay_load_hook': 'true', -+ 'win_delay_load_hook': 'false', - 'product_prefix': '', - - 'include_dirs': [ -@@ -72,19 +72,19 @@ - }], - [ 'OS=="win"', { - 'libraries': [ -- '-lkernel32.lib', -- '-luser32.lib', -- '-lgdi32.lib', -- '-lwinspool.lib', -- '-lcomdlg32.lib', -- '-ladvapi32.lib', -- '-lshell32.lib', -- '-lole32.lib', -- '-loleaut32.lib', -- '-luuid.lib', -- '-lodbc32.lib', -- '-lDelayImp.lib', -- '-l"<(node_root_dir)/$(ConfigurationName)/<(node_lib_file)"' -+ '-lkernel32', -+ '-luser32', -+ '-lgdi32', -+ '-lwinspool', -+ '-lcomdlg32', -+ '-ladvapi32', -+ '-lshell32', -+ '-lole32', -+ '-loleaut32', -+ '-luuid', -+ '-lodbc32', -+ '-lDelayImp', -+ '-lnode' - ], - 'msvs_disabled_warnings': [ - # warning C4251: 'node::ObjectWrap::handle_' : class 'v8::Persistent' -diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py -index aefdac7..63dc10b 100644 ---- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py -+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py -@@ -1347,7 +1347,11 @@ $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)/%%%s FORCE_DO_CMD - if target[:3] == 'lib': - target = target[3:] - target_prefix = 'lib' -- target_ext = '.so' -+ # part of Ray Donelly fix for msys gyp-git package -+ if self.flavor == 'win': -+ target_ext = '.dll' -+ else: -+ target_ext = '.so' - elif self.type == 'none': - target = '%s.stamp' % target - elif self.type != 'executable': -diff --git a/deps/npm/node_modules/node-gyp/lib/configure.js b/deps/npm/node_modules/node-gyp/lib/configure.js -index d21f555..bdc560e 100644 ---- a/deps/npm/node_modules/node-gyp/lib/configure.js -+++ b/deps/npm/node_modules/node-gyp/lib/configure.js -@@ -270,7 +270,7 @@ function configure (gyp, argv, callback) { - argv.push('-Dnode_exp_file=' + node_exp_file) - } - argv.push('-Dnode_gyp_dir=' + nodeGypDir) -- argv.push('-Dnode_lib_file=' + release.name + '.lib') -+ argv.push('-Dnode_lib_file=' + release.name) - argv.push('-Dmodule_root_dir=' + process.cwd()) - argv.push('--depth=.') - argv.push('--no-parallel') --- -2.9.1 - diff --git a/mingw-w64-nodejs/0013-use-windmc-instead-of-mc.patch b/mingw-w64-nodejs/0013-use-windmc-instead-of-mc.patch deleted file mode 100644 index cafd01e921..0000000000 --- a/mingw-w64-nodejs/0013-use-windmc-instead-of-mc.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 06665ce1cb24ada9489b21ef81d9fe360af17de8 Mon Sep 17 00:00:00 2001 -From: mati865 -Date: Wed, 14 Sep 2016 19:40:47 +0200 -Subject: [PATCH 13/13] use windmc instead of mc - ---- - node.gyp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/node.gyp b/node.gyp -index 39acb6c..2ee0d7a 100644 ---- a/node.gyp -+++ b/node.gyp -@@ -623,7 +623,7 @@ - 'tools/msvs/genfiles/node_etw_provider.h', - 'tools/msvs/genfiles/node_etw_providerTEMP.BIN', - ], -- 'action': [ 'mc <@(_inputs) -h tools/msvs/genfiles -r tools/msvs/genfiles' ] -+ 'action': [ 'windmc <@(_inputs) -h tools/msvs/genfiles -r tools/msvs/genfiles' ] - } - ] - } ] --- -2.9.1 - diff --git a/mingw-w64-nodejs/0100-Use-system-gyp.patch b/mingw-w64-nodejs/0100-Use-system-gyp.patch deleted file mode 100644 index 8fcfda14cc..0000000000 --- a/mingw-w64-nodejs/0100-Use-system-gyp.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- node-v0.10.29/tools/gyp_node.py.orig 2014-07-24 21:39:44.896367500 +0100 -+++ node-v0.10.29/tools/gyp_node.py 2014-07-24 21:55:27.797100700 +0100 -@@ -7,7 +7,6 @@ - script_dir = os.path.dirname(__file__) - node_root = os.path.normpath(os.path.join(script_dir, os.pardir)) - --sys.path.insert(0, os.path.join(node_root, 'tools', 'gyp', 'pylib')) - import gyp - - # Directory within which we want all generated files (including Makefiles) diff --git a/mingw-w64-nodejs/PKGBUILD b/mingw-w64-nodejs/PKGBUILD index 7f757abb92..dcb2667c38 100644 --- a/mingw-w64-nodejs/PKGBUILD +++ b/mingw-w64-nodejs/PKGBUILD @@ -2,27 +2,18 @@ # Maintainer: Ray Donnelly # Contributor: David Macek # Contributor: Mateusz MikuĊ‚a +# Contributor: Alethea Rose _realname=nodejs pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=6.5.0 +pkgver=6.9.5 pkgrel=1 pkgdesc="Evented I/O for V8 javascript (mingw-w64)" arch=('any') url="https://nodejs.org/" license=("MIT") -makedepends=("python2" "make" "gyp") -# If can switch to shared dependencies instead of -# static, bundled then here is the full list. For -# for now, reluctantly the only shared dependency -# is OpenSSL. -# depends=("${MINGW_PACKAGE_PREFIX}-c-ares" -# "${MINGW_PACKAGE_PREFIX}-http-parser" -# "${MINGW_PACKAGE_PREFIX}-v8" -# "${MINGW_PACKAGE_PREFIX}-libuv" -# "${MINGW_PACKAGE_PREFIX}-openssl" -# "${MINGW_PACKAGE_PREFIX}-zlib") +makedepends=('python2' 'make') depends=("${MINGW_PACKAGE_PREFIX}-c-ares" "${MINGW_PACKAGE_PREFIX}-http-parser" "${MINGW_PACKAGE_PREFIX}-icu" @@ -30,121 +21,54 @@ depends=("${MINGW_PACKAGE_PREFIX}-c-ares" "${MINGW_PACKAGE_PREFIX}-openssl" "${MINGW_PACKAGE_PREFIX}-zlib" "winpty") +optdepends=("${MINGW_PACKAGE_PREFIX}-npm: nodejs package manager") options=('!emptydirs' '!strip') # 'debug') -source=("https://nodejs.org/dist/v${pkgver}/node-v${pkgver}.tar.gz" - "0001-fix-python-2-shebang.patch" - "0002-Mat_Sutcliffe-node_mingw64-without-MSYS-path-convers.patch" - "0003-include-win32-headers.h-for-v8.patch" - "0004-mingw-w64-defines-localtime_s.patch" - "0005-skip-unneeded-includes.patch" - "0006-fix-winnt-version.patch" - "0007-MinGW-w64-add-platform-wintoolset-as-msvc-or-mingw-w.patch" - "0008-Use-shell-wrapper-script-for-npm-on-MSYS2-MinGW-w64.patch" - "0009-Revert-to-FHS-installation-paths-on-Windows-tests-no.patch" - "0010-cygpath-conversion-in-npm-shell-wrapper.patch" - "0011-fix-building-with-with-intl-system-icu.patch" - "0012-fixes-for-node-gyp-and-linking-to-node.patch" - "0013-use-windmc-instead-of-mc.patch" - "0100-Use-system-gyp.patch" - 'node-gyp' - 'node-gyp.cmd') - -sha256sums=('d7742558bb3331e41510d6e6f1f7b13c0527aecc00a63c3e05fcfd44427ff778' - '986d95dac203286a9b0c758154de05347eed2c08f948f72a1c0578325047c0a3' - '54968785923aa427962addc62e34c2ea54c743f201606d9b29a6139f759469df' - '31f2153edc8eb2ab15d95beba510de0832be0a343e56e53d7fba7c64957908e6' - 'e3a8f597e50f70bef54b2c4c371bcd31db9555776b3e33fe8cf1dcb0f577c371' - 'fa4eb521bd9ba54da31e163eb6e50d0af141072405ce05a4b4247cd11b174f09' - '47eea3ca00d0ea3fe2bdf947eaa172caf86fd6107fd4976ad26e2941dbedd8fd' - '9293ad3f4c86ae401904cdd92fc79391f39037c10db67affe7ff43b3e6927def' - '50a27c004f7cc6bc4c18d1b83b264f05af57248eea908214948350046713e516' - '8d8341f12f57a7f4869e873dce97b2023fffb49dceec711ac54b911be16bdea2' - '6c485c5a915222e5d826cf1d8f3eb18d7082258731f9a04f498b053df411ded0' - '56f3d4ef11ff6deebf7a381fb652d06a8bf5909f7da28efa9b1f6f64b220a66e' - '1a3a385f2a2ae79854f314b5a3a276a51b28982ae1b30b02dbb362a4045baa49' - '40dc46d438c319f2fe2c5cad76c2b0b4237572efa8cdb8e91c5d4565ecae79cb' - 'da4d21c363fbb5f2ae4bf8d948024a37b143f453885fb262c013d87b677510c9' - '8f00d54bc60c62cfc6c63657fca0a522ee485ab2f30de721bd09a0f868e81257' - '55294eca72a62b2730470a4586b5caab2ec3a43d5412566770541c9fc59e4135') +source=("https://nodejs.org/dist/v${pkgver}/node-v${pkgver}.tar.xz" + '0001-Fix-python-invocation-to-python2.patch' + '0002-Fix-system-icu-build.patch' + '0003-Include-win32-headers.h-in-v8-atomicops.h.patch' + '0004-Define-localtime_s-for-MinGW.patch' + '0005-Remove-.lib-suffix-on-linked-libraries.patch' + '0006-Define-_WIN32_WINNT-in-node.gyp.patch' + '0007-Skip-sys-resource-and-unneeded-includes-in-node.cc.patch' + '0008-Link-with-municode-and-extern-wmain-for-Unicode.patch' + '0009-Remove-no_rand_screen-from-s_client-invocation.patch' + '0010-Fix-incorrect-test-assumptions-for-MinGW.patch' + 'node') prepare() { - cd ${srcdir}/node-v${pkgver} + cd "${srcdir}/node-v${pkgver}" - # git init - - # Using perfctrs makes Vista the minimum OS. MinGW-w64's perflib.h is missing lots - # of stuff too, so the patches aren't enough. - patch -p1 -i "${srcdir}"/0001-fix-python-2-shebang.patch - patch -p1 -i "${srcdir}"/0002-Mat_Sutcliffe-node_mingw64-without-MSYS-path-convers.patch - patch -p1 -i "${srcdir}"/0003-include-win32-headers.h-for-v8.patch - patch -p1 -i "${srcdir}"/0004-mingw-w64-defines-localtime_s.patch - patch -p1 -i "${srcdir}"/0005-skip-unneeded-includes.patch - patch -p1 -i "${srcdir}"/0006-fix-winnt-version.patch - patch -p1 -i "${srcdir}"/0007-MinGW-w64-add-platform-wintoolset-as-msvc-or-mingw-w.patch - patch -p1 -i "${srcdir}"/0008-Use-shell-wrapper-script-for-npm-on-MSYS2-MinGW-w64.patch - patch -p1 -i "${srcdir}"/0009-Revert-to-FHS-installation-paths-on-Windows-tests-no.patch - patch -p1 -i "${srcdir}"/0010-cygpath-conversion-in-npm-shell-wrapper.patch - patch -p1 -i "${srcdir}"/0011-fix-building-with-with-intl-system-icu.patch - patch -p1 -i "${srcdir}"/0012-fixes-for-node-gyp-and-linking-to-node.patch - patch -p1 -i "${srcdir}"/0013-use-windmc-instead-of-mc.patch - patch -p1 -i "${srcdir}"/0100-Use-system-gyp.patch - - # taken form Arch with small improvement, can be used for recreating python patch - # msg 'Fixing for python2 name' - # find -type f ! \( -name "*.dat" -o -name "*.png" -o -name "*.gz" \ - # -o -name "*.tgz" -o -name "*.pdf" -o -name "*.md" -o -name "*.bat" \) -exec sed \ - # -e 's_^#!/usr/bin/env python$_&2_' \ - # -e 's_^\(#!/usr/bin/python2\).[45]$_\1_' \ - # -e 's_^#!/usr/bin/python$_&2_' \ - # -e 's_^\( *exec \+\)python\( \+.*\)$_\1python2\2_'\ - # -e 's_^\(.*\)python\( \+-c \+.*\)$_\1python2\2_'\ - # -e "s_'python'_'python2'_" -i {} \; - # find test/ -type f -exec sed 's_python _python2 _' -i {} \; - # sed "s_/usr/bin/env python2_/usr/bin/python2_" -i {configure,tools/gyp_node.py} + patch -Np1 -i "${srcdir}/0001-Fix-python-invocation-to-python2.patch" + patch -Np1 -i "${srcdir}/0002-Fix-system-icu-build.patch" + patch -Np1 -i "${srcdir}/0003-Include-win32-headers.h-in-v8-atomicops.h.patch" + patch -Np1 -i "${srcdir}/0004-Define-localtime_s-for-MinGW.patch" + patch -Np1 -i "${srcdir}/0005-Remove-.lib-suffix-on-linked-libraries.patch" + patch -Np1 -i "${srcdir}/0006-Define-_WIN32_WINNT-in-node.gyp.patch" + patch -Np1 -i "${srcdir}/0007-Skip-sys-resource-and-unneeded-includes-in-node.cc.patch" + patch -Np1 -i "${srcdir}/0008-Link-with-municode-and-extern-wmain-for-Unicode.patch" + patch -Np1 -i "${srcdir}/0009-Remove-no_rand_screen-from-s_client-invocation.patch" + patch -Np1 -i "${srcdir}/0010-Fix-incorrect-test-assumptions-for-MinGW.patch" } build() { local -a extra_config - cd ${srcdir} + cd "${srcdir}" sleep 5 [[ -d ${CARCH} ]] && rm -rf ${CARCH} mv node-v${pkgver} ${CARCH} - pushd ${CARCH} - -# node.js uses a patched version of v8 5.1.281.81. If/when they upgrade -# we might be able to use this: -# --shared-v8 \ -# --shared-v8-includes=$(pkgconf --variable=includedir v8) \ -# --shared-v8-libpath=$(pkgconf --variable=libdir v8) \ -# --shared-v8-libname=v8.$(pkgconf --modversion v8) \ - -# --output-dir= and 0004-Add-output-dir-option-to-configure-node_gyp-py.patch -# attempts to allow using the bundled (hence static) OpenSSL. The problem is -# that the link command line ends up being ~76k characters. This patch helps -# but it gets us down to ~45k. To further reduce this, the build folders of -# "Release/out.target" would be the next target. -# OUTDIR=$(cd ../../..; echo $PWD) -# --output-dir=/e/m2/t \ -# -# --without-perfctr because MinGW-w64's perflib.h is missing a needed define -# (PERF_COUNTERSET_MULTI_AGGREGATE) and the win32 perfcnt stuff uses __out, -# __in, and __in_opt arg decorators. - - export CC=gcc - export CXX=g++ - export LINK=g++ + cd ${CARCH} if check_option "debug" "y"; then extra_config+=( --debug ) fi -# TODO: fix etw and remove --without-etw ./configure \ - --prefix=${MINGW_PREFIX} \ + --prefix="${MINGW_PREFIX}" \ --dest-os=win \ --shared-openssl \ --shared-zlib \ @@ -154,42 +78,48 @@ build() { --shared-http-parser \ --without-perfctr \ --without-etw \ + --without-npm \ "${extra_config[@]}" + python2 tools/gyp_node.py -f make + touch config.gypi make } check() { - cd ${CARCH} - make check -k || true + cd "${srcdir}/${CARCH}" + + # A few tests still fail due to a bug with pausing/resuming file streams + python2 tools/test.py --mode=release -J \ + cctest doctool inspector message parallel sequential tick-processor || true } package() { cd "${srcdir}/${CARCH}" - make DESTDIR="${pkgdir}" install - install -d "${pkgdir}"/${MINGW_PREFIX}/share/doc/nodejs + python2 tools/install.py install "${pkgdir}" "/${MINGW_PREFIX}" + + install -d "${pkgdir}${MINGW_PREFIX}/share/doc/nodejs" cp -r doc/api/{*.html,assets} \ - "${pkgdir}"/${MINGW_PREFIX}/share/doc/nodejs + "${pkgdir}${MINGW_PREFIX}/share/doc/nodejs" install -D -m644 LICENSE \ - "${pkgdir}"/${MINGW_PREFIX}/share/licenses/nodejs/LICENSE + "${pkgdir}${MINGW_PREFIX}/share/licenses/nodejs/LICENSE" - install -m755 "${srcdir}/node-gyp" "${pkgdir}"${MINGW_PREFIX}/bin/node-gyp - install -m755 "${srcdir}/node-gyp.cmd" "${pkgdir}"${MINGW_PREFIX}/bin/node-gyp.cmd - install -m755 "${pkgdir}${MINGW_PREFIX}/lib/node_modules/npm/bin/npm.cmd" "${pkgdir}${MINGW_PREFIX}/bin/npm.cmd" - - install -m755 "${srcdir}/${CARCH}/out/node.dll.a" "${pkgdir}${MINGW_PREFIX}/lib/node.dll.a" - - # Use winpty to wrap the exe when executed from bash. Please don't move this into a patch as hopefully one day we won't need this hack. - local _exename="node" - mv "${pkgdir}"${MINGW_PREFIX}/bin/${_exename} "${pkgdir}"${MINGW_PREFIX}/bin/${_exename}_exe - echo "#!/usr/bin/env bash" > "${pkgdir}${MINGW_PREFIX}/bin/${_exename}" - echo '/usr/bin/winpty "$( dirname ${BASH_SOURCE[0]} )/'${_exename}'.exe" "$@"' >> "${pkgdir}${MINGW_PREFIX}/bin/${_exename}" - mv "${pkgdir}"${MINGW_PREFIX}/bin/${_exename}_exe "${pkgdir}"${MINGW_PREFIX}/bin/${_exename}.exe - - # copy missing manpages - cp -r "${pkgdir}${MINGW_PREFIX}/lib/node_modules/npm/man" "${pkgdir}${MINGW_PREFIX}/share" - - # /mingw64/lib/node_modules/npm/lib/npm.js is ridden with tests for win32, so that should probably be changed someday. + mv -v "${pkgdir}$MINGW_PREFIX/bin/node"{.exe,_exe} + install -m755 "${srcdir}/node" "${pkgdir}${MINGW_PREFIX}/bin/node" + mv -v "${pkgdir}$MINGW_PREFIX/bin/node"{_exe,.exe} } + +sha256sums=('d7fed1a354b29503f3e176d7fdb90b1a9de248e0ce9b3eb56cc26bb1f3d5b6b3' + '9053d5223932f82ddd34beea79cc2c9a48b81df11e7a3d353101772101e3faab' + '40d434001e222280bc047aca9e0fa55eaade0c0a917e70917bf4e50d0b4a619d' + '3d32d2723ca12edad1cb7b435e12855f0e1cdbbd885b7e64f2e92585778f4b02' + '2ed2b1a1ad4a4f042d844a89924ec7324deae7b5349b227108f515a2aea71b74' + '55644dc1483146dc25c643cf3586e78b134fd40a291667ac22a2fb5189c88e8e' + '674abf068127c7f6bcac7cde151d20744ca4ff72aeceeaa766e5cc94f0c0fd03' + '5af48e40f94ba25781226e2400b8440c1bbdc69799464008b5ba3696c66ea95f' + 'd1bdfdc29bee0c3087105fabe34210d7a6418dcb5069d1f7892ab3e9ee85862b' + 'd38537c543b74893e999e0fed59afced97895bfe98806ce1f5eac747fdd62f4a' + 'b10eba7327bdd015e44a56326d771a8a36e70418c6c5c0d8e3181c13914659d6' + '284251ff443506cd61530a026afb421d0084e4ad25c037bcfe3a045246d729a2') diff --git a/mingw-w64-nodejs/node b/mingw-w64-nodejs/node new file mode 100644 index 0000000000..70834e2543 --- /dev/null +++ b/mingw-w64-nodejs/node @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +NODE_EXE="$( dirname ${BASH_SOURCE[0]} )/node.exe" + +if [ -t 0 -a -t 1 ]; then + /usr/bin/winpty $NODE_EXE "$@" +else + exec $NODE_EXE "$@" +fi diff --git a/mingw-w64-nodejs/node-gyp b/mingw-w64-nodejs/node-gyp deleted file mode 100644 index 27831904db..0000000000 --- a/mingw-w64-nodejs/node-gyp +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -(set -o igncr) 2>/dev/null && set -o igncr; # cygwin encoding fix - -basedir=`dirname "$0"` - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node.exe" ]; then - "$basedir/node.exe" "$basedir/../lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "$@" - ret=$? -else - node "$basedir/../lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "$@" - ret=$? -fi -exit $ret diff --git a/mingw-w64-nodejs/node-gyp.cmd b/mingw-w64-nodejs/node-gyp.cmd deleted file mode 100644 index 2e6859a2e9..0000000000 --- a/mingw-w64-nodejs/node-gyp.cmd +++ /dev/null @@ -1,5 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\lib\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" %* -) ELSE ( - node "%~dp0\..\lib\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" %* -) diff --git a/mingw-w64-npm/PKGBUILD b/mingw-w64-npm/PKGBUILD new file mode 100644 index 0000000000..4fcb6a39ee --- /dev/null +++ b/mingw-w64-npm/PKGBUILD @@ -0,0 +1,50 @@ +# Contributor: Alethea Rose + +_realname=npm +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=4.3.0 +pkgrel=1 +pkgdesc='The package manager for JavaScript (mingw-w64)' +arch=('any') +url='https://www.npmjs.com/' +license=('custom:Artistic') +depends=('winpty' "$MINGW_PACKAGE_PREFIX-nodejs") +makedepends=('tar') +optdepends=("${MINGW_PACKAGE_PREFIX}-python2: for node-gyp") +options=('!emptydirs') +_marked_ver=0.3.6 +_marked_man_ver=0.2.0 + +source=("npm-$pkgver.tar.gz::https://github.com/npm/npm/archive/v$pkgver.tar.gz" + "npm-marked-man-$_marked_man_ver.tgz::https://registry.npmjs.org/marked-man/-/marked-man-$_marked_man_ver.tgz" + "npm-marked-$_marked_ver.tgz::https://registry.npmjs.org/marked/-/marked-$_marked_ver.tgz") +noextract=("npm-$pkgver.tar.gz" + "npm-marked-$_marked_ver.tgz" + "marked-man-$_marked_man_ver.tgz") + +sha256sums=('a4b083e0694ce786777d55f803551635b7c958e773b4ff5990103eab7c6e46a2' + 'ea48226f08675656a9794d44aef458e10d076b5f116be77a04986122b7c1c4c2' + '46f71f8b9cbb5606b166af554958c67f2de6b3346ebe8c8fcc92470252af00c3') + +prepare() { + cd "$srcdir" + tar -xf "npm-$pkgver.tar.gz" +} + +build() { + cd "$srcdir"/npm-$pkgver + + node cli.js install ../npm-marked-$_marked_ver.tgz + node cli.js install ../npm-marked-man-$_marked_man_ver.tgz + make +} + +package() { + cd "$srcdir"/npm-$pkgver + + make NPMOPTS="--prefix=\"$pkgdir$MINGW_PREFIX/bin\"" install + + mkdir -p "$pkgdir$MINGW_PREFIX/share/man" + cp -r man/* "$pkgdir$MINGW_PREFIX/share/man" +}