[packages/npm] do not depend on cmd-shim. it's windows only

glen glen at pld-linux.org
Thu Apr 4 21:41:22 CEST 2013


commit e0a4f2fdf7794475623df64becc9177e2101739e
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Thu Apr 4 22:41:00 2013 +0300

    do not depend on cmd-shim. it's windows only

 cmd-shim-optional.patch | 23 +++++++++++++++++++++++
 npm.spec                |  4 ++--
 2 files changed, 25 insertions(+), 2 deletions(-)
---
diff --git a/npm.spec b/npm.spec
index 654a216..ba090e6 100644
--- a/npm.spec
+++ b/npm.spec
@@ -13,6 +13,7 @@ URL:		http://npmjs.org/
 Source0:	http://registry.npmjs.org/npm/-/%{name}-%{version}.tgz
 # Source0-md5:	5df04ae977e5e2df2508936ede49c4e2
 Patch0:		link-globalPaths.patch
+Patch1:		cmd-shim-optional.patch
 BuildRequires:	bash
 BuildRequires:	nodejs >= 0.9
 BuildRequires:	rpmbuild(macros) >= 1.634
@@ -26,8 +27,6 @@ Requires:	nodejs-archy < 1.0.0
 Requires:	nodejs-block-stream
 Requires:	nodejs-chmodr >= 0.1.0
 Requires:	nodejs-chmodr < 0.2.0
-Requires:	nodejs-cmd-shim >= 1.1.0
-Requires:	nodejs-cmd-shim < 1.2.0
 Requires:	nodejs-chownr < 1.0.0
 Requires:	nodejs-devel
 Requires:	nodejs-fstream >= 0.1.22
@@ -113,6 +112,7 @@ bashowe uzupełnianie nazw dla %{name}.
 %setup -qc
 mv package/* .
 %patch0 -p1
+%patch1 -p1
 
 # fix shebangs
 %{__sed} -i -e '1s,^#!.*node,#!/usr/bin/node,' \
diff --git a/cmd-shim-optional.patch b/cmd-shim-optional.patch
new file mode 100644
index 0000000..4a6a9ff
--- /dev/null
+++ b/cmd-shim-optional.patch
@@ -0,0 +1,23 @@
+--- npm-1.2.17/lib/build.js~	2013-04-03 19:11:45.000000000 +0300
++++ npm-1.2.17/lib/build.js	2013-04-04 22:37:51.277211534 +0300
+@@ -16,7 +16,7 @@
+   , readJson = require("read-package-json")
+   , link = require("./utils/link.js")
+   , linkIfExists = link.ifExists
+-  , cmdShim = require("cmd-shim")
++  , cmdShim = (process.platform === "win32") ? require("cmd-shim") : {}
+   , cmdShimIfExists = cmdShim.ifExists
+   , asyncMap = require("slide").asyncMap
+ 
+--- npm-1.2.17/package.json~	2013-04-03 20:03:47.000000000 +0300
++++ npm-1.2.17/package.json	2013-04-04 22:40:22.977560473 +0300
+@@ -69,8 +69,7 @@
+     "once": "~1.1.1",
+     "npmconf": "0",
+     "opener": "~1.3.0",
+-    "chmodr": "~0.1.0",
+-    "cmd-shim": "~1.1.0"
++    "chmodr": "~0.1.0"
+   },
+   "bundleDependencies": [
+     "semver",
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/npm.git/commitdiff/e0a4f2fdf7794475623df64becc9177e2101739e



More information about the pld-cvs-commit mailing list