SUMMARY="A PNG optimizer, making PNG files smaller"
DESCRIPTION="
OptiPNG is a PNG optimizer, recompressing PNG files so they become smaller, \
without losing any information. Additionally, OptiPNG can convert other image \
formats, such as BMP, GIF, PNM and TIFF, to PNG files.
"
HOMEPAGE="http://optipng.sourceforge.net/"
SRC_URI="http://prdownloads.sourceforge.net/optipng/optipng-0.7.4.tar.gz"
CHECKSUM_SHA256="520b5d5a9405dbdc5c905dd0cff87211e69c4ed2059744037510e613fe8237ff"
LICENSE="Zlib"
COPYRIGHT="2001-2012 Cosmin Truta"
REVISION="2"
ARCHITECTURES="x86_gcc2 x86 x86_64"

PROVIDES="
	optipng$secondaryArchSuffix = $portVersion
	cmd:optipng$secondaryArchSuffix = $portVersion
	"

REQUIRES="
	haiku$secondaryArchSuffix >= $haikuVersion
	lib:libpng
	lib:libz
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel >= $haikuVersion
	devel:libpng
	devel:libz
	"

BUILD_PREREQUIRES="
	cmd:ar
	cmd:gcc$secondaryArchSuffix
	cmd:make
	cmd:ranlib
	"

PATCHES="optipng-0.7.4.patchset"

BUILD()
{
	./configure -bindir=$binDir -mandir=$manDir \
		-with-system-libpng \
		-with-system-zlib
	make
}

INSTALL()
{
	make install
}
