summaryrefslogtreecommitdiff
path: root/lang/nodejs
diff options
context:
space:
mode:
authormrg <mrg@pkgsrc.org>2020-10-17 21:48:41 +0000
committermrg <mrg@pkgsrc.org>2020-10-17 21:48:41 +0000
commitd79199b71aa089cdfb18e795e5ba458924aedcc8 (patch)
treed9bed7508f94cc571940354e36d5a723238474ba /lang/nodejs
parentb2cbe794b58b7a9a554046fe97d1178c94cb50f3 (diff)
downloadpkgsrc-d79199b71aa089cdfb18e795e5ba458924aedcc8.tar.gz
two fixes and now actually builds on armv7hf:
- mips, ppc and arm platforms want -latomic, so provide it - link -larm on netbsd/arm to find arm_sync_icache()
Diffstat (limited to 'lang/nodejs')
-rw-r--r--lang/nodejs/Makefile9
-rw-r--r--lang/nodejs/distinfo3
-rw-r--r--lang/nodejs/patches/patch-tools_v8_gypfiles_v8.gyp19
3 files changed, 29 insertions, 2 deletions
diff --git a/lang/nodejs/Makefile b/lang/nodejs/Makefile
index f1c5fe8a47e..f8be1a5c4e2 100644
--- a/lang/nodejs/Makefile
+++ b/lang/nodejs/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.196 2020/10/08 10:58:35 adam Exp $
+# $NetBSD: Makefile,v 1.197 2020/10/17 21:48:41 mrg Exp $
DISTNAME= node-v14.13.1
EXTRACT_SUFX= .tar.xz
@@ -24,6 +24,13 @@ CXXFLAGS+= -mstackrealign
.include "options.mk"
+# Node turns on -latomic for arm, mips and ppc.
+.if !empty(MACHINE_ARCH:M*arm*) || \
+ !empty(MACHINE_ARCH:M*powerpc*) || \
+ !empty(MACHINE_ARCH:M*mips*)
+.include "../../devel/libatomic/buildlink3.mk"
+.endif
+
.include "../../lang/nodejs/Makefile.common"
.include "../../textproc/icu/buildlink3.mk"
# Requires nghttp2_option_set_max_settings
diff --git a/lang/nodejs/distinfo b/lang/nodejs/distinfo
index c305fe0ffc5..5139f562cb0 100644
--- a/lang/nodejs/distinfo
+++ b/lang/nodejs/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.184 2020/10/17 07:22:15 mrg Exp $
+$NetBSD: distinfo,v 1.185 2020/10/17 21:48:41 mrg Exp $
SHA1 (node-v14.13.1.tar.xz) = 2bed8e2334d0a71a2e430539ae075e519642732e
RMD160 (node-v14.13.1.tar.xz) = 64015436572aed17a85acf2078be7e2e6a746607
@@ -25,3 +25,4 @@ SHA1 (patch-src_node__postmortem__metadata.cc) = 9938482d724ad6636af5dc3fa719ec2
SHA1 (patch-tools_gyp_pylib_gyp_generator_make.py) = 34d4f113d85b4502bc8240fac50dc37554ab4ebb
SHA1 (patch-tools_gyp_pylib_gyp_xcode__emulation.py) = 4ee24115f5e97ffbd23aaa6dc62f408d381d4e22
SHA1 (patch-tools_install.py) = 8058eb63387971b97a1c3573d1875befeb873e77
+SHA1 (patch-tools_v8_gypfiles_v8.gyp) = 49cfd4fa8a8122c6f74965a2e87bbca6d0e44efc
diff --git a/lang/nodejs/patches/patch-tools_v8_gypfiles_v8.gyp b/lang/nodejs/patches/patch-tools_v8_gypfiles_v8.gyp
new file mode 100644
index 00000000000..898e5965f14
--- /dev/null
+++ b/lang/nodejs/patches/patch-tools_v8_gypfiles_v8.gyp
@@ -0,0 +1,19 @@
+$NetBSD: patch-tools_v8_gypfiles_v8.gyp,v 1.1 2020/10/17 21:48:41 mrg Exp $
+
+Add -larm on netbsd arm platforms.
+
+--- tools/v8_gypfiles/v8.gyp.orig 2020-10-07 10:47:43.000000000 -0700
++++ tools/v8_gypfiles/v8.gyp 2020-10-17 13:16:57.485883322 -0700
+@@ -903,6 +903,12 @@
+ }],
+ # Platforms that don't have Compare-And-Swap (CAS) support need to link atomic library
+ # to implement atomic memory access
++ # NetBSD/arm also needs -larm.
++ ['OS == "netbsd" and v8_current_cpu in ["arm"]', {
++ 'link_settings': {
++ 'libraries': ['-larm', ],
++ },
++ }],
+ ['v8_current_cpu in ["mips", "mipsel", "mips64", "mips64el", "ppc", "arm"]', {
+ 'link_settings': {
+ 'libraries': ['-latomic', ],