# -*- 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
PortGroup       cmake 1.0

name            emergent
version         5.3.7
revision        4
svn.revision    5394
categories      science
platforms       darwin
maintainers     nomaintainer
license         GPL-2+

description     Neural network simulator

long_description \
    emergent is a comprehensive simulation environment for creating complex, \
    sophisticated models of the brain and cognitive processes using neural \
    network models. It includes a full GUI environment for constructing \
    networks and the input/output patterns for the networks to process, and \
    many different analysis tools for understanding what the networks are \
    doing.

homepage        http://grey.colorado.edu/emergent
fetch.type      svn
worksrcdir      ${version}
svn.url         http://grey.colorado.edu/svn/emergent/emergent/tags/${version}
svn.args        --username anonymous --password emergent
svn.method      checkout

depends_lib     port:readline port:Quarter port:gsl port:ode

build.dir       ${worksrcpath}/build

post-extract {
    file mkdir ${build.dir}
}

configure.dir       ${build.dir}
configure.args-append ..

# Needs to match how the ode port was built.
configure.cxxflags-append -DdDOUBLE

use_parallel_build  yes

livecheck.type      regex
livecheck.url       ftp://grey.colorado.edu/pub/emergent/
livecheck.regex     ${name}-(\[0-9.\]+)-
