LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File nodejs-lib64path.patch of Package nodejs (Project devel:languages:nodejs)

diff -urN node-v0.8.18/lib/module.js node-v0.8.18-patch/lib/module.js
--- node-v0.8.18/lib/module.js	2013-01-18 22:15:41.000000000 +0200
+++ node-v0.8.18-patch/lib/module.js	2013-01-25 08:26:59.000000000 +0200
@@ -493,7 +493,7 @@
 };
 
 Module._initPaths = function() {
-  var paths = [path.resolve(process.execPath, '..', '..', 'lib', 'node')];
+  var paths = ["/usr/lib/node", "/usr/lib64/node"];
 
   if (process.env['HOME']) {
     paths.unshift(path.resolve(process.env['HOME'], '.node_libraries'));
diff -urN node-v0.8.18/tools/install.py node-v0.8.18-patch/tools/install.py
--- node-v0.8.18/tools/install.py	2013-01-18 22:15:41.000000000 +0200
+++ node-v0.8.18-patch/tools/install.py	2013-01-25 08:26:59.000000000 +0200
@@ -97,7 +97,7 @@
           'tools/wafadmin/TaskGen.py',
           'tools/wafadmin/Task.py',
           'tools/wafadmin/Utils.py'],
-          'lib/node/wafadmin/')
+          'lib64/node/wafadmin/')
   action(['tools/wafadmin/Tools/ar.py',
           'tools/wafadmin/Tools/cc.py',
           'tools/wafadmin/Tools/ccroot.py',
@@ -131,7 +131,7 @@
           'tools/wafadmin/Tools/winres.py',
           'tools/wafadmin/Tools/xlc.py',
           'tools/wafadmin/Tools/xlcxx.py'],
-          'lib/node/wafadmin/Tools/')
+          'lib64/node/wafadmin/Tools/')
 
 def update_shebang(path, shebang):
   print 'updating shebang of %s to %s' % (path, shebang)
@@ -140,7 +140,7 @@
   open(path, 'w').write(s)
 
 def npm_files(action):
-  target_path = 'lib/node_modules/npm/'
+  target_path = 'lib64/node_modules/npm/'
 
   # don't install npm if the target path is a symlink, it probably means
   # that a dev version of npm is installed there
@@ -158,7 +158,7 @@
   if action == uninstall:
     action([link_path], 'bin/npm')
   elif action == install:
-    try_symlink('../lib/node_modules/npm/bin/npm-cli.js', link_path)
+    try_symlink('../lib64/node_modules/npm/bin/npm-cli.js', link_path)
     if os.environ.get('PORTABLE'):
       # This crazy hack is necessary to make the shebang execute the copy
       # of node relative to the same directory as the npm script. The precompiled
@@ -201,7 +201,7 @@
   # install unconditionally, checking if the platform supports dtrace doesn't
   # work when cross-compiling and besides, there's at least one linux flavor
   # with dtrace support now (oracle's "unbreakable" linux)
-  action(['src/node.d'], 'lib/dtrace/')
+  action(['src/node.d'], 'lib64/dtrace/')
 
   if 'freebsd' in sys.platform or 'openbsd' in sys.platform:
     action(['doc/node.1'], 'man/man1/')