# -*- 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
PortGroup           legacysupport 1.1

# _strnlen
legacysupport.newest_darwin_requires_legacy 10

github.setup        eclipse-cyclonedds cyclonedds 11.0.1
revision            0
categories          devel
license             EPL-2
maintainers         {@sikmir disroot.org:sikmir} \
                    {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer
description         Eclipse Cyclone DDS project
long_description    {*}${description}
homepage            https://cyclonedds.io

checksums           rmd160  b53ecd39394ce59fb230070c70a6744cd7e3b49c \
                    sha256  c25d46075ad6b5cee564bda9e5f49509e9a6dbb1a8b858e708eb360d335cf973 \
                    size    7972646
github.tarball_from archive

depends_lib-append  path:lib/libssl.dylib:openssl

compiler.thread_local_storage yes

compiler.c_standard 1999

# https://github.com/eclipse-cyclonedds/cyclonedds/issues/2019
if {${os.platform} eq "darwin" && ${os.major} < 17} {
    configure.args-append \
                    -DENABLE_IPV6=0 \
                    -DENABLE_SOURCE_SPECIFIC_MULTICAST=0

    platform powerpc {
        configure.args-append \
                    -DENABLE_LTO=OFF
    }
}
