Ticket #32456: npm.destroot.diff

File npm.destroot.diff, 1.6 KB (added by ryandesign (Ryan Carsten Schmidt), 13 years ago)

patch for testing

  • Portfile

     
    55
    66name                npm
    77version             1.0.106
    8 revision            1
     8revision            2
    99categories          devel
    1010platforms           darwin
    1111license             MIT
     
    4747
    4848build {}
    4949
    50 destroot {
     50destroot.cmd        ${prefix}/bin/node ./cli.js
     51destroot.args       --global .
     52destroot.destdir    --prefix=${destroot}${prefix}
    5153
    52     ln -s ${prefix}/lib/node_modules/.bin/npm ${destroot}${prefix}/bin
    53     ln -s ${prefix}/lib/node_modules/.bin/npm_g ${destroot}${prefix}/bin
    54     ln -s ${prefix}/lib/node_modules/.bin/npm-g ${destroot}${prefix}/bin
    55     system -W ${destroot}${prefix}/lib "${prefix}/bin/node ${worksrcpath}/cli.js install ${worksrcpath}"
    56 
    57     foreach f [glob -tails -directory ${worksrcpath}/man/man1 *] {
    58         if [string equal $f npm.1] {
    59             copy ${worksrcpath}/man/man1/$f ${destroot}${prefix}/share/man/man1/$f
    60         } else {
    61             copy ${worksrcpath}/man/man1/$f ${destroot}${prefix}/share/man/man1/npm-$f
    62         }
    63     }
    64    
    65     foreach f [glob -tails -directory ${worksrcpath}/man/man3 *] {
    66         if [string equal $f npm.3] {
    67             copy ${worksrcpath}/man/man3/$f ${destroot}${prefix}/share/man/man3/$f
    68         } else {
    69             copy ${worksrcpath}/man/man3/$f ${destroot}${prefix}/share/man/man3/npm-$f
    70         }
    71     }   
    72 }
    73 
    7454notes "
    7555It is not recommended to install packages globally. But if you do so\
    7656please be aware that they won't get cleaned up when you deactivate\