SUMMARY="A BSD licensed replacement for the GNU readline library"
DESCRIPTION="
This is an autotool- and libtoolized port of the NetBSD Editline library \
(libedit). This Berkeley-style licensed command line editor library provides \
generic line editing, history, and tokenization functions, similar to those \
found in GNU Readline.
"
LICENSE="BSD (3-clause)"
COPYRIGHT="1992-2012 The NetBSD Foundation, Inc."
HOMEPAGE="http://www.thrysoee.dk/editline/"
SRC_URI="http://www.thrysoee.dk/editline/libedit-20120601-3.0.tar.gz"
CHECKSUM_MD5="e50f6a7afb4de00c81650f7b1a0f5aea"
REVISION="1"
ARCHITECTURES="x86_gcc2 x86 x86_64"

PATCHES="libedit-2012_06_01_3.0.patch"

PROVIDES="
	libedit = $portVersion
	lib:libedit = 0.0.41 compat >= 0
	"
REQUIRES="
	haiku >= $haikuVersion
	lib:libncurses
	"
BUILD_REQUIRES="
	devel:libncurses
	"
BUILD_PREREQUIRES="
	haiku_devel >= $haikuVersion
	cmd:aclocal
	cmd:autoreconf
	cmd:gcc
	cmd:ld
	cmd:libtoolize
	cmd:make
	cmd:sed
	"

SOURCE_DIR="libedit-20120601-3.0"

BUILD()
{
	autoreconf --force --install
	runConfigure ./configure
	make $jobArgs
}

INSTALL()
{
	make install

	prepareInstalledDevelLibs libedit
	fixPkgconfig

	# devel package
	packageEntries devel \
		$developDir \
		$manDir/man3
}


# ----- devel package -------------------------------------------------------

PROVIDES_devel="
	libedit_devel = $portVersion
	devel:libedit = 0.0.41 compat >= 0
	"
REQUIRES_devel="
	libedit == $portVersion base
	"
