[84119] trunk/dports/devel/npm

ciserlohn at macports.org ciserlohn at macports.org
Sun Sep 18 05:55:49 PDT 2011


Revision: 84119
          http://trac.macports.org/changeset/84119
Author:   ciserlohn at macports.org
Date:     2011-09-18 05:55:44 -0700 (Sun, 18 Sep 2011)
Log Message:
-----------
npm: update to version 1.0.30; build manpages (pre-built manpages have been removed upstream)

Modified Paths:
--------------
    trunk/dports/devel/npm/Portfile

Added Paths:
-----------
    trunk/dports/devel/npm/files/patch-scripts-doc-build.sh

Modified: trunk/dports/devel/npm/Portfile
===================================================================
--- trunk/dports/devel/npm/Portfile	2011-09-17 21:22:44 UTC (rev 84118)
+++ trunk/dports/devel/npm/Portfile	2011-09-18 12:55:44 UTC (rev 84119)
@@ -4,7 +4,7 @@
 PortSystem          1.0
 
 name                npm
-version             1.0.28
+version             1.0.30
 categories          devel
 platforms           darwin
 license             MIT
@@ -27,7 +27,8 @@
 
 use_configure       no
 
-patchfiles          patch-lib-update.js
+patchfiles          patch-lib-update.js \
+                    patch-scripts-doc-build.sh
 
 post-fetch {
     system "cd ${worksrcpath} && git submodule update --init --recursive"
@@ -36,19 +37,25 @@
 post-patch {
     regsub -all {/} "^${prefix}/(bin/npm\\|lib/node_modules/npm)+" {\\\/} npm_path_jsregex
     reinplace "s|@@NPM_PATH_JSREGEX@@|${npm_path_jsregex}|g" ${worksrcpath}/lib/update.js
+    reinplace "s|@@_VERSION_@@|${version}|g" ${worksrcpath}/scripts/doc-build.sh
 }
 
-build {}
+build.asroot        yes
+build.target        doc
 
 destroot {
-    system "cd ${destroot}${prefix}/lib && node ${worksrcpath}/cli.js install ${worksrcpath}"
 
     ln -s ${prefix}/lib/node_modules/.bin/npm ${destroot}${prefix}/bin
     ln -s ${prefix}/lib/node_modules/.bin/npm_g ${destroot}${prefix}/bin
     ln -s ${prefix}/lib/node_modules/.bin/npm-g ${destroot}${prefix}/bin
+    system "cd ${destroot}${prefix}/lib && node ${worksrcpath}/cli.js install ${worksrcpath}"
 
     foreach f [glob -tails -directory ${worksrcpath}/man1 *] {
-        copy ${worksrcpath}/man1/$f ${destroot}${prefix}/share/man/man1/npm-$f
+        if [string equal $f npm.1] {
+            copy ${worksrcpath}/man1/$f ${destroot}${prefix}/share/man/man1/$f
+        } else {
+            copy ${worksrcpath}/man1/$f ${destroot}${prefix}/share/man/man1/npm-$f
+        }
     }    
 }
 

Added: trunk/dports/devel/npm/files/patch-scripts-doc-build.sh
===================================================================
--- trunk/dports/devel/npm/files/patch-scripts-doc-build.sh	                        (rev 0)
+++ trunk/dports/devel/npm/files/patch-scripts-doc-build.sh	2011-09-18 12:55:44 UTC (rev 84119)
@@ -0,0 +1,11 @@
+--- scripts/doc-build.sh.orig	2011-09-17 23:00:44.000000000 +0200
++++ scripts/doc-build.sh	2011-09-17 23:01:06.000000000 +0200
+@@ -12,7 +12,7 @@
+ dest=$2
+ name=$(basename ${src%.*})
+ date=$(date -u +'%Y-%M-%d %H:%m:%S')
+-version=$(npm -v)
++version=@@_VERSION_@@
+ 
+ mkdir -p $(dirname $dest)
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110918/440c74b3/attachment.html>


More information about the macports-changes mailing list