# -*- 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           cmake 1.1
PortGroup           github 1.0

github.setup        jbeder yaml-cpp 0.8.0
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            0

categories          devel
maintainers         {judaew @judaew} openmaintainer
license             MIT

description         yaml-cpp is a YAML parser and emitter in C++ written around the YAML 1.2 spec
long_description    {*}${description}

checksums           rmd160  f2bb5d61707943c0b8b33044bbf05d2480d8ffb6 \
                    sha256  46c4f7f574c1ee0975406144624088f7ff775667a163591dbc942d315bf0c77a \
                    size    1017454

compiler.cxx_standard   2011

configure.args      -DYAML_BUILD_SHARED_LIBS=ON

# Don't install Google Test
# https://github.com/jbeder/yaml-cpp/issues/539
configure.args-append \
                    -DYAML_CPP_BUILD_TESTS=OFF

variant tools description {Install parse tools with prefix yaml-*} {
    post-destroot {
        xinstall -m 0755 ${workpath}/build/util/parse \
            ${destroot}${prefix}/bin/yaml-parse
        xinstall -m 0755 ${workpath}/build/util/read \
            ${destroot}${prefix}/bin/yaml-read
        xinstall -m 0755 ${workpath}/build/util/sandbox \
            ${destroot}${prefix}/bin/yaml-sandbox
    }

    notes "
        Parse tools have been installed with prefix yaml-*:

            $ yaml-parse
            $ yaml-read
            $ yaml-sandbox
    "
}