Revision: 107403 https://trac.macports.org/changeset/107403 Author: ciserlohn@macports.org Date: 2013-06-27 00:30:06 -0700 (Thu, 27 Jun 2013) Log Message: ----------- npm: update to version 1.3.0; fix patch which prevents npm to update itself Modified Paths: -------------- trunk/dports/devel/npm/Portfile trunk/dports/devel/npm/files/patch-lib-update.js.diff Removed Paths: ------------- trunk/dports/devel/npm/files/patch-lib-update.js Modified: trunk/dports/devel/npm/Portfile =================================================================== --- trunk/dports/devel/npm/Portfile 2013-06-27 07:25:51 UTC (rev 107402) +++ trunk/dports/devel/npm/Portfile 2013-06-27 07:30:06 UTC (rev 107403) @@ -4,7 +4,7 @@ PortSystem 1.0 name npm -version 1.2.32 +version 1.3.0 categories devel platforms darwin @@ -24,8 +24,8 @@ extract.suffix .tgz -checksums rmd160 b3ff1a001a5ae601939ed7fca3af2be4627e1316 \ - sha256 cb50951626e79a110f37a359da4174b8a71d5ef26a68ebbd7956ff63494513a6 +checksums rmd160 3f18ee6fa9dc91d55939b8b3e43571e1c283044d \ + sha256 17deee7f6c6a73408b83e4e42de27daa09d71f1eb170d794f53c360955ab10cf worksrcdir "package" @@ -36,7 +36,7 @@ patchfiles patch-lib-update.js.diff post-patch { - regsub -all {/} "^${prefix}/(bin/npm\\|lib/node_modules/npm)+" {\\\/} npm_path_jsregex + regsub -all {/} "^${prefix}/lib" {\\\/} npm_path_jsregex reinplace "s|@@NPM_PATH_JSREGEX@@|${npm_path_jsregex}|g" ${worksrcpath}/lib/update.js foreach f [concat ${worksrcpath}/cli.js \ Deleted: trunk/dports/devel/npm/files/patch-lib-update.js =================================================================== --- trunk/dports/devel/npm/files/patch-lib-update.js 2013-06-27 07:25:51 UTC (rev 107402) +++ trunk/dports/devel/npm/files/patch-lib-update.js 2013-06-27 07:30:06 UTC (rev 107403) @@ -1,17 +0,0 @@ ---- lib/update.js.orig 2011-09-11 13:03:12.000000000 +0200 -+++ lib/update.js 2011-09-11 13:09:44.000000000 +0200 -@@ -27,6 +27,14 @@ - , dep = ww[1] - , want = ww[3] - , what = dep + "@" + want -+ -+ if (where.match(/@@NPM_PATH_JSREGEX@@/)) { -+ log.error("Trying to update '" + what + "' in '" + where + "'") -+ log.error("which is part of the MacPorts npm base installation.") -+ log.error("To update npm please run:") -+ log.error("sudo port selfupdate && sudo port upgrade npm\n") -+ return cb() -+ } - - npm.commands.install(where, what, cb) - }, cb) Modified: trunk/dports/devel/npm/files/patch-lib-update.js.diff =================================================================== --- trunk/dports/devel/npm/files/patch-lib-update.js.diff 2013-06-27 07:25:51 UTC (rev 107402) +++ trunk/dports/devel/npm/files/patch-lib-update.js.diff 2013-06-27 07:30:06 UTC (rev 107403) @@ -4,7 +4,7 @@ , req = ww[4] , url = require('url') -+ if (where.match(/@@NPM_PATH_JSREGEX@@/)) { ++ if (what.match(/^npm@/) && where.match(/@@NPM_PATH_JSREGEX@@/)) { + log.error("Trying to update '" + what + "' in '" + where + "'") + log.error("which is part of the MacPorts npm base installation.") + log.error("To update npm please run:")