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

# strnlen
legacysupport.newest_darwin_requires_legacy 10

R.setup             github tidyverse readr 2.1.5 v
revision            1
categories-append   textproc
maintainers         {@barracuda156 gmail.com:vital.had} openmaintainer
license             MIT
description         Read rectangular text data
long_description    {*}${description}
homepage            https://readr.tidyverse.org
checksums           rmd160  47b3997ca7731cc510866ae5f7ac4dad3e8ff5a7 \
                    sha256  79d287737e97e6055852b2a4f3a9ad41ebb1fabc2a7723bf9213f5d1b808c83e \
                    size    332274

depends_lib-append  port:R-cli \
                    port:R-clipr \
                    port:R-cpp11 \
                    port:R-crayon \
                    port:R-hms \
                    port:R-lifecycle \
                    port:R-R6 \
                    port:R-rlang \
                    port:R-tibble \
                    port:R-tzdb \
                    port:R-vroom

if {${os.platform} eq "darwin" && ${os.major} < 11} {
    patchfiles-append \
                    patch-Makevars.diff
    post-patch {
        reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/src/Makevars
    }
}

depends_test-append port:R-covr \
                    port:R-curl \
                    port:R-knitr \
                    port:R-rmarkdown \
                    port:R-spelling \
                    port:R-stringi \
                    port:R-testthat \
                    port:R-waldo \
                    port:R-withr \
                    port:R-xml2

test.run            yes