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

R.setup             cran raphael.hartmann rtmpt 2.0-3
revision            2
categories-append   math
maintainers         {@barracuda156 macos-powerpc.org:barracuda} openmaintainer
license             GPL-2+
description         Fitting of RT-MPT models
long_description    {*}${description}
checksums           rmd160  f359f331de1d1e6db7aeda55f25f6dd3753f0fbd \
                    sha256  17e8d48d3adf9a3ecc3bad07fc13fda826e6deb3d9de0cd4152fc70fc9bd1295 \
                    size    262070

depends_lib-append  port:gsl \
                    port:R-coda \
                    port:R-data.table \
                    port:R-loo \
                    port:R-Ryacas \
                    port:R-stringr \
                    port:R-truncnorm

# error: 'isfinite' was not declared in this scope; did you mean 'std::isfinite'?
# error: 'isnan' was not declared in this scope; did you mean 'std::isnan'?
patchfiles          patch-fix-math.diff

# Avoid brewisms to ensure correct linking.
patchfiles-append   patch-fix-gsl-path.diff

post-patch {
    reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/src/Makevars
}

depends_test-append port:R-knitr \
                    port:R-rmarkdown

test.run            yes
