Date: Tue, 9 Jun 2020 22:04:08 +0000 (UTC) From: "Bradley T. Hughes" <bhughes@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r538350 - in head/www/node: . files Message-ID: <202006092204.059M482n008024@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bhughes Date: Tue Jun 9 22:04:08 2020 New Revision: 538350 URL: https://svnweb.freebsd.org/changeset/ports/538350 Log: www/node: Update 13.14.0 -> 14.0.0 Upgrade to the latest major vesrion of Node.js. Regenerate patches since some have been adopted upstream, while others needed refreshing. Adopt a patch from a newer Node.js version to allow the port to build with either ICU 66.1 or 67.1. https://nodejs.org/en/blog/release/v14.0.0/ Sponsored by: Miles AS Added: head/www/node/files/patch-deps_v8_src_objects_js-number-format.cc (contents, props changed) Deleted: head/www/node/files/patch-deps_v8_src_codegen_arm_cpu-arm.cc Modified: head/www/node/Makefile head/www/node/distinfo head/www/node/files/patch-deps_v8_src_compiler_backend_instruction-selector.cc head/www/node/files/patch-deps_v8_src_compiler_backend_ppc_code-generator-ppc.cc head/www/node/files/patch-deps_v8_src_libsampler_sampler.cc head/www/node/pkg-plist Modified: head/www/node/Makefile ============================================================================== --- head/www/node/Makefile Tue Jun 9 21:50:21 2020 (r538349) +++ head/www/node/Makefile Tue Jun 9 22:04:08 2020 (r538350) @@ -1,7 +1,7 @@ # $FreeBSD$ PORTNAME= node -PORTVERSION= 13.14.0 +PORTVERSION= 14.0.0 DISTVERSIONPREFIX= v CATEGORIES= www MASTER_SITES= http://nodejs.org/dist/v${PORTVERSION}/ @@ -13,7 +13,7 @@ LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE BROKEN_SSL= libressl libressl-devel -BROKEN_SSL_REASON= Node.js 12.x requires OpenSSL 1.1.x or the BUNDLED_SSL option enabled +BROKEN_SSL_REASON= Node.js 14.x 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 @@ -38,7 +38,7 @@ BUNDLED_SSL_CONFIGURE_OFF= --shared-openssl --openssl- 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_BUILD_DEPENDS= icu>=66.1:devel/icu NLS_LIB_DEPENDS= libicui18n.so:devel/icu DTRACE_CONFIGURE_ON= --with-dtrace @@ -69,7 +69,7 @@ MAKE_ENV+= CC.host=${CC} CFLAGS.host="${CFLAGS}" \ LINK.host=${CXX} LDFLAGS.host="${LDFLAGS}" BUILD_DEPENDS+= c-ares>=1.15.0:dns/c-ares\ - libuv>=1.35.0:devel/libuv \ + libuv>=1.37.0:devel/libuv \ libnghttp2>=1.40.0:www/libnghttp2 \ objdump:devel/binutils LIB_DEPENDS+= libcares.so:dns/c-ares\ Modified: head/www/node/distinfo ============================================================================== --- head/www/node/distinfo Tue Jun 9 21:50:21 2020 (r538349) +++ head/www/node/distinfo Tue Jun 9 22:04:08 2020 (r538350) @@ -1,3 +1,3 @@ -TIMESTAMP = 1591215977 -SHA256 (node-v13.14.0.tar.gz) = fb69f44071a4c6728fc7e0d20c679ff4359e082a5738f5268d5b4e646cbd9491 -SIZE (node-v13.14.0.tar.gz) = 61226494 +TIMESTAMP = 1591305679 +SHA256 (node-v14.0.0.tar.gz) = 5ee2a8d3036a1652ec93bbd8b5812e0ae41e0450af729b14df4a27afc6f17cf8 +SIZE (node-v14.0.0.tar.gz) = 61453147 Modified: head/www/node/files/patch-deps_v8_src_compiler_backend_instruction-selector.cc ============================================================================== --- head/www/node/files/patch-deps_v8_src_compiler_backend_instruction-selector.cc Tue Jun 9 21:50:21 2020 (r538349) +++ head/www/node/files/patch-deps_v8_src_compiler_backend_instruction-selector.cc Tue Jun 9 22:04:08 2020 (r538350) @@ -1,6 +1,6 @@ ---- deps/v8/src/compiler/backend/instruction-selector.cc.orig 2019-12-03 12:54:01 UTC +--- deps/v8/src/compiler/backend/instruction-selector.cc.orig 2020-04-21 11:38:50 UTC +++ deps/v8/src/compiler/backend/instruction-selector.cc -@@ -2812,7 +2812,7 @@ void InstructionSelector::VisitCall(Node* node, BasicB +@@ -2783,7 +2783,7 @@ void InstructionSelector::VisitCall(Node* node, BasicB switch (call_descriptor->kind()) { case CallDescriptor::kCallAddress: { int misc_field = static_cast<int>(call_descriptor->ParameterCount()); @@ -8,4 +8,4 @@ +#if defined(_AIX) || (V8_TARGET_ARCH_PPC_BE && (!defined(_CALL_ELF) || _CALL_ELF == 1)) // Highest misc_field bit is used on AIX to indicate if a CFunction call // has function descriptor or not. - misc_field |= call_descriptor->HasFunctionDescriptor() + if (!call_descriptor->NoFunctionDescriptor()) { Modified: head/www/node/files/patch-deps_v8_src_compiler_backend_ppc_code-generator-ppc.cc ============================================================================== --- head/www/node/files/patch-deps_v8_src_compiler_backend_ppc_code-generator-ppc.cc Tue Jun 9 21:50:21 2020 (r538349) +++ head/www/node/files/patch-deps_v8_src_compiler_backend_ppc_code-generator-ppc.cc Tue Jun 9 22:04:08 2020 (r538350) @@ -1,9 +1,9 @@ ---- deps/v8/src/compiler/backend/ppc/code-generator-ppc.cc.orig 2019-12-03 11:33:29 UTC +--- deps/v8/src/compiler/backend/ppc/code-generator-ppc.cc.orig 2020-04-21 11:38:50 UTC +++ deps/v8/src/compiler/backend/ppc/code-generator-ppc.cc -@@ -1025,7 +1025,7 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleAr - Label start_call; +@@ -1032,7 +1032,7 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleAr bool isWasmCapiFunction = linkage()->GetIncomingDescriptor()->IsWasmCapiFunction(); + int offset = 9 * kInstrSize; -#if defined(_AIX) +#if defined(_AIX) || (V8_TARGET_ARCH_PPC_BE && (!defined(_CALL_ELF) || _CALL_ELF == 1)) // AIX/PPC64BE Linux uses a function descriptor Modified: head/www/node/files/patch-deps_v8_src_libsampler_sampler.cc ============================================================================== --- head/www/node/files/patch-deps_v8_src_libsampler_sampler.cc Tue Jun 9 21:50:21 2020 (r538349) +++ head/www/node/files/patch-deps_v8_src_libsampler_sampler.cc Tue Jun 9 22:04:08 2020 (r538350) @@ -1,15 +1,9 @@ ---- deps/v8/src/libsampler/sampler.cc.orig 2019-08-20 17:14:50 UTC +--- deps/v8/src/libsampler/sampler.cc.orig 2020-04-21 11:38:50 UTC +++ deps/v8/src/libsampler/sampler.cc -@@ -477,9 +477,13 @@ void SignalHandler::FillRegisterState(void* context, R - state->sp = reinterpret_cast<void*>(mcontext.mc_rsp); - state->fp = reinterpret_cast<void*>(mcontext.mc_rbp); - #elif V8_HOST_ARCH_ARM -- state->pc = reinterpret_cast<void*>(mcontext.mc_r15); -- state->sp = reinterpret_cast<void*>(mcontext.mc_r13); -- state->fp = reinterpret_cast<void*>(mcontext.mc_r11); -+ state->pc = reinterpret_cast<void*>(mcontext.__gregs[_REG_PC]); -+ state->sp = reinterpret_cast<void*>(mcontext.__gregs[_REG_SP]); -+ state->fp = reinterpret_cast<void*>(mcontext.__gregs[_REG_FP]); +@@ -480,6 +480,10 @@ void SignalHandler::FillRegisterState(void* context, R + state->pc = reinterpret_cast<void*>(mcontext.__gregs[_REG_PC]); + state->sp = reinterpret_cast<void*>(mcontext.__gregs[_REG_SP]); + state->fp = reinterpret_cast<void*>(mcontext.__gregs[_REG_FP]); +#elif V8_TARGET_ARCH_PPC_BE + state->pc = reinterpret_cast<void*>(mcontext.mc_srr0); + state->sp = reinterpret_cast<void*>(mcontext.mc_frame[1]); Added: head/www/node/files/patch-deps_v8_src_objects_js-number-format.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/node/files/patch-deps_v8_src_objects_js-number-format.cc Tue Jun 9 22:04:08 2020 (r538350) @@ -0,0 +1,143 @@ +--- deps/v8/src/objects/js-number-format.cc.orig 2020-04-21 11:38:50 UTC ++++ deps/v8/src/objects/js-number-format.cc +@@ -1197,42 +1197,31 @@ MaybeHandle<JSNumberFormat> JSNumberFormat::New(Isolat + } + + namespace { +-Maybe<icu::UnicodeString> IcuFormatNumber( ++Maybe<bool> IcuFormatNumber( + Isolate* isolate, + const icu::number::LocalizedNumberFormatter& number_format, +- Handle<Object> numeric_obj, icu::FieldPositionIterator* fp_iter) { ++ Handle<Object> 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<BigInt> big_int = Handle<BigInt>::cast(numeric_obj); + Handle<String> big_int_string; + ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, big_int_string, + BigInt::ToString(isolate, big_int), +- Nothing<icu::UnicodeString>()); +- formatted = number_format.formatDecimal( ++ Nothing<bool>()); ++ *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<icu::UnicodeString>()); ++ THROW_NEW_ERROR_RETURN_VALUE( ++ isolate, NewTypeError(MessageTemplate::kIcuError), Nothing<bool>()); + } +- 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<icu::UnicodeString>()); +- } +- return Just(result); ++ return Just(true); + } + + } // namespace +@@ -1243,10 +1232,16 @@ MaybeHandle<String> JSNumberFormat::FormatNumeric( + Handle<Object> numeric_obj) { + DCHECK(numeric_obj->IsNumeric()); + +- Maybe<icu::UnicodeString> maybe_format = +- IcuFormatNumber(isolate, number_format, numeric_obj, nullptr); ++ icu::number::FormattedNumber formatted; ++ Maybe<bool> maybe_format = ++ IcuFormatNumber(isolate, number_format, numeric_obj, &formatted); + MAYBE_RETURN(maybe_format, Handle<String>()); +- 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 { +@@ -1359,12 +1354,18 @@ std::vector<NumberFormatSpan> FlattenRegionsToParts( + } + + namespace { +-Maybe<int> ConstructParts(Isolate* isolate, const icu::UnicodeString& formatted, +- icu::FieldPositionIterator* fp_iter, ++Maybe<int> ConstructParts(Isolate* isolate, ++ icu::number::FormattedNumber* formatted, + Handle<JSArray> result, int start_index, + Handle<Object> 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<int>()); ++ } + 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); + +@@ -1373,13 +1374,14 @@ Maybe<int> 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())); + } + } + +@@ -1401,7 +1403,7 @@ Maybe<int> ConstructParts(Isolate* isolate, const icu: + Handle<String> 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<int>()); + Intl::AddElement(isolate, result, index, field_type_string, substring); + ++index; +@@ -1421,14 +1423,14 @@ MaybeHandle<JSArray> JSNumberFormat::FormatToParts( + number_format->icu_number_formatter().raw(); + CHECK_NOT_NULL(fmt); + +- icu::FieldPositionIterator fp_iter; +- Maybe<icu::UnicodeString> maybe_format = +- IcuFormatNumber(isolate, *fmt, numeric_obj, &fp_iter); ++ icu::number::FormattedNumber formatted; ++ Maybe<bool> maybe_format = ++ IcuFormatNumber(isolate, *fmt, numeric_obj, &formatted); + MAYBE_RETURN(maybe_format, Handle<JSArray>()); + + Handle<JSArray> result = factory->NewJSArray(0); + Maybe<int> 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<JSArray>()); + Modified: head/www/node/pkg-plist ============================================================================== --- head/www/node/pkg-plist Tue Jun 9 21:50:21 2020 (r538349) +++ head/www/node/pkg-plist Tue Jun 9 22:04:08 2020 (r538350) @@ -447,7 +447,6 @@ include/node/node_version.h include/node/v8-internal.h include/node/v8-platform.h include/node/v8-profiler.h -include/node/v8-testing.h include/node/v8-util.h include/node/v8-value-serializer-version.h include/node/v8-version.h
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202006092204.059M482n008024>