# -*- 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-1
revision            3
categories-append   math
maintainers         {@barracuda156 gmail.com:vital.had} openmaintainer
license             GPL-2+
description         Fitting of RT-MPT models
long_description    {*}${description}
checksums           rmd160  0515915ee6b4fe011fd54439a879e4f8e6f7bc81 \
                    sha256  e537af86a618024c440374324332daa8c7e8d058af7205aaff7ee190f93e4d47 \
                    size    259933

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
