nodejs: Update from 6.11.5 to 8.9.0

This commit is contained in:
Fredrik Fornwall 2017-11-01 20:18:56 +01:00
parent ee554e52a8
commit a25510ccf7
6 changed files with 95 additions and 106 deletions

View File

@ -1,7 +1,7 @@
TERMUX_PKG_HOMEPAGE=https://nodejs.org/
TERMUX_PKG_DESCRIPTION="Platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications"
TERMUX_PKG_VERSION=6.11.5
TERMUX_PKG_SHA256=1c6de415216799fbaeca82304b3fef87accc7101ebf2ead7d5c545e0779e8aaf
TERMUX_PKG_VERSION=8.9.0
TERMUX_PKG_SHA256=ae8258f89e127a76d4b4aff6fdb8dc395b7da0069cba054b913dfc36b3c91189
TERMUX_PKG_SRCURL=https://nodejs.org/dist/v${TERMUX_PKG_VERSION}/node-v${TERMUX_PKG_VERSION}.tar.xz
# Note that we do not use a shared libuv to avoid an issue with the Android
# linker, which does not use symbols of linked shared libraries when resolving
@ -9,7 +9,7 @@ TERMUX_PKG_SRCURL=https://nodejs.org/dist/v${TERMUX_PKG_VERSION}/node-v${TERMUX_
TERMUX_PKG_DEPENDS="openssl, c-ares"
TERMUX_PKG_RM_AFTER_INSTALL="lib/node_modules/npm/html lib/node_modules/npm/make.bat share/systemtap lib/dtrace"
TERMUX_PKG_BUILD_IN_SRC=yes
TERMUX_PKG_CONFLICTS="nodejs-current"
TERMUX_PKG_CONFLICTS="nodejs"
termux_step_configure () {
if [ $TERMUX_ARCH = "arm" ]; then
@ -24,6 +24,8 @@ termux_step_configure () {
termux_error_exit "Unsupported arch '$TERMUX_ARCH'"
fi
export GYP_DEFINES="host_os=linux"
# See note above TERMUX_PKG_DEPENDS why we do not use a shared libuv.
./configure \
--prefix=$TERMUX_PREFIX \
@ -34,5 +36,6 @@ termux_step_configure () {
--shared-zlib \
--without-inspector \
--without-intl \
--without-snapshot
--without-snapshot \
--cross-compiling
}

View File

@ -1,9 +1,6 @@
Patch to prepend include_dirs to avoid clashing with the
Termux system libuv which may be of a different version.
diff -u -r ../node-v6.11.0/deps/uv/uv.gyp ./deps/uv/uv.gyp
--- ../node-v6.11.0/deps/uv/uv.gyp 2017-06-06 21:24:24.000000000 +0200
+++ ./deps/uv/uv.gyp 2017-06-06 23:02:53.780158175 +0200
diff -u -r ../node-v8.1.4/deps/uv/uv.gyp ./deps/uv/uv.gyp
--- ../node-v8.1.4/deps/uv/uv.gyp 2017-07-11 05:48:01.000000000 +0200
+++ ./deps/uv/uv.gyp 2017-07-19 01:25:10.988614742 +0200
@@ -45,12 +45,12 @@
{
'target_name': 'libuv',

View File

@ -1,14 +0,0 @@
--- ../node-v6.0.0/deps/v8/src/flag-definitions.h 2016-04-26 15:50:11.000000000 -0400
+++ ./deps/v8/src/flag-definitions.h 2016-05-02 16:46:31.289030161 -0400
@@ -172,7 +172,10 @@
//
#define FLAG FLAG_FULL
-DEFINE_BOOL(warn_template_set, true,
+/* Termux modification: Do not enable this warning per default
+ as it will only confuse users needlessly. The root causes
+ of this warning will get fixed anyway soon in npm packages. */
+DEFINE_BOOL(warn_template_set, false,
"warn on deprecated v8::Template::Set() use")
DEFINE_BOOL(experimental_extras, false,

View File

@ -1,7 +1,7 @@
diff -uNr node-v6.11.3/deps/uv/src/unix/core.c node-v6.11.3.mod/deps/uv/src/unix/core.c
--- node-v6.11.3/deps/uv/src/unix/core.c 2017-09-05 20:34:50.000000000 +0300
+++ node-v6.11.3.mod/deps/uv/src/unix/core.c 2017-09-14 15:58:14.222856752 +0300
@@ -1105,7 +1105,9 @@
diff -uNr node-v8.4.0/deps/uv/src/unix/core.c node-v8.4.0.mod/deps/uv/src/unix/core.c
--- node-v8.4.0/deps/uv/src/unix/core.c 2017-08-15 19:42:28.000000000 +0300
+++ node-v8.4.0.mod/deps/uv/src/unix/core.c 2017-09-14 16:13:27.292856099 +0300
@@ -1112,7 +1112,9 @@
/* No temp environment variables defined */
#if defined(__ANDROID__)
@ -12,31 +12,22 @@ diff -uNr node-v6.11.3/deps/uv/src/unix/core.c node-v6.11.3.mod/deps/uv/src/unix
#else
buf = "/tmp";
#endif
diff -uNr node-v6.11.3/deps/v8/src/flag-definitions.h node-v6.11.3.mod/deps/v8/src/flag-definitions.h
--- node-v6.11.3/deps/v8/src/flag-definitions.h 2017-09-14 15:53:38.302856950 +0300
+++ node-v6.11.3.mod/deps/v8/src/flag-definitions.h 2017-09-14 15:54:54.082856895 +0300
@@ -862,7 +862,7 @@
DEFINE_STRING(testing_serialization_file, "C:\\Windows\\Temp\\serdes",
"file in which to testing_serialize heap")
#else
-DEFINE_STRING(testing_serialization_file, "/tmp/serdes",
+DEFINE_STRING(testing_serialization_file, "@TERMUX_PREFIX@/tmp/serdes",
"file in which to serialize heap")
#endif
@@ -1047,7 +1047,7 @@
DEFINE_NEG_IMPLICATION(perf_prof, compact_code_space)
DEFINE_BOOL(perf_prof_debug_info, false,
"Enable debug info for perf linux profiler (experimental).")
diff -uNr node-v8.4.0/deps/v8/src/flag-definitions.h node-v8.4.0.mod/deps/v8/src/flag-definitions.h
--- node-v8.4.0/deps/v8/src/flag-definitions.h 2017-08-15 19:42:30.000000000 +0300
+++ node-v8.4.0.mod/deps/v8/src/flag-definitions.h 2017-09-14 16:12:34.462856137 +0300
@@ -1203,7 +1203,7 @@
DEFINE_BOOL(perf_prof_unwinding_info, false,
"Enable unwinding info for perf linux profiler (experimental).")
DEFINE_IMPLICATION(perf_prof, perf_prof_unwinding_info)
-DEFINE_STRING(gc_fake_mmap, "/tmp/__v8_gc__",
+DEFINE_STRING(gc_fake_mmap, "@TERMUX_PREFIX@/tmp/__v8_gc__",
"Specify the name of the file for fake gc mmap used in ll_prof")
DEFINE_BOOL(log_internal_timer_events, false, "Time internal events.")
DEFINE_BOOL(log_timer_events, false,
diff -uNr node-v6.11.3/deps/v8/src/log.cc node-v6.11.3.mod/deps/v8/src/log.cc
--- node-v6.11.3/deps/v8/src/log.cc 2017-09-05 20:34:52.000000000 +0300
+++ node-v6.11.3.mod/deps/v8/src/log.cc 2017-09-14 15:55:20.192856877 +0300
@@ -245,7 +245,7 @@
diff -uNr node-v8.4.0/deps/v8/src/log.cc node-v8.4.0.mod/deps/v8/src/log.cc
--- node-v8.4.0/deps/v8/src/log.cc 2017-08-15 19:42:31.000000000 +0300
+++ node-v8.4.0.mod/deps/v8/src/log.cc 2017-09-14 16:11:05.192856201 +0300
@@ -233,7 +233,7 @@
FILE* perf_output_handle_;
};

View File

@ -1,7 +1,7 @@
diff -u -r ../node-v6.11.2/node.gyp ./node.gyp
--- ../node-v6.11.2/node.gyp 2017-08-01 05:39:14.000000000 +0000
+++ ./node.gyp 2017-08-08 08:52:59.805556714 +0000
@@ -531,123 +531,6 @@
diff -u -r ../node-v8.7.0/node.gyp ./node.gyp
--- ../node-v8.7.0/node.gyp 2017-10-11 14:36:02.000000000 +0200
+++ ./node.gyp 2017-10-14 19:41:03.915202106 +0200
@@ -586,152 +586,6 @@
],
} ],
]
@ -22,18 +22,33 @@ diff -u -r ../node-v6.11.2/node.gyp ./node.gyp
- 'variables': {
- 'OBJ_PATH': '<(OBJ_DIR)/node/src',
- 'OBJ_GEN_PATH': '<(OBJ_DIR)/node/gen',
- 'OBJ_TRACING_PATH': '<(OBJ_DIR)/node/src/tracing',
- 'OBJ_SUFFIX': 'o',
- 'OBJ_SEPARATOR': '/',
- 'conditions': [
- ['OS=="win"', {
- 'OBJ_PATH': '<(OBJ_DIR)/node',
- 'OBJ_GEN_PATH': '<(OBJ_DIR)/node',
- 'OBJ_SUFFIX': 'obj',
- }],
- ['OS=="aix"', {
- 'OBJ_PATH': '<(OBJ_DIR)/node_base/src',
- 'OBJ_GEN_PATH': '<(OBJ_DIR)/node_base/gen',
- }],
- ],
- ['GENERATOR=="ninja"', {
- 'OBJ_PATH': '<(OBJ_DIR)/src',
- 'OBJ_GEN_PATH': '<(OBJ_DIR)/gen',
- 'OBJ_TRACING_PATH': '<(OBJ_DIR)/src/tracing',
- 'OBJ_SEPARATOR': '/node.',
- }, {
- 'conditions': [
- ['OS=="win"', {
- 'OBJ_PATH': '<(OBJ_DIR)/node',
- 'OBJ_GEN_PATH': '<(OBJ_DIR)/node',
- 'OBJ_TRACING_PATH': '<(OBJ_DIR)/node',
- }],
- ['OS=="aix"', {
- 'OBJ_PATH': '<(OBJ_DIR)/node_base/src',
- 'OBJ_GEN_PATH': '<(OBJ_DIR)/node_base/gen',
- 'OBJ_TRACING_PATH': '<(OBJ_DIR)/node_base/src/tracing',
- }],
- ]}
- ]
- ],
- },
-
- 'includes': [
@ -49,36 +64,17 @@ diff -u -r ../node-v6.11.2/node.gyp ./node.gyp
- '<(SHARED_INTERMEDIATE_DIR)', # for node_natives.h
- ],
-
- 'libraries': [
- '<(OBJ_GEN_PATH)/node_javascript.<(OBJ_SUFFIX)',
- '<(OBJ_PATH)/async-wrap.<(OBJ_SUFFIX)',
- '<(OBJ_PATH)/env.<(OBJ_SUFFIX)',
- '<(OBJ_PATH)/node.<(OBJ_SUFFIX)',
- '<(OBJ_PATH)/node_buffer.<(OBJ_SUFFIX)',
- '<(OBJ_PATH)/node_i18n.<(OBJ_SUFFIX)',
- '<(OBJ_PATH)/debug-agent.<(OBJ_SUFFIX)',
- '<(OBJ_PATH)/util.<(OBJ_SUFFIX)',
- '<(OBJ_PATH)/string_bytes.<(OBJ_SUFFIX)',
- '<(OBJ_PATH)/string_search.<(OBJ_SUFFIX)',
- '<(OBJ_PATH)/stream_base.<(OBJ_SUFFIX)',
- '<(OBJ_PATH)/node_constants.<(OBJ_SUFFIX)',
- '<(OBJ_PATH)/node_revert.<(OBJ_SUFFIX)',
- ],
-
- 'defines': [
- # gtest's ASSERT macros conflict with our own.
- 'GTEST_DONT_DEFINE_ASSERT_EQ=1',
- 'GTEST_DONT_DEFINE_ASSERT_GE=1',
- 'GTEST_DONT_DEFINE_ASSERT_GT=1',
- 'GTEST_DONT_DEFINE_ASSERT_LE=1',
- 'GTEST_DONT_DEFINE_ASSERT_LT=1',
- 'GTEST_DONT_DEFINE_ASSERT_NE=1',
- 'NODE_WANT_INTERNALS=1',
- ],
- 'defines': [ 'NODE_WANT_INTERNALS=1' ],
-
- 'sources': [
- 'src/node_platform.cc',
- 'src/node_platform.h',
- 'test/cctest/node_test_fixture.cc',
- 'test/cctest/test_aliased_buffer.cc',
- 'test/cctest/test_base64.cc',
- 'test/cctest/test_environment.cc',
- 'test/cctest/test_util.cc',
- 'test/cctest/test_url.cc'
- ],
-
- 'sources!': [
@ -86,11 +82,39 @@ diff -u -r ../node-v6.11.2/node.gyp ./node.gyp
- ],
-
- 'conditions': [
- ['v8_inspector=="true"', {
- ['node_target_type!="static_library"', {
- 'libraries': [
- '<(OBJ_GEN_PATH)<(OBJ_SEPARATOR)node_javascript.<(OBJ_SUFFIX)',
- '<(OBJ_PATH)<(OBJ_SEPARATOR)node_debug_options.<(OBJ_SUFFIX)',
- '<(OBJ_PATH)<(OBJ_SEPARATOR)async-wrap.<(OBJ_SUFFIX)',
- '<(OBJ_PATH)<(OBJ_SEPARATOR)env.<(OBJ_SUFFIX)',
- '<(OBJ_PATH)<(OBJ_SEPARATOR)node.<(OBJ_SUFFIX)',
- '<(OBJ_PATH)<(OBJ_SEPARATOR)node_buffer.<(OBJ_SUFFIX)',
- '<(OBJ_PATH)<(OBJ_SEPARATOR)node_i18n.<(OBJ_SUFFIX)',
- '<(OBJ_PATH)<(OBJ_SEPARATOR)node_perf.<(OBJ_SUFFIX)',
- '<(OBJ_PATH)<(OBJ_SEPARATOR)node_url.<(OBJ_SUFFIX)',
- '<(OBJ_PATH)<(OBJ_SEPARATOR)util.<(OBJ_SUFFIX)',
- '<(OBJ_PATH)<(OBJ_SEPARATOR)string_bytes.<(OBJ_SUFFIX)',
- '<(OBJ_PATH)<(OBJ_SEPARATOR)string_search.<(OBJ_SUFFIX)',
- '<(OBJ_PATH)<(OBJ_SEPARATOR)stream_base.<(OBJ_SUFFIX)',
- '<(OBJ_PATH)<(OBJ_SEPARATOR)node_constants.<(OBJ_SUFFIX)',
- '<(OBJ_TRACING_PATH)<(OBJ_SEPARATOR)agent.<(OBJ_SUFFIX)',
- '<(OBJ_TRACING_PATH)<(OBJ_SEPARATOR)node_trace_buffer.<(OBJ_SUFFIX)',
- '<(OBJ_TRACING_PATH)<(OBJ_SEPARATOR)node_trace_writer.<(OBJ_SUFFIX)',
- '<(OBJ_TRACING_PATH)<(OBJ_SEPARATOR)trace_event.<(OBJ_SUFFIX)',
- ],
- }],
- ['v8_enable_inspector==1', {
- 'sources': [
- 'test/cctest/test_inspector_socket.cc',
- 'test/cctest/test_inspector_socket_server.cc'
- ],
- 'conditions': [
- [ 'node_shared_zlib=="false"', {
- 'dependencies': [
- 'deps/zlib/zlib.gyp:zlib',
- ]
- }],
- [ 'node_shared_openssl=="false" and node_shared=="false"', {
- 'dependencies': [
- 'deps/openssl/openssl.gyp:openssl'
@ -108,13 +132,18 @@ diff -u -r ../node-v6.11.2/node.gyp ./node.gyp
- }]
- ]
- }],
- [ 'node_use_v8_platform=="true"', {
- 'dependencies': [
- 'deps/v8/src/v8.gyp:v8_libplatform',
- ],
- }],
- [ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
- 'copies': [{
- 'destination': '<(OBJ_DIR)/cctest/src',
- 'files': [
- '<(OBJ_PATH)/node_dtrace_ustack.<(OBJ_SUFFIX)',
- '<(OBJ_PATH)/node_dtrace_provider.<(OBJ_SUFFIX)',
- '<(OBJ_PATH)/node_dtrace.<(OBJ_SUFFIX)',
- '<(OBJ_PATH)<(OBJ_SEPARATOR)node_dtrace_ustack.<(OBJ_SUFFIX)',
- '<(OBJ_PATH)<(OBJ_SEPARATOR)node_dtrace_provider.<(OBJ_SUFFIX)',
- '<(OBJ_PATH)<(OBJ_SEPARATOR)node_dtrace.<(OBJ_SUFFIX)',
- ]},
- ],
- }],

View File

@ -1,17 +0,0 @@
Termux is effectively a single-user system so chown:ing
does not make much sense.
Without this patch npm fails with EPERM on chown
for cache.json when first building the local index.
diff -u -r ../node-v0.12.7/deps/npm/lib/cache/update-index.js ./deps/npm/lib/cache/update-index.js
--- ../node-v0.12.7/deps/npm/lib/cache/update-index.js 2015-07-09 18:41:19.000000000 -0400
+++ ./deps/npm/lib/cache/update-index.js 2015-07-24 20:45:21.078116384 -0400
@@ -4,7 +4,7 @@
var assert = require('assert')
var path = require('path')
var mkdir = require('mkdirp')
-var chownr = require('chownr')
+var chownr = function(path, uid, gid, cb) { cb(null); }
var npm = require('../npm.js')
var log = require('npmlog')
var cacheFile = require('npm-cache-filename')