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/"
COPYRIGHT="2002-2021 Bill Kendrick and others"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="https://downloads.sourceforge.net/tuxpaint/tuxpaint-$portVersion.tar.gz"
CHECKSUM_SHA256="4aa83eb2e67bfc7e3493366d0ea231da46b9e6a9c552bf267ec868241fffa8f1"

ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"

USER_SETTINGS_FILES="
	settings/TuxPaint directory
	"

PROVIDES="
	tuxpaint$secondaryArchSuffix = $portVersion
	app:TuxPaint
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libcairo$secondaryArchSuffix
	lib:libfribidi$secondaryArchSuffix
	lib:libgdk_pixbuf_2.0$secondaryArchSuffix
	lib:libgio_2.0$secondaryArchSuffix
	lib:libglib_2.0$secondaryArchSuffix
	lib:libgobject_2.0$secondaryArchSuffix
	lib:libiconv$secondaryArchSuffix
	lib:libimagequant$secondaryArchSuffix
	lib:libintl$secondaryArchSuffix
	lib:libpaper$secondaryArchSuffix
	lib:libpng16$secondaryArchSuffix
	lib:librsvg_2$secondaryArchSuffix
	lib:libSDL_1.2$secondaryArchSuffix
	lib:libSDL_image_1.2$secondaryArchSuffix
	lib:libSDL_mixer_1.2$secondaryArchSuffix
	lib:libSDL_pango$secondaryArchSuffix
	lib:libSDL_ttf_2.0$secondaryArchSuffix
	lib:libz$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libcairo$secondaryArchSuffix
	devel:libfribidi$secondaryArchSuffix
	devel:libgdk_pixbuf_2.0$secondaryArchSuffix
	devel:libiconv$secondaryArchSuffix
	devel:libimagequant$secondaryArchSuffix
	devel:libintl$secondaryArchSuffix
	devel:libpaper$secondaryArchSuffix
	devel:libpng16$secondaryArchSuffix
	devel:librsvg_2$secondaryArchSuffix
	devel:libSDL_1.2$secondaryArchSuffix
	devel:libSDL_image_1.2$secondaryArchSuffix
	devel:libSDL_mixer_1.2$secondaryArchSuffix
	devel:libSDL_pango$secondaryArchSuffix
	devel:libSDL_ttf_2.0$secondaryArchSuffix
	devel:libz$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	cmd:convert$secondaryArchSuffix
	cmd:gcc$secondaryArchSuffix
	cmd:gperf
	cmd:ld$secondaryArchSuffix
	cmd:make
	cmd:pkg_config$secondaryArchSuffix
	"

BUILD()
{
	make PREFIX=$appsDir/TuxPaint
}

INSTALL()
{
	mkdir -p $appsDir/TuxPaint

	make install PREFIX=$appsDir/TuxPaint
	ln -s $appsDir/TuxPaint/bin/tuxpaint $appsDir/TuxPaint/TuxPaint

	addAppDeskbarSymlink $appsDir/TuxPaint/bin/tuxpaint TuxPaint
}
