nodejs: Add a patch really and remove obsolete comment Noticed by adam@. Thank you.diff -r1.211 -r1.212 pkgsrc/lang/nodejs/Makefile
(ryoon)
@@ -1,28 +1,27 @@ | @@ -1,28 +1,27 @@ | |||
1 | # $NetBSD: Makefile,v 1.211 2021/04/22 15:52:25 ryoon Exp $ | 1 | # $NetBSD: Makefile,v 1.212 2021/04/22 17:33:04 ryoon Exp $ | |
2 | 2 | |||
3 | DISTNAME= node-v14.16.1 | 3 | DISTNAME= node-v14.16.1 | |
4 | EXTRACT_SUFX= .tar.xz | 4 | EXTRACT_SUFX= .tar.xz | |
5 | 5 | |||
6 | USE_LANGUAGES= c gnu++14 | 6 | USE_LANGUAGES= c gnu++14 | |
7 | 7 | |||
8 | PKGREVISION= 2 | 8 | PKGREVISION= 2 | |
9 | .include "../../mk/bsd.prefs.mk" | 9 | .include "../../mk/bsd.prefs.mk" | |
10 | 10 | |||
11 | # XXX: figure out a way to add rpaths to torque | 11 | # XXX: figure out a way to add rpaths to torque | |
12 | MAKE_ENV+= LD_LIBRARY_PATH=${PREFIX}/lib | 12 | MAKE_ENV+= LD_LIBRARY_PATH=${PREFIX}/lib | |
13 | 13 | |||
14 | CONFIGURE_ARGS+= --shared-nghttp2 | 14 | CONFIGURE_ARGS+= --shared-nghttp2 | |
15 | # ICU 69.1: error: 'createInstance' is a private member of 'icu_69::ListFormatter' | |||
16 | CONFIGURE_ARGS+= --with-intl=system-icu | 15 | CONFIGURE_ARGS+= --with-intl=system-icu | |
17 | 16 | |||
18 | PYTHON_VERSIONS_ACCEPTED= 27 | 17 | PYTHON_VERSIONS_ACCEPTED= 27 | |
19 | 18 | |||
20 | CHECK_PORTABILITY_SKIP+= tools/macos-installer/pkgbuild/npm/scripts/preinstall | 19 | CHECK_PORTABILITY_SKIP+= tools/macos-installer/pkgbuild/npm/scripts/preinstall | |
21 | 20 | |||
22 | .if ${MACHINE_ARCH} == "i386" | 21 | .if ${MACHINE_ARCH} == "i386" | |
23 | # required for SSE2 code under i386. | 22 | # required for SSE2 code under i386. | |
24 | CXXFLAGS+= -mstackrealign | 23 | CXXFLAGS+= -mstackrealign | |
25 | .endif | 24 | .endif | |
26 | 25 | |||
27 | .include "options.mk" | 26 | .include "options.mk" | |
28 | 27 |
$NetBSD: patch-deps_v8_src_objects_js-list-format.cc,v 1.1 2021/04/22 17:33:04 ryoon Exp $
* Fix build with ICU 69.1. Backported from 16.0.0.
--- deps/v8/src/objects/js-list-format.cc.orig 2021-04-06 19:42:15.000000000 +0000
+++ deps/v8/src/objects/js-list-format.cc
@@ -73,6 +73,30 @@ const char* GetIcuStyleString(JSListForm
UNREACHABLE();
}
+UListFormatterWidth GetIcuWidth(JSListFormat::Style style) {
+ switch (style) {
+ case JSListFormat::Style::LONG:
+ return ULISTFMT_WIDTH_WIDE;
+ case JSListFormat::Style::SHORT:
+ return ULISTFMT_WIDTH_SHORT;
+ case JSListFormat::Style::NARROW:
+ return ULISTFMT_WIDTH_NARROW;
+ }
+ UNREACHABLE();
+}
+
+UListFormatterType GetIcuType(JSListFormat::Type type) {
+ switch (type) {
+ case JSListFormat::Type::CONJUNCTION:
+ return ULISTFMT_TYPE_AND;
+ case JSListFormat::Type::DISJUNCTION:
+ return ULISTFMT_TYPE_OR;
+ case JSListFormat::Type::UNIT:
+ return ULISTFMT_TYPE_UNITS;
+ }
+ UNREACHABLE();
+}
+
} // namespace
MaybeHandle<JSListFormat> JSListFormat::New(Isolate* isolate, Handle<Map> map,
@@ -143,7 +167,7 @@ MaybeHandle<JSListFormat> JSListFormat::
icu::Locale icu_locale = r.icu_locale;
UErrorCode status = U_ZERO_ERROR;
icu::ListFormatter* formatter = icu::ListFormatter::createInstance(
- icu_locale, GetIcuStyleString(style_enum, type_enum), status);
+ icu_locale, GetIcuType(type_enum), GetIcuWidth(style_enum), status);
if (U_FAILURE(status) || formatter == nullptr) {
delete formatter;
THROW_NEW_ERROR(isolate, NewRangeError(MessageTemplate::kIcuError),