SUMMARY="Tools for using the Ogg Vorbis sound file format"
DESCRIPTION="
vorbis-tools - tools for using the Ogg Vorbis sound file format.
"
HOMEPAGE="http://www.vorbis.com/" 
SRC_URI="http://downloads.xiph.org/releases/vorbis/vorbis-tools-1.4.0.tar.gz"
CHECKSUM_MD5="567e0fb8d321b2cd7124f8208b8b90e6"
REVISION="1"
LICENSE="GNU GPL v2"
COPYRIGHT="2000-2005 Michael Smith, Stan Seibert and other contributers"

ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"

PROVIDES="
	vorbis_tools = $portVersion compat >= 1
	cmd:oggenc$secondaryArchSuffix
	cmd:oggdec$secondaryArchSuffix
	cmd:ogginfo$secondaryArchSuffix
	cmd:vcut$secondaryArchSuffix
	cmd:vorbiscomment$secondaryArchSuffix
	cmd:ogg123$secondaryArchSuffix
	"

REQUIRES="
	haiku$secondaryArchSuffix >= $haikuVersion
	lib:libvorbis$secondaryArchSuffix
	lib:libflac$secondaryArchSuffix
	lib:libspeex$secondaryArchSuffix
	lib:libao$secondaryArchSuffix
	lib:libogg$secondaryArchSuffix
	lib:libvorbis$secondaryArchSuffix
	lib:libcurl$secondaryArchSuffix
	lib:libvorbisfile$secondaryArchSuffix
	lib:libvorbisenc$secondaryArchSuffix
	lib:libssl$secondaryArchSuffix
	lib:libz$secondaryArchSuffix	
	"
	
BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel >= $haikuVersion
	devel:libvorbis$secondaryArchSuffix
	devel:libflac$secondaryArchSuffix
	devel:libspeex$secondaryArchSuffix
	devel:libao$secondaryArchSuffix
	devel:libogg$secondaryArchSuffix
	devel:libvorbis$secondaryArchSuffix
	devel:libcurl$secondaryArchSuffix
	devel:libvorbisfile$secondaryArchSuffix
	devel:libvorbisenc$secondaryArchSuffix
	devel:libssl$secondaryArchSuffix
	devel:libz$secondaryArchSuffix
	"

BUILD_PREREQUIRES="
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:libtoolize
	cmd:aclocal
	cmd:autoconf
	cmd:automake
	cmd:make
	cmd:pkg_config$secondaryArchSuffix
	"

PATCHES="vorbis_tools-1.4.0.patch"

SOURCE_DIR="vorbis-tools-$portVersion"	

BUILD()
{
	sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' configure.ac	
	libtoolize --force --copy --install
	aclocal -I m4
	automake
	autoconf
	runConfigure ./configure
	make $jobArgs
}

INSTALL()
{
	make install
}
