# $Id: Portfile 78554 2011-05-11 22:55:56Z ryandesign@macports.org $
# -*- Mode: Tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0

name                portaudio
version             19.20110326
revision            1
categories          audio devel
platforms           macosx
maintainers         nomaintainer
license             MIT

description         PortAudio is a free, cross platform, open-source, audio I/O library.

long_description    PortAudio is a free, cross platform, open-source, audio I/O library. \
                    It lets you write simple audio programs in 'C' that will \
                    compile and run on many platforms including Windows, \
                    Macintosh (8,9,X), Unix (OSS), SGI, and BeOS. \
                    PortAudio is intended to promote the exchange of audio \
                    synthesis software between developers on different \
                    platforms. \
                    PortAudio provides a very simple API for recording and/or \
                    playing sound using a simple callback function. \
                    Example programs are included that synthesize sine waves \
                    and pink noise, perform fuzz distortion on a guitar, list \
                    available audio devices, etc.

homepage            http://www.portaudio.com/
master_sites        ${homepage}archives

distname            pa_stable_v[strsed ${version} {g/\./_/}]
extract.suffix      .tgz

checksums           sha1    f875ba67fd47c6f1dcc9024c9d94ada592bc9e51 \
                    rmd160  dc28b1ea15201a4bce44c6c432bf2fed0b9f4a2f

worksrcdir          ${name}

patchfiles          patch-configure \
                    patch-src__common__pa_types.h

configure.args      --disable-mac-universal

platform darwin 10 {
    patchfiles-append patch-src__hostapi__coreaudio__pa_mac_core.c
}

use_parallel_build  yes

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

livecheck.type      regex
livecheck.url       [lindex ${master_sites} 0]
livecheck.version   [strsed ${version} {g/\./_/}]
livecheck.regex     pa_stable_v(\[0-9._\]+)\\.
