SUMMARY="Opus Interactive Audio Codec"
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.
"
HOMEPAGE="http://www.opus-codec.org"
COPYRIGHT="2001-2014 Xiph.org"
LICENSE="BSD (3-clause)"
SOURCE_URI="http://downloads.xiph.org/releases/opus/opus-$portVersion.tar.gz"
CHECKSUM_SHA256="b9727015a58affcf3db527322bf8c4d2fcf39f5f6b8f15dbceca20206cbe1d95"
REVISION="1"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
PROVIDES="
	opus$secondaryArchSuffix = $portVersion compat >= 1
	lib:libopus$secondaryArchSuffix = 0.5.0 compat >= 0
	"
REQUIRES="
	haiku$secondaryArchSuffix
	"
BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	"
BUILD_PREREQUIRES="
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:make
	cmd:sed
	cmd:awk
	"

BUILD()
{
	runConfigure ./configure
	make
}
INSTALL()
{
	make install

	# remove libtool library file
	rm $libDir/libopus.la

	prepareInstalledDevelLibs libopus
	fixPkgconfig

	packageEntries devel $developDir \
		$dataDir
}


# ----- devel package -------------------------------------------------------


PROVIDES_devel="
	opus${secondaryArchSuffix}_devel = $portVersion compat >= 1
	devel:libopus$secondaryArchSuffix = 0.5.0 compat >= 0
	"
REQUIRES_devel="
	opus$secondaryArchSuffix == $portVersion base
	"
