[141913] trunk/dports/devel

ciserlohn at macports.org ciserlohn at macports.org
Sat Dec 12 03:32:23 PST 2015


Revision: 141913
          https://trac.macports.org/changeset/141913
Author:   ciserlohn at macports.org
Date:     2015-10-30 16:57:16 -0700 (Fri, 30 Oct 2015)
Log Message:
-----------
npm-devel: new port; version 3.3.9

Modified Paths:
--------------
    trunk/dports/devel/npm/Portfile
    trunk/dports/devel/npm-devel/files/patch-lib-update.js.diff

Added Paths:
-----------
    trunk/dports/devel/npm-devel/
    trunk/dports/devel/npm-devel/Portfile
    trunk/dports/devel/npm-devel/files/

Modified: trunk/dports/devel/npm/Portfile
===================================================================
--- trunk/dports/devel/npm/Portfile	2015-10-30 23:38:40 UTC (rev 141912)
+++ trunk/dports/devel/npm/Portfile	2015-10-30 23:57:16 UTC (rev 141913)
@@ -18,6 +18,8 @@
                     You can use it to install and publish your node programs. \
 		            It manages dependencies and does other cool stuff.
 
+conflicts           npm
+
 homepage            http://www.npmjs.org/
 
 master_sites        http://registry.npmjs.org/npm/-/

Copied: trunk/dports/devel/npm-devel/Portfile (from rev 141896, trunk/dports/devel/npm/Portfile)
===================================================================
--- trunk/dports/devel/npm-devel/Portfile	                        (rev 0)
+++ trunk/dports/devel/npm-devel/Portfile	2015-10-30 23:57:16 UTC (rev 141913)
@@ -0,0 +1,105 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem          1.0
+
+name                npm-devel
+version             3.3.9
+
+categories          devel
+platforms           darwin
+license             MIT
+maintainers         ciserlohn
+
+supported_archs     noarch
+
+description         node package manager
+long_description    npm is a package manager for node. \
+                    You can use it to install and publish your node programs. \
+		            It manages dependencies and does other cool stuff.
+
+conflicts           npm
+
+homepage            http://www.npmjs.org/
+
+master_sites        http://registry.npmjs.org/npm/-/
+
+extract.suffix      .tgz
+
+checksums           rmd160  e4b47f0dfac1286f052ba863afd6e3c66f1e6fba \
+                    sha256  b406bfc670045c2b92432aff419fe22ff28fd439bb0ef4faa14fd6f16bda0c22
+
+distname            npm-${version}
+
+worksrcdir          "package"
+
+depends_lib         path:bin/node:nodejs
+
+use_configure       no
+
+patchfiles          patch-lib-update.js.diff
+
+post-patch {
+    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 \
+                   ${worksrcpath}/bin/npm-cli.js \
+                   ${worksrcpath}/node_modules/cmd-shim/test/00-setup.js \
+                   ${worksrcpath}/node_modules/mkdirp/bin/cmd.js \
+                   ${worksrcpath}/node_modules/node-gyp/bin/node-gyp.js \
+                   ${worksrcpath}/node_modules/node-gyp/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js \
+                   ${worksrcpath}/node_modules/nopt/bin/nopt.js \
+                   ${worksrcpath}/node_modules/nopt/examples/my-program.js \
+                   ${worksrcpath}/node_modules/npmlog/node_modules/ansi/examples/beep/index.js \
+                   ${worksrcpath}/node_modules/npmlog/node_modules/ansi/examples/clear/index.js \
+                   ${worksrcpath}/node_modules/npmlog/node_modules/ansi/examples/cursorPosition.js \
+                   ${worksrcpath}/node_modules/npmlog/node_modules/ansi/examples/progress/index.js \
+                   ${worksrcpath}/node_modules/opener/opener.js \
+                   ${worksrcpath}/node_modules/read-cmd-shim/test/integration.js \
+                   ${worksrcpath}/node_modules/request/node_modules/bl/test/sauce.js \
+                   ${worksrcpath}/node_modules/request/node_modules/har-validator/bin/har-validator \
+                   ${worksrcpath}/node_modules/request/node_modules/har-validator/node_modules/commander/Readme.md \
+                   ${worksrcpath}/node_modules/request/node_modules/node-uuid/bin/uuid \
+                   ${worksrcpath}/node_modules/rimraf/bin.js \
+                   ${worksrcpath}/node_modules/semver/bin/semver \
+                   ${worksrcpath}/node_modules/which/bin/which \
+                   ${worksrcpath}/scripts/index-build.js \
+                   ${worksrcpath}/scripts/relocate.sh \
+                   ${worksrcpath}/test/disabled/package-config/test.js \
+                   ${worksrcpath}/test/packages/npm-test-array-bin/bin/array-bin \
+                   ${worksrcpath}/test/packages/npm-test-dir-bin/bin/dir-bin \
+                   ${worksrcpath}/test/tap/config-edit.js \
+                   ${worksrcpath}/test/tap/gently-rm-cmdshims.js \
+                   ${worksrcpath}/test/tap/install-link-scripts.js \
+                   ${worksrcpath}/test/tap/scripts-whitespace-windows.js] {
+        reinplace "s|/usr/bin/env node|${prefix}/bin/node|" ${f}
+    }
+}
+
+build {}
+
+destroot.cmd        ${prefix}/bin/node ./cli.js
+destroot.args       --global .
+destroot.destdir    --prefix=${destroot}${prefix}
+
+post-destroot {
+    set completions_path ${destroot}${prefix}/share/bash-completion/completions/
+    xinstall -d ${completions_path}
+    xinstall -m 644 ${worksrcpath}/lib/utils/completion.sh ${completions_path}/npm
+}
+
+variant bash_completion {
+    depends_run-append path:etc/bash_completion:bash-completion
+}
+
+notes "
+It is not recommended to install packages globally. But if you do so\
+please be aware that they won't get cleaned up when you deactivate\
+or uninstall ${name}. Globally installed packages will remain in\
+${prefix}/lib/node_modules/ until you manually delete them.
+" 
+
+livecheck.type      regex
+livecheck.url       http://registry.npmjs.org/npm
+livecheck.regex     {"latest":"(.*?)"}

Modified: trunk/dports/devel/npm-devel/files/patch-lib-update.js.diff
===================================================================
--- trunk/dports/devel/npm/files/patch-lib-update.js.diff	2015-10-30 11:17:14 UTC (rev 141866)
+++ trunk/dports/devel/npm-devel/files/patch-lib-update.js.diff	2015-10-30 23:57:16 UTC (rev 141913)
@@ -1,8 +1,8 @@
---- lib/update.js.orig	2013-06-21 13:44:01.000000000 +0200
-+++ lib/update.js	2013-06-26 21:18:40.000000000 +0200
-@@ -35,6 +35,14 @@
-         , req = ww[4]
-         , url = require('url')
+--- lib/update.js.orig	2015-09-11 02:47:10.000000000 +0200
++++ lib/update.js	2015-10-31 00:33:55.000000000 +0100
+@@ -46,6 +46,14 @@
+       // use the initial installation method (repo, tar, git) for updating
+       if (url.parse(ww.req).protocol) ww.what = ww.req
  
 +      if (what.match(/^npm@/) && where.match(/@@NPM_PATH_JSREGEX@@/)) {
 +        log.error("Trying to update '" + what + "' in '" + where + "'")
@@ -12,6 +12,6 @@
 +        return cb()
 +      }
 +
-       // use the initial installation method (repo, tar, git) for updating
-       if (url.parse(req).protocol) what = req
-       npm.commands.install(where, what, cb)
+       var where = ww.dep.parent && ww.dep.parent.path || ww.dep.path
+       if (toInstall[where]) {
+         toInstall[where].push(ww.what)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20151212/29e8b62d/attachment.html>


More information about the macports-changes mailing list