Ticket #38104: ninka.diff

File ninka.diff, 2.8 KB (added by ryandesign (Ryan Carsten Schmidt), 12 years ago)

proposed patch

  • files/patch-ninka_pl.diff

     
    1010-if ($path eq "") {
    1111-    $path = "./";
    1212-}
    13 +my $path = "%%PREFIX%%";
     13+my $path = "%%DATADIR%%";
    1414 
    1515 
    1616 my $force = exists $opts{f};
  • Portfile

     
    2222supported_archs     noarch
    2323checksums           rmd160  856573164bb105abf43a0c0140550447a3be3db0 \
    2424                    sha256  df6d4c7efe173fca70efe019deb21bf7b32a969a662cf6880c17aaba9a7144ce
     25
     26set datadir         ${prefix}/share/${name}
     27set docdir          ${prefix}/share/doc/${name}
     28
    2529patchfiles          patch-ninka_pl.diff
    2630post-patch {
    27     reinplace "s|%%PREFIX%%|${prefix}/share/${name}|" ${worksrcpath}/ninka.pl
     31    reinplace "s|%%DATADIR%%|${datadir}|" ${worksrcpath}/ninka.pl
    2832}
    2933
    3034use_configure       no
     
    3337    xinstall -m 755 ${worksrcpath}/ninka.pl ${destroot}${prefix}/bin/ninka
    3438    set directoriesToCopy [list comments extComments filter matcher senttok splitter]
    3539    foreach directory ${directoriesToCopy} {
    36         xinstall -d   -m 755 ${destroot}${prefix}/share/${name}/${directory}
    37         eval xinstall -m 644 [glob ${worksrcpath}/${directory}/*] ${destroot}${prefix}/share/${name}/${directory}
     40        xinstall -d   -m 755 ${destroot}${datadir}/${directory}
     41        eval xinstall -m 644 [glob ${worksrcpath}/${directory}/*] ${destroot}${datadir}/${directory}
    3842    }
    3943   
    40     foreach aFile [glob ${destroot}${prefix}/share/${name}/*/*.pl] {
     44    foreach aFile [glob ${destroot}${datadir}/*/*.pl] {
    4145        file attributes $aFile -permissions 0755
    4246    }
    4347
    44     xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
    45     xinstall    -m 644 ${worksrcpath}/README ${destroot}${prefix}/share/doc/${name}
     48    xinstall -d -m 755 ${destroot}${docdir}
     49    xinstall    -m 644 ${worksrcpath}/README ${destroot}${docdir}
    4650   
    47     move ${destroot}${prefix}/share/${name}/comments/README ${destroot}${prefix}/share/doc/${name}/README-comments
    48     move ${destroot}${prefix}/share/${name}/splitter/README ${destroot}${prefix}/share/doc/${name}/README-splitter
    49     file attributes ${destroot}${prefix}/share/doc/${name}/README-comments -permissions 644
    50     file attributes ${destroot}${prefix}/share/doc/${name}/README-splitter -permissions 644
     51    move ${destroot}${datadir}/comments/README ${destroot}${docdir}/README-comments
     52    move ${destroot}${datadir}/splitter/README ${destroot}${docdir}/README-splitter
     53    file attributes ${destroot}${docdir}/README-comments -permissions 644
     54    file attributes ${destroot}${docdir}/README-splitter -permissions 644
    5155}