SUMMARY="Tools for the interactive audio codec Opus"
DESCRIPTION="Opus is a totally open, royalty-free, highly versatile audio \
codec. Opus is unmatched for interactive speech and music transmission over \
the Internet, but is also intended for storage and streaming applications. \
It is standardized by the Internet Engineering Task Force (IETF) as RFC 6716 \
which incorporated technology from Skype's SILK codec and Xiph.Org's CELT \
codec.

This tools package provides command-line utilities to encode, inspect, and \
decode .opus files."
HOMEPAGE="https://www.opus-codec.org"
COPYRIGHT="2001-2014 Xiph.org"
LICENSE="BSD (3-clause)"
REVISION="2"
SOURCE_URI="http://downloads.xiph.org/releases/opus/opus-tools-$portVersion.tar.gz"
CHECKSUM_SHA256="b4e56cb00d3e509acfba9a9b627ffd8273b876b4e2408642259f6da28fa0ff86"
SOURCE_DIR="opus-tools-$portVersion"
PATCHES="opus_tools-$portVersion.patchset"

ARCHITECTURES="all"

PROVIDES="
	opus_tools$secondaryArchSuffix = $portVersion compat >= 0
	cmd:opusdec$secondaryArchSuffix
	cmd:opusenc$secondaryArchSuffix
	cmd:opusinfo$secondaryArchSuffix
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libflac$secondaryArchSuffix
	lib:libogg$secondaryArchSuffix
	lib:libopus$secondaryArchSuffix
	lib:libopusenc$secondaryArchSuffix
	lib:libopusfile$secondaryArchSuffix
	lib:libopusurl$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libflac$secondaryArchSuffix
	devel:libogg$secondaryArchSuffix
	devel:libopus$secondaryArchSuffix
	devel:libopusenc$secondaryArchSuffix
	devel:libopusfile$secondaryArchSuffix
	devel:libopusurl$secondaryArchSuffix
	devel:libssl$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	cmd:aclocal
	cmd:autoconf
	cmd:automake
	cmd:awk
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:libtoolize$secondaryArchSuffix
	cmd:make
	cmd:pkg_config$secondaryArchSuffix
	cmd:sed
	"

BUILD()
{
	autoreconf -fi
	runConfigure ./configure --disable-stack-protector
	make $jobArgs
}

INSTALL()
{
	make install
}
