source: trunk/dports/math/crfpp/Portfile @ 89973

Last change on this file since 89973 was 89973, checked in by hum@…, 8 years ago

crfpp: update to 0.55.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.1 KB
Line 
1# -*- 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
2# $Id: Portfile 89973 2012-02-18 05:48:02Z hum@macports.org $
3
4PortSystem          1.0
5
6name                crfpp
7version             0.55
8categories          math textproc
9platforms           darwin
10maintainers         hum openmaintainer
11license             LGPL-3+ BSD
12
13description         Yet Another CRF toolkit
14
15long_description    CRF++ is a simple, customizable, and open source implementation \
16                    of Conditional Random Fields (CRFs) for segmenting/labeling \
17                    sequential data. \
18                    CRF++ is designed for generic purpose and will be applied to \
19                    a variety of NLP tasks, such as Named Entity Recognition, \
20                    Information Extraction and Text Chunking.
21
22homepage            http://code.google.com/p/crfpp/
23master_sites        googlecode:crfpp
24distname            CRF++-${version}
25checksums           rmd160  238859d6f474582781c06ae2e4a1a1638dd56b60 \
26                    sha256  93282ce93d7541eb073d2f7fd18f75e9e2dcb212357467037890545daa5216a9
27
28depends_build       port:nkf
29
30patchfiles          patch-configure.diff
31
32post-destroot {
33    set sharedir ${prefix}/share/${name}
34    xinstall -d ${destroot}${sharedir}
35    xinstall -m 644 -W ${worksrcpath} \
36        AUTHORS COPYING ChangeLog NEWS README ${destroot}${sharedir}
37    foreach dir {doc example sdk} {
38        copy $dir ${destroot}${sharedir}
39    }
40    # fix file pathes in exec.sh
41    set modeldir /tmp
42    foreach ex {JapaneseNE basenp chunking seg} {
43        set dir ${sharedir}/example/${ex}
44        reinplace "s|\\.\\./\\.\\./|${prefix}/bin/|g"     ${destroot}${dir}/exec.sh
45        foreach file {template train.data test.data} {
46            reinplace "s| ${file}| ${dir}/${file}|g"      ${destroot}${dir}/exec.sh
47        }
48        reinplace "s| model| ${modeldir}/${name}.model|g" ${destroot}${dir}/exec.sh
49    }
50    # convert to UTF-8
51    foreach file {train.data test.data} {
52        set subdir example/JapaneseNE/${file}
53        system "nkf -w ${worksrcpath}/${subdir} > ${destroot}${sharedir}/${subdir}"
54    }
55}
56
57livecheck.regex     CRF\\+\\+-(\[0-9.\]+)\\.
Note: See TracBrowser for help on using the repository browser.