# -*- 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.3
revision            2
categories-append   graphics
maintainers         {@barracuda156 gmail.com:vital.had} openmaintainer
license             MIT
description         Advanced graphics and image-processing in R
long_description    {*}${description}
homepage            https://docs.ropensci.org/magick
checksums           rmd160  5fbb91f16ec61e6d5bf1634941db7b8b56a9f9e4 \
                    sha256  932b522d2e9199f50f391266b7f7cb22ca20ca8d5cedbeff12113f5cb445c079 \
                    size    4600396

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
