# -*- 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             github stan-dev cmdstanr 0.8.1 v
revision            0
categories-append   math
platforms           {darwin any}
maintainers         {@barracuda156 gmail.com:vital.had} openmaintainer
license             BSD
description         R interface to CmdStan
long_description    {*}${description}
homepage            https://mc-stan.org/cmdstanr
checksums           rmd160  dc35f517649155939189c17d72590b59de92d015 \
                    sha256  d151ad183a9aa340bd444ccf3e75e133f0ce4cb9502a917b98406f4f593209f5 \
                    size    1960785
github.tarball_from archive
supported_archs     noarch

depends_lib-append  port:R-checkmate \
                    port:R-data.table \
                    port:R-jsonlite \
                    port:R-posterior \
                    port:R-processx \
                    port:R-R6 \
                    port:R-withr

# TODO: implement building CmdStan inside MacPorts.
notes "
CmdStanR requires a working installation of CmdStan, the shell interface to Stan.\
If you don’t have CmdStan installed then CmdStanR can install it for you via install_cmdstan() command.
Please refer to: https://mc-stan.org/cmdstanr/articles/cmdstanr.html
"

depends_test-append port:R-bayesplot \
                    port:R-knitr \
                    port:R-loo \
                    port:R-Rcpp \
                    port:R-RcppEigen \
                    port:R-rlang \
                    port:R-rmarkdown \
                    port:R-testthat

test.run            yes
