SUMMARY="A TrueType font rendering library for SDL2"
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" 
SOURCE_URI="http://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-2.0.12.tar.gz"
CHECKSUM_SHA256="8728605443ea1cca5cad501dc34dc0cb15135d1e575551da6d151d213d356f6e"
REVISION="3"
LICENSE="Zlib"
COPYRIGHT="1997-2013 Sam Lantinga"

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

PROVIDES="
	sdl2_ttf${secondaryArchSuffix} = $portVersion
	lib:libSDL2_ttf${secondaryArchSuffix}
	lib:libSDL2_ttf_2.0${secondaryArchSuffix}
	"

REQUIRES="
	haiku${secondaryArchSuffix}
	lib:libfreetype${secondaryArchSuffix}
	lib:libSDL2_2.0${secondaryArchSuffix}
	lib:libz${secondaryArchSuffix}
	lib:libbz2${secondaryArchSuffix}
	lib:libpng${secondaryArchSuffix}
	lib:libGL${secondaryArchSuffix}
	lib:libltdl${secondaryArchSuffix}
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libfreetype${secondaryArchSuffix}
	devel:libSDL2${secondaryArchSuffix}
	devel:libz${secondaryArchSuffix}
	devel:libbz2${secondaryArchSuffix}
	devel:libpng${secondaryArchSuffix}
	"

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

SOURCE_DIR="SDL2_ttf-$portVersion"

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

INSTALL()
{
	make install

	prepareInstalledDevelLibs libSDL2_ttf
	fixPkgconfig

	packageEntries devel \
		$developDir
}

PROVIDES_devel="
	sdl2_ttf${secondaryArchSuffix}_devel = ${portVersion} compat >= 1.2
	devel:sdl2_ttf$secondaryArchSuffix = ${portVersion} compat >= 1.2
	devel:libSDL2_ttf$secondaryArchSuffix = 2.0_0.10.1 compat >= 2.0_0
	"

REQUIRES_devel="
	sdl2_ttf$secondaryArchSuffix == $portVersion base
	"
