# $Id: Portfile 99980 2012-11-23 20:38:02Z jmr@macports.org $

PortSystem          1.0

name                sphinxbase
version             0.7
description         Support library for CMU Sphinx
long_description \
    The CMU Sphinx toolkit is a group of speech recognition systems developed \
    at Carnegie Mellon University. This package is a support library that \
    is used by several elements of CMU Sphinx.

maintainers         nomaintainer
categories          audio
license             BSD MIT
platforms           darwin freebsd
homepage            http://cmusphinx.sourceforge.net/
master_sites        sourceforge:cmusphinx
checksums           rmd160 6f75698e95fc4e772f44d6eda76af24f5edcdf7d \
                    sha256 389cb99a545f7d615a2b3bc3f7362a490ca45fc4dc440140ae1d2a41f87773ec

depends_build       bin:doxygen:doxygen
depends_lib         port:python26

set python.branch   2.6
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}

patchfiles          Makefile.in.diff
pre-destroot {
    reinplace "s|@@PY_PREFIX@@|${python.prefix}|" ${worksrcpath}/python/Makefile
}
post-destroot {
    xinstall -d -m 755 ${destroot}${prefix}/share/doc/
    file copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/${name}
}

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