SUMMARY="aalib is an ASCII rendering 2D library"
DESCRIPTION="
aalib is a software library which allows applications to automatically convert \
still and moving images into ASCII art.
"
HOMEPAGE="http://aa-project.sourceforge.net/aalib/" 
SRC_URI="http://prdownloads.sourceforge.net/aa-project/aalib-1.4rc4.tar.gz"
SOURCE_DIR="aalib-1.4.0"
CHECKSUM_MD5="d5aa8e9eae07b7441298b5c30490f6a6"
REVISION="2"
LICENSE="Public Domain"
COPYRIGHT="1997 Jam Hubicka"

ARCHITECTURES="x86_gcc2 ?x86 ?x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"

PROVIDES="
	aalib$secondaryArchSuffix = $portVersion  compat >= 1
	lib:libaa$secondaryArchSuffix = 1.0.4 compat >= 1
	"

REQUIRES="
	haiku >= $haikuVersion
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel >= $haikuVersion
	"

BUILD_PREREQUIRES="
	cmd:aclocal
	cmd:autoconf
	cmd:automake
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:libtoolize
	cmd:make
	cmd:makeinfo
	cmd:ranlib
	"

PATCHES="
	aalib-1.4rc4.patch
	"

BUILD()
{
	libtoolize --force --copy --install
	aclocal
	autoconf
	automake --add-missing
	runConfigure ./configure
	make $jobArgs
}

INSTALL()
{
	make install
	prepareInstalledDevelLibs libaa
	fixPkgconfig

	# devel package
	packageEntries devel \
				$binDir \
				$dataDir \
				$developDir \
				$documentationDir
}

# ----- devel package -------------------------------------------------------

PROVIDES_devel="
	aalib${secondaryArchSuffix}_devel = $portVersion compat >= 1
	devel:aalib$secondaryArchSuffix = $portVersion compat >= 1
	devel:libaa$secondaryArchSuffix = $portVersion compat >= 1
	cmd:aafire$secondaryArchSuffix = $portVersion compat >= 1
	cmd:aainfo$secondaryArchSuffix = $portVersion compat >= 1
	cmd:aalib_config$secondaryArchSuffix = $portVersion compat >= 1
	cmd:aasavefont$secondaryArchSuffix = $portVersion compat >= 1
	cmd:aatest$secondaryArchSuffix = $portVersion compat >= 1
	"

REQUIRES_devel="
	aalib$secondaryArchSuffix == $portVersion base
	"
