From feeb172d1a8bf010490d22b8df9448b20d9d2aed Mon Sep 17 00:00:00 2001 From: Guillaume Burel Date: Mon, 20 Jan 2020 18:04:26 +0100 Subject: nodejs: 10.17.0 -> 12.14.0 - update Node.js to active 12.x LTS release 12.14.0. - remove compatibility with gcc 4.8 (has been removed upstream) Signed-off-by: Guillaume Burel Signed-off-by: Khem Raj --- ...isable-running-gyp-files-for-bundled-deps.patch | 25 ++-- .../nodejs/nodejs/0002-Using-native-binaries.patch | 71 ++++++++++ .../nodejs/nodejs/0002-Using-native-torque.patch | 36 ----- ...0003-Install-both-binaries-and-use-libdir.patch | 17 ++- .../0004-Make-compatibility-with-gcc-4.8.patch | 69 --------- .../nodejs/0004-v8-don-t-override-ARM-CFLAGS.patch | 102 +++++++++++++ .../nodejs/nodejs/0005-Link-atomic-library.patch | 20 --- .../nodejs/0007-v8-don-t-override-ARM-CFLAGS.patch | 102 ------------- meta-oe/recipes-devtools/nodejs/nodejs_10.17.0.bb | 155 -------------------- meta-oe/recipes-devtools/nodejs/nodejs_12.14.0.bb | 157 +++++++++++++++++++++ 10 files changed, 350 insertions(+), 404 deletions(-) create mode 100644 meta-oe/recipes-devtools/nodejs/nodejs/0002-Using-native-binaries.patch delete mode 100644 meta-oe/recipes-devtools/nodejs/nodejs/0002-Using-native-torque.patch delete mode 100644 meta-oe/recipes-devtools/nodejs/nodejs/0004-Make-compatibility-with-gcc-4.8.patch create mode 100644 meta-oe/recipes-devtools/nodejs/nodejs/0004-v8-don-t-override-ARM-CFLAGS.patch delete mode 100644 meta-oe/recipes-devtools/nodejs/nodejs/0005-Link-atomic-library.patch delete mode 100644 meta-oe/recipes-devtools/nodejs/nodejs/0007-v8-don-t-override-ARM-CFLAGS.patch delete mode 100644 meta-oe/recipes-devtools/nodejs/nodejs_10.17.0.bb create mode 100644 meta-oe/recipes-devtools/nodejs/nodejs_12.14.0.bb (limited to 'meta-oe/recipes-devtools/nodejs') diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch index 5d0dc03b66..4dd121f485 100644 --- a/meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch +++ b/meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch @@ -4,23 +4,22 @@ Date: Thu, 27 Apr 2017 14:25:42 +0200 Subject: [PATCH] Disable running gyp on shared deps --- - Makefile | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile -index a98772f..f5663e2 100644 +index 0947300f24..6c98691984 100644 --- a/Makefile +++ b/Makefile -@@ -123,8 +123,8 @@ with-code-cache: - test-code-cache: with-code-cache - $(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) code-cache +@@ -141,7 +141,7 @@ test-code-cache: with-code-cache + echo "'test-code-cache' target is a noop" --out/Makefile: common.gypi deps/uv/uv.gyp deps/http_parser/http_parser.gyp \ -- deps/zlib/zlib.gyp deps/v8/gypfiles/toolchain.gypi \ -+out/Makefile: common.gypi deps/http_parser/http_parser.gyp \ -+ deps/v8/gypfiles/toolchain.gypi \ - deps/v8/gypfiles/features.gypi deps/v8/gypfiles/v8.gyp node.gyp \ - config.gypi + out/Makefile: config.gypi common.gypi node.gyp \ +- deps/uv/uv.gyp deps/http_parser/http_parser.gyp deps/zlib/zlib.gyp \ ++ deps/http_parser/http_parser.gyp \ + tools/v8_gypfiles/toolchain.gypi tools/v8_gypfiles/features.gypi \ + tools/v8_gypfiles/inspector.gypi tools/v8_gypfiles/v8.gyp $(PYTHON) tools/gyp_node.py -f make -- -2.19.2 +2.20.1 + diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0002-Using-native-binaries.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0002-Using-native-binaries.patch new file mode 100644 index 0000000000..b5142dc9c1 --- /dev/null +++ b/meta-oe/recipes-devtools/nodejs/nodejs/0002-Using-native-binaries.patch @@ -0,0 +1,71 @@ +From 6c3ac20477a4bac643088f24df3c042e627fafa9 Mon Sep 17 00:00:00 2001 +From: Guillaume Burel +Date: Fri, 3 Jan 2020 11:25:54 +0100 +Subject: [PATCH] Using native binaries + +--- + node.gyp | 4 ++-- + tools/v8_gypfiles/v8.gyp | 11 ++++------- + 2 files changed, 6 insertions(+), 9 deletions(-) + +diff --git a/node.gyp b/node.gyp +index 8f4dc518..d9389190 100644 +--- a/node.gyp ++++ b/node.gyp +@@ -446,7 +446,7 @@ + '<(SHARED_INTERMEDIATE_DIR)/node_code_cache.cc', + ], + 'action': [ +- '<@(_inputs)', ++ 'mkcodecache', + '<@(_outputs)', + ], + }, +@@ -471,7 +471,7 @@ + '<(SHARED_INTERMEDIATE_DIR)/node_snapshot.cc', + ], + 'action': [ +- '<@(_inputs)', ++ 'node_mksnapshot', + '<@(_outputs)', + ], + }, +diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp +index a506a67d..c91f7dde 100644 +--- a/tools/v8_gypfiles/v8.gyp ++++ b/tools/v8_gypfiles/v8.gyp +@@ -140,7 +140,8 @@ + '<@(torque_outputs)', + ], + 'action': [ +- '<@(_inputs)', ++ 'torque', ++ '<@(torque_files)', + '-o', '<(torque_output_root)/torque-generated', + '-v8-root', '<(V8_ROOT)' + ], +@@ -247,9 +248,7 @@ + '<(generate_bytecode_builtins_list_output)', + ], + 'action': [ +- 'python', +- '<(V8_ROOT)/tools/run.py', +- '<@(_inputs)', ++ 'bytecode_builtins_list_generator', + '<@(_outputs)', + ], + }, +@@ -1396,9 +1395,7 @@ + '<(SHARED_INTERMEDIATE_DIR)/src/regexp/special-case.cc', + ], + 'action': [ +- 'python', +- '<(V8_ROOT)/tools/run.py', +- '<@(_inputs)', ++ 'gen-regexp-special-case', + '<@(_outputs)', + ], + }, +-- +2.20.1 + diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0002-Using-native-torque.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0002-Using-native-torque.patch deleted file mode 100644 index e9035f9eb3..0000000000 --- a/meta-oe/recipes-devtools/nodejs/nodejs/0002-Using-native-torque.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 4bbee5e3d58bc4911999f3ec2cc5aab8ded6717b Mon Sep 17 00:00:00 2001 -From: "Winker Matthias (TT-CA/ENG1)" -Date: Tue, 11 Dec 2018 10:44:29 +0100 -Subject: [PATCH] Using native torque - ---- - deps/v8/gypfiles/v8.gyp | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/deps/v8/gypfiles/v8.gyp b/deps/v8/gypfiles/v8.gyp -index 8c78f02255..434168844e 100644 ---- a/deps/v8/gypfiles/v8.gyp -+++ b/deps/v8/gypfiles/v8.gyp -@@ -2831,7 +2831,6 @@ - { - 'action_name': 'run_torque', - 'inputs': [ # Order matters. -- '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)torque<(EXECUTABLE_SUFFIX)', - '../src/builtins/base.tq', - '../src/builtins/array.tq', - '../src/builtins/typed-array.tq', -@@ -2845,7 +2844,10 @@ - '<(SHARED_INTERMEDIATE_DIR)/torque-generated/builtins-typed-array-from-dsl-gen.cc', - '<(SHARED_INTERMEDIATE_DIR)/torque-generated/builtins-typed-array-from-dsl-gen.h', - ], -- 'action': ['<@(_inputs)', '-o', '<(SHARED_INTERMEDIATE_DIR)/torque-generated'], -+ 'action': [ -+ 'torque', -+ '<@(_inputs)', -+ '-o', '<(SHARED_INTERMEDIATE_DIR)/torque-generated'], - }, - ], - }, # torque --- -2.19.2 - diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0003-Install-both-binaries-and-use-libdir.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0003-Install-both-binaries-and-use-libdir.patch index 7aa70fec99..599f742b2f 100644 --- a/meta-oe/recipes-devtools/nodejs/nodejs/0003-Install-both-binaries-and-use-libdir.patch +++ b/meta-oe/recipes-devtools/nodejs/nodejs/0003-Install-both-binaries-and-use-libdir.patch @@ -15,17 +15,16 @@ Stolen from [1] Upstream-Status: Pending Signed-off-by: Andreas Müller - --- configure.py | 7 +++++++ tools/install.py | 31 ++++++++++++++----------------- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/configure.py b/configure.py -index cfd4207..eb26f7d 100755 +index 20cce214db..e2d78a2a51 100755 --- a/configure.py +++ b/configure.py -@@ -552,6 +552,12 @@ parser.add_option('--shared', +@@ -559,6 +559,12 @@ parser.add_option('--shared', help='compile shared library for embedding node in another project. ' + '(This mode is not officially supported for regular applications)') @@ -38,19 +37,19 @@ index cfd4207..eb26f7d 100755 parser.add_option('--without-v8-platform', action='store_true', dest='without_v8_platform', -@@ -1095,6 +1101,7 @@ def configure_node(o): - if options.code_cache_path: - o['variables']['node_code_cache_path'] = options.code_cache_path +@@ -1103,6 +1109,7 @@ def configure_node(o): + if o['variables']['want_separate_host_toolset'] == 0: + o['variables']['node_code_cache'] = 'yes' # For testing o['variables']['node_shared'] = b(options.shared) + o['variables']['libdir'] = options.libdir node_module_version = getmoduleversion.get_version() if sys.platform == 'darwin': diff --git a/tools/install.py b/tools/install.py -index 028c32e..bf443c4 100755 +index 655802980a..fe4723bf15 100755 --- a/tools/install.py +++ b/tools/install.py -@@ -117,26 +117,23 @@ def subdir_files(path, dest, action): +@@ -121,26 +121,23 @@ def subdir_files(path, dest, action): def files(action): is_windows = sys.platform == 'win32' @@ -92,5 +91,5 @@ index 028c32e..bf443c4 100755 if 'true' == variables.get('node_use_dtrace'): action(['out/Release/node.d'], 'lib/dtrace/node.d') -- -2.23.0 +2.20.1 diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0004-Make-compatibility-with-gcc-4.8.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0004-Make-compatibility-with-gcc-4.8.patch deleted file mode 100644 index 925c085e9b..0000000000 --- a/meta-oe/recipes-devtools/nodejs/nodejs/0004-Make-compatibility-with-gcc-4.8.patch +++ /dev/null @@ -1,69 +0,0 @@ -Implement function as wrapper for std::make_unique -method to be compatible with gcc < 4.9 . -"error::make_unique is not a member of 'std'" - -Signed-off-by: Andrej Valek -Signed-off-by: Brad Bishop - -diff -Naur node-v10.15.1/src/cares_wrap.cc node-v10.15.1/src/cares_wrap.cc ---- node-v10.15.1/src/cares_wrap.cc 2019-01-29 08:20:50.000000000 +0100 -+++ node-v10.15.1/src/cares_wrap.cc 2019-02-21 16:22:25.489131665 +0100 -@@ -52,6 +52,16 @@ - # define AI_V4MAPPED 0 - #endif - -+#ifndef __cpp_lib_make_unique -+namespace std { -+ /// make_unique implementation -+ template -+ std::unique_ptr make_unique(Args&&... args) { -+ return std::unique_ptr(new T(std::forward(args)...)); -+ } -+} -+#endif -+ - namespace node { - namespace cares_wrap { - -diff -Naur node-v10.15.1/src/inspector_agent.cc node-v10.15.1/src/inspector_agent.cc ---- node-v10.15.1/src/inspector_agent.cc 2019-01-29 08:20:50.000000000 +0100 -+++ node-v10.15.1/src/inspector_agent.cc 2019-02-21 16:22:09.000185992 +0100 -@@ -24,6 +24,16 @@ - #include - #endif // __POSIX__ - -+#ifndef __cpp_lib_make_unique -+namespace std { -+ /// make_unique implementation -+ template -+ std::unique_ptr make_unique(Args&&... args) { -+ return std::unique_ptr(new T(std::forward(args)...)); -+ } -+} -+#endif -+ - namespace node { - namespace inspector { - namespace { - -diff --git a/src/inspector/main_thread_interface.cc b/src/inspector/main_thread_interface.cc -index e374c0fd70..05d7d8c60f 100644 ---- a/src/inspector/main_thread_interface.cc -+++ b/src/inspector/main_thread_interface.cc -@@ -6,6 +6,16 @@ - #include - #include - -+#ifndef __cpp_lib_make_unique -+namespace std { -+ /// make_unique implementation -+ template -+ std::unique_ptr make_unique(Args&&... args) { -+ return std::unique_ptr(new T(std::forward(args)...)); -+ } -+} -+#endif -+ - namespace node { - namespace inspector { - namespace { diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0004-v8-don-t-override-ARM-CFLAGS.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0004-v8-don-t-override-ARM-CFLAGS.patch new file mode 100644 index 0000000000..97ed972cee --- /dev/null +++ b/meta-oe/recipes-devtools/nodejs/nodejs/0004-v8-don-t-override-ARM-CFLAGS.patch @@ -0,0 +1,102 @@ +From 47ee5cc5501289205d3e8e9f27ea9daf18cebac1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Draszik?= +Date: Sat, 9 Nov 2019 14:45:30 +0000 +Subject: [PATCH] v8: don't override ARM CFLAGS +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This overrides yocto-provided build flags with its own, e.g we get + arm-poky-linux-musleabi-g++ -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a7 \ + ... \ + -march=armv7-a -mfpu=neon -mfloat-abi=hard -marm + +Causing the latter to override the former, and compiler warnings: + cc1plus: warning: switch '-mcpu=cortex-a7' conflicts with '-march=armv7-a' switch + +Patch this out, so that yocto-provided flags take precedence. +Note that in reality the same should probably be done for all the other +supported architectures, too. + +Note that this also switches to Thumb(2) mode (in my case). No obvious +problems have been noted during compilation or runtime. + +Upstream-Status: Inappropriate [oe-specific] +Signed-off-by: André Draszik +--- + tools/v8_gypfiles/toolchain.gypi | 52 ++------------------------------ + 1 file changed, 2 insertions(+), 50 deletions(-) + +diff --git a/tools/v8_gypfiles/toolchain.gypi b/tools/v8_gypfiles/toolchain.gypi +index 264b3e478e..0b41848145 100644 +--- a/tools/v8_gypfiles/toolchain.gypi ++++ b/tools/v8_gypfiles/toolchain.gypi +@@ -211,31 +211,7 @@ + 'target_conditions': [ + ['_toolset=="host"', { + 'conditions': [ +- ['v8_target_arch==host_arch', { +- # Host built with an Arm CXX compiler. +- 'conditions': [ +- [ 'arm_version==7', { +- 'cflags': ['-march=armv7-a',], +- }], +- [ 'arm_version==7 or arm_version=="default"', { +- 'conditions': [ +- [ 'arm_fpu!="default"', { +- 'cflags': ['-mfpu=<(arm_fpu)',], +- }], +- ], +- }], +- [ 'arm_float_abi!="default"', { +- 'cflags': ['-mfloat-abi=<(arm_float_abi)',], +- }], +- [ 'arm_thumb==1', { +- 'cflags': ['-mthumb',], +- }], +- [ 'arm_thumb==0', { +- 'cflags': ['-marm',], +- }], +- ], +- }, { +- # 'v8_target_arch!=host_arch' ++ ['v8_target_arch!=host_arch', { + # Host not built with an Arm CXX compiler (simulator build). + 'conditions': [ + [ 'arm_float_abi=="hard"', { +@@ -254,31 +230,7 @@ + }], # _toolset=="host" + ['_toolset=="target"', { + 'conditions': [ +- ['v8_target_arch==target_arch', { +- # Target built with an Arm CXX compiler. +- 'conditions': [ +- [ 'arm_version==7', { +- 'cflags': ['-march=armv7-a',], +- }], +- [ 'arm_version==7 or arm_version=="default"', { +- 'conditions': [ +- [ 'arm_fpu!="default"', { +- 'cflags': ['-mfpu=<(arm_fpu)',], +- }], +- ], +- }], +- [ 'arm_float_abi!="default"', { +- 'cflags': ['-mfloat-abi=<(arm_float_abi)',], +- }], +- [ 'arm_thumb==1', { +- 'cflags': ['-mthumb',], +- }], +- [ 'arm_thumb==0', { +- 'cflags': ['-marm',], +- }], +- ], +- }, { +- # 'v8_target_arch!=target_arch' ++ ['v8_target_arch!=target_arch', { + # Target not built with an Arm CXX compiler (simulator build). + 'conditions': [ + [ 'arm_float_abi=="hard"', { +-- +2.20.1 + diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0005-Link-atomic-library.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0005-Link-atomic-library.patch deleted file mode 100644 index 66ff18b4a3..0000000000 --- a/meta-oe/recipes-devtools/nodejs/nodejs/0005-Link-atomic-library.patch +++ /dev/null @@ -1,20 +0,0 @@ -Link atomic library to fix missing undefined referrences -like "undefined reference to `__atomic_fetch_add_8'" - -Signed-off-by: Andrej Valek - -diff -Naur node-v10.15.1/deps/v8/gypfiles/v8.gyp node-v10.15.1/deps/v8/gypfiles/v8.gyp ---- node-v10.15.1/deps/v8/gypfiles/v8.gyp 2019-02-13 09:02:21.000000000 +0100 -+++ node-v10.15.1/deps/v8/gypfiles/v8.gyp 2019-02-15 21:27:11.755679660 +0100 -@@ -452,6 +452,11 @@ - '<(DEPTH)', - '<(SHARED_INTERMEDIATE_DIR)' - ], -+ 'link_settings': { -+ 'libraries': [ -+ '-latomic' -+ ], -+ }, - 'sources': [ - '<@(inspector_all_sources)', - '../include//v8-inspector-protocol.h', diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0007-v8-don-t-override-ARM-CFLAGS.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0007-v8-don-t-override-ARM-CFLAGS.patch deleted file mode 100644 index eb2cbfb8b1..0000000000 --- a/meta-oe/recipes-devtools/nodejs/nodejs/0007-v8-don-t-override-ARM-CFLAGS.patch +++ /dev/null @@ -1,102 +0,0 @@ -From 47ee5cc5501289205d3e8e9f27ea9daf18cebac1 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andr=C3=A9=20Draszik?= -Date: Sat, 9 Nov 2019 14:45:30 +0000 -Subject: [PATCH] v8: don't override ARM CFLAGS -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This overrides yocto-provided build flags with its own, e.g we get - arm-poky-linux-musleabi-g++ -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a7 \ - ... \ - -march=armv7-a -mfpu=neon -mfloat-abi=hard -marm - -Causing the latter to override the former, and compiler warnings: - cc1plus: warning: switch '-mcpu=cortex-a7' conflicts with '-march=armv7-a' switch - -Patch this out, so that yocto-provided flags take precedence. -Note that in reality the same should probably be done for all the other -supported architectures, too. - -Note that this also switches to Thumb(2) mode (in my case). No obvious -problems have been noted during compilation or runtime. - -Upstream-Status: Inappropriate [oe-specific] -Signed-off-by: André Draszik ---- - deps/v8/gypfiles/toolchain.gypi | 52 ++------------------------------- - 1 file changed, 2 insertions(+), 50 deletions(-) - -diff --git a/deps/v8/gypfiles/toolchain.gypi b/deps/v8/gypfiles/toolchain.gypi -index 910a212..1390b15 100644 ---- a/deps/v8/gypfiles/toolchain.gypi -+++ b/deps/v8/gypfiles/toolchain.gypi -@@ -199,31 +199,7 @@ - 'target_conditions': [ - ['_toolset=="host"', { - 'conditions': [ -- ['v8_target_arch==host_arch', { -- # Host built with an Arm CXX compiler. -- 'conditions': [ -- [ 'arm_version==7', { -- 'cflags': ['-march=armv7-a',], -- }], -- [ 'arm_version==7 or arm_version=="default"', { -- 'conditions': [ -- [ 'arm_fpu!="default"', { -- 'cflags': ['-mfpu=<(arm_fpu)',], -- }], -- ], -- }], -- [ 'arm_float_abi!="default"', { -- 'cflags': ['-mfloat-abi=<(arm_float_abi)',], -- }], -- [ 'arm_thumb==1', { -- 'cflags': ['-mthumb',], -- }], -- [ 'arm_thumb==0', { -- 'cflags': ['-marm',], -- }], -- ], -- }, { -- # 'v8_target_arch!=host_arch' -+ ['v8_target_arch!=host_arch', { - # Host not built with an Arm CXX compiler (simulator build). - 'conditions': [ - [ 'arm_float_abi=="hard"', { -@@ -242,31 +218,7 @@ - }], # _toolset=="host" - ['_toolset=="target"', { - 'conditions': [ -- ['v8_target_arch==target_arch', { -- # Target built with an Arm CXX compiler. -- 'conditions': [ -- [ 'arm_version==7', { -- 'cflags': ['-march=armv7-a',], -- }], -- [ 'arm_version==7 or arm_version=="default"', { -- 'conditions': [ -- [ 'arm_fpu!="default"', { -- 'cflags': ['-mfpu=<(arm_fpu)',], -- }], -- ], -- }], -- [ 'arm_float_abi!="default"', { -- 'cflags': ['-mfloat-abi=<(arm_float_abi)',], -- }], -- [ 'arm_thumb==1', { -- 'cflags': ['-mthumb',], -- }], -- [ 'arm_thumb==0', { -- 'cflags': ['-marm',], -- }], -- ], -- }, { -- # 'v8_target_arch!=target_arch' -+ ['v8_target_arch!=target_arch', { - # Target not built with an Arm CXX compiler (simulator build). - 'conditions': [ - [ 'arm_float_abi=="hard"', { --- -2.23.0.rc1 - diff --git a/meta-oe/recipes-devtools/nodejs/nodejs_10.17.0.bb b/meta-oe/recipes-devtools/nodejs/nodejs_10.17.0.bb deleted file mode 100644 index ba1c2beed3..0000000000 --- a/meta-oe/recipes-devtools/nodejs/nodejs_10.17.0.bb +++ /dev/null @@ -1,155 +0,0 @@ -DESCRIPTION = "nodeJS Evented I/O for V8 JavaScript" -HOMEPAGE = "http://nodejs.org" -LICENSE = "MIT & BSD & Artistic-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=be980eb7ccafe287cb438076a65e888c" - -DEPENDS = "openssl" -DEPENDS_append_class-target = " nodejs-native" - -inherit pkgconfig ${@bb.utils.contains("BBFILE_COLLECTIONS", "meta-python2", "pythonnative", "", d)} - -COMPATIBLE_MACHINE_armv4 = "(!.*armv4).*" -COMPATIBLE_MACHINE_armv5 = "(!.*armv5).*" -COMPATIBLE_MACHINE_mips64 = "(!.*mips64).*" - -COMPATIBLE_HOST_riscv64 = "null" -COMPATIBLE_HOST_riscv32 = "null" - -SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \ - file://0001-Disable-running-gyp-files-for-bundled-deps.patch \ - file://0003-Install-both-binaries-and-use-libdir.patch \ - file://0004-Make-compatibility-with-gcc-4.8.patch \ - file://0007-v8-don-t-override-ARM-CFLAGS.patch \ - " -SRC_URI_append_class-target = " \ - file://0002-Using-native-torque.patch \ - file://0005-Link-atomic-library.patch \ - " - -SRC_URI[md5sum] = "d5a56d0abf764a91f627f0690cd4b9f3" -SRC_URI[sha256sum] = "412667d76bd5273c07cb69c215998109fd5bb35c874654f93e6a0132d666c58e" - -S = "${WORKDIR}/node-v${PV}" - -# v8 errors out if you have set CCACHE -CCACHE = "" - -def map_nodejs_arch(a, d): - import re - - if re.match('i.86$', a): return 'ia32' - elif re.match('x86_64$', a): return 'x64' - elif re.match('aarch64$', a): return 'arm64' - elif re.match('(powerpc64|ppc64le)$', a): return 'ppc64' - elif re.match('powerpc$', a): return 'ppc' - return a - -ARCHFLAGS_arm = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--with-arm-float-abi=hard', '--with-arm-float-abi=softfp', d)} \ - ${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-arm-fpu=neon', \ - bb.utils.contains('TUNE_FEATURES', 'vfpv3d16', '--with-arm-fpu=vfpv3-d16', \ - bb.utils.contains('TUNE_FEATURES', 'vfpv3', '--with-arm-fpu=vfpv3', \ - '--with-arm-fpu=vfp', d), d), d)}" -GYP_DEFINES_append_mipsel = " mips_arch_variant='r1' " -ARCHFLAGS ?= "" - -PACKAGECONFIG ??= "ares icu libuv zlib" -PACKAGECONFIG[ares] = "--shared-cares,,c-ares" -PACKAGECONFIG[gyp] = ",,gyp-py2-native" -PACKAGECONFIG[icu] = "--with-intl=system-icu,--without-intl,icu" -PACKAGECONFIG[libuv] = "--shared-libuv,,libuv" -PACKAGECONFIG[nghttp2] = "--shared-nghttp2,,nghttp2" -PACKAGECONFIG[shared] = "--shared" -PACKAGECONFIG[zlib] = "--shared-zlib,,zlib" - -# We don't want to cross-compile during target compile, -# and we need to use the right flags during host compile, -# too. -EXTRA_OEMAKE = "\ - CC.host='${CC}' \ - CFLAGS.host='${CPPFLAGS} ${CFLAGS}' \ - CXX.host='${CXX}' \ - CXXFLAGS.host='${CPPFLAGS} ${CXXFLAGS}' \ - LDFLAGS.host='${LDFLAGS}' \ - AR.host='${AR}' \ - \ - builddir_name=./ \ -" - -python do_unpack() { - import shutil - - bb.build.exec_func('base_do_unpack', d) - - shutil.rmtree(d.getVar('S') + '/deps/openssl', True) - if 'ares' in d.getVar('PACKAGECONFIG'): - shutil.rmtree(d.getVar('S') + '/deps/cares', True) - if 'gyp' in d.getVar('PACKAGECONFIG'): - shutil.rmtree(d.getVar('S') + '/tools/gyp', True) - if 'libuv' in d.getVar('PACKAGECONFIG'): - shutil.rmtree(d.getVar('S') + '/deps/uv', True) - if 'nghttp2' in d.getVar('PACKAGECONFIG'): - shutil.rmtree(d.getVar('S') + '/deps/nghttp2', True) - if 'zlib' in d.getVar('PACKAGECONFIG'): - shutil.rmtree(d.getVar('S') + '/deps/zlib', True) -} - -# Node is way too cool to use proper autotools, so we install two wrappers to forcefully inject proper arch cflags to workaround gypi -do_configure () { - export LD="${CXX}" - GYP_DEFINES="${GYP_DEFINES}" export GYP_DEFINES - # $TARGET_ARCH settings don't match --dest-cpu settings - ./configure --prefix=${prefix} --without-snapshot --shared-openssl \ - --dest-cpu="${@map_nodejs_arch(d.getVar('TARGET_ARCH'), d)}" \ - --dest-os=linux \ - --libdir=${D}${libdir} \ - ${ARCHFLAGS} \ - ${PACKAGECONFIG_CONFARGS} -} - -do_compile () { - export LD="${CXX}" - oe_runmake BUILDTYPE=Release -} - -do_install () { - oe_runmake install DESTDIR=${D} -} - -do_install_append_class-native() { - # use node from PATH instead of absolute path to sysroot - # node-v0.10.25/tools/install.py is using: - # shebang = os.path.join(node_prefix, 'bin/node') - # update_shebang(link_path, shebang) - # and node_prefix can be very long path to bindir in native sysroot and - # when it exceeds 128 character shebang limit it's stripped to incorrect path - # and npm fails to execute like in this case with 133 characters show in log.do_install: - # updating shebang of /home/jenkins/workspace/build-webos-nightly/device/qemux86/label/open-webos-builder/BUILD-qemux86/work/x86_64-linux/nodejs-native/0.10.15-r0/image/home/jenkins/workspace/build-webos-nightly/device/qemux86/label/open-webos-builder/BUILD-qemux86/sysroots/x86_64-linux/usr/bin/npm to /home/jenkins/workspace/build-webos-nightly/device/qemux86/label/open-webos-builder/BUILD-qemux86/sysroots/x86_64-linux/usr/bin/node - # /usr/bin/npm is symlink to /usr/lib/node_modules/npm/bin/npm-cli.js - # use sed on npm-cli.js because otherwise symlink is replaced with normal file and - # npm-cli.js continues to use old shebang - sed "1s^.*^#\!/usr/bin/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js - - # Install the native torque to provide it within sysroot for the target compilation - install -d ${D}${bindir} - install -m 0755 ${S}/out/Release/torque ${D}${bindir}/torque -} - -do_install_append_class-target() { - sed "1s^.*^#\!${bindir}/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js -} - -PACKAGES =+ "${PN}-npm" -FILES_${PN}-npm = "${exec_prefix}/lib/node_modules ${bindir}/npm ${bindir}/npx" -RDEPENDS_${PN}-npm = "bash python-core python-shell python-datetime python-subprocess python-textutils \ - python-compiler python-misc python-multiprocessing" - -PACKAGES =+ "${PN}-systemtap" -FILES_${PN}-systemtap = "${datadir}/systemtap" - - -BBCLASSEXTEND = "native" - -python() { - if 'meta-python2' not in d.getVar('BBFILE_COLLECTIONS').split(): - raise bb.parse.SkipRecipe('Requires meta-python2 to be present.') -} diff --git a/meta-oe/recipes-devtools/nodejs/nodejs_12.14.0.bb b/meta-oe/recipes-devtools/nodejs/nodejs_12.14.0.bb new file mode 100644 index 0000000000..35abb8f1f0 --- /dev/null +++ b/meta-oe/recipes-devtools/nodejs/nodejs_12.14.0.bb @@ -0,0 +1,157 @@ +DESCRIPTION = "nodeJS Evented I/O for V8 JavaScript" +HOMEPAGE = "http://nodejs.org" +LICENSE = "MIT & BSD & Artistic-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=be4d5107c64dc3d7c57e3797e1a0674b" + +DEPENDS = "openssl" +DEPENDS_append_class-target = " nodejs-native" + +inherit pkgconfig ${@bb.utils.contains("BBFILE_COLLECTIONS", "meta-python2", "pythonnative", "", d)} + +COMPATIBLE_MACHINE_armv4 = "(!.*armv4).*" +COMPATIBLE_MACHINE_armv5 = "(!.*armv5).*" +COMPATIBLE_MACHINE_mips64 = "(!.*mips64).*" + +COMPATIBLE_HOST_riscv64 = "null" +COMPATIBLE_HOST_riscv32 = "null" + +SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \ + file://0001-Disable-running-gyp-files-for-bundled-deps.patch \ + file://0003-Install-both-binaries-and-use-libdir.patch \ + file://0004-v8-don-t-override-ARM-CFLAGS.patch \ + " +SRC_URI_append_class-target = " \ + file://0002-Using-native-binaries.patch \ + " + +SRC_URI[md5sum] = "6762f5629f6f68fb9bdf83a741cba038" +SRC_URI[sha256sum] = "088a217ba2af641b8cc15be29f6e2956b8a33e6badb85596bbc2cdea9df9be71" + +S = "${WORKDIR}/node-v${PV}" + +# v8 errors out if you have set CCACHE +CCACHE = "" + +def map_nodejs_arch(a, d): + import re + + if re.match('i.86$', a): return 'ia32' + elif re.match('x86_64$', a): return 'x64' + elif re.match('aarch64$', a): return 'arm64' + elif re.match('(powerpc64|ppc64le)$', a): return 'ppc64' + elif re.match('powerpc$', a): return 'ppc' + return a + +ARCHFLAGS_arm = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--with-arm-float-abi=hard', '--with-arm-float-abi=softfp', d)} \ + ${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-arm-fpu=neon', \ + bb.utils.contains('TUNE_FEATURES', 'vfpv3d16', '--with-arm-fpu=vfpv3-d16', \ + bb.utils.contains('TUNE_FEATURES', 'vfpv3', '--with-arm-fpu=vfpv3', \ + '--with-arm-fpu=vfp', d), d), d)}" +GYP_DEFINES_append_mipsel = " mips_arch_variant='r1' " +ARCHFLAGS ?= "" + +PACKAGECONFIG ??= "ares icu libuv zlib" +PACKAGECONFIG[ares] = "--shared-cares,,c-ares" +PACKAGECONFIG[gyp] = ",,gyp-py2-native" +PACKAGECONFIG[icu] = "--with-intl=system-icu,--without-intl,icu" +PACKAGECONFIG[libuv] = "--shared-libuv,,libuv" +PACKAGECONFIG[nghttp2] = "--shared-nghttp2,,nghttp2" +PACKAGECONFIG[shared] = "--shared" +PACKAGECONFIG[zlib] = "--shared-zlib,,zlib" + +# We don't want to cross-compile during target compile, +# and we need to use the right flags during host compile, +# too. +EXTRA_OEMAKE = "\ + CC.host='${CC}' \ + CFLAGS.host='${CPPFLAGS} ${CFLAGS}' \ + CXX.host='${CXX}' \ + CXXFLAGS.host='${CPPFLAGS} ${CXXFLAGS}' \ + LDFLAGS.host='${LDFLAGS}' \ + AR.host='${AR}' \ + \ + builddir_name=./ \ +" + +python do_unpack() { + import shutil + + bb.build.exec_func('base_do_unpack', d) + + shutil.rmtree(d.getVar('S') + '/deps/openssl', True) + if 'ares' in d.getVar('PACKAGECONFIG'): + shutil.rmtree(d.getVar('S') + '/deps/cares', True) + if 'gyp' in d.getVar('PACKAGECONFIG'): + shutil.rmtree(d.getVar('S') + '/tools/gyp', True) + if 'libuv' in d.getVar('PACKAGECONFIG'): + shutil.rmtree(d.getVar('S') + '/deps/uv', True) + if 'nghttp2' in d.getVar('PACKAGECONFIG'): + shutil.rmtree(d.getVar('S') + '/deps/nghttp2', True) + if 'zlib' in d.getVar('PACKAGECONFIG'): + shutil.rmtree(d.getVar('S') + '/deps/zlib', True) +} + +# Node is way too cool to use proper autotools, so we install two wrappers to forcefully inject proper arch cflags to workaround gypi +do_configure () { + export LD="${CXX}" + GYP_DEFINES="${GYP_DEFINES}" export GYP_DEFINES + # $TARGET_ARCH settings don't match --dest-cpu settings + ./configure --prefix=${prefix} --without-snapshot --shared-openssl \ + --dest-cpu="${@map_nodejs_arch(d.getVar('TARGET_ARCH'), d)}" \ + --dest-os=linux \ + --libdir=${D}${libdir} \ + ${ARCHFLAGS} \ + ${PACKAGECONFIG_CONFARGS} +} + +do_compile () { + export LD="${CXX}" + oe_runmake BUILDTYPE=Release +} + +do_install () { + oe_runmake install DESTDIR=${D} +} + +do_install_append_class-native() { + # use node from PATH instead of absolute path to sysroot + # node-v0.10.25/tools/install.py is using: + # shebang = os.path.join(node_prefix, 'bin/node') + # update_shebang(link_path, shebang) + # and node_prefix can be very long path to bindir in native sysroot and + # when it exceeds 128 character shebang limit it's stripped to incorrect path + # and npm fails to execute like in this case with 133 characters show in log.do_install: + # updating shebang of /home/jenkins/workspace/build-webos-nightly/device/qemux86/label/open-webos-builder/BUILD-qemux86/work/x86_64-linux/nodejs-native/0.10.15-r0/image/home/jenkins/workspace/build-webos-nightly/device/qemux86/label/open-webos-builder/BUILD-qemux86/sysroots/x86_64-linux/usr/bin/npm to /home/jenkins/workspace/build-webos-nightly/device/qemux86/label/open-webos-builder/BUILD-qemux86/sysroots/x86_64-linux/usr/bin/node + # /usr/bin/npm is symlink to /usr/lib/node_modules/npm/bin/npm-cli.js + # use sed on npm-cli.js because otherwise symlink is replaced with normal file and + # npm-cli.js continues to use old shebang + sed "1s^.*^#\!/usr/bin/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js + + # Install the native binaries to provide it within sysroot for the target compilation + install -d ${D}${bindir} + install -m 0755 ${S}/out/Release/torque ${D}${bindir}/torque + install -m 0755 ${S}/out/Release/bytecode_builtins_list_generator ${D}${bindir}/bytecode_builtins_list_generator + install -m 0755 ${S}/out/Release/gen-regexp-special-case ${D}${bindir}/gen-regexp-special-case + install -m 0755 ${S}/out/Release/mkcodecache ${D}${bindir}/mkcodecache + install -m 0755 ${S}/out/Release/node_mksnapshot ${D}${bindir}/node_mksnapshot +} + +do_install_append_class-target() { + sed "1s^.*^#\!${bindir}/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js +} + +PACKAGES =+ "${PN}-npm" +FILES_${PN}-npm = "${exec_prefix}/lib/node_modules ${bindir}/npm ${bindir}/npx" +RDEPENDS_${PN}-npm = "bash python-core python-shell python-datetime python-subprocess python-textutils \ + python-compiler python-misc python-multiprocessing" + +PACKAGES =+ "${PN}-systemtap" +FILES_${PN}-systemtap = "${datadir}/systemtap" + + +BBCLASSEXTEND = "native" + +python() { + if 'meta-python2' not in d.getVar('BBFILE_COLLECTIONS').split(): + raise bb.parse.SkipRecipe('Requires meta-python2 to be present.') +} -- cgit 1.2.3-korg