# -*- 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

PortSystem          1.0

name                slearp
version             0.95
categories          textproc math
maintainers         nomaintainer

description         structured learning and predict toolkit for tasks such as \
	            g2p conversion, based on discriminative leaning

long_description    Slearp (structured learning and prediction) is the ${description}.

homepage            http://sourceforge.jp/projects/slearp/
platforms           darwin
license             GPL-3

distname            ${name}_${version}

master_sites        sourceforge_jp:slearp/60712/
checksums           rmd160  e15088a7336f137f588ea3062128ecfec950f69d \
                    sha256  f4849952e714861351e30d444602383f4d02b4be3f5b11566f00c11398d05990

patchfiles          patch-Makefile.diff

use_configure       no
variant universal   {}

build.target
build.args          CXX="${configure.cxx}" \
                    CXXFLAGS="${configure.cxxflags} [get_canonical_archflags cxx]"

destroot {
    xinstall -m 755 ${worksrcpath}/slearp ${destroot}${prefix}/bin
    set docdir ${prefix}/share/doc/${name}
    xinstall -d ${destroot}${docdir}
    xinstall -m 644 -W ${worksrcpath} \
        COPYING readme \
        ${destroot}${docdir}
    set exdir ${prefix}/share/examples/${name}
    xinstall -d ${destroot}${exdir}
    copy ${worksrcpath}/g2p_example ${destroot}${exdir}
}

livecheck.type      regex
livecheck.url       http://sourceforge.jp/projects/slearp/releases/
livecheck.regex     "${name}_(\\d+(?:\\.\\d+)*)${extract.suffix}"