PortSystem      1.0
PortGroup       github 1.0

name            libsdl2_mixer
github.setup    libsdl-org SDL_mixer 2.8.1 release-
categories      audio devel
license         zlib
maintainers     {jmr @jmroot} openmaintainer
description     Audio mixer library for SDL

long_description \
    A sample multi-channel audio mixer library. It supports any number of \
    simultaneously playing channels of 16 bit stereo audio, plus a single \
    channel of music.

github.tarball_from releases
distname        SDL2_mixer-${version}

checksums       rmd160 73d0e0e7d7fb5a9f6344d9b0377b5cf1f20a7b7b \
                sha256 cb760211b056bfe44f4a1e180cc7cb201137e4d1572f2002cc1be728efd22660

depends_build   path:bin/pkg-config:pkgconfig
depends_lib     port:libsdl2 \
                port:libxmp \
                port:opusfile \
                port:wavpack

configure.args  --disable-sdltest \
                --disable-music-gme \
                --disable-music-midi-fluidsynth \
                --disable-music-mod-xmp-shared \
                --disable-music-opus-shared \
                --disable-music-wavpack-shared

compiler.blacklist *gcc-4.* { clang < 211 }

post-destroot {
    set docdir ${prefix}/share/doc/${name}
    xinstall -d ${destroot}${docdir}
    xinstall -m 0644 -W ${worksrcpath} CHANGES.txt LICENSE.txt README.txt \
        ${destroot}${docdir}
}
