SUMMARY="A full-featured cross-platform image library"
DESCRIPTION="
Developer's Image Library (DevIL) is a programmer's library to develop \
applications with very powerful image loading capabilities, yet is easy for a \
developer to learn and use. Ultimate control of images is left to the \
developer, so unnecessary conversions, etc. are not performed. DevIL utilizes \
a simple, yet powerful, syntax. DevIL can load, save, convert, manipulate, \
filter and display a wide variety of image formats.
"
HOMEPAGE="http://openil.sourceforge.net/"
SOURCE_URI="http://sourceforge.net/projects/openil/files/DevIL/1.7.8/DevIL-1.7.8.tar.gz"
CHECKSUM_SHA256="682ffa3fc894686156337b8ce473c954bf3f4fb0f3ecac159c73db632d28a8fd"
REVISION="2"
LICENSE="GNU LGPL v2.1"
COPYRIGHT="2009 Denton Woods"
ARCHITECTURES="x86_gcc2 x86"
SECONDARY_ARCHITECTURES="x86"

PROVIDES="
	devil$secondaryArchSuffix = $portVersion
	lib:libIL$secondaryArchSuffix
	"
REQUIRES="
	haiku$secondaryArchSuffix
	"
BUILD_REQUIRES="
	devel:libjasper$secondaryArchSuffix
	devel:libjpeg$secondaryArchSuffix
	devel:libmng$secondaryArchSuffix
	devel:libIlmImf$secondaryArchSuffix
	devel:libpng$secondaryArchSuffix
	devel:libtiff$secondaryArchSuffix
	devel:libz$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	haiku${secondaryArchSuffix}_devel
	cmd:awk
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:libtoolize
	cmd:make
	cmd:pkg_config$secondaryArchSuffix
	"

BUILD()
{
	runConfigure ./configure CFLAGS=-Dpng_set_gray_1_2_4_to_8=png_set_expand_gray_1_2_4_to_8
	make $jobArgs
}


INSTALL()
{
	make install

	prepareInstalledDevelLib libIL
	fixPkgconfig
	packageEntries devel $developDir
}


TEST()
{
	make check
}


PROVIDES_devel="
	devil${secondaryArchSuffix}_devel = $portVersion
	devel:libIL$secondaryArchSuffix
	"
REQUIRES_devel="
	haiku$secondaryArchSuffix
	devil$secondaryArchSuffix == $portVersion base
	"
