SUMMARY="A platform game in which you play an angry bear whose son has been kidnapped by god."
HOMEPAGE="http://www.stuff-o-matic.com/plee-the-bear/"
LICENSE="GNU GPL v3"
COPYRIGHT="2012 Stuff O Matic"
SRC_URI="http://www.stuff-o-matic.com/plee-the-bear/download/file.php?platform=source"
CHECKSUM_SHA256="41dfe864fe2d791d6f99ba7cd330e22c94fce19d82909054eeac594aa4f2924e"
SRC_FILENAME="plee-the-bear-0.7.0.tgz"

REVISION="1"
ARCHITECTURES="?x86"
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
	# x86_gcc2 is fine as primary target architecture as long as we're building
	# for a different secondary architecture.
	ARCHITECTURES="$ARCHITECTURES !x86_gcc2"
fi
SECONDARY_ARCHITECTURES="x86"

PROVIDES="
	plee_the_bear = $portVersion
	cmd:plee_the_bear = $portVersion
	lib:libbear_audio$secondaryArchSuffix
	lib:libbear_communication$secondaryArchSuffix
	lib:libbear_debug$secondaryArchSuffix
	lib:libbear_engine$secondaryArchSuffix
	lib:libbear_expr$secondaryArchSuffix
	lib:libbear_generic_items$secondaryArchSuffix
	lib:libbear_gui$secondaryArchSuffix
	lib:libbear_input$secondaryArchSuffix
	lib:libbear_net$secondaryArchSuffix
	lib:libbear_text_interface$secondaryArchSuffix
	lib:libbear_time$secondaryArchSuffix
	lib:libbear_universe$secondaryArchSuffix
	lib:libbear_visual$secondaryArchSuffix
	"

REQUIRES="
	haiku$secondaryArchSuffix >= $haikuVersion
	lib:libstdc++$secondaryArchSuffix
	lib:libsdl2$secondaryArchSuffix
	lib:libsdl$secondaryArchSuffix
	lib:libsdl2_mixer$secondaryArchSuffix
	lib:libintl$secondaryArchSuffix
	lib:libGL$secondaryArchSuffix
	lib:libjpeg$secondaryArchSuffix
	lib:libpng$secondaryArchSuffix
	lib:libz$secondaryArchSuffix
	lib:libclaw_dynamic_library$secondaryArchSuffix
	lib:libclaw_graphic$secondaryArchSuffix
	lib:libclaw_net$secondaryArchSuffix
	lib:libclaw_tween$secondaryArchSuffix
	lib:libboost_system$secondaryArchSuffix
	lib:libboost_thread$secondaryArchSuffix
	lib:libboost_filesystem$secondaryArchSuffix
	lib:libboost_regex$secondaryArchSuffix
	lib:libfreetype$secondaryArchSuffix
	"
BUILD_REQUIRES="
	devel:libsdl2$secondaryArchSuffix
	devel:libsdl2_mixer$secondaryArchSuffix
	devel:libsdl$secondaryArchSuffix
	devel:sdl_mixer$secondaryArchSuffix
	devel:libfreetype$secondaryArchSuffix
	devel:libclaw_application$secondaryArchSuffix
	devel:libz$secondaryArchSuffix
	devel:libpng$secondaryArchSuffix
	devel:libjpeg$secondaryArchSuffix
	devel:libintl$secondaryArchSuffix
	boost_devel${secondaryArchSuffix}
	"
BUILD_PREREQUIRES="
	haiku${secondaryArchSuffix}_devel >= $haikuVersion
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:make
	cmd:cmake >= 3.0
	"

SOURCE_DIR="plee-the-bear-0.7.0-light"
PATCHES="plee_the_bear-$portVersion.patchset"
BUILD()
{
	cmake . -DBEAR_EDITORS_ENABLED=FALSE -DCMAKE_INSTALL_PREFIX=$prefix
	make $jobArgs
}

INSTALL()
{
	make install
	rm -r $prefix/share

	addAppDeskbarSymlink $binDir/plee_the_bear "Plee the Bear"
}

# ----- DESCRIPTION -----------------------------------------------------------

DESCRIPTION="
Plee the Bear is a platform game in which you play an angry bear whose son has
been kidnapped by god. Here is a guy hard to brave! Jump in this amazing journey
to find and rescue your son. Because you want to rescue him, don't you? Or to
slap him? Maybe both….

With three levels of the storyline and four mini-games, Plee the Bear did
received very positive criticisms. The players loved the fun, the graphics and
the music; the community around the free software movement appreciated the
overall process and the quality of the resources, remarkable for a free game;
and the indie gaming community was pleasantly surprised by the technical skills
and the details of the game.
"
