# $Id: Portfile,v 1.14 2004/12/22 18:25:18 toby Exp $

PortSystem 1.0
name             sox
version          12.17.7
categories       audio
maintainers      toby@opendarwin.org
description      SOund eXchange - universal sound sample translator
long_description \
	SoX (also known as Sound eXchange) translates sound samples between \
	different file formats, and optionally applies various sound \
	effects. SoX is intended as the Swiss Army knife of sound processing \
	tools. It doesn't do anything very well, but sooner or later it \
	comes in very handy.
homepage         http://sox.sourceforge.net/
platforms        darwin
master_sites     http://voxel.dl.sourceforge.net/sourceforge/sox/ sourceforge
checksums        md5 a6876289602c1f2896b39e6a88e2a574

patchfiles       patch-Makefile.in

configure.env    CPPFLAGS=-I${prefix}/include LDFLAGS=-L${prefix}/lib
configure.args   --mandir=\\\${prefix}/share/man \
                 --disable-ogg-vorbis \
                 --disable-mad \
                 --disable-lame

build.env        ${configure.env}

destroot.destdir prefix=${destroot}${prefix}

variant vorbis {
	configure.args-delete --disable-ogg-vorbis
	depends_lib-append    lib:libvorbis.0:libvorbis
}

variant mad {
	configure.args-delete --disable-mad
	depends_lib-append    lib:libmad.0:libmad
}

variant lame {
	configure.args-delete --disable-lame
	depends_lib-append    lib:libmp3lame.0:lame
}
