SUMMARY="A cross platform IDE written in C++/Qt 4"
DESCRIPTION="MonkeyStudio's primary goal was to be a Qt 4 only IDE, but it \
evolved to be a way to support any kind of project. It supports Qt 4 \
project management and embeds Designer and Assistant to form a complete, \
fast and powerful Qt-based IDE. It's based upon a flexible plugin system \
that allows extending it in a near-infinite manner."
HOMEPAGE="http://www.monkeystudio.org"
SOURCE_URI="http://monkeystudio.googlecode.com/files/mks_1.9.0.4-src.tar.gz"
CHECKSUM_SHA256="cfd3517ac6d4a5d8ffdf7ec9995a624b6cef13aa00163e46a9b54b1f52164ffd"
SOURCE_DIR="mks_$portVersion-src"
PATCHES="monkeystudio-$portVersion.patch"
REVISION="1"
LICENSE="GNU GPL v2"
COPYRIGHT="2005-2012 Azevedo Filipe & The Monkey Studio Team"

ARCHITECTURES="x86 ?x86_64"
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
	ARCHITECTURES="$ARCHITECTURES x86_gcc2"
fi
SECONDARY_ARCHITECTURES="x86"

PROVIDES="
	monkeystudio${secondaryArchSuffix} = $portVersion
	app:MonkeyStudio${secondaryArchSuffix} = $portVersion
	"

REQUIRES="
	haiku${secondaryArchSuffix}
	libqt4${secondaryArchSuffix} >= 4.8.0
	"

BUILD_PREREQUIRES="
	cmd:qmake${secondaryArchSuffix}
	cmd:make
	cmd:g++${secondaryArchSuffix}
	"
        
BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	libqt4${secondaryArchSuffix}_devel >= 4.8.0
	"

BUILD()
{
	qmake -set SYSTEM_QSCINTILLA 0
	qmake -r prefix=$appsDir/MonkeyStudio
	make $jobArgs
}

INSTALL()
{
	monkeyDir=$appsDir/MonkeyStudio
	mkdir -p $monkeyDir
	make install

	mv $monkeyDir/bin/monkeystudio $monkeyDir/bin/MonkeyStudio
	rm -rf $monkeyDir/share/applications
	rm -rf $monkeyDir/share/doc
	
	addAppDeskbarSymlink $monkeyDir/bin/MonkeyStudio "MonkeyStudio"
}
