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

name                qpid-proton
description         Qpid Proton is a high-performance, lightweight AMQP \
                    1.0 messaging library.
long_description    Qpid Proton is a high-performance, lightweight messaging library. It can \
                    be used in the widest range of messaging applications, including brokers, \
                    client libraries, routers, bridges, proxies, and more. Proton makes it \
                    trivial to integrate with the AMQP 1.0 ecosystem from any platform, \
                    environment, or language.
categories          net
license             Apache-2
maintainers         {unifiedsoftworx.com:roddie.kieley @roddiekieley} openmaintainer
platforms           darwin freebsd linux
homepage            https://qpid.apache.org

PortGroup           github 1.0

github.setup        apache qpid-proton 0.21.0

PortGroup           cmake 1.0

checksums           rmd160  8828d18e9c3f664e38012f496e80e20a2aee8cb1 \
                    sha256  26524227525c7bcec0817cdc5ce83aeb0729412aec0408431ebafc103c23572b

cmake.out_of_source yes
configure.args-append \
                    -DSASL_IMPL=none \
                    -DSSL_IMPL=none \
                    -DLIB_SUFFIX="" \
                    -DBUILD_PERL=OFF \
                    -DBUILD_PYTHON=OFF \
                    -DBUILD_GO=OFF \
                    -DBUILD_RUBY=OFF

default_variants    +openssl

variant openssl description {With built-in support for OpenSSL} {
    configure.args-replace -DSSL_IMPL=none -DSSL_IMPL=openssl

    depends_lib-append      port:openssl
}

variant swig description {With built-in support for SWIG so the bindings can be built} {
    configure.args-replace -DBUILD_PERL=OFF -DBUILD_PERL=ON
    configure.args-replace -DBUILD_PYTHON=OFF -DBUILD_PYTHON=ON
    configure.args-replace -DBUILD_GO=OFF -DBUILD_GO=ON
    configure.args-replace -DBUILD_RUBY=OFF -DBUILD_RUBY=ON

    depends_lib-append      port:swig \
                            port:swig-perl \
                            port:swig-python \
                            port:swig-go \
                            port:swig-ruby
}