Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node.js: add node.js v16 #5037

Merged
merged 2 commits into from
Jan 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 0 additions & 52 deletions cross/nodejs/Makefile

This file was deleted.

10 changes: 0 additions & 10 deletions cross/nodejs/PLIST

This file was deleted.

3 changes: 0 additions & 3 deletions cross/nodejs/digests

This file was deleted.

48 changes: 48 additions & 0 deletions cross/nodejs_v16/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
PKG_NAME = node
PKG_VERS = 16.13.1
PKG_EXT = tar.xz
PKG_DIST_NAME = $(PKG_NAME)-v$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://nodejs.org/dist/v$(PKG_VERS)
PKG_DIR = $(PKG_NAME)-v$(PKG_VERS)

# C++ compiler (CXX=/spksrc/toolchain/syno-x64-7.0/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-g++, 7.3.0) too old, need g++ 8.3.0 or clang++ 8.0.0
# DSM 7 toolchains have g++ 7.3.0 only, but succeed to compile nodejs v16.
# newest DSM 6 toolchains have g++ <= 4.9.3.
REQUIRED_DSM = 7.0
# comcerto2k is supported by DSM 7, but toolchain has g++ 4.9.3 that is too old.
UNSUPPORTED_ARCHS = comcerto2k

HOMEPAGE = https://www.nodejs.org
COMMENT = A JavaScript runtime built on Chrome\'s V8 JavaScript engine.
LICENSE = https://github.com/nodejs/node/raw/master/LICENSE

CONFIGURE_ARGS = --cross-compiling --dest-os=linux --prefix=$(INSTALL_PREFIX)

# fix compilation with newer compilers
ADDITIONAL_CPPFLAGS = -D_GLIBCXX_USE_C99_MATH -D_GLIBCXX_HAVE_OBSOLETE_ISNAN -D_GLIBCXX_HAVE_OBSOLETE_ISINF

include ../../mk/spksrc.cross-cc.mk

ifeq ($(findstring $(ARCH),$(64bit_ARCHS)),$(ARCH))
ENV += CC_host="gcc -m64"
ENV += CXX_host="g++ -m64"
else
ENV += CC_host="gcc -m32"
ENV += CXX_host="g++ -m32"
endif

ifeq ($(findstring $(ARCH),$(ARMv7_ARCHS)),$(ARCH))
CONFIGURE_ARGS += --dest-cpu=arm
endif

ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS)),$(ARCH))
CONFIGURE_ARGS += --dest-cpu=arm64
endif

ifeq ($(findstring $(ARCH),$(i686_ARCHS)),$(ARCH))
CONFIGURE_ARGS += --dest-cpu=x86
endif

ifeq ($(findstring $(ARCH),$(x64_ARCHS)),$(ARCH))
CONFIGURE_ARGS += --dest-cpu=x86_64
endif
10 changes: 10 additions & 0 deletions cross/nodejs_v16/PLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
bin:bin/node
rsc:bin/npm
rsc:bin/npx
rsc:lib/node_modules/npm/.npmrc
rsc:lib/node_modules/npm/LICENSE
rsc:lib/node_modules/npm/README.md
rsc:lib/node_modules/npm/bin/
rsc:lib/node_modules/npm/lib/
rsc:lib/node_modules/npm/node_modules/
rsc:lib/node_modules/npm/package.json
3 changes: 3 additions & 0 deletions cross/nodejs_v16/digests
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node-v16.13.1.tar.xz SHA1 a5f5c8ea1ef091923e07ea69f4a096ad32602c71
node-v16.13.1.tar.xz SHA256 4c23004fd75eaf799ad8e76fe34f53e0327f433d4acbfc883396f72e96cc63ad
node-v16.13.1.tar.xz MD5 80667c769fd7d12da24d203585cead11
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# https://github.com/nodejs/node/issues/36287#issuecomment-939324717
# disable V8_TRAP_HANDLER for ARM64
--- deps/v8/src/trap-handler/trap-handler.h.orig 2022-01-01 21:51:12.918863800 +0000
+++ deps/v8/src/trap-handler/trap-handler.h 2022-01-02 17:22:11.340303717 +0000
@@ -25,10 +25,9 @@
// Arm64 (non-simulator) on Mac.
#elif V8_TARGET_ARCH_ARM64 && V8_HOST_ARCH_ARM64 && V8_OS_MACOSX
#define V8_TRAP_HANDLER_SUPPORTED true
-// Arm64 simulator on x64 on Linux or Mac.
+// Arm64 simulator on x64 on Linux or Mac. -> patched to disable supported
#elif V8_TARGET_ARCH_ARM64 && V8_HOST_ARCH_X64 && (V8_OS_LINUX || V8_OS_MACOSX)
-#define V8_TRAP_HANDLER_VIA_SIMULATOR
-#define V8_TRAP_HANDLER_SUPPORTED true
+#define V8_TRAP_HANDLER_SUPPORTED false
// Everything else is unsupported.
#else
#define V8_TRAP_HANDLER_SUPPORTED false
19 changes: 0 additions & 19 deletions spk/nodejs/Makefile

This file was deleted.

Binary file removed spk/nodejs/src/node.png
Binary file not shown.
20 changes: 20 additions & 0 deletions spk/nodejs_v16/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
SPK_NAME = nodejs_v16
SPK_VERS = 16.13.1
SPK_REV = 1
SPK_ICON = src/node.png

DEPENDS = cross/$(SPK_NAME)

MAINTAINER = SynoCommunity
DESCRIPTION = Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.
CHANGELOG = "Initial v16 package release."
DISPLAY_NAME = Node.js® v16

HOMEPAGE = https://nodejs.org
LICENSE = https://github.com/nodejs/node/raw/master/LICENSE

STARTABLE = no

SPK_COMMANDS = bin/node bin/npm bin/npx

include ../../mk/spksrc.spk.mk
File renamed without changes.
Binary file added spk/nodejs_v16/src/node.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.