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

R.setup             cran stla lazyNumbers 1.2.1
revision            2
categories-append   math
maintainers         {@barracuda156 gmail.com:vital.had} openmaintainer
license             GPL-3
description         Exact floating-point arithmetic
long_description    {*}${description}
checksums           rmd160  f63d668b0598c8dfaedd59eda55a78f8f39c66ef \
                    sha256  1400fa9cf96664cfe9f5895e9fc9d9117299f1b857ac5b09f0439ecdd2918035 \
                    size    24528

depends_build-append \
                    port:pkgconfig
depends_lib-append  port:gmp \
                    port:mpfr \
                    port:R-BH \
                    port:R-Rcpp \
                    port:R-RcppCGAL \
                    port:R-RcppEigen

# https://github.com/stla/lazyNumbers/issues/1
patchfiles          patch-isinf.diff

# https://github.com/stla/lazyNumbers/issues/2
if {[string match *gcc* ${configure.compiler}]} {
    patchfiles-append \
                    patch-libatomic.diff
}

depends_test-append port:R-testthat

test.run            yes
