Index: head/www/node12/Makefile =================================================================== --- head/www/node12/Makefile (revision 537960) +++ head/www/node12/Makefile (revision 537961) @@ -1,109 +1,108 @@ # $FreeBSD$ PORTNAME= node -PORTVERSION= 12.16.2 +PORTVERSION= 12.16.3 DISTVERSIONPREFIX= v -PORTREVISION= 1 CATEGORIES= www MASTER_SITES= http://nodejs.org/dist/v${PORTVERSION}/ PKGNAMESUFFIX= 12 MAINTAINER= bhughes@FreeBSD.org COMMENT= V8 JavaScript for client and server LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE BROKEN_SSL= libressl libressl-devel BROKEN_SSL_REASON= Node.js 12.x LTS requires OpenSSL 1.1.x or the BUNDLED_SSL option enabled ONLY_FOR_ARCHS= aarch64 amd64 armv6 armv7 i386 powerpc64 OPTIONS_DEFINE= BUNDLED_SSL DOCS NLS DTRACE OPTIONS_DEFAULT= DTRACE OPTIONS_DEFAULT_FreeBSD_11= BUNDLED_SSL OPTIONS_DEFAULT+= ${OPTIONS_DEFAULT_${OPSYS}_${OSREL:R}} OPTIONS_SUB= yes .if !exists(/usr/sbin/dtrace) OPTIONS_EXCLUDE+= DTRACE .endif OPTIONS_EXCLUDE_aarch64= DTRACE # 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 --openssl-use-def-ca-store BUNDLED_SSL_RUN_DEPENDS_OFF= ca_root_nss>=0:security/ca_root_nss NLS_CONFIGURE_ON= --with-intl=system-icu NLS_BUILD_DEPENDS= icu>=64.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= node[68]-[0-9]* node10-[0-9]* node-[0-9]* CONFIGURE_ARGS= --prefix=${PREFIX_RELDEST} \ --without-npm \ --shared-cares \ --shared-libuv \ --shared-nghttp2 \ --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.15.0:dns/c-ares\ libuv>=1.34.2:devel/libuv \ libnghttp2>=1.40.0:www/libnghttp2 \ objdump:devel/binutils LIB_DEPENDS+= libcares.so:dns/c-ares\ libuv.so:devel/libuv \ libnghttp2.so:www/libnghttp2 .include .if ${OPSYS} == FreeBSD && ${OSVERSION} < 1200085 BROKEN_SSL+= base .endif .if ${ARCH} == armv6 || ${ARCH} == armv7 EXTRA_PATCHES= ${PATCHDIR}/extra-patch-tools_v8__gypfiles_v8.gyp .endif .if ${PORT_OPTIONS:MBUNDLED_SSL} && ${ARCH} != amd64 CONFIGURE_ARGS+=--openssl-no-asm .endif post-patch: @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' \ ${WRKSRC}/tools/v8_gypfiles/v8.gyp post-configure: # Post-process Makefile and *.mk files created by node-gyp and remove # all occurrences of -I${LOCALBASE}/include. C*FLAGS include this # before all -I../deps/* for bundled code. This can cause build # breakages if the dependency is installed in ${LOCALBASE}. The # USES+=localbase # above will ensure that we pick up includes for real # external dependencies. ${FIND} ${WRKSRC}/out -type f -print0 \ | ${XARGS} -0 ${REINPLACE_CMD} -e "s|-I${LOCALBASE}/include||g" post-install: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/node .include Index: head/www/node12/distinfo =================================================================== --- head/www/node12/distinfo (revision 537960) +++ head/www/node12/distinfo (revision 537961) @@ -1,3 +1,3 @@ -TIMESTAMP = 1586708011 -SHA256 (node-v12.16.2.tar.gz) = 48b21340eff95bfc6e7297e4a027f5db74d6d64257c476972a1b2f2fdccc9582 -SIZE (node-v12.16.2.tar.gz) = 52267110 +TIMESTAMP = 1591215955 +SHA256 (node-v12.16.3.tar.gz) = 4694056576b6c48a70ad401cf061181eafbc3cbf5070907cdba4e6de1be567a5 +SIZE (node-v12.16.3.tar.gz) = 52322941 Index: head/www/node12/files/patch-deps_v8_src_execution_simulator.h =================================================================== --- head/www/node12/files/patch-deps_v8_src_execution_simulator.h (revision 537960) +++ head/www/node12/files/patch-deps_v8_src_execution_simulator.h (revision 537961) @@ -1,11 +1,11 @@ ---- deps/v8/src/execution/simulator.h.orig 2019-04-26 17:47:06 UTC +--- deps/v8/src/execution/simulator.h.orig 2020-04-28 09:45:23 UTC +++ deps/v8/src/execution/simulator.h -@@ -124,7 +124,7 @@ class GeneratedCode { +@@ -122,7 +122,7 @@ class GeneratedCode { DISABLE_CFI_ICALL Return Call(Args... args) { // When running without a simulator we call the entry directly. -#if V8_OS_AIX +#if V8_TARGET_ARCH_PPC_BE // AIX ABI requires function descriptors (FD). Artificially create a pseudo // FD to ensure correct dispatch to generated code. The 'volatile' // declaration is required to avoid the compiler from not observing the Index: head/www/node12/files/patch-deps_v8_src_objects_js-number-format.cc =================================================================== --- head/www/node12/files/patch-deps_v8_src_objects_js-number-format.cc (revision 537960) +++ head/www/node12/files/patch-deps_v8_src_objects_js-number-format.cc (revision 537961) @@ -1,145 +1,145 @@ https://github.com/nodejs/node/issues/32660 ---- deps/v8/src/objects/js-number-format.cc.orig 2020-03-26 20:00:01 UTC +--- deps/v8/src/objects/js-number-format.cc.orig 2020-04-28 09:45:23 UTC +++ deps/v8/src/objects/js-number-format.cc -@@ -1187,42 +1187,31 @@ MaybeHandle JSNumberFormat::New(Isolat +@@ -1257,42 +1257,31 @@ MaybeHandle JSNumberFormat::New(Isolat } namespace { -Maybe IcuFormatNumber( +Maybe IcuFormatNumber( Isolate* isolate, const icu::number::LocalizedNumberFormatter& number_format, - Handle numeric_obj, icu::FieldPositionIterator* fp_iter) { + Handle numeric_obj, icu::number::FormattedNumber* formatted) { // If it is BigInt, handle it differently. UErrorCode status = U_ZERO_ERROR; - icu::number::FormattedNumber formatted; if (numeric_obj->IsBigInt()) { Handle big_int = Handle::cast(numeric_obj); Handle big_int_string; ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, big_int_string, BigInt::ToString(isolate, big_int), - Nothing()); - formatted = number_format.formatDecimal( + Nothing()); + *formatted = number_format.formatDecimal( {big_int_string->ToCString().get(), big_int_string->length()}, status); } else { double number = numeric_obj->Number(); - formatted = number_format.formatDouble(number, status); + *formatted = number_format.formatDouble(number, status); } if (U_FAILURE(status)) { // This happen because of icu data trimming trim out "unit". // See https://bugs.chromium.org/p/v8/issues/detail?id=8641 - THROW_NEW_ERROR_RETURN_VALUE(isolate, - NewTypeError(MessageTemplate::kIcuError), - Nothing()); + THROW_NEW_ERROR_RETURN_VALUE( + isolate, NewTypeError(MessageTemplate::kIcuError), Nothing()); } - if (fp_iter) { - formatted.getAllFieldPositions(*fp_iter, status); - } - icu::UnicodeString result = formatted.toString(status); - if (U_FAILURE(status)) { - THROW_NEW_ERROR_RETURN_VALUE(isolate, - NewTypeError(MessageTemplate::kIcuError), - Nothing()); - } - return Just(result); + return Just(true); } } // namespace -@@ -1233,10 +1222,16 @@ MaybeHandle JSNumberFormat::FormatNumeric( +@@ -1303,10 +1292,16 @@ MaybeHandle JSNumberFormat::FormatNumeric( Handle numeric_obj) { DCHECK(numeric_obj->IsNumeric()); - Maybe maybe_format = - IcuFormatNumber(isolate, number_format, numeric_obj, nullptr); + icu::number::FormattedNumber formatted; + Maybe maybe_format = + IcuFormatNumber(isolate, number_format, numeric_obj, &formatted); MAYBE_RETURN(maybe_format, Handle()); - return Intl::ToString(isolate, maybe_format.FromJust()); + UErrorCode status = U_ZERO_ERROR; + icu::UnicodeString result = formatted.toString(status); + if (U_FAILURE(status)) { + THROW_NEW_ERROR(isolate, NewTypeError(MessageTemplate::kIcuError), String); + } + return Intl::ToString(isolate, result); } namespace { -@@ -1349,12 +1344,18 @@ std::vector FlattenRegionsToParts( +@@ -1419,12 +1414,18 @@ std::vector FlattenRegionsToParts( } namespace { -Maybe ConstructParts(Isolate* isolate, const icu::UnicodeString& formatted, - icu::FieldPositionIterator* fp_iter, +Maybe ConstructParts(Isolate* isolate, + icu::number::FormattedNumber* formatted, Handle result, int start_index, Handle numeric_obj, bool style_is_unit) { + UErrorCode status = U_ZERO_ERROR; + icu::UnicodeString formatted_text = formatted->toString(status); + if (U_FAILURE(status)) { + THROW_NEW_ERROR_RETURN_VALUE( + isolate, NewTypeError(MessageTemplate::kIcuError), Nothing()); + } DCHECK(numeric_obj->IsNumeric()); - int32_t length = formatted.length(); + int32_t length = formatted_text.length(); int index = start_index; if (length == 0) return Just(index); -@@ -1363,13 +1364,14 @@ Maybe ConstructParts(Isolate* isolate, const icu: +@@ -1433,13 +1434,14 @@ Maybe ConstructParts(Isolate* isolate, const icu: // other region covers some part of the formatted string. It's possible // there's another field with exactly the same begin and end as this backdrop, // in which case the backdrop's field_id of -1 will give it lower priority. - regions.push_back(NumberFormatSpan(-1, 0, formatted.length())); + regions.push_back(NumberFormatSpan(-1, 0, formatted_text.length())); { - icu::FieldPosition fp; - while (fp_iter->next(fp)) { - regions.push_back(NumberFormatSpan(fp.getField(), fp.getBeginIndex(), - fp.getEndIndex())); + icu::ConstrainedFieldPosition cfp; + cfp.constrainCategory(UFIELD_CATEGORY_NUMBER); + while (formatted->nextPosition(cfp, status)) { + regions.push_back( + NumberFormatSpan(cfp.getField(), cfp.getStart(), cfp.getLimit())); } } -@@ -1391,7 +1393,7 @@ Maybe ConstructParts(Isolate* isolate, const icu: +@@ -1461,7 +1463,7 @@ Maybe ConstructParts(Isolate* isolate, const icu: Handle substring; ASSIGN_RETURN_ON_EXCEPTION_VALUE( isolate, substring, - Intl::ToString(isolate, formatted, part.begin_pos, part.end_pos), + Intl::ToString(isolate, formatted_text, part.begin_pos, part.end_pos), Nothing()); Intl::AddElement(isolate, result, index, field_type_string, substring); ++index; -@@ -1411,14 +1413,14 @@ MaybeHandle JSNumberFormat::FormatToParts( +@@ -1481,14 +1483,14 @@ MaybeHandle JSNumberFormat::FormatToParts( number_format->icu_number_formatter().raw(); CHECK_NOT_NULL(fmt); - icu::FieldPositionIterator fp_iter; - Maybe maybe_format = - IcuFormatNumber(isolate, *fmt, numeric_obj, &fp_iter); + icu::number::FormattedNumber formatted; + Maybe maybe_format = + IcuFormatNumber(isolate, *fmt, numeric_obj, &formatted); MAYBE_RETURN(maybe_format, Handle()); Handle result = factory->NewJSArray(0); Maybe maybe_format_to_parts = ConstructParts( - isolate, maybe_format.FromJust(), &fp_iter, result, 0, numeric_obj, + isolate, &formatted, result, 0, numeric_obj, number_format->style() == JSNumberFormat::Style::UNIT); MAYBE_RETURN(maybe_format_to_parts, Handle()); Index: head/www/node12/files/patch-node.gypi =================================================================== --- head/www/node12/files/patch-node.gypi (revision 537960) +++ head/www/node12/files/patch-node.gypi (revision 537961) @@ -1,12 +1,12 @@ ---- node.gypi.orig 2020-02-18 05:08:36 UTC +--- node.gypi.orig 2020-04-28 09:45:25 UTC +++ node.gypi -@@ -331,6 +331,9 @@ +@@ -341,6 +341,9 @@ ['openssl_fips != "" or openssl_is_fips=="true"', { 'defines': [ 'NODE_FIPS_MODE' ], }], + ['openssl_no_asm==1', { + 'defines': [ 'OPENSSL_NO_ASM' ], + }], [ 'node_shared_openssl=="false"', { 'dependencies': [ './deps/openssl/openssl.gyp:openssl',