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

# GitHub version lags behind.
R.setup             cran quanteda quanteda.textstats 0.97.2
revision            0
categories-append   textproc
maintainers         nomaintainer
license             GPL-3
description         Textual statistics for the Quantitative Analysis of Textual Data
long_description    {*}${description}
homepage            https://github.com/quanteda/quanteda.textstats
checksums           rmd160  0fb18c3671c1ecd54a21f1b20307d5570573b5cd \
                    sha256  36db8f7a19627983ceeefc726a3d7fe0e9ff5685597dab82e2354b4e255ff42f \
                    size    139901

# As with R-quanteda, it fails to configure properly.
# Help it.
patchfiles          patch-Makevars.diff

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

depends_lib-append  port:onetbb \
                    port:R-nsyllable \
                    port:R-proxyC \
                    port:R-quanteda \
                    port:R-Rcpp \
                    port:R-RcppArmadillo \
                    port:R-stringi

compilers.setup     require_fortran

depends_test-append port:R-covr \
                    port:R-entropy \
                    port:R-ExPosition \
                    port:R-knitr \
                    port:R-proxy \
                    port:R-rmarkdown \
                    port:R-spelling \
                    port:R-svs \
                    port:R-testthat

test.run            yes