# -*- 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 114610 2013-12-11 21:03:31Z ryandesign@macports.org $

PortSystem          1.0

name                rubberband
version             1.8.1
set download_id     34
categories          audio
platforms           darwin
maintainers         ryandesign openmaintainer
license             GPL-2+

description         audio time-stretching and pitch-shifting library and utility program

long_description    Rubber Band is a library and utility program that permits \
                    changing the tempo and pitch of an audio recording \
                    independently of one another.

homepage            http://breakfastquay.com/rubberband/
master_sites        http://code.breakfastquay.com/attachments/download/${download_id}/
use_bzip2           yes

checksums           rmd160  21178218aeffb0a0827ba8c4fd32e95f5a08b295 \
                    sha256  ff0c63b0b5ce41f937a8a3bc560f27918c5fe0b90c6bc1cb70829b86ada82b75

depends_lib         port:libsndfile

patchfiles          patch-Makefile.osx.diff

use_configure       no

variant universal {}

build.target        default
build.args          -f Makefile.osx \
                    ARCHFLAGS="[get_canonical_archflags cc]" \
                    CC=${configure.cc} \
                    CXX=${configure.cxx} \
                    PREFIX=${prefix}

eval destroot.args  ${build.args}

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

livecheck.type      regex
livecheck.regex     ${name}-(\[0-9.\]+)${extract.suffix}
