# $Id: Portfile,v 1.14 2006/02/16 20:37:18 toby Exp $

PortSystem 1.0
name             vorbis-tools
version          1.1.1
categories       audio
maintainers      toby@opendarwin.org
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.xiph.org/ogg/vorbis/
platforms        darwin
master_sites     http://downloads.xiph.org/releases/vorbis/
checksums        sha1 a1394b39905b389d72f12c2a9f0c86a33d07a487
depends_lib      lib:libogg.0:libogg lib:libvorbis.0:libvorbis \
                 lib:libcurl.2:curl
configure.env    LDFLAGS="-L${prefix}/lib" \
                 CPPFLAGS="-I${prefix}/include -no-cpp-precomp"
configure.args   --mandir=${prefix}/share/man \
                 --without-ao \
                 --disable-ogg123 \
                 --without-flac \
                 --without-speex

variant player {
	depends_lib-append    lib:libao.2:libao
	configure.args-delete --without-ao --disable-ogg123
	configure.args-append --with-ao --enable-ogg123
}

variant flac {
	depends_lib-append    lib:libFLAC.7:flac
	configure.args-delete --without-flac
	configure.args-append --with-flac
}

variant speex {
	depends_lib-append    lib:libspeex.1:speex
	configure.args-delete --without-speex
	configure.args-append --with-speex
}

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