diff --git a/lang/node-hid/Makefile b/lang/node-hid/Makefile index afcda102..390b3d29 100644 --- a/lang/node-hid/Makefile +++ b/lang/node-hid/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NPM_NAME:=hid PKG_NAME:=node-$(PKG_NPM_NAME) PKG_VERSION:=0.7.2 -PKG_RELEASE:=1 +PKG_RELEASE:=3 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/node-hid/node-hid.git @@ -43,7 +43,9 @@ endef CPU:=$(subst x86_64,x64,$(subst i386,ia32,$(ARCH))) -EXTRA_CFLAGS+=-I$(STAGING_DIR)/usr/include/libusb-1.0 +TMPNPM:=$(shell mktemp -u XXXXXXXXXX) + +TARGET_CFLAGS+=$(FPIC) -I$(STAGING_DIR)/usr/include/libusb-1.0 define Build/Compile git init $(PKG_BUILD_DIR) @@ -51,7 +53,7 @@ define Build/Compile $(MAKE_FLAGS) \ npm_config_arch=$(CONFIG_ARCH) \ npm_config_nodedir=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/ \ - npm_config_cache=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/npm-cache \ + npm_config_cache=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/npm-cache-$(TMPNPM) \ PREFIX="$(PKG_INSTALL_DIR)/usr/" \ npm install --build-from-source --target_arch=$(CPU) -g $(PKG_BUILD_DIR) endef diff --git a/lang/node-serialport/Makefile b/lang/node-serialport/Makefile index 1fec2e47..59ba6ed1 100644 --- a/lang/node-serialport/Makefile +++ b/lang/node-serialport/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NPM_NAME:=serialport PKG_NAME:=node-$(PKG_NPM_NAME) PKG_VERSION:=6.1.1 -PKG_RELEASE:=1 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz PKG_SOURCE_URL:=http://registry.npmjs.org/$(PKG_NPM_NAME)/-/ @@ -45,13 +45,16 @@ endef CPU:=$(subst x86_64,x64,$(subst i386,ia32,$(ARCH))) -EXTRA_LDFLAGS="-L$(TOOLCHAIN_DIR)/lib/ -Wl,-rpath-link $(TOOLCHAIN_DIR)/lib/" \ +EXTRA_LDFLAGS="$(FPIC) -L$(TOOLCHAIN_DIR)/lib/ -Wl,-rpath-link $(TOOLCHAIN_DIR)/lib/" \ +TMPNPM:=$(shell mktemp -u XXXXXXXXXX) + +TARGET_CFLAGS+=$(FPIC) define Build/Compile $(MAKE_FLAGS) \ npm_config_arch=$(CONFIG_ARCH) \ npm_config_nodedir=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/ \ - npm_config_cache=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/npm-cache \ + npm_config_cache=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/npm-cache-$(TMPNPM) \ PREFIX="$(PKG_INSTALL_DIR)/usr/" \ npm install --build-from-source --target_arch=$(CPU) -g $(PKG_BUILD_DIR) endef diff --git a/lang/node/Makefile b/lang/node/Makefile index e10913fe..1274caba 100644 --- a/lang/node/Makefile +++ b/lang/node/Makefile @@ -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 , Adrian Panella 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) diff --git a/lang/node/patches/003-path.patch b/lang/node/patches/003-path.patch index 113f60ee..d9f0eb7a 100644 --- a/lang/node/patches/003-path.patch +++ b/lang/node/patches/003-path.patch @@ -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, '..', '..'); } diff --git a/lang/node/patches/004-node_crypto_include_cmath.patch b/lang/node/patches/004-node_crypto_include_cmath.patch new file mode 100644 index 00000000..77b309f6 --- /dev/null +++ b/lang/node/patches/004-node_crypto_include_cmath.patch @@ -0,0 +1,25 @@ +From 34825d50db18631a92902af3f51ddd27aa074c90 Mon Sep 17 00:00:00 2001 +From: Jeroen Roovers +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 ++#include + #include + #include // INT_MAX +-#include + #include + #include + #include diff --git a/lang/node/patches/004-openssl-deprecated.patch b/lang/node/patches/004-openssl-deprecated.patch deleted file mode 100644 index 7fae2234..00000000 --- a/lang/node/patches/004-openssl-deprecated.patch +++ /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 - #include - -+#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& 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& 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 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 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& 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 -+#include -+#include -+#include - #include - #include - #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 index ba8be051..00000000 --- a/lang/node/patches/005-powerpc32_musl_support.patch +++ /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(ucontext->uc_mcontext.regs->gpr[PT_R1]); - state->fp = - reinterpret_cast(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(ucontext->uc_mcontext.gregs[32]); -+ state->sp = reinterpret_cast(ucontext->uc_mcontext.gregs[1]); -+ state->fp = reinterpret_cast(ucontext->uc_mcontext.gregs[31]); -+#else - state->pc = reinterpret_cast(ucontext->uc_mcontext.gp_regs[32]); - state->sp = reinterpret_cast(ucontext->uc_mcontext.gp_regs[1]); - state->fp = reinterpret_cast(ucontext->uc_mcontext.gp_regs[31]); diff --git a/lang/node/patches/006-mips64_support.patch b/lang/node/patches/006-mips64_support.patch deleted file mode 100644 index 80062450..00000000 --- a/lang/node/patches/006-mips64_support.patch +++ /dev/null @@ -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': diff --git a/lang/node/patches/007-fix_host_build_on_macos.patch b/lang/node/patches/007-fix_host_build_on_macos.patch deleted file mode 100644 index 34f6ec8b..00000000 --- a/lang/node/patches/007-fix_host_build_on_macos.patch +++ /dev/null @@ -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)