# -*- 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 ropensci magick 2.8.0
revision            0
categories-append   graphics
maintainers         {@barracuda156 gmail.com:vital.had} openmaintainer
license             MIT
description         Advanced graphics and image-processing in R
long_description    {*}${description}
checksums           rmd160  dad5c5f8e1810982679336d890cac3742ef66ffe \
                    sha256  e83a540f69f76ccbdb89b10b731d13f102e5edc5d75a521933b4bd9df85581aa \
                    size    4599626

depends_build-append \
                    port:pkgconfig
depends_lib-append  port:ImageMagick \
                    port:R-curl \
                    port:R-magrittr \
                    port:R-Rcpp

# See: https://trac.macports.org/ticket/66978
patchfiles          patch-isnan.diff \
                    patch-no-gifski.diff

if {${os.platform} eq "darwin" && ${os.major} < 16} {
    # Symbol not found: __ZN6Magick5Image10fontFamilyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
    patchfiles-append \
                    patch-cxx11.diff
}

depends_test-append port:R-av \
                    port:R-gapminder \
                    port:R-ggplot2 \
                    port:R-IRdisplay \
                    port:R-jsonlite \
                    port:R-knitr \
                    port:R-pdftools \
                    port:R-rmarkdown \
                    port:R-rsvg \
                    port:R-spelling \
                    port:R-tesseract \
                    port:R-webp

test.run            no
