# -*- 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 46452 2009-02-05 05:24:20Z devans@macports.org $

PortSystem              1.0

name                    aubio
version                 0.3.2
revision                1
categories              audio
maintainers             devans openmaintainer
platforms               darwin
use_parallel_build      yes
homepage                http://aubio.piem.org/

description             audio labeling library
long_description \
    ${name} is a library for audio labeling. \
    Its features include segmenting a sound file before each of its attacks, \
    performing pitch detection, \
    tapping the beat and producing MIDI streams from live audio.

master_sites            ${homepage}pub/
checksums               md5 ffc3e5e4880fec67064f043252263a44
depends_lib             port:fftw-3 \
                        port:libsamplerate \
                        port:python25

configure.args          --disable-alsa \
                        --disable-jack \
                        --disable-lash

configure.python        ${prefix}/bin/python2.5

post-build {
    # aubio's includedir is ${prefix}/include/aubio but aubio's file fft.h
    # includes fftw-3's fftw3.h but fftw3.h is in ${prefix}/include.
    reinplace {s%-I${includedir}%-I${includedir} -I${prefix}/include%} ${worksrcpath}/${name}.pc
}

variant python description "Enable gnuplot and python interface" {
    depends_lib-append      port:py25-numarray \
                            port:swig
    depends_run-append      port:py25-gnuplot
}

livecheck.check regex
livecheck.url   ${master_sites}
livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"

