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

# clock_gettime
legacysupport.newest_darwin_requires_legacy 15

codeberg.setup      skyjake the_Foundation 1.12.2 v
revision            0
categories          devel
license             BSD
maintainers         {@sikmir disroot.org:sikmir} openmaintainer

description         Opinionated C11 library for low-level functionality
long_description    {*}${description}

checksums           rmd160  3342e818e0c9ff9e89af52cc4ea9c0de4e4e236c \
                    sha256  04b419a9b8f2264a8cf6ba190d4358b3951322ee66b1d67ccdc54dd4f88fcd13 \
                    size    233451

depends_build-append \
                    port:pkgconfig
depends_lib-append  port:curl \
                    port:libunistring \
                    path:lib/libssl.dylib:openssl \
                    port:pcre2 \
                    port:zlib

worksrcdir          the_foundation

patchfiles-append   patch-environ.diff

compiler.c_standard 2011

# fatal error: 'stdatomic.h' file not found
compiler.blacklist-append {clang < 700}

# t_test.c: error: variable 'remCount' set but not used [-Werror,-Wunused-but-set-variable]
configure.args-append \
                    -DTFDN_ENABLE_WARN_ERROR=OFF
