]> git.pld-linux.org Git - packages/nodejs.git/blame - 0002-Install-both-binaries-and-use-libdir.patch
up to 14.16.0 (fixes CVE-2021-22883 CVE-2021-22884)
[packages/nodejs.git] / 0002-Install-both-binaries-and-use-libdir.patch
CommitLineData
c2768f1e
AM
1From cf581096dd350cf7267e5a12ff26159120274c5c Mon Sep 17 00:00:00 2001
2From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
3Date: Tue, 19 Mar 2019 23:22:40 -0400
4Subject: [PATCH 2/3] Install both binaries and use libdir.
5
6This allows us to build with a shared library for other users while
7still providing the normal executable.
8
9Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
10---
11 configure.py | 7 +++++++
12 tools/install.py | 29 +++++++++++++----------------
13 2 files changed, 20 insertions(+), 16 deletions(-)
14
15diff --git a/configure.py b/configure.py
16index 20cce214dbb113aeef8f1044d7af88d842a11fd7..e2d78a2a51ef81621618cb20fa76f4a1421bf9e0 100755
17--- a/configure.py
18+++ b/configure.py
19@@ -559,6 +559,12 @@ parser.add_option('--shared',
20 help='compile shared library for embedding node in another project. ' +
21 '(This mode is not officially supported for regular applications)')
22
23+parser.add_option('--libdir',
24+ action='store',
25+ dest='libdir',
26+ default='lib',
27+ help='a directory to install the shared library into')
28+
29 parser.add_option('--without-v8-platform',
30 action='store_true',
31 dest='without_v8_platform',
32@@ -1103,6 +1109,7 @@ def configure_node(o):
713af70d
JP
33 o['variables']['node_no_browser_globals'] = b(options.no_browser_globals)
34
c2768f1e
AM
35 o['variables']['node_shared'] = b(options.shared)
36+ o['variables']['libdir'] = options.libdir
37 node_module_version = getmoduleversion.get_version()
38
713af70d 39 if options.dest_os == 'android':
c2768f1e
AM
40diff --git a/tools/install.py b/tools/install.py
41index 655802980a6ea94d1d4ca1dc63c8c8e905fbb83a..fe4723bf15012c8aacacb0393dc8294c049b0503 100755
42--- a/tools/install.py
43+++ b/tools/install.py
ec0ca276 44@@ -121,22 +121,19 @@ def subdir_files(path, dest, action):
c2768f1e
AM
45
46 def files(action):
47 is_windows = sys.platform == 'win32'
48- output_file = 'node'
49 output_prefix = 'out/Release/'
50+ output_libprefix = output_prefix
51
52- if 'false' == variables.get('node_shared'):
53- if is_windows:
54- output_file += '.exe'
55+ if is_windows:
56+ output_bin = 'node.exe'
57+ output_lib = 'node.dll'
58 else:
59- if is_windows:
60- output_file += '.dll'
61- else:
62- output_file = 'lib' + output_file + '.' + variables.get('shlib_suffix')
c2768f1e
AM
63+ output_bin = 'node'
64+ output_lib = 'libnode.' + variables.get('shlib_suffix')
c2768f1e
AM
65
66- if 'false' == variables.get('node_shared'):
67- action([output_prefix + output_file], 'bin/' + output_file)
68- else:
69- action([output_prefix + output_file], 'lib/' + output_file)
70+ action([output_prefix + output_bin], 'bin/' + output_bin)
71+ if 'true' == variables.get('node_shared'):
72+ action([output_libprefix + output_lib], variables.get('libdir') + '/' + output_lib)
73
74 if 'true' == variables.get('node_use_dtrace'):
75 action(['out/Release/node.d'], 'lib/dtrace/node.d')
76--
772.23.0
78
This page took 0.09573 seconds and 4 git commands to generate.