SUMMARY="The 'nice editor'"
DESCRIPTION="ne is one of the few text editors which are \
both easy to use for beginners and powerful enough for powerusers. \
It supports UTF-8 and multi-column characters as well as syntax highlighting. \
Is also has fully configurable key bindings and supports macros."
HOMEPAGE="https://ne.di.unimi.it/"
COPYRIGHT="1993-1998 Sebastiano Vigna
	1999-2010 Todd M. Lewis and Sebastiano Vigna"
LICENSE="GNU GPL v2"
REVISION="3"
SOURCE_URI="https://github.com/vigna/ne/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="a88a24153a17844bb2dfbc3c76a6fbd1d456ee0e8215d5139551cf082627596a"
PATCHES="ne-$portVersion.patchset"

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

PROVIDES="
	ne$secondaryArchSuffix = $portVersion
	cmd:ne$secondaryArchSuffix = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	cmd:aspell
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libncurses$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	makefile_engine
	cmd:gcc$secondaryArchSuffix
	cmd:make
	cmd:makeinfo
	cmd:perl
	"

BUILD()
{
	make $jobArgs CC=gcc NE_ANSI=1 NE_TERMCAP=1 NE_GLOBAL_DIR=$dataDir/ne
}

INSTALL()
{
	mkdir -p $binDir $manDir/man1 $dataDir/ne/syntax $docDir

	cp -pf src/ne $binDir
	cp -p syntax/*.jsf $dataDir/ne/syntax
	cp -pr macros $dataDir/ne
	cp -pr doc/html doc/ne.txt doc/default.* \
		README.md COPYING NEWS CHANGES $docDir
	cp -p doc/ne.1 $manDir/man1
}
