]> git.pld-linux.org Git - packages/nodejs.git/blob - nodejs-shared.patch
buildconflicts eio vs libeio
[packages/nodejs.git] / nodejs-shared.patch
1 diff -ur node-v0.8.15-o/Makefile node-v0.8.15/Makefile
2 --- node-v0.8.15-o/Makefile     2012-11-26 08:51:39.000000000 -0700
3 +++ node-v0.8.15/Makefile       2012-12-02 10:04:42.000000000 -0700
4 @@ -39,11 +39,13 @@
5  out/Makefile: common.gypi deps/uv/uv.gyp deps/http_parser/http_parser.gyp deps/zlib/zlib.gyp deps/v8/build/common.gypi deps/v8/tools/gyp/v8.gyp node.gyp config.gypi
6         $(PYTHON) tools/gyp_node -f make
7  
8 -install: all
9 -       $(PYTHON) tools/install.py $@ $(DESTDIR)
10 +install: all justinstall
11 +
12 +justinstall:
13 +       $(PYTHON) tools/install.py install $(DESTDIR) $(LIBDIR)
14  
15  uninstall:
16 -       $(PYTHON) tools/install.py $@ $(DESTDIR)
17 +       $(PYTHON) tools/install.py $@ $(DESTDIR) $(LIBDIR)
18  
19  clean:
20         -rm -rf out/Makefile node node_g out/$(BUILDTYPE)/node blog.html email.md
21 diff -ur node-v0.8.15-o/node.gyp node-v0.8.15/node.gyp
22 --- node-v0.8.15-o/node.gyp     2012-11-26 08:51:39.000000000 -0700
23 +++ node-v0.8.15/node.gyp       2012-12-02 10:04:42.000000000 -0700
24 @@ -57,6 +57,36 @@
25        'type': 'executable',
26  
27        'dependencies': [
28 +        'libnode',
29 +        'deps/uv/uv.gyp:uv',
30 +        'node_js2c#host',
31 +      ],
32 +
33 +      'include_dirs': [
34 +        'src',
35 +        'deps/uv/src/ares',
36 +        '<(SHARED_INTERMEDIATE_DIR)' # for node_natives.h
37 +      ],
38 +
39 +      'sources': [
40 +        'src/node_main.cc',
41 +        # node.gyp is added to the project by default.
42 +        'common.gypi',
43 +      ],
44 +
45 +      'defines': [
46 +        'NODE_WANT_INTERNALS=1',
47 +        'ARCH="<(target_arch)"',
48 +        'PLATFORM="<(OS)"',
49 +      ],
50 +    },
51 +    {
52 +      'target_name': 'libnode',
53 +      'type': 'shared_library',
54 +      'product_extension': 'so.8.0.0',
55 +      'soname_version': '8.0.0',
56 +
57 +      'dependencies': [
58          'deps/http_parser/http_parser.gyp:http_parser',
59          'deps/uv/uv.gyp:uv',
60          'node_js2c#host',
61 @@ -79,7 +109,6 @@
62          'src/node_file.cc',
63          'src/node_http_parser.cc',
64          'src/node_javascript.cc',
65 -        'src/node_main.cc',
66          'src/node_os.cc',
67          'src/node_script.cc',
68          'src/node_stat_watcher.cc',
69 diff -ur node-v0.8.15-o/tools/install.py node-v0.8.15/tools/install.py
70 --- node-v0.8.15-o/tools/install.py     2012-12-01 22:39:50.000000000 -0700
71 +++ node-v0.8.15/tools/install.py       2012-12-02 10:04:52.000000000 -0700
72 @@ -10,6 +10,7 @@
73  # set at init time
74  dst_dir = None
75  node_prefix = None # dst_dir without DESTDIR prefix
76 +lib_dir = 'lib'
77  target_defaults = None
78  variables = None
79  
80 @@ -168,6 +169,7 @@
81      assert(0) # unhandled action type
82  
83  def files(action):
84 +  global lib_dir
85    action(['deps/uv/include/ares.h',
86            'deps/uv/include/ares_version.h',
87            'deps/uv/include/uv.h',
88 @@ -193,6 +195,7 @@
89            'include/node/uv-private/')
90    action(['doc/node.1'], 'share/man/man1/')
91    action(['out/Release/node'], 'bin/node')
92 +  action(['out/Release/lib.target/libnode.so.8.0.0'], lib_dir + '/libnode.so.8.0.0')
93  
94    # install unconditionally, checking if the platform supports dtrace doesn't
95    # work when cross-compiling and besides, there's at least one linux flavor
96 @@ -203,7 +206,7 @@
97    if 'true' == variables.get('node_install_npm'): npm_files(action)
98  
99  def run(args):
100 -  global dst_dir, node_prefix, target_defaults, variables
101 +  global dst_dir, node_prefix, target_defaults, variables, lib_dir
102  
103    # chdir to the project's top-level directory
104    os.chdir(abspath(os.path.dirname(__file__), '..'))
105 @@ -215,6 +218,7 @@
106    # argv[2] is a custom install prefix for packagers (think DESTDIR)
107    dst_dir = node_prefix = variables.get('node_prefix') or '/usr/local'
108    if len(args) > 2: dst_dir = abspath(args[2] + '/' + dst_dir)
109 +  if len(args) > 3: lib_dir = args[3]
110  
111    cmd = args[1] if len(args) > 1 else 'install'
112    if cmd == 'install': return files(install)
This page took 0.115353 seconds and 3 git commands to generate.