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

# Revert to GitHub once updated there.
R.setup             cran Rdatatable data.table 1.16.4
revision            0
maintainers         {@barracuda156 gmail.com:vital.had} openmaintainer
license             MPL-2
description         Extension of data.frame
long_description    {*}${description}
homepage            https://r-datatable.com
checksums           rmd160  0afd58185b75a47187f72dd4ffe3e6cc3e86b4f9 \
                    sha256  72764bb3aebc111de60223cfb32b6111a47081e3a1e7f6d20c78eb7f30269cdf \
                    size    5490632
# github.tarball_from archive

depends_build-append \
                    path:bin/pkg-config:pkgconfig

depends_lib-append  port:zlib

# We only need the right paths for builds with clang,
# since finally the check works correctly after:
# https://github.com/Rdatatable/data.table/issues/6409
patchfiles          patch-fix-omp.diff

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

compiler.openmp_version 3.0

depends_test-append port:R-bit \
                    port:R-bit64 \
                    port:R-knitr \
                    port:R-markdown \
                    port:R-R.utils \
                    port:R-xts \
                    port:R-yaml \
                    port:R-zoo

# 2 errors out of 1161 on PPC: https://github.com/Rdatatable/data.table/issues/5601
test.run            yes
