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

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

crfpp: correct escape notation in regex of reinplace.

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