SUMMARY="Drawing program designed for young children"
DESCRIPTION="
Tux Paint is a free, award-winning drawing program for children \
ages 3 to 12 (for example, preschool and K-6). Tux Paint is used \
in schools and around the world as a computer literacy drawing activity. \
It combines an easy-to-use interface, fun sound effects, and an \
encouraging cartoon mascot who guides children as they use the program.
"
HOMEPAGE="http://www.tuxpaint.org/" 
SOURCE_URI="http://sourceforge.net/projects/tuxpaint/files/tuxpaint/0.9.22/tuxpaint-$portVersion.tar.gz"
CHECKSUM_SHA256="8abd932f8e36fad795bba0290c094c9c221e424c4b9aa8c763b7fb3459cb2be3"
COPYRIGHT="2002-2010 Bill Kendrick and others"
LICENSE="GNU GPL v2"
REVISION="1"

ARCHITECTURES="x86 ?x86_gcc2 ?x86_64"

PATCHES="tuxpaint-$portVersion.patchset"

PROVIDES="
	tuxpaint = $portVersion
	"

REQUIRES="
	haiku
	lib:libfribidi
	lib:libiconv
	lib:libintl
	lib:libpaper
	lib:libpng
	lib:libsdl
	lib:libSDL_ttf
	lib:libSDL_image
	lib:libSDL_mixer
	lib:libz
	"

BUILD_REQUIRES="
	haiku_devel
	devel:libfribidi
	devel:libiconv
	devel:libintl
	devel:libpaper
	devel:libpng
	devel:libsdl
	devel:libSDL_ttf
	devel:libSDL_image
	devel:libSDL_mixer
	devel:libz
	"

BUILD_PREREQUIRES="
	cmd:make
	cmd:gcc
	cmd:gperf
	cmd:pkg_config
	cmd:ld
	"

USER_SETTING_FILES="
	settings/TuxPaint directory
	"

BUILD()
{
	make $jobArgs FRIBIDI_LIB=-lfribidi PREFIX=$appsDir/TuxPaint
}

INSTALL()
{
	mkdir -p $appsDir/TuxPaint
	
	make install DESTDIR=$appsDir/TuxPaint
	ln -s $appsDir/TuxPaint/bin/tuxpaint $appsDir/TuxPaint/TuxPaint
	
	addAppDeskbarSymlink $appsDir/TuxPaint/bin/tuxpaint TuxPaint
}
