SUMMARY="An open source integrated development environment (IDE)"
DESCRIPTION="Paladin is an open source integrated development environment (IDE) \
modeled after BeOS' BeIDE.

Paladin's feature set includes:

- Command-line build support
- Quick find file with Alt+F
- Multithreaded builds
- Revision control-friendly project files
- More run options for projects
- Explicit support for debugging with gdb under Haiku
- Bundled helper tools
- Streamlined project settings
- Out-of-the-box support for Lex and Yacc
- Support for text and binary resource files
- Projects can include notes and other files that aren't source code
- Project templates
- Out-of-the-box makefile generation
- Integrated source code management
- 1-click project backups"
HOMEPAGE="https://github.com/adamfowleruk/Paladin"
COPYRIGHT="2001-2010 DarkWyrm
       2014 John Scipione
       2018-2019 Adam Fowler"
LICENSE="MIT"
REVISION="2"
srcGitRev="9ea26012d1dc05f3bb42bcd3c971ac7a611570b9"
SOURCE_URI="https://github.com/adamfowleruk/Paladin/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="6cdb0ed4020d1a65e509dae8328ead14f1de3b9a6931d6fcbd351d2b39ad74e3"
SOURCE_DIR="Paladin-$srcGitRev"
if [ $effectiveTargetArchitecture == 'x86_gcc2' ]; then
		PATCHES="$PATCHES
		paladin-$portVersion-gcc2.patchset"
fi

ARCHITECTURES="all"

USER_SETTINGS_FILES="settings/Paladin_settings"

PROVIDES="
	paladin = $portVersion
	app:Paladin
	app:SymbolFinder
	"
REQUIRES="
	haiku
	# required by templates
	haiku_devel
	lib:libpcre
	lib:libz
	"

BUILD_REQUIRES="
	haiku_devel
	devel:libpcre
	unittest++_devel
	devel:libz
	"
BUILD_PREREQUIRES="
	makefile_engine
	cmd:find
	cmd:gcc
	cmd:ld
	cmd:make
	"

BUILD()
{
	./buildsuite.sh $jobs
}

INSTALL()
{
	mkdir -p $appsDir/Paladin $appsDir/Paladin/Documentation
	mkdir -p $binDir

	cp -r Documentation $appsDir/Paladin
	rm $appsDir/Paladin/Documentation/KeltFont.zip
	cp -r Paladin/Paladin Paladin/Templates $appsDir/Paladin/
	cp SymbolFinder/SymbolFinder $appsDir/Paladin/

	addAppDeskbarSymlink $appsDir/Paladin/Paladin Paladin
}
