# -*- 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 koheiw proxyC 0.5.2
revision            1
categories-append   math
maintainers         {@barracuda156 macos-powerpc.org:barracuda} openmaintainer
license             GPL-3
description         Computes proximity between rows or columns \
                    of large matrices efficiently in C++
long_description    {*}${description}
checksums           rmd160  a0a052796a1804b4a2de5352947f59416a37fe3f \
                    sha256  7251540e4db04e4fc4a89acc73c88f2c2396d5af19354df4b895bc4bca8f87a0 \
                    size    88924

# Notice that 0.4.0 has switched to using OneTBB
# instead of R-RcppParallel. Make sure our OneTBB
# is found. Configure script is broken and does nothing:
# https://github.com/koheiw/proxyC/issues/50
patchfiles          patch-Makevars.diff

post-patch {
    reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/src/Makevars.in
}

depends_lib-append  port:onetbb \
                    port:R-Rcpp \
                    port:R-RcppArmadillo

compilers.setup     require_fortran

depends_test-append port:R-entropy \
                    port:R-knitr \
                    port:R-proxy \
                    port:R-rmarkdown \
                    port:R-testthat

test.run            yes
