SUMMARY="A Free, High-Quality, and Portable Font Engine"
DESCRIPTION="
FreeType is written in C, designed to be small, efficient, highly \
customizable, and portable while capable of producing high-quality output \
(glyph images) of most vector and bitmap font formats.
"
HOMEPAGE="http://www.freetype.org"
LICENSE="FreeType"
COPYRIGHT="1996-2012 David Turner, Robert Wilhelm, Werner Lemberg, et al."
SRC_URI="http://download.savannah.gnu.org/releases/freetype/freetype-2.4.9.tar.bz2"
CHECKSUM_MD5="77a893dae81fd5b896632715ca041179"
REVISION="3"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"

PROVIDES="
	freetype$secondaryArchSuffix = $portVersion
	lib:libfreetype$secondaryArchSuffix = 6.8.1 compat >= 6
	"
REQUIRES="
	haiku$secondaryArchSuffix >= $haikuVersion
	lib:libz$secondaryArchSuffix >= 1
	"
BUILD_REQUIRES="
	devel:libz$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	haiku${secondaryArchSuffix}_devel >= $haikuVersion
	cmd:aclocal
	cmd:autoconf
	cmd:automake
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:libtoolize
	cmd:make
	"

BUILD()
{
	./autogen.sh
	runConfigure ./configure
	make $jobArgs
}

INSTALL()
{
	make install

	prepareInstalledDevelLibs libfreetype
	fixPkgconfig

	# devel package
	packageEntries devel \
		$binDir \
		$dataRootDir/aclocal \
		$developDir
}

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

PROVIDES_devel="
	freetype${secondaryArchSuffix}_devel = $portVersion
	cmd:freetype_config${secondaryArchSuffix} = $portVersion
	devel:libfreetype${secondaryArchSuffix} = 6.8.1 compat >= 6
	"
REQUIRES_devel="
	freetype${secondaryArchSuffix} == $portVersion base
	"
