# -*- 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
# $Id: Portfile 74772 2011-01-02 07:45:05Z ryandesign@macports.org $

PortSystem              1.0

name                    faust
version                 0.9.30
categories              audio lang
platforms               darwin
maintainers             ryandesign
license                 GPL-2
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               sha1    b8c96e65d081b4ea94fadc1a71b3db2262ee3a9c \
                        rmd160  3ca726396d16c1e17be87c82f42915db0d85e59f

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
