PortSystem      1.0

name            libsdl2_mixer
set my_name     SDL2_mixer
version         2.0.1
categories      audio devel
platforms       darwin
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.

homepage        http://www.libsdl.org/projects/SDL_mixer/
master_sites    ${homepage}release/
distname        ${my_name}-${version}

checksums       rmd160 1b7420e4320be401e5a27fad5b6dfa2c16778f03 \
                sha256 5a24f62a610249d744cbd8d28ee399d8905db7222bf3bdbc8a8b4a76e597695f

depends_build   port:pkgconfig
depends_lib     port:libsdl2 \
                port:smpeg2 \
                port:flac \
                port:libvorbis \
                port:libmikmod

configure.args  --enable-sdltest \
                --disable-smpegtest \
                --disable-music-mod-modplug \
                --disable-music-midi-fluidsynth \
                --enable-music-mod-mikmod \
                --disable-music-mod-mikmod-shared \
                --disable-music-ogg-shared \
                --disable-music-flac-shared \
                --disable-music-mp3-smpeg-shared
                
# fix one little hiccup on Tiger PPC
patchfiles-append patch-native-midi-macosx.diff

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

livecheck.type  regex
livecheck.url   ${homepage}
livecheck.regex ${my_name}-(\\d+(?:\\.\\d+)*)
