LogoopenSUSE Build Service > Projects
Sign Up | Log In

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

Index: lib/module.js
===================================================================
--- lib/module.js.orig
+++ lib/module.js
@@ -493,7 +493,7 @@ Module.runMain = function() {
 };
 
 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'));
Index: tools/install.py
===================================================================
--- tools/install.py.orig
+++ tools/install.py
@@ -92,7 +92,7 @@ def waf_files(action):
           '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',
@@ -126,7 +126,7 @@ def waf_files(action):
           '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)
@@ -135,7 +135,7 @@ def update_shebang(path, shebang):
   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
@@ -153,7 +153,7 @@ def npm_files(action):
   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
@@ -197,7 +197,7 @@ def files(action):
   # 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 'true' == variables.get('node_install_waf'): waf_files(action)
   if 'true' == variables.get('node_install_npm'): npm_files(action)