SUMMARY="Editor for programmers"
DESCRIPTION="Jed is a small, fast and powerful text editor.\
It is completely customizable with prepared emulation modes for Emacs, \
CUA (similar to Openoffice), Borland-IDE, Brief, and EDT using the S-Lang \
scripting language (with a syntax resembling C)."
HOMEPAGE="http://www.jedsoft.org/jed/"
COPYRIGHT="1992, 1998-2009 John E. Davis"
LICENSE="GNU GPL v2"
REVISION="2"
SOURCE_URI="http://www.jedsoft.org/snapshots/jed-pre0.99.20-128.tar.gz"
CHECKSUM_SHA256="51a98c72064b4654ec8143643478a6d98d2642081d06d994aa90a0d7ddd2e7e1"
SOURCE_DIR="jed-pre0.99.20-128"
PATCHES="jed-$portVersion.patchset"

ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"

PROVIDES="
	jed$secondaryArchSuffix = $portVersion
	cmd:jed$secondaryArchSuffix
	cmd:jed_script$secondaryArchSuffix
	#cmd:xjed$secondaryArchSuffix
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libncurses$secondaryArchSuffix
	lib:libslang$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libncurses$secondaryArchSuffix
	devel:libslang$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	cmd:aclocal
	cmd:autoconf
	cmd:awk
	cmd:gcc$secondaryArchSuffix
	cmd:libtoolize$secondaryArchSuffix
	cmd:make
	cmd:pkg_config$secondaryArchSuffix
	"

BUILD()
{
	export LDFLAGS="-lncurses -lnetwork"
	cd autoconf
	autoconf
	cd ..
	chmod +x ./configure
	runConfigure ./configure --with-slanglib=$libDir \
		--with-slanginc=$developDir JED_ROOT=$docDir
	make clean
	make $jobArgs
}

INSTALL()
{
	mkdir -p $libDir/jed $docDir/jed
	touch src/objs/xjed
	make install
	rm $binDir/xjed
}
