DESCRIPTION="
Paladin is an open source integrated development environment (IDE) modeled \
after BeOS' BeIDE.
"
HOMEPAGE="http://paladin.sourceforge.net" 
SRC_URI="hg+http://paladin.hg.sourceforge.net:8000/hgroot/paladin/paladin"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND=""
#CHECKSUM_MD5=""
BUILD()
{
	cd paladin-1.3-hg
#	./buildsuite.sh 1
	cd Paladin
#	chmod 755 buildhaikugcc2.sh
#	chmod 755 buildhaikugcc4.sh
	if [ -n "$(setgcc | grep '2')" ]; then
   		./buildhaikugcc2.sh
   		cd ../SymbolFinder
    	../Paladin/Paladin -r -d SymbolFinder.pld   		
	else
		./buildhaikugcc4.sh
		cd ../SymbolFinder
		sed -i 's/gcc4\///g' *
		make
		cp objects.x86-gcc4-release/SymbolFinder SymbolFinder
	fi
	cd ../PalEdit
	jam
}

INSTALL()
{
	cd paladin-1.3-hg
	mkdir -p ${DESTDIR}/`finddir B_APPS_DIRECTORY`/Paladin
	cp -f Paladin/Paladin ${DESTDIR}/`finddir B_APPS_DIRECTORY`/Paladin/
	cp -f Paladin/WHAT* ${DESTDIR}/`finddir B_APPS_DIRECTORY`/Paladin/
	cp -f Paladin/README ${DESTDIR}/`finddir B_APPS_DIRECTORY`/Paladin/
	cp -f -r Paladin/Templates ${DESTDIR}/`finddir B_APPS_DIRECTORY`/Paladin/
	cp -f -r PalEdit/generated/distro/* ${DESTDIR}/`finddir B_APPS_DIRECTORY`/Paladin/
	cp -f SymbolFinder/SymbolFinder ${DESTDIR}/`finddir B_APPS_DIRECTORY`/Paladin/
	cp -f -r Paladin/Licenses ${DESTDIR}/`finddir B_APPS_DIRECTORY`/Paladin/
}
LICENSE="MIT"
COPYRIGHT="2008-2011 DarkWyrm"
