]> git.pld-linux.org Git - packages/nodejs.git/blob - nodejs-shared.patch
builds with uv 1.6.0
[packages/nodejs.git] / nodejs-shared.patch
1 --- node-v0.10.3/common.gypi~   2013-04-03 20:30:57.000000000 +0300
2 +++ node-v0.10.3/common.gypi    2013-04-08 15:50:00.327121152 +0300
3 @@ -8,6 +8,8 @@
4      'component%': 'static_library',  # NB. these names match with what V8 expects
5      'msvs_multi_core_compile': '0',  # we do enable multicore compiles, but not using the V8 way
6      'gcc_version%': 'unknown',
7 +    # For a shared library build, results in "libnode.so.<(soname_version)".
8 +    'soname_version%': '',
9      'clang%': 0,
10      'python%': 'python',
11  
12 --- node-v0.10.3-o/node.gyp     2013-04-03 11:30:57.000000000 -0600
13 +++ node-v0.10.3/node.gyp       2013-04-03 19:30:22.000000000 -0600
14 @@ -67,17 +67,35 @@
15        'type': 'executable',
16  
17        'dependencies': [
18 -        'node_js2c#host',
19 +        'libnode'
20        ],
21  
22 -      'include_dirs': [
23 -        'src',
24 -        'tools/msvs/genfiles',
25 -        'deps/uv/src/ares',
26 -        '<(SHARED_INTERMEDIATE_DIR)' # for node_natives.h
27 +      'conditions': [
28 +        [ 'node_shared_libuv=="false"', {
29 +          'dependencies': [ 'deps/uv/uv.gyp:libuv' ],
30 +        }],
31        ],
32  
33        'sources': [
34 +        'src/node_main.cc',
35 +        # node.gyp is added to the project by default.
36 +        'common.gypi',
37 +      ],
38 +
39 +      'defines': [
40 +        'NODE_WANT_INTERNALS=1',
41 +        'ARCH="<(target_arch)"',
42 +        'PLATFORM="<(OS)"',
43 +      ],
44 +    },
45 +    {
46 +      'target_name': 'libnode',
47 +      'type': 'shared_library',
48 +      'product_extension': 'so.<(soname_version)',
49 +      'soname_version': '<(soname_version)',
50 +      'cflags': ['-fPIC'],
51 +
52 +      'sources': [
53          'src/fs_event_wrap.cc',
54          'src/cares_wrap.cc',
55          'src/handle_wrap.cc',
56 @@ -88,7 +106,6 @@
57          'src/node_file.cc',
58          'src/node_http_parser.cc',
59          'src/node_javascript.cc',
60 -        'src/node_main.cc',
61          'src/node_os.cc',
62          'src/node_script.cc',
63          'src/node_stat_watcher.cc',
64 @@ -137,6 +154,17 @@
65          'common.gypi',
66        ],
67  
68 +      'include_dirs': [
69 +        'src',
70 +        'tools/msvs/genfiles',
71 +        'deps/uv/src/ares',
72 +        '<(SHARED_INTERMEDIATE_DIR)' # for node_natives.h
73 +      ],
74 +
75 +      'dependencies': [
76 +        'node_js2c#host',
77 +      ],
78 +
79        'defines': [
80          'NODE_WANT_INTERNALS=1',
81          'ARCH="<(target_arch)"',
82 --- node-v0.10.3-o/tools/install.py     2013-04-03 11:30:57.000000000 -0600
83 +++ node-v0.10.3/tools/install.py       2013-04-03 19:31:32.000000000 -0600
84 @@ -119,7 +119,9 @@
85      assert(0) # unhandled action type
86  
87  def files(action):
88 +  global lib_dir
89    action(['out/Release/node'], 'bin/node')
90 +  action(['out/Release/lib.target/libnode.so.10'], lib_dir + '/libnode.so.10.3.0')
91  
92    # install unconditionally, checking if the platform supports dtrace doesn't
93    # work when cross-compiling and besides, there's at least one linux flavor
94 @@ -134,7 +136,7 @@
95    if 'true' == variables.get('node_install_npm'): npm_files(action)
96  
97  def run(args):
98 -  global dst_dir, node_prefix, target_defaults, variables
99 +  global dst_dir, node_prefix, target_defaults, variables, lib_dir
100  
101    # chdir to the project's top-level directory
102    os.chdir(abspath(os.path.dirname(__file__), '..'))
103 @@ -147,6 +149,9 @@
104    dst_dir = node_prefix = variables.get('node_prefix') or '/usr/local'
105    if len(args) > 2: dst_dir = abspath(args[2] + '/' + dst_dir)
106  
107 +  lib_dir = 'lib'
108 +  if len(args) > 3: lib_dir = args[3]
109 +
110    cmd = args[1] if len(args) > 1 else 'install'
111    if cmd == 'install': return files(install)
112    if cmd == 'uninstall': return files(uninstall)
This page took 0.067792 seconds and 3 git commands to generate.