Changeset 112687


Ignore:
Timestamp:
Oct 29, 2013, 2:14:05 PM (6 years ago)
Author:
hum@…
Message:

crfsuite: update to 0.12.2; install doc and examples according to the standard file hierarchy; install bench scripts.

Location:
trunk/dports/math/crfsuite
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/math/crfsuite/Portfile

    r97084 r112687  
    55PortGroup           github 1.0
    66
    7 github.setup        chokkan crfsuite 0.12
     7github.setup        chokkan crfsuite 961809adc379148892022276fc9367dfcb2b680f
     8version             0.12.2
    89categories          math textproc
    910maintainers         hum openmaintainer
     
    1718license             BSD
    1819
    19 checksums           rmd160  f202eeb0fcf29b3e0b0c49d84b111c3bf2b764aa \
    20                     sha256  7ac996883f3f925c8bf233a5d7c1462034f68df728775c8dc781faeaf7cd00ff
     20checksums           rmd160  ba5e127e3d8e5d1bb2a344e7e96259bb328f9bb7 \
     21                    sha256  8931f215e6f9b230cc2dc440fcd890c37afa3b1df3e8da512c7e74cafba8f0c5
    2122
    2223depends_build       port:libtool  \
     
    2627
    2728patchfiles          patch-autogen.sh.diff \
    28                     patch-configure.in.diff
     29                    patch-configure.in.diff \
     30                    patch-bench.diff
    2931
    3032pre-configure {
     
    3335
    3436configure.args      --with-liblbfgs=${prefix}
     37
     38post-destroot {
     39    # install additional documents.
     40    set dest_doc ${destroot}${prefix}/share/doc/${name}
     41    xinstall -d ${dest_doc}
     42    xinstall -m 644 -W ${worksrcpath} \
     43        AUTHORS COPYING ChangeLog README \
     44        ${dest_doc}
     45    # install example scripts.
     46    xinstall -d ${destroot}${prefix}/share/examples
     47    set ex                 ${prefix}/share/examples/${name}
     48    copy ${worksrcpath}/example ${destroot}/${ex}
     49    # install benchmark scripts.
     50    set bench ${ex}/bench
     51    copy ${worksrcpath}/bench ${destroot}/${bench}
     52    foreach py {bench_crfpp.py bench_crfsgd.py bench_crfsuite.py bench_wapiti.py collect.py} {
     53        reinplace "s|@PREFIX@|${prefix}|g" ${destroot}/${bench}/${py}
     54        reinplace "s|@BENCH@|${bench}|g"   ${destroot}/${bench}/${py}
     55    }
     56    reinplace "s|@TEMPLATE_CRFPP@|${prefix}/share/examples/crfpp/chunking/template|g" \
     57        ${destroot}/${bench}/bench_crfpp.py
     58    reinplace "s|@TEMPLATE_CRFPP@|${prefix}/share/examples/sgd/crf/template|g" \
     59        ${destroot}/${bench}/bench_crfsgd.py
     60    reinplace "s|@TEMPLATE_WAPITI@|${prefix}/share/examples/wapiti/chpattern.txt|g" \
     61        ${destroot}/${bench}/bench_wapiti.py
     62}
     63
     64# Note:
     65# To run benchmark scripts in ${prefix}/share/examples/${name}/bench,
     66# please install the following ports: wapiti, sgd, crfpp, mallet.
Note: See TracChangeset for help on using the changeset viewer.