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

github.setup        stclib STC 5.0 v
revision            0

categories          devel
license             MIT
maintainers         {mascguy @mascguy} {@barracuda156 gmail.com:vital.had} openmaintainer

description         A modern, user-friendly, generic, type-safe and fast C99 container library
long_description    {*}${description} featuring string, vector, sorted and unordered map and set, \
                    deque, forward list, smart pointers, bitset and random numbers.

checksums           rmd160  d953b319dbffcc77a7052c60e83f741724d00820 \
                    sha256  d61353852b9d7ef69b56fa32edcbc7934f2153385f3778536234201ceebcc950 \
                    size    972147
github.tarball_from archive

compiler.c_standard 1999

configure.args-append \
                    -Dexamples=disabled \
                    -Dtests=disabled

# Needs support for atomic operations.
# Re Xcode clang: https://github.com/stclib/STC/issues/62
compiler.blacklist-append \
                    *gcc-4.0 *gcc-4.2 {clang < 1200}

post-destroot {
    move ${destroot}${prefix}/include/c11 ${destroot}${prefix}/include/stc
}

variant tests description {Enable tests} {
    configure.args-replace \
                    -Dtests=disabled -Dtests=enabled

    test.run        yes
}
