node: remake - do not use shared abseil-cpp
authorHirokazu MORIKAWA <morikw2@gmail.com>
Fri, 27 Dec 2024 22:40:50 +0000 (07:40 +0900)
committerTianling Shen <cnsztl@gmail.com>
Mon, 30 Dec 2024 03:32:05 +0000 (11:32 +0800)
remake this commit https://github.com/openwrt/packages/pull/25582

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

Signed-off-by: Hirokazu MORIKAWA <morikw2@gmail.com>
lang/node/Makefile
lang/node/patches/204-v8_gyp.patch

index 76ff54bcb8cef7aeb22395c434fe8ec815dbee6e..6d458432daec34ed005f6339503af55076b46417 100644 (file)
@@ -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
index 8496a7c717f80542cab2dafc085f39c9f9cc0d1e..5dba48a4f8d8230a240352043641bca8d3874838 100644 (file)
@@ -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
@@ -40,7 +40,7 @@
        '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 = ")',
@@ -48,7 +48,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': [
@@ -57,7 +57,7 @@
        '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',
@@ -65,7 +65,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': [
@@ -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',
          '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': [
          '<(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)',