View | Details | Raw Unified | Return to bug 213693 | Differences between
and this patch

Collapse All | Expand All

(-)www/Makefile (+1 lines)
Lines 537-542 Link Here
537
    SUBDIR += node
537
    SUBDIR += node
538
    SUBDIR += node012
538
    SUBDIR += node012
539
    SUBDIR += node4
539
    SUBDIR += node4
540
    SUBDIR += node6
540
    SUBDIR += nostromo
541
    SUBDIR += nostromo
541
    SUBDIR += npapi-vlc
542
    SUBDIR += npapi-vlc
542
    SUBDIR += npapi-xine
543
    SUBDIR += npapi-xine
(-)www/node6/Makefile (+99 lines)
Added Link Here
1
# $FreeBSD$
2
3
PORTNAME=	node
4
PORTVERSION=	6.9.1
5
DISTVERSIONPREFIX=	v
6
CATEGORIES=	www
7
MASTER_SITES=	http://nodejs.org/dist/v${PORTVERSION}/
8
PKGNAMESUFFIX=	6
9
10
MAINTAINER=	bradleythughes@fastmail.fm
11
COMMENT=	V8 JavaScript for client and server (6.x)
12
13
LICENSE=	MIT
14
LICENSE_FILE=	${WRKSRC}/LICENSE
15
16
OPTIONS_DEFINE=	BUNDLED_SSL DOCS NLS
17
OPTIONS_SUB=	yes
18
19
BUNDLED_SSL_DESC=		Use node.js's bundled OpenSSL implementation
20
BUNDLED_SSL_USES_OFF=		ssl
21
BUNDLED_SSL_CONFIGURE_OFF+=	--shared-openssl
22
23
NLS_CONFIGURE_ON=	--with-intl=system-icu
24
NLS_LIB_DEPENDS=	libicui18n.so:devel/icu
25
26
USES=		compiler:c++11-lib execinfo gmake python:2,build pkgconfig localbase
27
HAS_CONFIGURE=	yes
28
USE_LDCONFIG=	yes
29
30
CONFLICTS_INSTALL=	node4-4.* node012-0.12.* node010-0.10.* node-devel-[0-9]* iojs-[0-9]*
31
32
ONLY_FOR_ARCHS=	i386 amd64 armv6
33
CONFIGURE_ARGS=	--prefix=${PREFIX_RELDEST} \
34
		--without-npm \
35
		--shared-cares \
36
		--shared-libuv \
37
		--shared-zlib
38
39
PREFIX_RELDEST=	${PREFIX:S,^${DESTDIR},,}
40
REINPLACE_ARGS=	-i ''
41
MAKE_ENV+=	CC.host=${CC} CXX.host=${CXX} LINK.host=${CXX} LINK.target=${CXX}
42
43
LIB_DEPENDS+=	libcares.so:dns/c-ares\
44
		libuv.so:devel/libuv
45
46
.include <bsd.port.options.mk>
47
48
.if empty(PORT_OPTIONS:MBUNDLED_SSL)
49
50
.if ${OSVERSION} < 1100085
51
# node.js requires openssl 1.0.2, use the port since base isn't new enough
52
WITH_OPENSSL_PORT=	yes
53
.endif
54
55
.endif
56
57
.include <bsd.port.pre.mk>
58
59
.if empty(PORT_OPTIONS:MBUNDLED_SSL)
60
.if !empty(SSL_DEFAULT:Mlibressl*)
61
IGNORE=		cannot build node.js with LibreSSL. You must enable BUNDLED_SSL
62
.endif
63
.endif
64
65
.if ${ARCH} == "armv6"
66
CONFIGURE_ARGS=	--openssl-no-asm
67
.endif
68
69
.if ${COMPILER_TYPE} == gcc
70
# GCC does not expose std::snprintf() without this define
71
CXXFLAGS+=	-D_GLIBCXX_USE_C99
72
.endif
73
74
post-patch:
75
	@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' \
76
		${WRKSRC}/deps/v8/tools/gyp/v8.gyp
77
	# So many different ways to run python. Fix them all.
78
	@${REINPLACE_CMD} -e 's|/usr/bin/env python|${PYTHON_CMD}|' \
79
		${WRKSRC}/configure
80
	@${FIND} ${WRKSRC} -type f -name '*.gyp*' -print0 \
81
		| ${XARGS} -0 ${REINPLACE_CMD} \
82
			-e "s|'python'|'${PYTHON_CMD}'|" \
83
			-e 's|<!(python |<!(${PYTHON_CMD} |' \
84
			-e 's|\&\& python |\&\& ${PYTHON_CMD} |'
85
86
post-configure:
87
	# Post-process Makefile and *.mk files created by node-gyp and remove
88
	# all occurrences of -I${LOCALBASE}/include. C*FLAGS include this
89
	# before all -I../deps/* for bundled code. This can cause build
90
	# breakages if the dependency is installed in ${LOCALBASE}. The
91
	# USES+=localbase # above will ensure that we pick up includes for real
92
	# external dependencies.
93
	${FIND} ${WRKSRC}/out -type f -print0 \
94
		| ${XARGS} -0 ${REINPLACE_CMD} -e "s|-I${LOCALBASE}/include||g"
95
96
post-install:
97
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/node
98
99
.include <bsd.port.post.mk>
(-)www/node6/distinfo (+3 lines)
Added Link Here
1
TIMESTAMP = 1476953621
2
SHA256 (node-v6.9.1.tar.gz) = a98997ca3a4d10751f0ebe97839b2308a31ae884b4203cda0c99cf36bc7fe3bf
3
SIZE (node-v6.9.1.tar.gz) = 26504341
(-)www/node6/files/patch-deps_v8_src_arm_cpu-arm.cc (+22 lines)
Added Link Here
1
--- deps/v8/src/arm/cpu-arm.cc.orig	2016-10-19 22:02:03 UTC
2
+++ deps/v8/src/arm/cpu-arm.cc
3
@@ -7,6 +7,9 @@
4
 #ifdef __QNXNTO__
5
 #include <sys/mman.h>  // for cache flushing.
6
 #undef MAP_TYPE
7
+#elif defined(__FreeBSD__)
8
+#include <sys/types.h>
9
+#include <machine/sysarch.h> // for cache flushing.
10
 #else
11
 #include <sys/syscall.h>  // for cache flushing.
12
 #endif
13
@@ -24,6 +27,9 @@ void CpuFeatures::FlushICache(void* star
14
 #if !defined(USE_SIMULATOR)
15
 #if V8_OS_QNX
16
   msync(start, size, MS_SYNC | MS_INVALIDATE_ICACHE);
17
+#elif defined(__FreeBSD__)
18
+  struct arm_sync_icache_args args = { .addr = (uintptr_t)start, .len = size };
19
+  sysarch(ARM_SYNC_ICACHE, (void *)&args);
20
 #else
21
   register uint32_t beg asm("r0") = reinterpret_cast<uint32_t>(start);
22
   register uint32_t end asm("r1") = beg + size;
(-)www/node6/files/patch-deps_v8_src_base_atomicops__internals__arm__gcc.h (+35 lines)
Added Link Here
1
--- deps/v8/src/base/atomicops_internals_arm_gcc.h.orig	2016-10-19 22:02:03 UTC
2
+++ deps/v8/src/base/atomicops_internals_arm_gcc.h
3
@@ -13,6 +13,11 @@
4
 #include <sys/cpuinline.h>
5
 #endif
6
 
7
+#if defined(__FreeBSD__)
8
+#include <sys/types.h>
9
+#include <machine/sysarch.h>
10
+#endif
11
+
12
 namespace v8 {
13
 namespace base {
14
 
15
@@ -48,6 +53,8 @@ inline void MemoryBarrier() {
16
   // Note: This is a function call, which is also an implicit compiler barrier.
17
   typedef void (*KernelMemoryBarrierFunc)();
18
   ((KernelMemoryBarrierFunc)0xffff0fa0)();
19
+#elif defined(__FreeBSD__)
20
+  sysarch(ARM_DRAIN_WRITEBUF, (void *)0);
21
 #elif defined(__QNXNTO__)
22
   __cpu_membarrier();
23
 #else
24
@@ -64,8 +71,9 @@ inline void MemoryBarrier() {
25
     defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) ||  \
26
     defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || \
27
     defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) ||  \
28
-    defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || \
29
-    defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__)
30
+    defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6KZ__) || \
31
+    defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || \
32
+    defined(__ARM_ARCH_6T2__)
33
 
34
 inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr,
35
                                          Atomic32 old_value,
(-)www/node6/files/patch-deps_v8_src_base_platform_platform-freebsd.cc (+51 lines)
Added Link Here
1
--- deps/v8/src/base/platform/platform-freebsd.cc.orig	2016-10-19 22:02:03 UTC
2
+++ deps/v8/src/base/platform/platform-freebsd.cc
3
@@ -35,6 +35,48 @@
4
 namespace v8 {
5
 namespace base {
6
 
7
+#ifdef __arm__
8
+
9
+bool OS::ArmUsingHardFloat() {
10
+  // GCC versions 4.6 and above define __ARM_PCS or __ARM_PCS_VFP to specify
11
+  // the Floating Point ABI used (PCS stands for Procedure Call Standard).
12
+  // We use these as well as a couple of other defines to statically determine
13
+  // what FP ABI used.
14
+  // GCC versions 4.4 and below don't support hard-fp.
15
+  // GCC versions 4.5 may support hard-fp without defining __ARM_PCS or
16
+  // __ARM_PCS_VFP.
17
+
18
+#define GCC_VERSION (__GNUC__ * 10000                                          \
19
+                     + __GNUC_MINOR__ * 100                                    \
20
+                     + __GNUC_PATCHLEVEL__)
21
+#if GCC_VERSION >= 40600
22
+#if defined(__ARM_PCS_VFP)
23
+  return true;
24
+#else
25
+  return false;
26
+#endif
27
+
28
+#elif GCC_VERSION < 40500
29
+  return false;
30
+
31
+#else
32
+#if defined(__ARM_PCS_VFP)
33
+  return true;
34
+#elif defined(__ARM_PCS) || defined(__SOFTFP__) || defined(__SOFTFP) || \
35
+      !defined(__VFP_FP__)
36
+  return false;
37
+#else
38
+#error "Your version of GCC does not report the FP ABI compiled for."          \
39
+       "Please report it on this issue"                                        \
40
+       "http://code.google.com/p/v8/issues/detail?id=2140"
41
+
42
+#endif
43
+#endif
44
+#undef GCC_VERSION
45
+}
46
+
47
+#endif  // def __arm__
48
+
49
 
50
 const char* OS::LocalTimezone(double time, TimezoneCache* cache) {
51
   if (std::isnan(time)) return "";
(-)www/node6/files/patch-deps_v8_src_log-utils.h (+12 lines)
Added Link Here
1
--- deps/v8/src/log-utils.h.orig	2016-10-19 22:02:04 UTC
2
+++ deps/v8/src/log-utils.h
3
@@ -9,6 +9,9 @@
4
 
5
 #include <cstdarg>
6
 
7
+#include <cstdio>
8
+#include <cstdarg>
9
+
10
 #include "src/allocation.h"
11
 #include "src/base/platform/mutex.h"
12
 #include "src/flags.h"
(-)www/node6/files/patch-deps_v8_src_profiler_sampler.cc (+15 lines)
Added Link Here
1
--- deps/v8/src/profiler/sampler.cc.orig	2016-10-19 22:02:04 UTC
2
+++ deps/v8/src/profiler/sampler.cc
3
@@ -534,9 +534,9 @@ void SignalHandler::HandleProfilerSignal
4
   state.sp = reinterpret_cast<Address>(mcontext.mc_rsp);
5
   state.fp = reinterpret_cast<Address>(mcontext.mc_rbp);
6
 #elif V8_HOST_ARCH_ARM
7
-  state.pc = reinterpret_cast<Address>(mcontext.mc_r15);
8
-  state.sp = reinterpret_cast<Address>(mcontext.mc_r13);
9
-  state.fp = reinterpret_cast<Address>(mcontext.mc_r11);
10
+  state.pc = reinterpret_cast<Address>(mcontext.__gregs[_REG_PC]);
11
+  state.sp = reinterpret_cast<Address>(mcontext.__gregs[_REG_SP]);
12
+  state.fp = reinterpret_cast<Address>(mcontext.__gregs[_REG_FP]);
13
 #endif  // V8_HOST_ARCH_*
14
 #elif V8_OS_NETBSD
15
 #if V8_HOST_ARCH_IA32
(-)www/node6/pkg-descr (+3 lines)
Added Link Here
1
node - evented I/O for V8 javascript
2
3
WWW: http://nodejs.org/
(-)www/node6/pkg-message (+1 lines)
Added Link Here
1
Note: If you need npm (Node Package Manager), please install www/npm.
(-)www/node6/pkg-plist (+114 lines)
Added Link Here
1
bin/node
2
include/node/common.gypi
3
include/node/config.gypi
4
include/node/libplatform/libplatform.h
5
include/node/node.h
6
include/node/node_buffer.h
7
include/node/node_object_wrap.h
8
include/node/node_version.h
9
%%BUNDLED_SSL%%include/node/openssl/aes.h
10
%%BUNDLED_SSL%%include/node/openssl/archs/BSD-x86/opensslconf.h
11
%%BUNDLED_SSL%%include/node/openssl/archs/BSD-x86_64/opensslconf.h
12
%%BUNDLED_SSL%%include/node/openssl/archs/VC-WIN32/opensslconf.h
13
%%BUNDLED_SSL%%include/node/openssl/archs/VC-WIN64A/opensslconf.h
14
%%BUNDLED_SSL%%include/node/openssl/archs/aix-gcc/opensslconf.h
15
%%BUNDLED_SSL%%include/node/openssl/archs/aix64-gcc/opensslconf.h
16
%%BUNDLED_SSL%%include/node/openssl/archs/darwin-i386-cc/opensslconf.h
17
%%BUNDLED_SSL%%include/node/openssl/archs/darwin64-x86_64-cc/opensslconf.h
18
%%BUNDLED_SSL%%include/node/openssl/archs/linux-aarch64/opensslconf.h
19
%%BUNDLED_SSL%%include/node/openssl/archs/linux-armv4/opensslconf.h
20
%%BUNDLED_SSL%%include/node/openssl/archs/linux-elf/opensslconf.h
21
%%BUNDLED_SSL%%include/node/openssl/archs/linux-ppc/opensslconf.h
22
%%BUNDLED_SSL%%include/node/openssl/archs/linux-ppc64/opensslconf.h
23
%%BUNDLED_SSL%%include/node/openssl/archs/linux-x32/opensslconf.h
24
%%BUNDLED_SSL%%include/node/openssl/archs/linux-x86_64/opensslconf.h
25
%%BUNDLED_SSL%%include/node/openssl/archs/linux32-s390x/opensslconf.h
26
%%BUNDLED_SSL%%include/node/openssl/archs/linux64-s390x/opensslconf.h
27
%%BUNDLED_SSL%%include/node/openssl/archs/solaris-x86-gcc/opensslconf.h
28
%%BUNDLED_SSL%%include/node/openssl/archs/solaris64-x86_64-gcc/opensslconf.h
29
%%BUNDLED_SSL%%include/node/openssl/asn1.h
30
%%BUNDLED_SSL%%include/node/openssl/asn1_mac.h
31
%%BUNDLED_SSL%%include/node/openssl/asn1t.h
32
%%BUNDLED_SSL%%include/node/openssl/bio.h
33
%%BUNDLED_SSL%%include/node/openssl/blowfish.h
34
%%BUNDLED_SSL%%include/node/openssl/bn.h
35
%%BUNDLED_SSL%%include/node/openssl/buffer.h
36
%%BUNDLED_SSL%%include/node/openssl/camellia.h
37
%%BUNDLED_SSL%%include/node/openssl/cast.h
38
%%BUNDLED_SSL%%include/node/openssl/cmac.h
39
%%BUNDLED_SSL%%include/node/openssl/cms.h
40
%%BUNDLED_SSL%%include/node/openssl/comp.h
41
%%BUNDLED_SSL%%include/node/openssl/conf.h
42
%%BUNDLED_SSL%%include/node/openssl/conf_api.h
43
%%BUNDLED_SSL%%include/node/openssl/crypto.h
44
%%BUNDLED_SSL%%include/node/openssl/des.h
45
%%BUNDLED_SSL%%include/node/openssl/des_old.h
46
%%BUNDLED_SSL%%include/node/openssl/dh.h
47
%%BUNDLED_SSL%%include/node/openssl/dsa.h
48
%%BUNDLED_SSL%%include/node/openssl/dso.h
49
%%BUNDLED_SSL%%include/node/openssl/dtls1.h
50
%%BUNDLED_SSL%%include/node/openssl/e_os2.h
51
%%BUNDLED_SSL%%include/node/openssl/ebcdic.h
52
%%BUNDLED_SSL%%include/node/openssl/ec.h
53
%%BUNDLED_SSL%%include/node/openssl/ecdh.h
54
%%BUNDLED_SSL%%include/node/openssl/ecdsa.h
55
%%BUNDLED_SSL%%include/node/openssl/engine.h
56
%%BUNDLED_SSL%%include/node/openssl/err.h
57
%%BUNDLED_SSL%%include/node/openssl/evp.h
58
%%BUNDLED_SSL%%include/node/openssl/hmac.h
59
%%BUNDLED_SSL%%include/node/openssl/idea.h
60
%%BUNDLED_SSL%%include/node/openssl/krb5_asn.h
61
%%BUNDLED_SSL%%include/node/openssl/kssl.h
62
%%BUNDLED_SSL%%include/node/openssl/lhash.h
63
%%BUNDLED_SSL%%include/node/openssl/md4.h
64
%%BUNDLED_SSL%%include/node/openssl/md5.h
65
%%BUNDLED_SSL%%include/node/openssl/mdc2.h
66
%%BUNDLED_SSL%%include/node/openssl/modes.h
67
%%BUNDLED_SSL%%include/node/openssl/obj_mac.h
68
%%BUNDLED_SSL%%include/node/openssl/objects.h
69
%%BUNDLED_SSL%%include/node/openssl/ocsp.h
70
%%BUNDLED_SSL%%include/node/openssl/opensslconf.h
71
%%BUNDLED_SSL%%include/node/openssl/opensslv.h
72
%%BUNDLED_SSL%%include/node/openssl/ossl_typ.h
73
%%BUNDLED_SSL%%include/node/openssl/pem.h
74
%%BUNDLED_SSL%%include/node/openssl/pem2.h
75
%%BUNDLED_SSL%%include/node/openssl/pkcs12.h
76
%%BUNDLED_SSL%%include/node/openssl/pkcs7.h
77
%%BUNDLED_SSL%%include/node/openssl/pqueue.h
78
%%BUNDLED_SSL%%include/node/openssl/rand.h
79
%%BUNDLED_SSL%%include/node/openssl/rc2.h
80
%%BUNDLED_SSL%%include/node/openssl/rc4.h
81
%%BUNDLED_SSL%%include/node/openssl/ripemd.h
82
%%BUNDLED_SSL%%include/node/openssl/rsa.h
83
%%BUNDLED_SSL%%include/node/openssl/safestack.h
84
%%BUNDLED_SSL%%include/node/openssl/seed.h
85
%%BUNDLED_SSL%%include/node/openssl/sha.h
86
%%BUNDLED_SSL%%include/node/openssl/srp.h
87
%%BUNDLED_SSL%%include/node/openssl/srtp.h
88
%%BUNDLED_SSL%%include/node/openssl/ssl.h
89
%%BUNDLED_SSL%%include/node/openssl/ssl2.h
90
%%BUNDLED_SSL%%include/node/openssl/ssl23.h
91
%%BUNDLED_SSL%%include/node/openssl/ssl3.h
92
%%BUNDLED_SSL%%include/node/openssl/stack.h
93
%%BUNDLED_SSL%%include/node/openssl/symhacks.h
94
%%BUNDLED_SSL%%include/node/openssl/tls1.h
95
%%BUNDLED_SSL%%include/node/openssl/ts.h
96
%%BUNDLED_SSL%%include/node/openssl/txt_db.h
97
%%BUNDLED_SSL%%include/node/openssl/ui.h
98
%%BUNDLED_SSL%%include/node/openssl/ui_compat.h
99
%%BUNDLED_SSL%%include/node/openssl/whrlpool.h
100
%%BUNDLED_SSL%%include/node/openssl/x509.h
101
%%BUNDLED_SSL%%include/node/openssl/x509_vfy.h
102
%%BUNDLED_SSL%%include/node/openssl/x509v3.h
103
include/node/v8-debug.h
104
include/node/v8-experimental.h
105
include/node/v8-platform.h
106
include/node/v8-profiler.h
107
include/node/v8-testing.h
108
include/node/v8-util.h
109
include/node/v8-version.h
110
include/node/v8.h
111
include/node/v8config.h
112
@(,,444) man/man1/node.1.gz
113
%%PORTDOCS%%%%DOCSDIR%%/gdbinit
114
share/systemtap/tapset/node.stp

Return to bug 213693