SUMMARY="A library for encoding and decoding WebP image files"
DESCRIPTION="
A library for encoding and decoding WebP image files.
"
HOMEPAGE="https://developers.google.com/speed/webp"
SOURCE_URI="http://downloads.webmproject.org/releases/webp/libwebp-$portVersion.tar.gz"
CHECKSUM_SHA256="00b646e6f66550a8faa998711fe70aabee9ed3bc562a8437c89042901674d027"
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 compat >= 0.4
	lib:libwebp$secondaryArchSuffix = 5.0.1 compat >= 5
	cmd:cwebp$secondaryArchSuffix
	cmd:dwebp$secondaryArchSuffix
	"
REQUIRES="
	haiku$secondaryArchSuffix
	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
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:autoconf
	cmd:libtool
	cmd:aclocal
	cmd:make
	cmd:m4
	cmd:find
	"

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.4
	devel:libwebp$secondaryArchSuffix = 5.0.1 compat >= 5
	"
REQUIRES_devel="
	libwebp$secondaryArchSuffix == $portVersion base
	"
