# -*- 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.22
revision            1
categories-append   devel
maintainers         {@barracuda156 gmail.com:vital.had} 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  e9f6d049b1f696a17c9179190400d36fa0c78d23 \
                    sha256  75b802176722052d1ef2c6b36adff9204ee86fb8f2e1fcecd897571bd8ed8d7e \
                    size    1010658

if {${os.platform} eq "darwin" && ${os.major} < 16} {
    # Symbol not found: __ZN6google8protobuf8compiler10SourceTree19GetLastErrorMessageB5cxx11Ev
    patchfiles-append \
                    patch-cxx11.diff
}

depends_build-append \
                    port:pkgconfig
depends_lib-append  port:protobuf3-cpp \
                    port:R-Rcpp

compiler.cxx_standard 2017

depends_test-append port:R-tinytest

test.run            yes
