LogoopenSUSE Build Service > Projects
Sign Up | Log In

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

Index: node-v0.10.4/lib/module.js
===================================================================
--- node-v0.10.4.orig/lib/module.js
+++ node-v0.10.4/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.4/tools/install.py
===================================================================
--- node-v0.10.4.orig/tools/install.py
+++ node-v0.10.4/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
@@ -124,7 +124,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 'freebsd' in sys.platform or 'openbsd' in sys.platform:
     action(['doc/node.1'], 'man/man1/')