# $Id: Portfile 49358 2009-04-08 08:51:53Z jeremyhu@macports.org $

PortSystem       1.0

name             vorbis-tools
version          1.2.0
revision         1
categories       audio
platforms        darwin
maintainers      nomaintainer

description      The Ogg Vorbis CODEC tools
long_description \
    Ogg Vorbis is a fully Open, non-proprietary, patent-and-royalty-free, \
    general-purpose compressed audio format for mid to high quality \
    (8kHz-48.0kHz, 16+ bit, polyphonic) audio and music at fixed and \
    variable bitrates from 16 to 128 kbps/channel. This places Vorbis in \
    the same competetive class as audio representations such as MPEG-4 \
    (AAC), and similar to, but higher performance than MPEG-1/2 audio \
    layer 3, MPEG-4 audio (TwinVQ), WMA and PAC.

homepage         http://www.vorbis.com/
master_sites     http://downloads.xiph.org/releases/vorbis/

checksums        md5 df976d24e51ef3d87cd462edf747bf9a \
                 sha1 c5c5ee4637ab8c9fc953d203663b7264432f874a \
                 rmd160 8cb6925c6e4e69373b6c91ff20d7ed8d75153b7c

depends_lib      port:libogg \
                 port:libvorbis \
                 port:curl \
                 port:libao \
                 port:gettext

configure.cppflags-append "-no-cpp-precomp"
configure.args   --mandir=${prefix}/share/man \
                 --with-ao \
                 --enable-ogg123 \
                 --without-flac \
                 --without-speex \
                 --enable-vcut

use_parallel_build yes

variant flac description "Enable FLAC support" {
  depends_lib-append    port:flac
  configure.args-delete --without-flac
}

variant speex description "Enable Speex support" {
  depends_lib-append    path:lib/libspeex.dylib:speex
  configure.args-delete --without-speex
}

post-destroot {
  file delete -force ${destroot}${prefix}/share/locale/locale.alias
  file delete -force ${destroot}${prefix}/lib/charset.alias
}

livecheck.check regex
livecheck.url   http://xiph.org/downloads/
livecheck.regex {vorbis-tools-(\d+(?:\.\d+)*).tar.gz}
