]> git.pld-linux.org Git - packages/nodejs.git/blob - 0002-Install-both-binaries-and-use-libdir.patch
drop more internal deps
[packages/nodejs.git] / 0002-Install-both-binaries-and-use-libdir.patch
1 From cf581096dd350cf7267e5a12ff26159120274c5c Mon Sep 17 00:00:00 2001
2 From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
3 Date: Tue, 19 Mar 2019 23:22:40 -0400
4 Subject: [PATCH 2/3] Install both binaries and use libdir.
5
6 This allows us to build with a shared library for other users while
7 still providing the normal executable.
8
9 Signed-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
15 diff --git a/configure.py b/configure.py
16 index 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):
33    if o['variables']['want_separate_host_toolset'] == 0:
34      o['variables']['node_code_cache'] = 'yes' # For testing
35    o['variables']['node_shared'] = b(options.shared)
36 +  o['variables']['libdir'] = options.libdir
37    node_module_version = getmoduleversion.get_version()
38  
39    if sys.platform == 'darwin':
40 diff --git a/tools/install.py b/tools/install.py
41 index 655802980a6ea94d1d4ca1dc63c8c8e905fbb83a..fe4723bf15012c8aacacb0393dc8294c049b0503 100755
42 --- a/tools/install.py
43 +++ b/tools/install.py
44 @@ -121,26 +121,23 @@ def subdir_files(path, dest, action):
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')
63 -      # GYP will output to lib.target except on OS X, this is hardcoded
64 -      # in its source - see the _InstallableTargetInstallPath function.
65 -      if sys.platform != 'darwin':
66 -        output_prefix += 'lib.target/'
67 +    output_bin = 'node'
68 +    output_lib = 'libnode.' + variables.get('shlib_suffix')
69 +    # GYP will output to lib.target except on OS X, this is hardcoded
70 +    # in its source - see the _InstallableTargetInstallPath function.
71 +    if sys.platform != 'darwin':
72 +      output_libprefix += 'lib.target/'
73  
74 -  if 'false' == variables.get('node_shared'):
75 -    action([output_prefix + output_file], 'bin/' + output_file)
76 -  else:
77 -    action([output_prefix + output_file], 'lib/' + output_file)
78 +  action([output_prefix + output_bin], 'bin/' + output_bin)
79 +  if 'true' == variables.get('node_shared'):
80 +    action([output_libprefix + output_lib], variables.get('libdir') + '/' + output_lib)
81  
82    if 'true' == variables.get('node_use_dtrace'):
83      action(['out/Release/node.d'], 'lib/dtrace/node.d')
84 -- 
85 2.23.0
86
This page took 0.052087 seconds and 3 git commands to generate.