# -*- 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 symengine symengine 0.2.10
revision            1
categories-append   math
maintainers         {@barracuda156 macos-powerpc.org:barracuda} openmaintainer
license             GPL-2+
description         Interface to the SymEngine library
long_description    {*}${description}
homepage            https://github.com/symengine/symengine.R
checksums           rmd160  ee7707cb8b8bfdb96993c7c704d0b46cb47ee5f5 \
                    sha256  039cb0409063f39891e29119be1db796796347bb30bf82ef7b00bdb5e09c2c9b \
                    size    663390

depends_lib-append  path:bin/cmake:cmake \
                    port:gmp \
                    port:mpfr \
                    port:R-Rcpp \
                    port:symengine

# Use MacPorts symengine:
patchfiles          patch-configure.diff

post-patch {
    reinplace "s,@PREFIX@,${prefix},g" ${worksrcpath}/configure
}

depends_test-append port:R-crayon \
                    port:R-knitr \
                    port:R-pracma \
                    port:R-rmarkdown \
                    port:R-testthat

test.run            yes
