# -*- 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 doccstat fastcpd 0.14.3
revision            0
categories-append   math
maintainers         {@barracuda156 gmail.com:vital.had} openmaintainer
license             GPL-3+
description         Fast change point detection via sequential gradient descent
long_description    {*}${description}
homepage            https://fastcpd.xingchi.li
checksums           rmd160  5f153e008ec160fc1a3dd2ae35f41a81c26c8a47 \
                    sha256  5f9b8c7616030f2c4b8b9f2c763985c2f67fcc00df6602d19d75510b50a7bd2c \
                    size    5307747

depends_lib-append  port:R-fastglm \
                    port:R-forecast \
                    port:R-glmnet \
                    port:R-progress \
                    port:R-Rcpp \
                    port:R-RcppArmadillo \
                    port:R-RcppClock \
                    port:R-testthat \
                    port:R-tseries

compilers.setup     require_fortran

variant tests description "Enable testing" {
    # https://github.com/doccstat/fastcpd/issues/8
    patchfiles-append \
                    patch-tests-no-parallel.diff

    depends_test-append \
                    port:R-abind \
                    port:R-breakfast \
                    port:R-changepoint \
                    port:R-cpm \
                    port:R-CptNonPar \
                    port:R-ecp \
                    port:R-fpop \
                    port:R-gfpop \
                    port:R-ggplot2 \
                    port:R-gridExtra \
                    port:R-InspectChangepoint \
                    port:R-jointseg \
                    port:R-knitr \
                    port:R-lubridate \
                    port:R-matrixStats \
                    port:R-mcp \
                    port:R-mockthat \
                    port:R-mosum \
                    port:R-mvtnorm \
                    port:R-not \
                    port:R-numDeriv \
                    port:R-rmarkdown \
                    port:R-segmented \
                    port:R-stepR \
                    port:R-strucchange \
                    port:R-testthat \
                    port:R-VARDetect \
                    port:R-wbs \
                    port:R-xml2 \
                    port:R-zoo

    test.run        yes
}
