From: Jonathan Brielmaier <jonathan.brielmaier@web.de>
To: 48845@debbugs.gnu.org
Cc: Jonathan Brielmaier <jonathan.brielmaier@web.de>
Subject: [bug#48845] [PATCH core-updates] gnu: node: Fix build.
Date: Sat, 5 Jun 2021 11:38:29 +0200 [thread overview]
Message-ID: <20210605093829.20999-1-jonathan.brielmaier@web.de> (raw)
Newer icu versions do not define and export FALSE anymore, thus leading
to a build error.
* gnu/packages/patches/node-10.24-fix-build.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/node.scm (source): Use patch.
---
gnu/local.mk | 1 +
gnu/packages/node.scm | 1 +
.../patches/node-10.24-fix-build.patch | 86 +++++++++++++++++++
3 files changed, 88 insertions(+)
create mode 100644 gnu/packages/patches/node-10.24-fix-build.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 1e8dab8989..b0707dc92c 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1441,6 +1441,7 @@ dist_patch_DATA = \
%D%/packages/patches/ngircd-handle-zombies.patch \
%D%/packages/patches/network-manager-plugin-path.patch \
%D%/packages/patches/nginx-socket-cloexec.patch \
+ %D%/packages/patches/node-10.24-fix-build.patch \
%D%/packages/patches/nsis-env-passthru.patch \
%D%/packages/patches/nss-increase-test-timeout.patch \
%D%/packages/patches/nss-3.56-pkgconfig.patch \
diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm
index 4e80dd4d4e..1d94ec54c5 100644
--- a/gnu/packages/node.scm
+++ b/gnu/packages/node.scm
@@ -61,6 +61,7 @@
(sha256
(base32
"1k1srdis23782hnd1ymgczs78x9gqhv77v0am7yb54gqcspp70hm"))
+ (patches (search-patches "node-10.24-fix-build.patch"))
(modules '((guix build utils)))
(snippet
`(begin
diff --git a/gnu/packages/patches/node-10.24-fix-build.patch b/gnu/packages/patches/node-10.24-fix-build.patch
new file mode 100644
index 0000000000..ef255c1016
--- /dev/null
+++ b/gnu/packages/patches/node-10.24-fix-build.patch
@@ -0,0 +1,86 @@
+Taken from openSUSE:
+https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs10
+
+Author: Callum Farmer <gmbr3@opensuse.org>
+Date: Mon Dec 21 20:10:03 UTC 2020
+Subject: ICU68 no longer defines TRUE and FALSE
+===============================================================
+--- a/deps/v8/src/objects/intl-objects.cc
++++ b/deps/v8/src/objects/intl-objects.cc
+@@ -243,7 +243,7 @@
+ char result[ULOC_FULLNAME_CAPACITY];
+ status = U_ZERO_ERROR;
+ uloc_toLanguageTag(icu_locale.getName(), result, ULOC_FULLNAME_CAPACITY,
+- FALSE, &status);
++ false, &status);
+ if (U_SUCCESS(status)) {
+ JSObject::SetProperty(resolved, factory->NewStringFromStaticChars("locale"),
+ factory->NewStringFromAsciiChecked(result),
+@@ -422,7 +422,7 @@
+ char result[ULOC_FULLNAME_CAPACITY];
+ UErrorCode status = U_ZERO_ERROR;
+ uloc_toLanguageTag(icu_locale.getName(), result, ULOC_FULLNAME_CAPACITY,
+- FALSE, &status);
++ false, &status);
+ if (U_SUCCESS(status)) {
+ JSObject::SetProperty(resolved, factory->NewStringFromStaticChars("locale"),
+ factory->NewStringFromAsciiChecked(result),
+@@ -657,7 +657,7 @@
+ char result[ULOC_FULLNAME_CAPACITY];
+ status = U_ZERO_ERROR;
+ uloc_toLanguageTag(icu_locale.getName(), result, ULOC_FULLNAME_CAPACITY,
+- FALSE, &status);
++ false, &status);
+ if (U_SUCCESS(status)) {
+ JSObject::SetProperty(resolved, factory->NewStringFromStaticChars("locale"),
+ factory->NewStringFromAsciiChecked(result),
+@@ -796,7 +796,7 @@
+ char result[ULOC_FULLNAME_CAPACITY];
+ status = U_ZERO_ERROR;
+ uloc_toLanguageTag(icu_locale.getName(), result, ULOC_FULLNAME_CAPACITY,
+- FALSE, &status);
++ false, &status);
+ if (U_SUCCESS(status)) {
+ JSObject::SetProperty(resolved, factory->NewStringFromStaticChars("locale"),
+ factory->NewStringFromAsciiChecked(result),
+--- a/deps/v8/src/runtime/runtime-intl.cc
++++ b/deps/v8/src/runtime/runtime-intl.cc
+@@ -85,7 +85,7 @@
+ char result[ULOC_FULLNAME_CAPACITY];
+
+ // Force strict BCP47 rules.
+- uloc_toLanguageTag(icu_result, result, ULOC_FULLNAME_CAPACITY, TRUE, &error);
++ uloc_toLanguageTag(icu_result, result, ULOC_FULLNAME_CAPACITY, true, &error);
+
+ if (U_FAILURE(error) || error == U_STRING_NOT_TERMINATED_WARNING) {
+ return *factory->NewStringFromAsciiChecked(kInvalidTag);
+@@ -132,7 +132,7 @@
+
+ error = U_ZERO_ERROR;
+ // No need to force strict BCP47 rules.
+- uloc_toLanguageTag(icu_name, result, ULOC_FULLNAME_CAPACITY, FALSE, &error);
++ uloc_toLanguageTag(icu_name, result, ULOC_FULLNAME_CAPACITY, false, &error);
+ if (U_FAILURE(error) || error == U_STRING_NOT_TERMINATED_WARNING) {
+ // This shouldn't happen, but lets not break the user.
+ continue;
+@@ -164,7 +164,7 @@
+ char result[ULOC_FULLNAME_CAPACITY];
+ UErrorCode status = U_ZERO_ERROR;
+ uloc_toLanguageTag(default_locale.getName(), result, ULOC_FULLNAME_CAPACITY,
+- FALSE, &status);
++ false, &status);
+ if (U_SUCCESS(status)) {
+ return *factory->NewStringFromAsciiChecked(result);
+ }
+@@ -399,9 +399,9 @@
+ std::unique_ptr<uc16[]> sap1;
+ std::unique_ptr<uc16[]> sap2;
+ icu::UnicodeString string_val1(
+- FALSE, GetUCharBufferFromFlat(flat1, &sap1, length1), length1);
++ false, GetUCharBufferFromFlat(flat1, &sap1, length1), length1);
+ icu::UnicodeString string_val2(
+- FALSE, GetUCharBufferFromFlat(flat2, &sap2, length2), length2);
++ false, GetUCharBufferFromFlat(flat2, &sap2, length2), length2);
+ result = collator->compare(string_val1, string_val2, status);
+ }
+ if (U_FAILURE(status)) return isolate->ThrowIllegalOperation();
--
2.31.1
next reply other threads:[~2021-06-05 9:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-05 9:38 Jonathan Brielmaier [this message]
2021-07-08 17:32 ` bug#48845: [PATCH core-updates] gnu: node: Fix build Mathieu Othacehe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210605093829.20999-1-jonathan.brielmaier@web.de \
--to=jonathan.brielmaier@web.de \
--cc=48845@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).