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