SUMMARY="Library for handling cover art for audio files"
DESCRIPTION="
Development library geared towards developers who wish to add cover art \
capabilites to their applications.
"
HOMEPAGE="http://musicbrainz.org/doc/libcoverart" 
SRC_URI="https://github.com/downloads/metabrainz/libcoverart/libcoverart-1.0.0.tar.gz"
CHECKSUM_SHA256="e4cb78939003a4b5e5c4db68e42e86fbbbea5e69d3166b43ca01a7065916a121"
LICENSE="GNU LGPL v2"
COPYRIGHT="2012 Andrew Hawkins"
REVISION="1"

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

PROVIDES="
	libcoverart = $portVersion
	lib:libcoverart$secondaryArchSuffix = $portVersion
	"
	
REQUIRES="
	haiku$secondaryArchSuffix >= $haikuVersion
	lib:libjansson$secondaryArchSuffix
	lib:libneon$secondaryArchSuffix
	"

BUILD_REQUIRES="
	devel:libjansson$secondaryArchSuffix
	devel:libneon$secondaryArchSuffix
	"
	
BUILD_PREREQUIRES="
	haiku${secondaryArchSuffix}_devel >= $haikuVersion
	cmd:cmake
	cmd:gcc$secondaryArchSuffix
	cmd:make
	cmd:pkg_config$secondaryArchSuffix
	"

SOURCE_DIR="libcoverart-{PROJECT_VERSION}"

BUILD()
{
	cmake . 
	make
}

INSTALL()
{
	make install
	prepareInstalledDevelLibs libcoverart	
	fixPkgconfig

	packageEntries devel \
			$developDir
}

TEST()
{
	make test
	cd tests
	./test
}

PROVIDES_devel="
	libcoverart${secondaryArchSuffix}_devel = $portVersion
	devel:libcoverart$secondaryArchSuffix = $portVersion
	"

REQUIRES_devel="
	libcoverart$secondaryArchSuffix == $portVersion base
	"
