SUMMARY="Converts APNG animations into GIF format"
DESCRIPTION="This program converts APNG animations into animated GIF format. \
It performs the reverse of gif2apng."
HOMEPAGE="http://apng2gif.sourceforge.net/"
COPYRIGHT="2010-2017 Max Stepin"
LICENSE="Zlib"
REVISION="2"
SOURCE_URI="https://downloads.sourceforge.net/apng2gif/apng2gif-$portVersion-src.zip"
CHECKSUM_SHA256="9a07e386017dc696573cd7bc7b46b2575c06da0bc68c3c4f1c24a4b39cdedd4d"
SOURCE_DIR=""

ARCHITECTURES="all"

if [ "$targetArchitecture" = x86_gcc2 ]; then
	LIBS="-lstdc++.r4 -lpng -lz"
else
	LIBS="-lstdc++ -lpng -lz"
fi

PROVIDES="
	apng2gif = $portVersion
	cmd:apng2gif = $portVersion
	"
REQUIRES="
	haiku
	lib:libpng16
	lib:libz
	"

BUILD_REQUIRES="
	haiku_devel
	devel:libpng16
	devel:libz
	"
BUILD_PREREQUIRES="
	cmd:gcc
	cmd:ld
	cmd:make
	"

BUILD()
{
	make LIBS="$LIBS"
}

INSTALL()
{
	install -d -m 755 $binDir $docDir
	install -t $binDir -c -m 555 -s apng2gif
	install -t $docDir -c -m 444 readme.txt
}
