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

github.setup        espeak-ng pcaudiolib 1.3
revision            0
categories          audio
maintainers         nomaintainer
license             GPL-3+
description         Portable C Audio Library
long_description    The Portable C Audio Library (pcaudiolib) \
                    which provides a C API to different audio devices.
checksums           rmd160  852d617e2edbfbdd6a651ce763d0c42751b678d6 \
                    sha256  e8bd15f460ea171ccd0769ea432e188532a7fb27fa73ec2d526088a082abaaad \
                    size    390894
github.tarball_from releases

depends_build-append \
                    path:bin/pkg-config:pkgconfig
depends_lib-append  port:pulseaudio

# fatal error: 'stdatomic.h' file not found
compiler.c_standard 2011
compiler.blacklist-append \
                    {clang < 601}

configure.args-append \
                    --disable-silent-rules \
                    --with-coreaudio \
                    --with-pulseaudio \
                    --without-alsa \
                    --without-qsa

test.run            yes
test.target         check

post-destroot {
    set docdir ${prefix}/share/doc/${subport}
    xinstall -d ${destroot}${docdir}
    xinstall -m 0644 -W ${worksrcpath} \
        AUTHORS \
        ChangeLog \
        CHANGELOG.md \
        COPYING \
        README.md \
        ${destroot}${docdir}
}
