node: update to v12.15.0
authorHirokazu MORIKAWA <redacted>
Tue, 8 Oct 2019 04:51:59 +0000 (13:51 +0900)
committerHirokazu MORIKAWA <redacted>
Thu, 6 Feb 2020 06:52:40 +0000 (15:52 +0900)
Update to v12.15.0
Support Python3 : https://github.com/openwrt/packages/issues/8893
Preparing to deprecate nosnapshot builds.

Signed-off-by: Hirokazu MORIKAWA <redacted>
13 files changed:
lang/node/Makefile
lang/node/patches/001-hardfloat.patch
lang/node/patches/002-addr_info.patch
lang/node/patches/003-path.patch
lang/node/patches/004-musl_support.patch [new file with mode: 0644]
lang/node/patches/004-openssl-deprecated.patch [deleted file]
lang/node/patches/005-powerpc32_musl_support.patch [deleted file]
lang/node/patches/006-mips64_support.patch
lang/node/patches/007-fix_host_build_on_macos.patch
lang/node/patches/008-deps_v8_fix_big_endian.patch [new file with mode: 0644]
lang/node/patches/999-delete_unnecessary_libraries_for_host_execute.patch [new file with mode: 0644]
lang/node/patches/999-fix_missing_llhttp_depends.patch [new file with mode: 0644]
lang/node/patches/999-v8_this_build_method_will_be_deprecated.patch [new file with mode: 0644]

index e10913fe497aeb5196118b638f305ade6b41b4b2..87a22b5d956f36414f04ea126bd419e25e0b5e8f 100644 (file)
@@ -8,26 +8,27 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=node
-PKG_VERSION:=v8.16.1
+PKG_VERSION:=v12.15.0
 PKG_RELEASE:=1
-PKG_SOURCE:=node-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=https://nodejs.org/dist/${PKG_VERSION}
-PKG_HASH:=d8c190acdf2d967faf49c22df883d31a8d4e249d67852dae3c2d8a0f756b0512
 
-HOST_BUILD_DEPENDS:=python/host
-PKG_BUILD_DEPENDS:=python/host
-
-PKG_INSTALL:=1
-PKG_USE_MIPS16:=0
-
-HOST_BUILD_PARALLEL:=1
-PKG_BUILD_PARALLEL:=1
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=https://nodejs.org/dist/$(PKG_VERSION)
+PKG_HASH:=d2fb4fa80ccf321570552b0a6e6b5f2aedeb281a8450207b057cf54c54d5a81b
 
 PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>, Adrian Panella <ianchi74@outlook.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 PKG_CPE_ID:=cpe:/a:nodejs:node.js
 
+HOST_BUILD_DEPENDS:=python3/host
+HOST_BUILD_PARALLEL:=1
+
+PKG_BUILD_DEPENDS:=python3/host
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+PKG_USE_MIPS16:=0
+PKG_ASLR_PIE:=0
+
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/package.mk
 
@@ -37,15 +38,16 @@ define Package/node
   SUBMENU:=Node.js
   TITLE:=Node.js is a platform built on Chrome's JavaScript runtime
   URL:=https://nodejs.org/
-  DEPENDS:=@(HAS_FPU||KERNEL_MIPS_FPU_EMULATOR) @!arc @!armeb \
+  DEPENDS:=@(HAS_FPU||KERNEL_MIPS_FPU_EMULATOR) @!arc @!armeb @!powerpc \
           +libstdcpp +libopenssl +zlib +libnghttp2 +libuv +libhttp-parser \
-          +NODEJS_ICU:icu
+          +libcares +libatomic +NODEJS_ICU_SYSTEM:icu +NODEJS_ICU_SYSTEM:icu-full-data
 endef
 
 define Package/node/description
   Node.jsĀ® is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js uses
   an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js'
    package ecosystem, npm, is the largest ecosystem of open source libraries in the world.
+  *** Requires GCC/G++ Multilib on host system to build 32-bit target ***
 endef
 
 define Package/node-npm
@@ -53,7 +55,7 @@ define Package/node-npm
   CATEGORY:=Languages
   SUBMENU:=Node.js
   TITLE:=NPM stands for Node Package Manager
-  URL:=https://npmjs.com/
+  URL:=https://www.npmjs.com/
   DEPENDS:=+node
 endef
 
@@ -63,35 +65,54 @@ endef
 
 define Package/node/config
        if PACKAGE_node
-
-       config NODEJS_ICU
-               bool "enable i18n features"
-               default n
-
+       choice
+               prompt "i18n features"
+               default NODEJS_ICU_NONE
+               help
+                Select i18n features
+
+               config NODEJS_ICU_NONE
+                       bool "Disable"
+
+               config NODEJS_ICU_SMALL
+                       depends on !BIG_ENDIAN
+                       bool "small-icu"
+
+               config NODEJS_ICU_SYSTEM
+                       depends on ARCH_64BIT&&!BIG_ENDIAN
+                       bool "system-icu"
+       endchoice
        endif
 endef
 
 NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))))
 
+ifneq ($(CONFIG_ARCH_64BIT),y)
+FORCE_32BIT:=-m32
+endif
+
 MAKE_VARS+= \
-       DESTCPU=$(NODEJS_CPU)
+       DESTCPU=$(NODEJS_CPU) \
+       LD_LIBRARY_PATH=$(STAGING_DIR_HOSTPKG)/share/icu/65.1/lib
 
 CONFIGURE_VARS:= \
        CC="$(TARGET_CC) $(TARGET_OPTIMIZATION)" \
        CXX="$(TARGET_CXX) $(TARGET_OPTIMIZATION)" \
-       CC_host="$(HOSTCC)" \
-       CXX_host="$(HOSTCXX)"
+       CC_host="$(HOSTCC) $(FORCE_32BIT)" \
+       CXX_host="$(HOSTCXX) $(FORCE_32BIT)"
 
 CONFIGURE_ARGS:= \
        --dest-cpu=$(NODEJS_CPU) \
        --dest-os=linux \
-       --without-snapshot \
+       --cross-compiling \
        --shared-zlib \
        --shared-openssl \
        --shared-nghttp2 \
        --shared-libuv \
        --shared-http-parser \
-       --with-intl=$(if $(CONFIG_NODEJS_ICU),system-icu,none) \
+       --shared-cares \
+       $(if $(CONFIG_NODEJS_ICU_SMALL),, \
+               --with-intl=$(if $(CONFIG_NODEJS_ICU_SYSTEM),system-icu,none)) \
        $(if $(findstring mips,$(NODEJS_CPU)), \
                $(if $(CONFIG_SOFT_FLOAT),--with-mips-float-abi=soft)) \
        $(if $(findstring +neon,$(CONFIG_CPU_TYPE)),--with-arm-fpu=neon) \
@@ -104,29 +125,25 @@ HOST_CONFIGURE_VARS:=
 
 HOST_CONFIGURE_ARGS:= \
        --dest-os=$(if $(findstring Darwin,$(HOST_OS)),mac,linux) \
-       --without-snapshot \
+       --with-intl=none \
        --prefix=$(STAGING_DIR_HOSTPKG)
 
-HOST_CONFIGURE_CMD:=python ./configure
-
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include
        $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
 endef
 
 define Package/node/install
-       mkdir -p $(1)/usr/bin
-       $(CP) $(PKG_INSTALL_DIR)/usr/bin/node $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/node $(1)/usr/bin/
 endef
 
 define Package/node-npm/install
-       mkdir -p $(1)/usr/bin $(1)/usr/lib/node_modules/npm/{bin,lib,node_modules}
-       $(CP) $(PKG_INSTALL_DIR)/usr/bin/{npm,npx} $(1)/usr/bin/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/{package.json,LICENSE} $(1)/usr/lib/node_modules/npm
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/bin/npm-cli.js $(1)/usr/lib/node_modules/npm/bin
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/bin/npx-cli.js $(1)/usr/lib/node_modules/npm/bin
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/lib/* $(1)/usr/lib/node_modules/npm/lib/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/node_modules/* $(1)/usr/lib/node_modules/npm/node_modules/
+       $(INSTALL_DIR) $(1)/usr/lib/node_modules
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/* $(1)/usr/lib/node_modules/
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(LN) ../lib/node_modules/npm/bin/npm-cli.js $(1)/usr/bin/npm
+       $(LN) ../lib/node_modules/npm/bin/npx-cli.js $(1)/usr/bin/npx
 endef
 
 $(eval $(call HostBuild))
index 1a573cb5d65e9dd25cdb5f21eb49a9df61675463..6c879f77999b936a3f481dcebf9ca4170fae43ed 100644 (file)
@@ -1,6 +1,6 @@
 --- a/deps/v8/src/base/cpu.cc
 +++ b/deps/v8/src/base/cpu.cc
-@@ -144,6 +144,7 @@
+@@ -143,6 +143,7 @@
        ".set push\n\t"
        ".set noreorder\n\t"
        ".set oddspreg\n\t"
index 3e4e583afc28bb99bfa6642a3006a760ad39f617..4a0f709e87a2ac5afcca7d1df8c06989db58a1ff 100644 (file)
@@ -1,10 +1,10 @@
 --- a/deps/uv/src/unix/getaddrinfo.c
 +++ b/deps/uv/src/unix/getaddrinfo.c
-@@ -100,6 +100,7 @@
+@@ -103,6 +103,7 @@
    int err;
  
    req = container_of(w, uv_getaddrinfo_t, work_req);
-+   req->hints->ai_flags &= ~AI_V4MAPPED;
++  req->hints->ai_flags &= ~AI_V4MAPPED;
    err = getaddrinfo(req->hostname, req->service, req->hints, &req->addrinfo);
    req->retcode = uv__getaddrinfo_translate_error(err);
  }
index 113f60ee602173b6f2a991d2ac97151f5fc6c543..987c866f288eebc694f1ebd8c287296c6eee9b8c 100644 (file)
@@ -1,11 +1,11 @@
---- a/lib/module.js
-+++ b/lib/module.js
-@@ -715,7 +715,8 @@
-   } else {
-     prefixDir = path.resolve(process.execPath, '..', '..');
-   }
--  var paths = [path.resolve(prefixDir, 'lib', 'node')];
-+  var paths = [path.resolve(prefixDir, 'lib', 'node'),
+--- a/lib/internal/modules/cjs/loader.js
++++ b/lib/internal/modules/cjs/loader.js
+@@ -1095,7 +1095,8 @@
+     path.resolve(process.execPath, '..') :
+     path.resolve(process.execPath, '..', '..');
+-  let paths = [path.resolve(prefixDir, 'lib', 'node')];
++  let paths = [path.resolve(prefixDir, 'lib', 'node'),
 +               path.resolve(prefixDir, 'lib', 'node_modules')];
  
    if (homeDir) {
diff --git a/lang/node/patches/004-musl_support.patch b/lang/node/patches/004-musl_support.patch
new file mode 100644 (file)
index 0000000..4d197ff
--- /dev/null
@@ -0,0 +1,61 @@
+diff -urN a/deps/v8/src/base/platform/condition-variable.cc b/deps/v8/src/base/platform/condition-variable.cc
+--- a/deps/v8/src/base/platform/condition-variable.cc  2019-09-05 00:36:23.000000000 +0900
++++ b/deps/v8/src/base/platform/condition-variable.cc  2019-09-12 15:10:01.063792083 +0900
+@@ -16,7 +16,7 @@
+ ConditionVariable::ConditionVariable() {
+ #if (V8_OS_FREEBSD || V8_OS_NETBSD || V8_OS_OPENBSD || \
+-     (V8_OS_LINUX && V8_LIBC_GLIBC))
++     V8_OS_LINUX)
+   // On Free/Net/OpenBSD and Linux with glibc we can change the time
+   // source for pthread_cond_timedwait() to use the monotonic clock.
+   pthread_condattr_t attr;
+@@ -92,7 +92,7 @@
+       &native_handle_, &mutex->native_handle(), &ts);
+ #else
+ #if (V8_OS_FREEBSD || V8_OS_NETBSD || V8_OS_OPENBSD || \
+-     (V8_OS_LINUX && V8_LIBC_GLIBC))
++     V8_OS_LINUX)
+   // On Free/Net/OpenBSD and Linux with glibc we can change the time
+   // source for pthread_cond_timedwait() to use the monotonic clock.
+   result = clock_gettime(CLOCK_MONOTONIC, &ts);
+diff -urN a/deps/v8/src/base/platform/platform-posix.cc b/deps/v8/src/base/platform/platform-posix.cc
+--- a/deps/v8/src/base/platform/platform-posix.cc      2019-09-05 00:36:23.000000000 +0900
++++ b/deps/v8/src/base/platform/platform-posix.cc      2019-09-12 15:10:01.063792083 +0900
+@@ -773,7 +773,7 @@
+ #if V8_OS_MACOSX
+     // Default on Mac OS X is 512kB -- bump up to 1MB
+     stack_size = 1 * 1024 * 1024;
+-#elif V8_OS_AIX
++#elif V8_OS_AIX || !defined(__GLIBC__)
+     // Default on AIX is 96kB -- bump up to 2MB
+     stack_size = 2 * 1024 * 1024;
+ #endif
+diff -urN a/deps/v8/src/codegen/external-reference-table.cc b/deps/v8/src/codegen/external-reference-table.cc
+--- a/deps/v8/src/codegen/external-reference-table.cc  2019-09-05 00:36:23.000000000 +0900
++++ b/deps/v8/src/codegen/external-reference-table.cc  2019-09-12 15:09:41.959828134 +0900
+@@ -9,7 +9,7 @@
+ #include "src/ic/stub-cache.h"
+ #include "src/logging/counters.h"
+-#if defined(DEBUG) && defined(V8_OS_LINUX) && !defined(V8_OS_ANDROID)
++#if defined(DEBUG) && defined(V8_OS_LINUX) && !defined(V8_OS_ANDROID) && defined(V8_LIBC_GLIBC)
+ #define SYMBOLIZE_FUNCTION
+ #include <execinfo.h>
+ #include <vector>
+diff -urN a/deps/v8/src/compiler-dispatcher/optimizing-compile-dispatcher.cc b/deps/v8/src/compiler-dispatcher/optimizing-compile-dispatcher.cc
+--- a/deps/v8/src/compiler-dispatcher/optimizing-compile-dispatcher.cc 2019-09-05 00:36:23.000000000 +0900
++++ b/deps/v8/src/compiler-dispatcher/optimizing-compile-dispatcher.cc 2019-09-12 15:10:01.063792083 +0900
+@@ -134,8 +134,10 @@
+     // The function may have already been optimized by OSR.  Simply continue.
+     // Use a mutex to make sure that functions marked for install
+     // are always also queued.
+-    base::MutexGuard access_output_queue_(&output_queue_mutex_);
+-    output_queue_.push(job);
++    {
++      base::MutexGuard access_output_queue_(&output_queue_mutex_);
++      output_queue_.push(job);
++    }
+   }
+   isolate_->stack_guard()->RequestInstallCode();
diff --git a/lang/node/patches/004-openssl-deprecated.patch b/lang/node/patches/004-openssl-deprecated.patch
deleted file mode 100644 (file)
index 7fae223..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-diff --git a/src/node_crypto.cc b/src/node_crypto.cc
-index c3779c0..611fb43 100644
---- a/src/node_crypto.cc
-+++ b/src/node_crypto.cc
-@@ -43,6 +43,11 @@
- #include <string.h>
- #include <vector>
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#define X509_get0_notBefore X509_get_notBefore
-+#define X509_get0_notAfter X509_get_notAfter
-+#endif
-+
- #define THROW_AND_RETURN_IF_NOT_STRING_OR_BUFFER(val, prefix)                  \
-   do {                                                                         \
-     if (!Buffer::HasInstance(val) && !val->IsString()) {                       \
-@@ -536,6 +541,7 @@ void SecureContext::Init(const FunctionCallbackInfo<Value>& args) {
-       method = SSLv23_server_method();
-     } else if (strcmp(*sslmethod, "SSLv23_client_method") == 0) {
-       method = SSLv23_client_method();
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-     } else if (strcmp(*sslmethod, "TLSv1_method") == 0) {
-       method = TLSv1_method();
-     } else if (strcmp(*sslmethod, "TLSv1_server_method") == 0) {
-@@ -554,6 +560,14 @@ void SecureContext::Init(const FunctionCallbackInfo<Value>& args) {
-       method = TLSv1_2_server_method();
-     } else if (strcmp(*sslmethod, "TLSv1_2_client_method") == 0) {
-       method = TLSv1_2_client_method();
-+#else
-+    } else if (strcmp(*sslmethod, "TLS_method") == 0) {
-+      method = TLS_method();
-+    } else if (strcmp(*sslmethod, "TLS_server_method") == 0) {
-+      method = TLS_server_method();
-+    } else if (strcmp(*sslmethod, "TLS_client_method") == 0) {
-+      method = TLS_client_method();
-+#endif
-     } else {
-       return env->ThrowError("Unknown method");
-     }
-@@ -1799,7 +1813,7 @@ static Local<Object> X509ToObject(Environment* env, X509* cert) {
-     rsa = nullptr;
-   }
--  ASN1_TIME_print(bio, X509_get_notBefore(cert));
-+  ASN1_TIME_print(bio, X509_get0_notBefore(cert));
-   BIO_get_mem_ptr(bio, &mem);
-   info->Set(context, env->valid_from_string(),
-             String::NewFromUtf8(env->isolate(), mem->data,
-@@ -1807,7 +1821,7 @@ static Local<Object> X509ToObject(Environment* env, X509* cert) {
-                                 mem->length)).FromJust();
-   (void) BIO_reset(bio);
--  ASN1_TIME_print(bio, X509_get_notAfter(cert));
-+  ASN1_TIME_print(bio, X509_get0_notAfter(cert));
-   BIO_get_mem_ptr(bio, &mem);
-   info->Set(context, env->valid_to_string(),
-             String::NewFromUtf8(env->isolate(), mem->data,
-@@ -6191,8 +6205,12 @@ void TimingSafeEqual(const FunctionCallbackInfo<Value>& args) {
- }
- void InitCryptoOnce() {
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-   SSL_load_error_strings();
-   OPENSSL_no_config();
-+#else
-+  OPENSSL_init_crypto(OPENSSL_INIT_NO_LOAD_CONFIG, NULL);
-+#endif
-   // --openssl-config=...
-   if (!openssl_config.empty()) {
-@@ -6214,10 +6232,10 @@ void InitCryptoOnce() {
-     }
-   }
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-   SSL_library_init();
-   OpenSSL_add_all_algorithms();
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-   crypto_lock_init();
-   CRYPTO_set_locking_callback(crypto_lock_cb);
-   CRYPTO_THREADID_set_callback(crypto_threadid_cb);
-diff --git a/src/node_crypto.h b/src/node_crypto.h
-index 58f5b72..875a787 100644
---- a/src/node_crypto.h
-+++ b/src/node_crypto.h
-@@ -37,6 +37,9 @@
- #include "v8.h"
- #include <openssl/ssl.h>
-+#include <openssl/bn.h>
-+#include <openssl/rsa.h>
-+#include <openssl/dh.h>
- #include <openssl/ec.h>
- #include <openssl/ecdh.h>
- #ifndef OPENSSL_NO_ENGINE
diff --git a/lang/node/patches/005-powerpc32_musl_support.patch b/lang/node/patches/005-powerpc32_musl_support.patch
deleted file mode 100644 (file)
index ba8be05..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
---- a/deps/v8/src/libsampler/sampler.cc
-+++ b/deps/v8/src/libsampler/sampler.cc
-@@ -456,8 +456,12 @@
-       reinterpret_cast<void*>(ucontext->uc_mcontext.regs->gpr[PT_R1]);
-   state->fp =
-       reinterpret_cast<void*>(ucontext->uc_mcontext.regs->gpr[PT_R31]);
--#else
-+#elif V8_TARGET_ARCH_32_BIT
-   // Some C libraries, notably Musl, define the regs member as a void pointer
-+  state->pc = reinterpret_cast<void*>(ucontext->uc_mcontext.gregs[32]);
-+  state->sp = reinterpret_cast<void*>(ucontext->uc_mcontext.gregs[1]);
-+  state->fp = reinterpret_cast<void*>(ucontext->uc_mcontext.gregs[31]);
-+#else
-   state->pc = reinterpret_cast<void*>(ucontext->uc_mcontext.gp_regs[32]);
-   state->sp = reinterpret_cast<void*>(ucontext->uc_mcontext.gp_regs[1]);
-   state->fp = reinterpret_cast<void*>(ucontext->uc_mcontext.gp_regs[31]);
index 80062450c07f0cd2fc753e51aba6093b742a71fb..01fd2acef375ed4d434a582e03c17514b266215e 100644 (file)
@@ -1,15 +1,15 @@
---- a/configure
-+++ b/configure
-@@ -60,7 +60,7 @@
+--- a/configure.py
++++ b/configure.py
+@@ -48,7 +48,7 @@
  
  valid_os = ('win', 'mac', 'solaris', 'freebsd', 'openbsd', 'linux',
-             'android', 'aix')
+             'android', 'aix', 'cloudabi')
 -valid_arch = ('arm', 'arm64', 'ia32', 'mips', 'mipsel', 'mips64el', 'ppc',
 +valid_arch = ('arm', 'arm64', 'ia32', 'mips', 'mipsel', 'mips64', 'mips64el', 'ppc',
-               'ppc64', 'x32','x64', 'x86', 'x86_64', 's390', 's390x')
+               'ppc64', 'x32','x64', 'x86', 'x86_64', 's390x')
  valid_arm_float_abi = ('soft', 'softfp', 'hard')
  valid_arm_fpu = ('vfp', 'vfpv3', 'vfpv3-d16', 'neon')
-@@ -795,6 +795,9 @@
+@@ -883,6 +883,9 @@
    if rtn == 'mipsel' and '_LP64' in k:
      rtn = 'mips64el'
  
@@ -19,7 +19,7 @@
    return rtn
  
  
-@@ -877,7 +880,7 @@
+@@ -981,7 +984,7 @@
  
    if target_arch == 'arm':
      configure_arm(o)
index 34f6ec8b986c5e9e9e16c6992fa4709cdf8a9203..486d2ffd0ae74503ff234d8f80aeeacd3059e953 100644 (file)
@@ -1,6 +1,6 @@
 --- a/tools/gyp/pylib/gyp/generator/make.py
 +++ b/tools/gyp/pylib/gyp/generator/make.py
-@@ -174,7 +174,7 @@
+@@ -176,7 +176,7 @@
  
  LINK_COMMANDS_MAC = """\
  quiet_cmd_alink = LIBTOOL-STATIC $@
diff --git a/lang/node/patches/008-deps_v8_fix_big_endian.patch b/lang/node/patches/008-deps_v8_fix_big_endian.patch
new file mode 100644 (file)
index 0000000..040e2e6
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/deps/v8/src/runtime/runtime-utils.h
++++ b/deps/v8/src/runtime/runtime-utils.h
+@@ -126,7 +126,7 @@
+ #if defined(V8_TARGET_LITTLE_ENDIAN)
+   return x.ptr() | (static_cast<ObjectPair>(y.ptr()) << 32);
+ #elif defined(V8_TARGET_BIG_ENDIAN)
+-  return y->ptr() | (static_cast<ObjectPair>(x->ptr()) << 32);
++  return y.ptr() | (static_cast<ObjectPair>(x.ptr()) << 32);
+ #else
+ #error Unknown endianness
+ #endif
diff --git a/lang/node/patches/999-delete_unnecessary_libraries_for_host_execute.patch b/lang/node/patches/999-delete_unnecessary_libraries_for_host_execute.patch
new file mode 100644 (file)
index 0000000..7e87cee
--- /dev/null
@@ -0,0 +1,78 @@
+--- a/tools/icu/icu-generic.gyp
++++ b/tools/icu/icu-generic.gyp
+@@ -517,6 +517,7 @@
+       'target_name': 'genrb',
+       'type': 'executable',
+       'toolsets': [ 'host' ],
++      'libraries!':[ '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ],
+       'dependencies': [ 'icutools' ],
+       'sources': [
+         '<@(icu_src_genrb)'
+@@ -533,6 +534,7 @@
+       'target_name': 'iculslocs',
+       'toolsets': [ 'host' ],
+       'type': 'executable',
++      'libraries!':[ '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ],
+       'dependencies': [ 'icutools' ],
+       'sources': [
+         'iculslocs.cc',
+@@ -545,6 +547,7 @@
+       'target_name': 'icupkg',
+       'toolsets': [ 'host' ],
+       'type': 'executable',
++      'libraries!':[ '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ],
+       'dependencies': [ 'icutools' ],
+       'sources': [
+         '<@(icu_src_icupkg)',
+@@ -556,6 +559,7 @@
+       'target_name': 'genccode',
+       'toolsets': [ 'host' ],
+       'type': 'executable',
++      'libraries!':[ '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ],
+       'dependencies': [ 'icutools' ],
+       'sources': [
+         '<@(icu_src_genccode)',
+--- a/tools/v8_gypfiles/v8.gyp 2019-06-27 19:12:20.000000000 +0900
++++ b/tools/v8_gypfiles/v8.gyp 2019-07-01 14:40:48.292020880 +0900
+@@ -1258,6 +1258,7 @@
+     {
+       'target_name': 'bytecode_builtins_list_generator',
+       'type': 'executable',
++      'libraries!':[ '-licui18n', '-licuuc', '-licudata', '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ],
+       'conditions': [
+         ['want_separate_host_toolset', {
+           'toolsets': ['host'],
+@@ -1281,6 +1282,8 @@
+     {
+       'target_name': 'mksnapshot',
+       'type': 'executable',
++      'libraries!':[ '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ],
++      'library_dirs':[ '../../../../staging_dir/hostpkg/share/icu/65.1/lib' ],
+       'dependencies': [
+         'v8_base_without_compiler',
+         'v8_compiler_for_mksnapshot',
+@@ -1303,6 +1306,7 @@
+     {
+       'target_name': 'torque',
+       'type': 'executable',
++      'libraries!':[ '-licui18n', '-licuuc', '-licudata', '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ],
+       'dependencies': [
+         'torque_base',
+         # "build/win:default_exe_manifest",
+@@ -1341,6 +1345,7 @@
+     {
+       'target_name': 'torque-language-server',
+       'type': 'executable',
++      'libraries!':[ '-licui18n', '-licuuc', '-licudata', '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ],
+       'conditions': [
+         ['want_separate_host_toolset', {
+           'toolsets': ['host'],
+@@ -1368,6 +1373,8 @@
+     {
+       'target_name': 'gen-regexp-special-case',
+       'type': 'executable',
++      'libraries!':[ '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ],
++      'library_dirs':[ '../../../../staging_dir/hostpkg/share/icu/65.1/lib' ],
+       'dependencies': [
+         'v8_libbase',
+         # "build/win:default_exe_manifest",
diff --git a/lang/node/patches/999-fix_missing_llhttp_depends.patch b/lang/node/patches/999-fix_missing_llhttp_depends.patch
new file mode 100644 (file)
index 0000000..1ef0bd6
--- /dev/null
@@ -0,0 +1,14 @@
+diff -urN a/node.gypi b/node.gypi
+--- a/node.gypi        2019-09-05 00:36:25.000000000 +0900
++++ b/node.gypi        2019-09-13 09:57:54.073191914 +0900
+@@ -142,6 +142,10 @@
+         'deps/http_parser/http_parser.gyp:http_parser',
+         'deps/llhttp/llhttp.gyp:llhttp'
+       ],
++    }, {
++      'dependencies': [
++        'deps/llhttp/llhttp.gyp:llhttp'
++      ],
+     } ],
+     [ 'node_shared_cares=="false"', {
diff --git a/lang/node/patches/999-v8_this_build_method_will_be_deprecated.patch b/lang/node/patches/999-v8_this_build_method_will_be_deprecated.patch
new file mode 100644 (file)
index 0000000..406b340
--- /dev/null
@@ -0,0 +1,37 @@
+diff -urN a/configure.py b/configure.py
+--- a/configure.py     2019-09-05 00:36:21.000000000 +0900
++++ b/configure.py     2019-09-27 11:49:55.445800884 +0900
+@@ -1202,6 +1202,25 @@
+     options.build_v8_with_gn = FetchDeps(v8_path)
+   o['variables']['build_v8_with_gn'] = b(options.build_v8_with_gn)
++def configure_v8_deprecated(o):
++  target_arch = options.dest_cpu
++  if target_arch == 'x86':
++    target_arch = 'ia32'
++  if target_arch == 'x86_64':
++    target_arch = 'x64'
++
++  if target_arch in ('mips', 'mips64'):
++    o['variables']['v8_use_snapshot'] = 'false'
++  elif target_arch in ('mipsel', 'mips64el'):
++    o['variables']['v8_enable_embedded_builtins'] = 0
++  elif target_arch == 'x64':
++    if options.with_intl in (None, 'none'):
++      o['variables']['v8_enable_embedded_builtins'] = 0
++  elif target_arch == 'ia32':
++    if options.with_intl in (None, 'none'):
++      o['variables']['v8_enable_embedded_builtins'] = 1
++    else:
++      o['variables']['v8_enable_embedded_builtins'] = 0
+ def configure_openssl(o):
+   variables = o['variables']
+@@ -1632,6 +1651,7 @@
+ configure_intl(output)
+ configure_static(output)
+ configure_inspector(output)
++configure_v8_deprecated(output)
+ # variables should be a root level element,
+ # move everything else to target_defaults
git clone https://git.99rst.org/PROJECT