diff mbox series

[meta-oe,1/2] nodejs: Fix build with icu-76+

Message ID 20241123191825.656582-1-raj.khem@gmail.com
State New
Headers show
Series [meta-oe,1/2] nodejs: Fix build with icu-76+ | expand

Commit Message

Khem Raj Nov. 23, 2024, 7:18 p.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...uild-fix-building-with-system-icu-76.patch | 33 +++++++++++++++++++
 .../recipes-devtools/nodejs/nodejs_22.11.0.bb |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/nodejs/nodejs/0001-build-fix-building-with-system-icu-76.patch
diff mbox series

Patch

diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0001-build-fix-building-with-system-icu-76.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0001-build-fix-building-with-system-icu-76.patch
new file mode 100644
index 0000000000..326d226290
--- /dev/null
+++ b/meta-oe/recipes-devtools/nodejs/nodejs/0001-build-fix-building-with-system-icu-76.patch
@@ -0,0 +1,33 @@ 
+From 2aec714749db053014a205d2d66d186f94867b55 Mon Sep 17 00:00:00 2001
+From: Michael Cho <michael@michaelcho.dev>
+Date: Tue, 29 Oct 2024 19:24:38 -0400
+Subject: [PATCH] build: fix building with system icu 76
+
+ICU 76 decided to reduce overlinking[^1] thus `icu-i18n` will no longer
+add `icu-uc` when linking to shared libraries. This results in undefined
+symbols/references when trying to build with system ICU 76.
+
+[^1]: unicode-org/icu@199bc82
+
+Upstream-Status: Backport [https://github.com/nodejs/node/pull/55563]
+PR-URL: https://github.com/nodejs/node/pull/55563
+Reviewed-By: Richard Lau <rlau@redhat.com>
+Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.py b/configure.py
+index c4653f37..bff72b75 100755
+--- a/configure.py
++++ b/configure.py
+@@ -1876,7 +1876,7 @@ def configure_intl(o):
+   elif with_intl == 'system-icu':
+     # ICU from pkg-config.
+     o['variables']['v8_enable_i18n_support'] = 1
+-    pkgicu = pkg_config('icu-i18n')
++    pkgicu = pkg_config(['icu-i18n', 'icu-uc'])
+     if not pkgicu[0]:
+       error('''Could not load pkg-config data for "icu-i18n".
+        See above errors or the README.md.''')
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs_22.11.0.bb b/meta-oe/recipes-devtools/nodejs/nodejs_22.11.0.bb
index 49a5f350d9..e9e569af0d 100644
--- a/meta-oe/recipes-devtools/nodejs/nodejs_22.11.0.bb
+++ b/meta-oe/recipes-devtools/nodejs/nodejs_22.11.0.bb
@@ -28,6 +28,7 @@  SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \
            file://0001-deps-disable-io_uring-support-in-libuv.patch \
            file://0001-positional-args.patch \
            file://0001-custom-env.patch \
+           file://0001-build-fix-building-with-system-icu-76.patch \
            file://run-ptest \
            "
 SRC_URI:append:class-target = " \