SUMMARY="Load and save bitmaps from Allegro programs"
DESCRIPTION="loadpng is some glue that makes it easy to use libpng to load \
and save bitmaps from Allegro programs."
HOMEPAGE="https://tjaden.strangesoft.net/loadpng/"
COPYRIGHT="1997-2004 Psyk Software."
LICENSE="Public Domain"
REVISION="1"
SOURCE_URI="https://tjaden.strangesoft.net/loadpng/loadpng-1.5.tar.gz"
CHECKSUM_SHA256="ba0e496e5368de70e6df43cb5500468cda402e63ab95b6a466e29ec6b795b7d7"
PATCHES="loadpng-$portVersion.patchset"

ARCHITECTURES="?all"

libVersion="1.5"

PROVIDES="
	loadpng = $portVersion
	lib:libloadpng_$libVersion = $libVersion compat >= 1
	"
REQUIRES="
	haiku
	lib:liballeg
	lib:libpng16
	lib:libz
	"

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

BUILD()
{
	make $jobArgs shared
}

INSTALL()
{
	mkdir -p $libDir $includeDir

	cp libloadpng-$libVersion.so $libDir
	cp loadpng.h $includeDir
}
