diff --git a/MOVED b/MOVED index a4f00ce2cec2..ff0cd24435c1 100644 --- a/MOVED +++ b/MOVED @@ -12759,4 +12759,3 @@ databases/py-mysql-connector-python2|databases/py-mysql-connector-python|2019-05 www/py-requests1||2019-05-19|Temporary port while port consumers moved to requests 2.x support and the www/py-requests port. No longer depended on by any ports lang/spidermonkey170|lang/spidermonkey52|2019-05-23|Not depended on, use newer version lang/spidermonkey38|lang/spidermonkey52|2019-05-23|Not depended on, use newer version -www/node6|www/node8|2019-05-23|Has expired: Node.js 6.x LTS reached end-of-life on 2019-04-30, see https://github.com/nodejs/Release diff --git a/www/Makefile b/www/Makefile index 974626c428d6..d277119b82b8 100644 --- a/www/Makefile +++ b/www/Makefile @@ -460,6 +460,7 @@ SUBDIR += nibbleblog SUBDIR += node SUBDIR += node10 + SUBDIR += node6 SUBDIR += node8 SUBDIR += nostromo SUBDIR += novnc diff --git a/www/node/Makefile b/www/node/Makefile index 80560d4ba426..b47db43373b7 100644 --- a/www/node/Makefile +++ b/www/node/Makefile @@ -48,7 +48,7 @@ USES= compiler:c++11-lib gmake python:2.7,build pkgconfig \ HAS_CONFIGURE= yes -CONFLICTS_INSTALL= node8-[0-9]* node10-[0-9]* +CONFLICTS_INSTALL= node[68]-[0-9]* node10-[0-9]* CONFIGURE_ARGS= --prefix=${PREFIX_RELDEST} \ --without-npm \ diff --git a/www/node10/Makefile b/www/node10/Makefile index f68e66a07775..1e15209b136a 100644 --- a/www/node10/Makefile +++ b/www/node10/Makefile @@ -50,7 +50,7 @@ USES= compiler:c++11-lib gmake python:2.7,build pkgconfig \ HAS_CONFIGURE= yes -CONFLICTS_INSTALL= node8-[0-9]* node-[0-9]* +CONFLICTS_INSTALL= node[68]-[0-9]* node-[0-9]* CONFIGURE_ARGS= --prefix=${PREFIX_RELDEST} \ --without-npm \ diff --git a/www/node6/Makefile b/www/node6/Makefile new file mode 100644 index 000000000000..cb7168bfba36 --- /dev/null +++ b/www/node6/Makefile @@ -0,0 +1,116 @@ +# $FreeBSD$ + +PORTNAME= node +PORTVERSION= 6.17.1 +DISTVERSIONPREFIX= v +CATEGORIES= www +MASTER_SITES= http://nodejs.org/dist/v${PORTVERSION}/ +PKGNAMESUFFIX= 6 + +MAINTAINER= bhughes@FreeBSD.org +COMMENT= V8 JavaScript for client and server (6.x LTS) + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +BROKEN_SSL= openssl111 libressl libressl-devel +BROKEN_SSL_REASON= Node.js 6.x LTS requires OpenSSL 1.0.2 or the BUNDLED_SSL option enabled +DEPRECATED= Node.js 6.x LTS reaches end-of-life on 2019-04-30, see https://github.com/nodejs/Release +EXPIRATION_DATE= 2019-04-30 +ONLY_FOR_ARCHS= amd64 armv6 armv7 i386 powerpc64 + +OPTIONS_DEFINE= BUNDLED_SSL DOCS NLS DTRACE +OPTIONS_DEFAULT= DTRACE +OPTIONS_DEFAULT_FreeBSD_12= BUNDLED_SSL +OPTIONS_DEFAULT_FreeBSD_13= BUNDLED_SSL +OPTIONS_DEFAULT+= ${OPTIONS_DEFAULT_${OPSYS}_${OSREL:R}} +OPTIONS_SUB= yes + +.if !exists(/usr/sbin/dtrace) +OPTIONS_EXCLUDE+= DTRACE +.endif + +# dt_modtext:/usr/src/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c(820): arm not implemented +OPTIONS_EXCLUDE_armv6= DTRACE +OPTIONS_EXCLUDE_armv7= DTRACE +OPTIONS_EXCLUDE_powerpc64= DTRACE + +BUNDLED_SSL_DESC= Use node.js's bundled OpenSSL implementation #' +BUNDLED_SSL_USES_OFF= ssl +BUNDLED_SSL_CONFIGURE_OFF+= --shared-openssl + +NLS_CONFIGURE_ON= --with-intl=system-icu +NLS_BUILD_DEPENDS= icu>=58.2:devel/icu +NLS_LIB_DEPENDS= libicui18n.so:devel/icu + +DTRACE_CONFIGURE_ON= --with-dtrace + +USES= compiler:c++11-lib gmake python:2.7,build pkgconfig \ + localbase shebangfix + +HAS_CONFIGURE= yes + +CONFLICTS_INSTALL= node8-[0-9]* node10-[0-9]* node-[0-9]* + +CONFIGURE_ARGS= --prefix=${PREFIX_RELDEST} \ + --without-npm \ + --shared-cares \ + --shared-libuv \ + --shared-zlib + +SHEBANG_FILES= tools/specialize_node_d.py tools/genv8constants.py + +PREFIX_RELDEST= ${PREFIX:S,^${DESTDIR},,} +REINPLACE_ARGS= -i '' +MAKE_ENV+= CC.host=${CC} CFLAGS.host="${CFLAGS}" \ + CXX.host=${CXX} CXXFLAGS.host="${CXXFLAGS}" \ + LINK.host=${CXX} LDFLAGS.host="${LDFLAGS}" + +BUILD_DEPENDS+= c-ares>=1.10.0:dns/c-ares\ + libuv>=1.16.1:devel/libuv +LIB_DEPENDS+= libcares.so:dns/c-ares\ + libuv.so:devel/libuv + +.include + +.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1200085 +BROKEN_SSL+= base +.endif + +.if ${PORT_OPTIONS:MBUNDLED_SSL} && ${ARCH} != amd64 && ${ARCH} != i386 +CONFIGURE_ARGS+=--openssl-no-asm +.endif + +.include + +.if ${CHOSEN_COMPILER_TYPE} == gcc +# GCC does not expose std::snprintf() without this define +CXXFLAGS+= -D_GLIBCXX_USE_C99 +.endif + +post-patch: + @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' \ + ${WRKSRC}/deps/v8/tools/gyp/v8.gyp + # So many different ways to run python. Fix them all. + @${REINPLACE_CMD} -e 's|/usr/bin/env python|${PYTHON_CMD}|' \ + ${WRKSRC}/configure + @${FIND} ${WRKSRC} -type f -name '*.gyp*' -print0 \ + | ${XARGS} -0 ${REINPLACE_CMD} \ + -e "s|'python'|'${PYTHON_CMD}'|" \ + -e 's| diff --git a/www/node6/distinfo b/www/node6/distinfo new file mode 100644 index 000000000000..c066ce9ebee4 --- /dev/null +++ b/www/node6/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1554323316 +SHA256 (node-v6.17.1.tar.gz) = 6fa487c5c6770cc7ca0567c0e532d6bcdf0f5d1aebdceb169ecfb66984459dea +SIZE (node-v6.17.1.tar.gz) = 27241292 diff --git a/www/node6/files/patch-deps_v8_src_arm_cpu-arm.cc b/www/node6/files/patch-deps_v8_src_arm_cpu-arm.cc new file mode 100644 index 000000000000..43810becdccd --- /dev/null +++ b/www/node6/files/patch-deps_v8_src_arm_cpu-arm.cc @@ -0,0 +1,22 @@ +--- deps/v8/src/arm/cpu-arm.cc.orig 2016-10-19 22:02:03 UTC ++++ deps/v8/src/arm/cpu-arm.cc +@@ -7,6 +7,9 @@ + #ifdef __QNXNTO__ + #include // for cache flushing. + #undef MAP_TYPE ++#elif defined(__FreeBSD__) ++#include ++#include // for cache flushing. + #else + #include // for cache flushing. + #endif +@@ -24,6 +27,9 @@ void CpuFeatures::FlushICache(void* star + #if !defined(USE_SIMULATOR) + #if V8_OS_QNX + msync(start, size, MS_SYNC | MS_INVALIDATE_ICACHE); ++#elif defined(__FreeBSD__) ++ struct arm_sync_icache_args args = { .addr = (uintptr_t)start, .len = size }; ++ sysarch(ARM_SYNC_ICACHE, (void *)&args); + #else + register uint32_t beg asm("r0") = reinterpret_cast(start); + register uint32_t end asm("r1") = beg + size; diff --git a/www/node6/files/patch-deps_v8_src_base_atomicops__internals__arm__gcc.h b/www/node6/files/patch-deps_v8_src_base_atomicops__internals__arm__gcc.h new file mode 100644 index 000000000000..6581e9fe4f21 --- /dev/null +++ b/www/node6/files/patch-deps_v8_src_base_atomicops__internals__arm__gcc.h @@ -0,0 +1,35 @@ +--- deps/v8/src/base/atomicops_internals_arm_gcc.h.orig 2016-10-19 22:02:03 UTC ++++ deps/v8/src/base/atomicops_internals_arm_gcc.h +@@ -13,6 +13,11 @@ + #include + #endif + ++#if defined(__FreeBSD__) ++#include ++#include ++#endif ++ + namespace v8 { + namespace base { + +@@ -48,6 +53,8 @@ inline void MemoryBarrier() { + // Note: This is a function call, which is also an implicit compiler barrier. + typedef void (*KernelMemoryBarrierFunc)(); + ((KernelMemoryBarrierFunc)0xffff0fa0)(); ++#elif defined(__FreeBSD__) ++ sysarch(ARM_DRAIN_WRITEBUF, (void *)0); + #elif defined(__QNXNTO__) + __cpu_membarrier(); + #else +@@ -64,8 +71,9 @@ inline void MemoryBarrier() { + defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || \ + defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || \ + defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || \ +- defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || \ +- defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__) ++ defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6KZ__) || \ ++ defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || \ ++ defined(__ARM_ARCH_6T2__) + + inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr, + Atomic32 old_value, diff --git a/www/node6/files/patch-deps_v8_src_base_platform_platform-freebsd.cc b/www/node6/files/patch-deps_v8_src_base_platform_platform-freebsd.cc new file mode 100644 index 000000000000..c4d641e08256 --- /dev/null +++ b/www/node6/files/patch-deps_v8_src_base_platform_platform-freebsd.cc @@ -0,0 +1,51 @@ +--- deps/v8/src/base/platform/platform-freebsd.cc.orig 2016-10-19 22:02:03 UTC ++++ deps/v8/src/base/platform/platform-freebsd.cc +@@ -35,6 +35,48 @@ + namespace v8 { + namespace base { + ++#ifdef __arm__ ++ ++bool OS::ArmUsingHardFloat() { ++ // GCC versions 4.6 and above define __ARM_PCS or __ARM_PCS_VFP to specify ++ // the Floating Point ABI used (PCS stands for Procedure Call Standard). ++ // We use these as well as a couple of other defines to statically determine ++ // what FP ABI used. ++ // GCC versions 4.4 and below don't support hard-fp. ++ // GCC versions 4.5 may support hard-fp without defining __ARM_PCS or ++ // __ARM_PCS_VFP. ++ ++#define GCC_VERSION (__GNUC__ * 10000 \ ++ + __GNUC_MINOR__ * 100 \ ++ + __GNUC_PATCHLEVEL__) ++#if GCC_VERSION >= 40600 ++#if defined(__ARM_PCS_VFP) ++ return true; ++#else ++ return false; ++#endif ++ ++#elif GCC_VERSION < 40500 ++ return false; ++ ++#else ++#if defined(__ARM_PCS_VFP) ++ return true; ++#elif defined(__ARM_PCS) || defined(__SOFTFP__) || defined(__SOFTFP) || \ ++ !defined(__VFP_FP__) ++ return false; ++#else ++#error "Your version of GCC does not report the FP ABI compiled for." \ ++ "Please report it on this issue" \ ++ "http://code.google.com/p/v8/issues/detail?id=2140" ++ ++#endif ++#endif ++#undef GCC_VERSION ++} ++ ++#endif // def __arm__ ++ + + const char* OS::LocalTimezone(double time, TimezoneCache* cache) { + if (std::isnan(time)) return ""; diff --git a/www/node6/files/patch-deps_v8_src_log-utils.h b/www/node6/files/patch-deps_v8_src_log-utils.h new file mode 100644 index 000000000000..cd3bb039e772 --- /dev/null +++ b/www/node6/files/patch-deps_v8_src_log-utils.h @@ -0,0 +1,12 @@ +--- deps/v8/src/log-utils.h.orig 2016-10-19 22:02:04 UTC ++++ deps/v8/src/log-utils.h +@@ -9,6 +9,9 @@ + + #include + ++#include ++#include ++ + #include "src/allocation.h" + #include "src/base/platform/mutex.h" + #include "src/flags.h" diff --git a/www/node6/files/patch-deps_v8_src_profiler_sampler.cc b/www/node6/files/patch-deps_v8_src_profiler_sampler.cc new file mode 100644 index 000000000000..7c6fb3a37f63 --- /dev/null +++ b/www/node6/files/patch-deps_v8_src_profiler_sampler.cc @@ -0,0 +1,15 @@ +--- deps/v8/src/profiler/sampler.cc.orig 2016-10-19 22:02:04 UTC ++++ deps/v8/src/profiler/sampler.cc +@@ -534,9 +534,9 @@ void SignalHandler::HandleProfilerSignal + state.sp = reinterpret_cast
(mcontext.mc_rsp); + state.fp = reinterpret_cast
(mcontext.mc_rbp); + #elif V8_HOST_ARCH_ARM +- state.pc = reinterpret_cast
(mcontext.mc_r15); +- state.sp = reinterpret_cast
(mcontext.mc_r13); +- state.fp = reinterpret_cast
(mcontext.mc_r11); ++ state.pc = reinterpret_cast
(mcontext.__gregs[_REG_PC]); ++ state.sp = reinterpret_cast
(mcontext.__gregs[_REG_SP]); ++ state.fp = reinterpret_cast
(mcontext.__gregs[_REG_FP]); + #endif // V8_HOST_ARCH_* + #elif V8_OS_NETBSD + #if V8_HOST_ARCH_IA32 diff --git a/www/node6/pkg-descr b/www/node6/pkg-descr new file mode 100644 index 000000000000..1000b1412fcc --- /dev/null +++ b/www/node6/pkg-descr @@ -0,0 +1,3 @@ +node - evented I/O for V8 javascript + +WWW: https://nodejs.org/ diff --git a/www/node6/pkg-message b/www/node6/pkg-message new file mode 100644 index 000000000000..3c3a16e0cd44 --- /dev/null +++ b/www/node6/pkg-message @@ -0,0 +1,2 @@ +Note: If you need npm (Node Package Manager), please install the npm3 +package, or build any of the www/npm* ports with the NODE6 option enabled. diff --git a/www/node6/pkg-plist b/www/node6/pkg-plist new file mode 100644 index 000000000000..0e8d7756b62b --- /dev/null +++ b/www/node6/pkg-plist @@ -0,0 +1,119 @@ +bin/node +include/node/common.gypi +include/node/config.gypi +include/node/libplatform/libplatform.h +include/node/node.h +include/node/node_api.h +include/node/node_api_types.h +include/node/node_buffer.h +include/node/node_object_wrap.h +include/node/node_version.h +%%BUNDLED_SSL%%include/node/openssl/aes.h +%%BUNDLED_SSL%%include/node/openssl/archs/BSD-x86/opensslconf.h +%%BUNDLED_SSL%%include/node/openssl/archs/BSD-x86_64/opensslconf.h +%%BUNDLED_SSL%%include/node/openssl/archs/VC-WIN32/opensslconf.h +%%BUNDLED_SSL%%include/node/openssl/archs/VC-WIN64A/opensslconf.h +%%BUNDLED_SSL%%include/node/openssl/archs/aix-gcc/opensslconf.h +%%BUNDLED_SSL%%include/node/openssl/archs/aix64-gcc/opensslconf.h +%%BUNDLED_SSL%%include/node/openssl/archs/darwin-i386-cc/opensslconf.h +%%BUNDLED_SSL%%include/node/openssl/archs/darwin64-x86_64-cc/opensslconf.h +%%BUNDLED_SSL%%include/node/openssl/archs/linux-aarch64/opensslconf.h +%%BUNDLED_SSL%%include/node/openssl/archs/linux-armv4/opensslconf.h +%%BUNDLED_SSL%%include/node/openssl/archs/linux-elf/opensslconf.h +%%BUNDLED_SSL%%include/node/openssl/archs/linux-ppc/opensslconf.h +%%BUNDLED_SSL%%include/node/openssl/archs/linux-ppc64/opensslconf.h +%%BUNDLED_SSL%%include/node/openssl/archs/linux-x32/opensslconf.h +%%BUNDLED_SSL%%include/node/openssl/archs/linux-x86_64/opensslconf.h +%%BUNDLED_SSL%%include/node/openssl/archs/linux32-s390x/opensslconf.h +%%BUNDLED_SSL%%include/node/openssl/archs/linux64-s390x/opensslconf.h +%%BUNDLED_SSL%%include/node/openssl/archs/solaris-x86-gcc/opensslconf.h +%%BUNDLED_SSL%%include/node/openssl/archs/solaris64-x86_64-gcc/opensslconf.h +%%BUNDLED_SSL%%include/node/openssl/asn1.h +%%BUNDLED_SSL%%include/node/openssl/asn1_mac.h +%%BUNDLED_SSL%%include/node/openssl/asn1t.h +%%BUNDLED_SSL%%include/node/openssl/bio.h +%%BUNDLED_SSL%%include/node/openssl/blowfish.h +%%BUNDLED_SSL%%include/node/openssl/bn.h +%%BUNDLED_SSL%%include/node/openssl/buffer.h +%%BUNDLED_SSL%%include/node/openssl/camellia.h +%%BUNDLED_SSL%%include/node/openssl/cast.h +%%BUNDLED_SSL%%include/node/openssl/cmac.h +%%BUNDLED_SSL%%include/node/openssl/cms.h +%%BUNDLED_SSL%%include/node/openssl/comp.h +%%BUNDLED_SSL%%include/node/openssl/conf.h +%%BUNDLED_SSL%%include/node/openssl/conf_api.h +%%BUNDLED_SSL%%include/node/openssl/crypto.h +%%BUNDLED_SSL%%include/node/openssl/des.h +%%BUNDLED_SSL%%include/node/openssl/des_old.h +%%BUNDLED_SSL%%include/node/openssl/dh.h +%%BUNDLED_SSL%%include/node/openssl/dsa.h +%%BUNDLED_SSL%%include/node/openssl/dso.h +%%BUNDLED_SSL%%include/node/openssl/dtls1.h +%%BUNDLED_SSL%%include/node/openssl/e_os2.h +%%BUNDLED_SSL%%include/node/openssl/ebcdic.h +%%BUNDLED_SSL%%include/node/openssl/ec.h +%%BUNDLED_SSL%%include/node/openssl/ecdh.h +%%BUNDLED_SSL%%include/node/openssl/ecdsa.h +%%BUNDLED_SSL%%include/node/openssl/engine.h +%%BUNDLED_SSL%%include/node/openssl/err.h +%%BUNDLED_SSL%%include/node/openssl/evp.h +%%BUNDLED_SSL%%include/node/openssl/hmac.h +%%BUNDLED_SSL%%include/node/openssl/idea.h +%%BUNDLED_SSL%%include/node/openssl/krb5_asn.h +%%BUNDLED_SSL%%include/node/openssl/kssl.h +%%BUNDLED_SSL%%include/node/openssl/lhash.h +%%BUNDLED_SSL%%include/node/openssl/md4.h +%%BUNDLED_SSL%%include/node/openssl/md5.h +%%BUNDLED_SSL%%include/node/openssl/mdc2.h +%%BUNDLED_SSL%%include/node/openssl/modes.h +%%BUNDLED_SSL%%include/node/openssl/obj_mac.h +%%BUNDLED_SSL%%include/node/openssl/objects.h +%%BUNDLED_SSL%%include/node/openssl/ocsp.h +%%BUNDLED_SSL%%include/node/openssl/opensslconf.h +%%BUNDLED_SSL%%include/node/openssl/opensslv.h +%%BUNDLED_SSL%%include/node/openssl/ossl_typ.h +%%BUNDLED_SSL%%include/node/openssl/pem.h +%%BUNDLED_SSL%%include/node/openssl/pem2.h +%%BUNDLED_SSL%%include/node/openssl/pkcs12.h +%%BUNDLED_SSL%%include/node/openssl/pkcs7.h +%%BUNDLED_SSL%%include/node/openssl/pqueue.h +%%BUNDLED_SSL%%include/node/openssl/rand.h +%%BUNDLED_SSL%%include/node/openssl/rc2.h +%%BUNDLED_SSL%%include/node/openssl/rc4.h +%%BUNDLED_SSL%%include/node/openssl/ripemd.h +%%BUNDLED_SSL%%include/node/openssl/rsa.h +%%BUNDLED_SSL%%include/node/openssl/safestack.h +%%BUNDLED_SSL%%include/node/openssl/seed.h +%%BUNDLED_SSL%%include/node/openssl/sha.h +%%BUNDLED_SSL%%include/node/openssl/srp.h +%%BUNDLED_SSL%%include/node/openssl/srtp.h +%%BUNDLED_SSL%%include/node/openssl/ssl.h +%%BUNDLED_SSL%%include/node/openssl/ssl2.h +%%BUNDLED_SSL%%include/node/openssl/ssl23.h +%%BUNDLED_SSL%%include/node/openssl/ssl3.h +%%BUNDLED_SSL%%include/node/openssl/stack.h +%%BUNDLED_SSL%%include/node/openssl/symhacks.h +%%BUNDLED_SSL%%include/node/openssl/tls1.h +%%BUNDLED_SSL%%include/node/openssl/ts.h +%%BUNDLED_SSL%%include/node/openssl/txt_db.h +%%BUNDLED_SSL%%include/node/openssl/ui.h +%%BUNDLED_SSL%%include/node/openssl/ui_compat.h +%%BUNDLED_SSL%%include/node/openssl/whrlpool.h +%%BUNDLED_SSL%%include/node/openssl/x509.h +%%BUNDLED_SSL%%include/node/openssl/x509_vfy.h +%%BUNDLED_SSL%%include/node/openssl/x509v3.h +include/node/v8-debug.h +include/node/v8-experimental.h +include/node/v8-platform.h +include/node/v8-profiler.h +include/node/v8-testing.h +include/node/v8-util.h +include/node/v8-version.h +include/node/v8.h +include/node/v8config.h +%%DTRACE%%lib/dtrace/node.d +@(,,444) man/man1/node.1.gz +%%PORTDOCS%%%%DOCSDIR%%/gdbinit +%%PORTDOCS%%%%DOCSDIR%%/lldb_commands.py +%%PORTDOCS%%%%DOCSDIR%%/lldbinit +share/systemtap/tapset/node.stp diff --git a/www/node8/Makefile b/www/node8/Makefile index 9b7732ba4b7d..025fbbef0898 100644 --- a/www/node8/Makefile +++ b/www/node8/Makefile @@ -47,7 +47,7 @@ USES= compiler:c++11-lib gmake python:2.7,build pkgconfig \ HAS_CONFIGURE= yes -CONFLICTS_INSTALL= node10-[0-9]* node-[0-9]* +CONFLICTS_INSTALL= node6-[0-9]* node10-[0-9]* node-[0-9]* CONFIGURE_ARGS= --prefix=${PREFIX_RELDEST} \ --without-npm \