# -*- 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                rnnlm
version             0.4b
categories          textproc
maintainers         nomaintainer

description         Recurrent Neural Network Language Modeling Toolkit

long_description    Neural network based language models are nowdays among the \
                    most successful techniques for statistical language modeling. \
                    They can be easily applied in wide range of tasks, including \
                    automatic speech recognition and machine translation, and \
                    provide significant improvements over classic backoff n-gram \
                    models.

homepage            http://rnnlm.org
platforms           darwin
license             Permissive

master_sites        https://googledrive.com/host/0ByxdPXuxLPS5RFM5dVNvWVhTd0U/
extract.suffix      .tgz
checksums           rmd160  09c895f331593c7fb4bcae6970e1e6c799782854 \
                    sha256  bade7d3ca453c9edd171d72cefb8019d0c4ed365fa5c660629ff4cd08932cc23

patchfiles          patch-rnnlmlib.cpp.diff

use_configure       no
variant universal   {}

configure.optflags  -O2

use_parallel_build  no
build.args          CC="${configure.cxx}" \
                    CFLAGS="${configure.cxxflags} [get_canonical_archflags cxx] -D WEIGHTTYPE=float -lm -Wall -funroll-loops -ffast-math"

destroot {
    xinstall -m 755 -W ${worksrcpath} \
        rnnlm \
        ${destroot}${prefix}/bin
    set docdir ${prefix}/share/doc/${name}
    xinstall -d ${destroot}${docdir}
    xinstall -m 644 -W ${worksrcpath} \
        CHANGE-Cantab.log CHANGE.log COPYRIGHT.txt FAQ.txt \
        ${destroot}${docdir}
}

livecheck.type      regex
livecheck.url       [lindex ${master_sites} 0]
livecheck.regex     "${name}-(\\d+(?:\\.\\d+)*\\w*)${extract.suffix}"
