# -*- 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             github grimbough Rhdf5lib 511632077dea4150cbf49e79323634cd3170415b
version             1.23.2
revision            0
maintainers         {@barracuda156 gmail.com:vital.had} openmaintainer
license             Artistic-2
description         HDF5 library as an R package
long_description    {*}${description}
checksums           rmd160  7643768c493432b6a530ffff33967b4b3d0a8217 \
                    sha256  c503c93b4934886c31a07cad72a250a6a824ca6cf44afad85563c891a4c594df \
                    size    11615463

# FIXME: reason is unknown at the moment, but recent versions may fail to build on Rosetta:
# See: https://github.com/grimbough/Rhdf5lib/issues/53
platform darwin 10 powerpc {
    # Build system uses multiple configure scripts, and it gets messy on Rosetta otherwise.
    patchfiles      patch-rosetta.diff

    post-patch {
        reinplace "s,@BUILD@,powerpc-apple-darwin10,g" ${worksrcpath}/src/Makevars.in
    }

    destroot.pre_args-append \
                    --configure-args=' \
                        --build=powerpc-apple-darwin10 \
                        '
}

depends_test-append port:R-BiocStyle \
                    port:R-knitr \
                    port:R-mockery \
                    port:R-rmarkdown \
                    port:R-tinytest

test.run            yes
