# -*- 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 is outdated.
R.setup             cran wrathematics float 0.3-3
revision            2
categories-append   math
maintainers         {@barracuda156 macos-powerpc.org:barracuda} openmaintainer
license             BSD
description         Single precision (float) matrices for R
long_description    R comes with a suite of utilities for linear algebra with numeric (double precision) vectors/matrices. \
                    However, sometimes single precision (or less) is more than enough for a particular task. \
                    This package extends R linear algebra facilities to include 32-bit float (single precision) data.
checksums           rmd160  0ed190100f96dad230e8be1a4a13c68e9b98a9ed \
                    sha256  97ba6351707ac7f27be2d65435da77cae77c6d45da7259118d68d421be5372d1 \
                    size    1437051

# Changes to BLAS libs for float require revbump to its dependents: R-rsparse etc.
depends_lib-append  path:lib/libopenblas.dylib:OpenBLAS

# FIXME: see if it can be linked to Accelerate instead.
# https://github.com/wrathematics/float/issues/48
patchfiles          patch-compiler.diff

post-patch {
    reinplace "s,@CC@,${configure.cc}," ${worksrcpath}/configure
}

compilers.setup     require_fortran

# Some tests may fail: https://github.com/wrathematics/float/issues/49
test.run            yes
