# $Id: Portfile 75812 2011-02-09 11:20:00Z jmr@macports.org $

PortSystem      1.0

name            libsdl_mixer
set my_name     SDL_mixer
version         1.2.11
revision        3
categories      audio devel
platforms       macosx
license         LGPL-2.1+
maintainers     jmr 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/${my_name}/
master_sites    ${homepage}release/
distname        ${my_name}-${version}

checksums       md5     65ada3d997fe85109191a5fb083f248c \
                sha1    ef5d45160babeb51eafa7e4019cec38324ee1a5d \
                rmd160  559355116a1c380edf71879da0dbcf5359f05476

depends_build   port:pkgconfig
depends_lib     path:lib/pkgconfig/sdl.pc:libsdl \
				port:flac \
                port:smpeg \
                port:libvorbis \
                port:libmikmod

patchfiles      Makefile.in.diff

configure.args  --with-sdl-prefix=${prefix} \
                --disable-sdltest \
                --with-smpeg-prefix=${prefix} \
                --disable-smpegtest \
                --enable-music-mod \
                --disable-music-mod-shared \
                --disable-music-ogg-shared \
                --disable-music-flac-shared \
                --disable-music-mp3-shared

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

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