SUMMARY="Simple Direct Media Layer Image Library" 
DESCRIPTION="
SDL_ttf is a TrueType font rendering library that is used with the SDL \
library, and almost as portable. It depends on freetype2 to handle the \
TrueType font data. It allows a programmer to use multiple TrueType fonts \
without having to code a font rendering routine themselves. With the power of \
outline fonts and antialiasing, high quality text output can be obtained \
without much effort.
"
HOMEPAGE="http://www.libsdl.org/projects/SDL_ttf/release-1.2.html" 
SRC_URI="http://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-2.0.11.tar.gz"
CHECKSUM_SHA256="724cd895ecf4da319a3ef164892b72078bd92632a5d812111261cde248ebcdb7"
LICENSE="Zlib"
COPYRIGHT="1997-2012 Sam Lantinga"

REVISION="1"

ARCHITECTURES="x86 x86_gcc2"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"

PROVIDES="
	sdl_ttf$secondaryArchSuffix = $portVersion compat >= 1.2
	lib:libSDL_ttf$secondaryArchSuffix = 2.0_0.10.1 compat >= 2.0_0
	lib:libSDL_ttf_2.0$secondaryArchSuffix = 0.10.1 compat >= 0
	"

REQUIRES="
	haiku$secondaryArchSuffix >= $haikuVersion
	lib:libsdl$secondaryArchSuffix
	lib:libfreetype$secondaryArchSuffix
	lib:libz$secondaryArchSuffix
	lib:libGL$secondaryArchSuffix
	"

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

BUILD_PREREQUIRES="
	cmd:libtoolize
	cmd:aclocal
	cmd:automake
	cmd:autoconf
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:sdl_config$secondaryArchSuffix
	cmd:make
	cmd:freetype_config$secondaryArchSuffix
	"

SOURCE_DIR="SDL_ttf-$portVersion"

BUILD()
{
	libtoolize --copy --force --install
	aclocal --install -I acinclude
	autoconf
	runConfigure ./configure --with-x=no
	make
}

INSTALL()
{
	make install

	prepareInstalledDevelLibs libSDL_ttf \
			libSDL_ttf-2.0
	fixPkgconfig

	packageEntries devel \
			$developDir
}

PROVIDES_devel="
	sdl_ttf${secondaryArchSuffix}_devel = 2.0.11 compat >= 1.2
	devel:sdl_ttf$secondaryArchSuffix = 2.0.11 compat >= 1.2
	devel:libSDL_ttf$secondaryArchSuffix = 2.0_0.10.1 compat >= 2.0_0
	devel:libSDL_ttf_2.0$secondaryArchSuffix = 0.10.1 compat >= 0
	"

REQUIRES_devel="
	sdl_ttf$secondaryArchSuffix == $portVersion base
	"
