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

name            libsdl2_mixer
github.setup    libsdl-org SDL_mixer 2.8.2 release-
revision        0
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  718e4acdc77e3efcb7c915cdebbf5a97c4621622 \
                sha256  938dff531d00ace2296557a6599abe6f34599e2f34f0a4a08a397e2ccac8b8f7 \
                size    6000649

patchfiles      patch-native_midi_macosx.diff

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 < 421}

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}
}
