File v8-icu69-FormattedNumberRange-no-default-constructible.patch of Package nodejs-electron.v3
--- src/v8/include/v8-maybe.h.old 2022-09-27 21:29:49.591750100 +0200
+++ src/v8/include/v8-maybe.h 2022-10-02 15:29:28.460199600 +0200
@@ -8,11 +8,15 @@
#include <type_traits>
#include <utility>
+#include <unicode/numberrangeformatter.h>
+
#include "v8-internal.h" // NOLINT(build/include_directory)
#include "v8config.h" // NOLINT(build/include_directory)
namespace v8 {
+icu::number::FormattedNumberRange SUSE_AwfulHackForIcu69();
+
namespace api_internal {
// Called when ToChecked is called on an empty Maybe.
V8_EXPORT void FromJustIsNothing();
@@ -155,6 +159,11 @@
inline Maybe<void> JustVoid() { return Maybe<void>(Maybe<void>::JustTag()); }
+//Awful hack to make Electron compile with icu-69. Note that this header is public
+//thus electron-devel now requires icu-devel
+template<> inline Maybe<icu::number::FormattedNumberRange>::Maybe() : has_value_(false),
+ value_(SUSE_AwfulHackForIcu69()) {}
+
} // namespace v8
#endif // INCLUDE_V8_MAYBE_H_
--- src/v8/src/objects/js-number-format.cc.old 2022-09-27 21:29:49.787848100 +0200
+++ src/v8/src/objects/js-number-format.cc 2022-10-02 15:36:28.816558900 +0200
@@ -30,6 +30,12 @@
#include "unicode/uvernum.h" // for U_ICU_VERSION_MAJOR_NUM
namespace v8 {
+
+icu::number::FormattedNumberRange SUSE_AwfulHackForIcu69() {
+ // This constructor is private so the file needs compiled with -fno-access-control
+ return icu::number::FormattedNumberRange(U_INVALID_STATE_ERROR);
+}
+
namespace internal {
namespace {
--- src/v8/BUILD.gn.old 2022-09-27 21:33:45.805792800 +0200
+++ src/v8/BUILD.gn 2022-10-02 15:43:25.581854000 +0200
@@ -5293,6 +5293,9 @@
"src/tracing/trace-categories.h",
]
}
+
+#SUSE: patched code in js-number-format.cc accesses private ICU api
+ cflags_cc = [ "-fno-access-control" ]
}
group("v8_base") {