Skip to content

Commit

Permalink
node: remake - do not use shared abseil-cpp
Browse files Browse the repository at this point in the history
remake this commit openwrt#25582

Fix nodejs compile errors after the introduction of abseil-cpp in openwrt#25565

Signed-off-by: Hirokazu MORIKAWA <[email protected]>
  • Loading branch information
nxhack committed Dec 27, 2024
1 parent ca9c3d1 commit 9604d2b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion lang/node/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=node
PKG_VERSION:=22.11.0
PKG_RELEASE:=3
PKG_RELEASE:=4
NODE_MODULE_VERSION:=127

PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
Expand Down
24 changes: 16 additions & 8 deletions lang/node/patches/204-v8_gyp.patch
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
'sources': [
'<(V8_ROOT)/src/init/setup-isolate-full.cc',
],
+ 'include_dirs': [ '<!@(echo "$STAGING_DIR"/usr/../usr/include)' ],
+ 'include_dirs': [ '../../deps/v8/third_party/abseil-cpp', '<!@(echo "$STAGING_DIR"/usr/../usr/include)' ],
}, # v8_init
{
# This target is used to work around a GCC issue that causes the
Expand All @@ -40,15 +40,15 @@
'include_dirs': [
'<(SHARED_INTERMEDIATE_DIR)',
'<(generate_bytecode_output_root)',
+ '<!@(echo "$STAGING_DIR"/usr/../usr/include)',
+ '../../deps/v8/third_party/abseil-cpp', '<!@(echo "$STAGING_DIR"/usr/../usr/include)',
],
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_initializers.*?sources = ")',
@@ -820,6 +826,7 @@
'toolsets': ['host', 'target'],
'direct_dependent_settings': {
'sources': ['<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_compiler_sources = ")'],
+ 'include_dirs': [ '<!@(echo "$STAGING_DIR"/usr/../usr/include)' ],
+ 'include_dirs': [ '../../deps/v8/third_party/abseil-cpp', '<!@(echo "$STAGING_DIR"/usr/../usr/include)' ],
'conditions': [
['v8_target_arch=="ia32"', {
'sources': [
Expand All @@ -57,15 +57,15 @@
'type': 'static_library',
'toolsets': ['host', 'target'],
+ 'libraries!':[ '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ],
+ 'include_dirs': [ '<!@(echo "$STAGING_DIR"/usr/../usr/include)' ],
+ 'include_dirs': [ '../../deps/v8/third_party/abseil-cpp', '<!@(echo "$STAGING_DIR"/usr/../usr/include)' ],
'dependencies': [
'generate_bytecode_builtins_list',
'run_torque',
@@ -968,6 +977,7 @@
'run_torque',
'v8_maybe_icu',
],
+ 'include_dirs': [ '<!@(echo "$STAGING_DIR"/usr/../usr/include)' ],
+ 'include_dirs': [ '../../deps/v8/third_party/abseil-cpp', '<!@(echo "$STAGING_DIR"/usr/../usr/include)' ],
'conditions': [
['(is_component_build and not v8_optimized_debug and v8_enable_fast_mksnapshot) or v8_enable_turbofan==0', {
'dependencies': [
Expand Down Expand Up @@ -99,7 +99,7 @@
'type': 'executable',
+ 'libraries!':[ '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ],
+ 'library_dirs':[ '../../../../staging_dir/hostpkg/share/icu/current/lib' ],
+ 'include_dirs': [ '<!@(echo "$STAGING_DIR"/usr/../usr/include)' ],
+ 'include_dirs': [ '../../deps/v8/third_party/abseil-cpp', '<!@(echo "$STAGING_DIR"/usr/../usr/include)' ],
'dependencies': [
'v8_base_without_compiler',
'v8_compiler_for_mksnapshot',
Expand Down Expand Up @@ -144,15 +144,23 @@
'include_dirs': [
'<(V8_ROOT)/third_party/zlib',
'<(V8_ROOT)/third_party/zlib/google',
+ '<!@(echo "$STAGING_DIR"/usr/../usr/include)',
+ '../../deps/v8/third_party/abseil-cpp', '<!@(echo "$STAGING_DIR"/usr/../usr/include)',
],
},
'defines': [ 'ZLIB_IMPLEMENTATION' ],
+ 'include_dirs!': [ '<!@(echo "$STAGING_DIR"/usr/include)' ],
'include_dirs': [
'<(V8_ROOT)/third_party/zlib',
'<(V8_ROOT)/third_party/zlib/google',
+ '<!@(echo "$STAGING_DIR"/usr/../usr/include)',
+ '../../deps/v8/third_party/abseil-cpp', '<!@(echo "$STAGING_DIR"/usr/../usr/include)',
],
'sources': [
'<(V8_ROOT)/third_party/zlib/adler32.c',
@@ -2228,6 +2253,7 @@
'variables': {
'ABSEIL_ROOT': '../../deps/v8/third_party/abseil-cpp',
},
+ 'include_dirs!': [ '<!@(echo "$STAGING_DIR"/usr/include)' ],
'direct_dependent_settings': {
'include_dirs': [
'<(ABSEIL_ROOT)',

0 comments on commit 9604d2b

Please sign in to comment.