# -*- 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 eddelbuettel RProtoBuf 0.4.26
revision            1
categories-append   devel
maintainers         {@barracuda156 macos-powerpc.org:barracuda} openmaintainer
license             GPL-2+
description         R interface to the Protocol Buffers API
long_description    {*}${description}
homepage-append     https://dirk.eddelbuettel.com/code/rprotobuf.html
checksums           rmd160  3920a4957f9c740cddfb9b7deec0f3a848bda90c \
                    sha256  340c99e90f6132974ee6d487751722f8fa2196412c99397b22b97808aa032a29 \
                    size    650000

if {${os.platform} eq "darwin" && ${configure.cxx_stdlib} ne "libc++"} {
    # Symbol not found: __ZN6google8protobuf8compiler10SourceTree19GetLastErrorMessageB5cxx11Ev
    patchfiles-append \
                    patch-cxx11.diff
}

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

depends_lib-append  port:protobuf \
                    port:R-Rcpp

depends_test-append port:R-tinytest

test.run            yes
