PortSystem          1.0

name                sphinxtrain
version             1.0.8
description         Acoustic model training tools for Sphinx
long_description    \
    This is SphinxTrain, Carnegie Mellon University's open source acoustic \
    model trainer.
maintainers         nomaintainer
categories          audio
license             Permissive
platforms           darwin freebsd
homepage            http://cmusphinx.sourceforge.net/
master_sites        sourceforge:project/cmusphinx/sphinxtrain/${version}/
depends_build       port:pkgconfig
depends_lib         port:sphinxbase bin:perl:perl5 port:python27

checksums           rmd160  1238b9dcc296dc0cab3fc4d0d7c55649b6917b74 \
                    sha256  548e3e513ceaa1b2fd6fd7ed1724349e0a4bf7bdeb11be9c91787e6f2b865203

set python.branch       2.7
set python.prefix       ${frameworks_dir}/Python.framework/Versions/${python.branch}
set python.bin  ${python.prefix}/bin/python${python.branch}
set python.lib  ${python.prefix}/Python
set python.libdir ${python.prefix}/lib/python${python.branch}
set python.pkgd ${python.prefix}/lib/python${python.branch}/site-packages
set python.include      ${python.prefix}/include/python${python.branch}

post-destroot {
    system "cd ${worksrcpath}/python && ${python.bin} setup.py --no-user-cfg install --prefix=${python.prefix} --root=${destroot}"
}

livecheck.type  regex
livecheck.url   https://sourceforge.net/projects/cmusphinx/files/sphinxtrain/
livecheck.regex "/${name}/(\[0-9.\]+)/\""
