SUMMARY="library for encoding and decoding WebP image files"
DESCRIPTION="
A library for encoding and decoding WebP image files.
"
HOMEPAGE="http://code.google.com/p/webp"
SRC_URI="http://webp.googlecode.com/files/libwebp-0.3.1.tar.gz"
CHECKSUM_SHA256="b37932c625322a69fe4e9b88884b5c7aed2b3eaf9fd5e5b480aee339a92e6ee7"
LICENSE="BSD (3-clause)"
COPYRIGHT="2011 Google Inc."
REVISION="1"

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

PROVIDES="
	libwebp$secondaryArchSuffix = $portVersion
	lib:libwebp$secondaryArchSuffix = $portVersion
	cmd:cwebp$secondaryArchSuffix
	cmd:dwebp$secondaryArchSuffix
	"

REQUIRES="
	haiku$secondaryArchSuffix >= $haikuVersion
	lib:libjpeg$secondaryArchSuffix
	lib:libgif$secondaryArchSuffix
	lib:libpng$secondaryArchSuffix
	lib:libz$secondaryArchSuffix
	"
	
BUILD_REQUIRES="
	devel:libjpeg$secondaryArchSuffix
	devel:libgif$secondaryArchSuffix
	devel:libpng$secondaryArchSuffix
	devel:libz$secondaryArchSuffix
	"

BUILD_PREREQUIRES="
	haiku${secondaryArchSuffix}_devel >= $haikuVersion
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:autoconf
	cmd:libtool
	cmd:aclocal
	cmd:make
	cmd:m4
	"

BUILD()
{
	./autogen.sh
	runConfigure ./configure
	make $jobArgs
}
	
INSTALL()
{
	make install
	
	prepareInstalledDevelLibs libwebp
	fixPkgconfig
	
	#devel package
	packageEntries devel \
		$developDir
}

PROVIDES_devel="
	libwebp${secondaryArchSuffix}_devel = $portVersion compat >= 0.3
	devel:libwebp$secondaryArchSuffix = 4.0.3 compat >= 4
	"

REQUIRES_devel="
	libwebp$secondaryArchSuffix == $portVersion base
	"
