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

if {${os.platform} eq "darwin" && ${os.major} > 11} {
    wxWidgets.use   wxWidgets-3.0
} else {
    wxWidgets.use   wxGTK-3.0
}

name                gmtk
version             1.4.3
revision            17
categories          science
license             OSL-3
maintainers         uw.edu:rprogers openmaintainer
description         Graphical Models Toolkit
long_description    The Graphical Models Toolkit is an open source \
                    toolkit for rapidly prototyping dynamic graphical models
homepage            https://j.ee.washington.edu/trac/gmtk
master_sites        http://melodi.ee.washington.edu/downloads/gmtk/

checksums           rmd160  3cd7597094301dc8848ff06358cc19de5af011a7 \
                    sha256  d0c40d0fca6b8756ffbe33b4ae7e066fa4a87dd80c1788f7d5160fd8ec070876 \
                    size    3433613

depends_build       path:libexec/coreutils/libstdbuf.so:coreutils
depends_lib         port:hdf5 \
                    port:${wxWidgets.port}

# Handle stealth updates #49576
dist_subdir   ${name}/${version}_1

configure.args      --with-wxdir=${wxWidgets.wxdir} \
                    --without-x

post-destroot {
    # Install example files not installed by the Makefile
    file mkdir  ${destroot}${prefix}/share/doc/${name}
    file copy   ${worksrcpath}/COPYING \
                ${destroot}${prefix}/share/doc/${name}
    file copy   ${worksrcpath}/NEWS \
                ${destroot}${prefix}/share/doc/${name}
    file copy   ${worksrcpath}/README \
                ${destroot}${prefix}/share/doc/${name}
}
