File nodejs-lib64path.patch of Package nodejs

Index: node-v0.10.29/lib/module.js
===================================================================
--- node-v0.10.29.orig/lib/module.js
+++ node-v0.10.29/lib/module.js
@@ -508,7 +508,7 @@ Module._initPaths = function() {
     var homeDir = process.env.HOME;
   }
 
-  var paths = [path.resolve(process.execPath, '..', '..', 'lib', 'node')];
+  var paths = ["/usr/lib/node", "/usr/lib64/node"];
 
   if (homeDir) {
     paths.unshift(path.resolve(homeDir, '.node_libraries'));
Index: node-v0.10.29/tools/install.py
===================================================================
--- node-v0.10.29.orig/tools/install.py
+++ node-v0.10.29/tools/install.py
@@ -86,7 +86,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
@@ -104,7 +104,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
@@ -130,7 +130,7 @@ def files(action):
   action(['out/Release/node'], 'bin/node')
 
   if 'true' == variables.get('node_use_dtrace'):
-    action(['out/Release/node.d'], 'lib/dtrace/node.d')
+    action(['out/Release/node.d'], 'lib64/dtrace/node.d')
 
   if 'freebsd' in sys.platform or 'openbsd' in sys.platform:
     action(['doc/node.1'], 'man/man1/')
openSUSE Build Service is sponsored by