diff options
author | Björn Esser <b.esser@pengutronix.de> | 2020-03-18 16:54:04 +0100 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2020-03-20 13:39:08 +0100 |
commit | d03d780d41aabed93be7ad89276abbeca945f45f (patch) | |
tree | 6b595d2aa1d01932756b71c7123852b20ea1ca07 /patches | |
parent | 8f6fae6b045790b0b2a3264df15970fbda945196 (diff) | |
download | ptxdist-d03d780d41aabed93be7ad89276abbeca945f45f.tar.gz ptxdist-d03d780d41aabed93be7ad89276abbeca945f45f.tar.xz |
nodejs: version bump 6.9.5 -> 12.14.1 LTS
We also need to build a host-nodejs package first, as there
are some tools needed to be executable on the host system
during the intermediate cross-build process.
This package drops support for NPM, as we will be managing
Node.js packages with Yarn, which will be implemented in the
following commits.
The patches that are shipped along with this version of the
package have been taken from the SRPM of the Node.js-package
in Fedora. See:
https://src.fedoraproject.org/rpms/nodejs/c/f0e2a1ed4615?branch=master
Signed-off-by: Björn Esser <b.esser@pengutronix.de>
[uol: fixed whitespace issues in first patch, added patch to get rid of the
non-existing rpath, dropped CREDITS lines, switched from menuconfig entry for
NODEJS back to config entry because of the removal of all sub-menu entries,
removed shell usage & inserted line break in build command]
Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Message-Id: <20200318155406.27584-1-u.oelmann@pengutronix.de>
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'patches')
6 files changed, 140 insertions, 35 deletions
diff --git a/patches/node-v12.14.1/0001-Disable-running-gyp-on-shared-deps.patch b/patches/node-v12.14.1/0001-Disable-running-gyp-on-shared-deps.patch new file mode 100644 index 000000000..b41095a20 --- /dev/null +++ b/patches/node-v12.14.1/0001-Disable-running-gyp-on-shared-deps.patch @@ -0,0 +1,21 @@ +From: Zuzana Svetlikova <zsvetlik@redhat.com> +Date: Thu, 27 Apr 2017 14:25:42 +0200 +Subject: [PATCH] Disable running gyp on shared deps + +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 56f53582d1f4..f289f258df6f 100644 +--- a/Makefile ++++ b/Makefile +@@ -141,7 +141,7 @@ test-code-cache: with-code-cache + echo "'test-code-cache' target is a noop" + + 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 diff --git a/patches/node-v12.14.1/0002-Install-both-binaries-and-use-libdir.patch b/patches/node-v12.14.1/0002-Install-both-binaries-and-use-libdir.patch new file mode 100644 index 000000000..38c3c9650 --- /dev/null +++ b/patches/node-v12.14.1/0002-Install-both-binaries-and-use-libdir.patch @@ -0,0 +1,83 @@ +From: Elliott Sales de Andrade <quantum.analyst@gmail.com> +Date: Tue, 19 Mar 2019 23:22:40 -0400 +Subject: [PATCH] Install both binaries and use libdir. + +This allows us to build with a shared library for other users while +still providing the normal executable. + +Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com> +--- + configure.py | 7 +++++++ + tools/install.py | 31 ++++++++++++++----------------- + 2 files changed, 21 insertions(+), 17 deletions(-) + +diff --git a/configure.py b/configure.py +index 20cce214dbb1..e2d78a2a51ef 100755 +--- a/configure.py ++++ b/configure.py +@@ -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)') + ++parser.add_option('--libdir', ++ action='store', ++ dest='libdir', ++ default='lib', ++ help='a directory to install the shared library into') ++ + parser.add_option('--without-v8-platform', + action='store_true', + dest='without_v8_platform', +@@ -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 655802980a6e..fe4723bf1501 100755 +--- a/tools/install.py ++++ b/tools/install.py +@@ -121,26 +121,23 @@ def subdir_files(path, dest, action): + + def files(action): + is_windows = sys.platform == 'win32' +- output_file = 'node' + output_prefix = 'out/Release/' ++ output_libprefix = output_prefix + +- if 'false' == variables.get('node_shared'): +- if is_windows: +- output_file += '.exe' ++ if is_windows: ++ output_bin = 'node.exe' ++ output_lib = 'node.dll' + else: +- if is_windows: +- output_file += '.dll' +- else: +- output_file = 'lib' + output_file + '.' + variables.get('shlib_suffix') +- # GYP will output to lib.target except on OS X, this is hardcoded +- # in its source - see the _InstallableTargetInstallPath function. +- if sys.platform != 'darwin': +- output_prefix += 'lib.target/' +- +- if 'false' == variables.get('node_shared'): +- action([output_prefix + output_file], 'bin/' + output_file) +- else: +- action([output_prefix + output_file], 'lib/' + output_file) ++ output_bin = 'node' ++ output_lib = 'libnode.' + variables.get('shlib_suffix') ++ # GYP will output to lib.target except on OS X, this is hardcoded ++ # in its source - see the _InstallableTargetInstallPath function. ++ if sys.platform != 'darwin': ++ output_libprefix += 'lib.target/' ++ ++ action([output_prefix + output_bin], 'bin/' + output_bin) ++ if 'true' == variables.get('node_shared'): ++ action([output_libprefix + output_lib], variables.get('libdir') + '/' + output_lib) + + if 'true' == variables.get('node_use_dtrace'): + action(['out/Release/node.d'], 'lib/dtrace/node.d') diff --git a/patches/node-v12.14.1/0003-tools-do-not-explicitely-set-an-rpath-in-make-genera.patch b/patches/node-v12.14.1/0003-tools-do-not-explicitely-set-an-rpath-in-make-genera.patch new file mode 100644 index 000000000..f05bcafd5 --- /dev/null +++ b/patches/node-v12.14.1/0003-tools-do-not-explicitely-set-an-rpath-in-make-genera.patch @@ -0,0 +1,30 @@ +From: =?UTF-8?q?Ulrich=20=C3=96lmann?= <u.oelmann@pengutronix.de> +Date: Fri, 13 Mar 2020 12:36:49 +0100 +Subject: [PATCH] tools: do not explicitely set an rpath in make generator +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This is not necessary as the library is installed into the standard path. + +Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> +--- + tools/gyp/pylib/gyp/generator/make.py | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/tools/gyp/pylib/gyp/generator/make.py b/tools/gyp/pylib/gyp/generator/make.py +index 91a119c5a576..c109b2b488ec 100644 +--- a/tools/gyp/pylib/gyp/generator/make.py ++++ b/tools/gyp/pylib/gyp/generator/make.py +@@ -1474,11 +1474,7 @@ $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)/%%%s FORCE_DO_CMD + target_postbuilds[configname] = target_postbuild + else: + ldflags = config.get('ldflags', []) +- # Compute an rpath for this output if needed. + if any(dep.endswith('.so') or '.so.' in dep for dep in deps): +- # We want to get the literal string "$ORIGIN" into the link command, +- # so we need lots of escaping. +- ldflags.append(r'-Wl,-rpath=\$$ORIGIN/lib.%s/' % self.toolset) + ldflags.append(r'-Wl,-rpath-link=\$(builddir)/lib.%s/' % + self.toolset) + library_dirs = config.get('library_dirs', []) diff --git a/patches/node-v12.14.1/series b/patches/node-v12.14.1/series new file mode 100644 index 000000000..f86c12166 --- /dev/null +++ b/patches/node-v12.14.1/series @@ -0,0 +1,6 @@ +# generated by git-ptx-patches +#tag:base --start-number 1 +0001-Disable-running-gyp-on-shared-deps.patch +0002-Install-both-binaries-and-use-libdir.patch +0003-tools-do-not-explicitely-set-an-rpath-in-make-genera.patch +# b4f94a5ae9905853dec0da236e8ee053 - git-ptx-patches magic diff --git a/patches/npmbox-2.6.1/0001-npmbox-add-build-from-source-option-to-npmunbox.patch b/patches/npmbox-2.6.1/0001-npmbox-add-build-from-source-option-to-npmunbox.patch deleted file mode 100644 index 1e34b0dd3..000000000 --- a/patches/npmbox-2.6.1/0001-npmbox-add-build-from-source-option-to-npmunbox.patch +++ /dev/null @@ -1,31 +0,0 @@ -From: Michael Grzeschik <m.grzeschik@pengutronix.de> -Date: Wed, 22 Jul 2015 18:18:59 +0200 -Subject: [PATCH] npmbox: add build from source option to npmunbox - -Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> ---- - lib/node_modules/npmbox/npmunbox.js | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/lib/node_modules/npmbox/npmunbox.js b/lib/node_modules/npmbox/npmunbox.js -index 66d6ef3..1cdc375 100644 ---- a/lib/node_modules/npmbox/npmunbox.js -+++ b/lib/node_modules/npmbox/npmunbox.js -@@ -43,6 +43,7 @@ if (args.length<1 || argv.help) { - console.log(" -O, -save-optional npm --save-optional swtich."); - console.log(" -B, -save-bundle npm --save-bundle swtich."); - console.log(" -E, -save-exact npm --save-exact swtich."); -+ console.log(" -b, -build-from-source npm --build-from-source swtich."); - console.log(""); - process.exit(0); - } -@@ -55,7 +56,8 @@ var options = { - "save-dev": argv.D || argv["save-dev"] || false, - "save-optional": argv.O || argv["save-optional"] || false, - "save-bundle": argv.B || argv["save-bundle"] || false, -- "save-exact": argv.E || argv["save-exact"] || false -+ "save-exact": argv.E || argv["save-exact"] || false, -+ "build-from-source": argv.b || argv["build-from-source"] || false - }; - if (argv.C || argv.prefix) options.prefix = argv.C || argv.prefix; - diff --git a/patches/npmbox-2.6.1/series b/patches/npmbox-2.6.1/series deleted file mode 100644 index 0e8cfa98b..000000000 --- a/patches/npmbox-2.6.1/series +++ /dev/null @@ -1,4 +0,0 @@ -# generated by git-ptx-patches -#tag:base --start-number 1 -0001-npmbox-add-build-from-source-option-to-npmunbox.patch -# 1fc845f15dff1b0b44df5cf3183e8d63 - git-ptx-patches magic |