SUMMARY="A programmer's editor"
DESCRIPTION="
Pe is a native programmer's editor for Haiku. It features syntax highlighting \
and a structural view for several programming language, as well as basic \
support for Makefile and Jamfile project management.
"
HOMEPAGE="http://pe-editor.berlios.de/"
LICENSE="
	BSD (4-clause)
	MIT
	"
COPYRIGHT="
	1996-2002 Maarteen Hekkelman
	2003-2013 Team Pe
	"
SRC_URI="hg+http://hg.berlios.de/repos/pe-editor#606"
REVISION="1"
ARCHITECTURES="x86_gcc2 x86 x86_64"

PATCHES="pe-2.4.3_adjustments_for_pm.patchset"

PROVIDES="
	pe = $portVersion
	cmd:Pe = $portVersion compat >= 2
	cmd:lpe = $portVersion compat >= 2
	"

REQUIRES="
	haiku >= $haikuVersion
	lib:libpcre
	lib:libpcreposix
	"
BUILD_REQUIRES="
	devel:libpcre >= 0.0.1
	devel:libpcreposix >= 0.0.1
	"
BUILD_PREREQUIRES="
	haiku_devel >= $haikuVersion
	cmd:bison
	cmd:flex
	cmd:gcc
	cmd:jam
	cmd:ld
	"

USER_SETTINGS_FILES="
	settings/pe directory
	"


BUILD()
{
	jam -q
		# multi-job builds don't work reliably
}

INSTALL()
{
	peDir=$appsDir/Pe

	mkdir -p $appsDir
	cp -a generated/distro $peDir
	cp -a doc $peDir/Documentation

	mkdir $binDir
	ln -sfn $peDir/lpe $binDir

	addAppDeskbarSymlink $peDir/Pe
}
