# $Id: Portfile 67728 2010-05-17 05:09:37Z ryandesign@macports.org $

PortSystem              1.0

name                    faust
version                 0.9.24
categories              audio lang
platforms               darwin
maintainers             ryandesign
license                 GPLv2
master_sites            sourceforge:faudiostream
homepage                http://faust.grame.fr/

description             functional programming language for realtime audio

long_description        Faust is a functional programming language \
                        specifically designed for realtime audio applications \
                        and plugins.

checksums               md5     0a5c2b04be44870da281bb422e8c7dfb \
                        sha1    d96b4c1e20cda92bafef9a4f791828285a06509b \
                        rmd160  1de44132669056394028e5bc2e374a63256f8852

patchfiles-append       patch-prefix.diff

post-patch {
    reinplace "s|/usr/local|${prefix}|g" \
        ${worksrcpath}/compiler/parser/enrobage.cpp \
        ${worksrcpath}/compiler/tlib/compatibility.cpp \
        ${worksrcpath}/examples/Makefile.csound \
        ${worksrcpath}/examples/Makefile.mspcompile \
        ${worksrcpath}/examples/Makefile.qtcompile \
        ${worksrcpath}/examples/Makefile.vstcompile
}

use_configure           no

build.args-append       prefix=${prefix} \
                        CXX=${configure.cxx}

destroot.destdir        prefix=${destroot}${prefix}

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

livecheck.type          regex
livecheck.url           http://sourceforge.net/projects/faudiostream/files/
livecheck.regex         ${name}-(\[0-9a-z.\]+)\\.tar
