Revert "nodejs: bumpt version"

This reverts commit ddb4e6835b.
This commit is contained in:
LEAN-ESX 2019-10-26 08:22:57 -07:00
parent ddb4e6835b
commit 3d3c9c9bbe
7 changed files with 36 additions and 170 deletions

View File

@ -8,11 +8,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=node
PKG_VERSION:=v8.16.1
PKG_RELEASE:=1
PKG_VERSION:=v8.10.0
PKG_RELEASE:=3
PKG_SOURCE:=node-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://nodejs.org/dist/${PKG_VERSION}
PKG_HASH:=d8c190acdf2d967faf49c22df883d31a8d4e249d67852dae3c2d8a0f756b0512
PKG_SOURCE_URL:=http://nodejs.org/dist/${PKG_VERSION}
PKG_HASH:=b72d4e71618d6bcbd039b487b51fa7543631a4ac3331d7caf69bdf55b5b2901a
HOST_BUILD_DEPENDS:=python/host
PKG_BUILD_DEPENDS:=python/host
@ -26,7 +26,6 @@ PKG_BUILD_PARALLEL:=1
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
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk
@ -36,10 +35,8 @@ define Package/node
CATEGORY:=Languages
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 \
+libstdcpp +libopenssl +zlib +libnghttp2 +libuv +libhttp-parser \
+NODEJS_ICU:icu
URL:=http://nodejs.org/
DEPENDS:=@(HAS_FPU||KERNEL_MIPS_FPU_EMULATOR) +libstdcpp +libopenssl +zlib +USE_UCLIBC:libpthread +USE_UCLIBC:librt +NODEJS_ICU:icu
endef
define Package/node/description
@ -53,7 +50,7 @@ define Package/node-npm
CATEGORY:=Languages
SUBMENU:=Node.js
TITLE:=NPM stands for Node Package Manager
URL:=https://npmjs.com/
URL:=http://npmjs.com/
DEPENDS:=+node
endef
@ -62,13 +59,13 @@ define Package/node-npm/description
endef
define Package/node/config
if PACKAGE_node
menu "Module Selection"
config NODEJS_ICU
bool "enable i18n features"
default n
endif
endmenu
endef
NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))))
@ -88,9 +85,6 @@ CONFIGURE_ARGS:= \
--without-snapshot \
--shared-zlib \
--shared-openssl \
--shared-nghttp2 \
--shared-libuv \
--shared-http-parser \
--with-intl=$(if $(CONFIG_NODEJS_ICU),system-icu,none) \
$(if $(findstring mips,$(NODEJS_CPU)), \
$(if $(CONFIG_SOFT_FLOAT),--with-mips-float-abi=soft)) \
@ -103,7 +97,7 @@ CONFIGURE_ARGS:= \
HOST_CONFIGURE_VARS:=
HOST_CONFIGURE_ARGS:= \
--dest-os=$(if $(findstring Darwin,$(HOST_OS)),mac,linux) \
--dest-os=linux \
--without-snapshot \
--prefix=$(STAGING_DIR_HOSTPKG)

View File

@ -1,6 +1,6 @@
--- a/lib/module.js
+++ b/lib/module.js
@@ -715,7 +715,8 @@
@@ -714,7 +714,8 @@
} else {
prefixDir = path.resolve(process.execPath, '..', '..');
}

View File

@ -0,0 +1,25 @@
From 34825d50db18631a92902af3f51ddd27aa074c90 Mon Sep 17 00:00:00 2001
From: Jeroen Roovers <jer-gentoo@users.noreply.github.com>
Date: Fri, 13 Apr 2018 05:54:42 +0200
Subject: [PATCH 2/2] Include cmath ...
... instead of using the C implementations of isnan and isinf
---
src/node_crypto.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/node_crypto.cc b/src/node_crypto.cc
index 7c0f65a5735..0aa4adbd467 100644
--- a/src/node_crypto.cc
+++ b/src/node_crypto.cc
@@ -44,9 +44,9 @@
#include "StartComAndWoSignData.inc"
#include <algorithm>
+#include <cmath>
#include <errno.h>
#include <limits.h> // INT_MAX
-#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <vector>

View File

@ -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

View File

@ -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]);

View File

@ -1,30 +0,0 @@
--- a/configure
+++ b/configure
@@ -60,7 +60,7 @@
valid_os = ('win', 'mac', 'solaris', 'freebsd', 'openbsd', 'linux',
'android', 'aix')
-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')
valid_arm_float_abi = ('soft', 'softfp', 'hard')
valid_arm_fpu = ('vfp', 'vfpv3', 'vfpv3-d16', 'neon')
@@ -795,6 +795,9 @@
if rtn == 'mipsel' and '_LP64' in k:
rtn = 'mips64el'
+ if rtn == 'mips' and '_LP64' in k:
+ rtn = 'mips64'
+
return rtn
@@ -877,7 +880,7 @@
if target_arch == 'arm':
configure_arm(o)
- elif target_arch in ('mips', 'mipsel', 'mips64el'):
+ elif target_arch in ('mips', 'mipsel', 'mips64', 'mips64el'):
configure_mips(o)
if flavor == 'aix':

View File

@ -1,11 +0,0 @@
--- a/tools/gyp/pylib/gyp/generator/make.py
+++ b/tools/gyp/pylib/gyp/generator/make.py
@@ -174,7 +174,7 @@
LINK_COMMANDS_MAC = """\
quiet_cmd_alink = LIBTOOL-STATIC $@
-cmd_alink = rm -f $@ && ./gyp-mac-tool filter-libtool libtool $(GYP_LIBTOOLFLAGS) -static -o $@ $(filter %.o,$^)
+cmd_alink = rm -f $@ && ./gyp-mac-tool filter-libtool /usr/bin/libtool $(GYP_LIBTOOLFLAGS) -static -o $@ $(filter %.o,$^)
quiet_cmd_link = LINK($(TOOLSET)) $@
cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS)