SUMMARY="aspell - a free and open source spell checker"
DESCRIPTION="
GNU Aspell is a Free and Open Source spell checker designed to eventually \
replace Ispell. It can either be used as a library or as an independent spell \
checker. Its main feature is that it does a superior job of suggesting \
possible replacements for a misspelled word than just about any other spell \
checker out there for the English language. Unlike Ispell, Aspell can also \
easily check documents in UTF-8 without having to use a special dictionary. \
Aspell will also do its best to respect the current locale setting. Other \
advantages over Ispell include support for using multiple dictionaries at once \
and intelligently handling personal dictionaries when more than one Aspell \
process is open at once.
"
LICENSE="GNU LGPL v2"
COPYRIGHT="2000-2006 Kevin Atkinson"
HOMEPAGE="http://aspell.net" 
SRC_URI="ftp://ftp.gnu.org/gnu/aspell/aspell-0.60.6.1.tar.gz"
REVISION="1"
ARCHITECTURES="x86 x86_gcc2"
CHECKSUM_MD5="e66a9c9af6a60dc46134fdacf6ce97d7"

PROVIDES="
	aspell = $portVersion compat >= 0.60
	cmd:aspell = $portVersion compat >= 0.60
	cmd:aspell_import = $portVersion compat >= 0.60
	cmd:precat = $portVersion compat >= 0.60
	cmd:preunzip = $portVersion compat >= 0.60
	cmd:prezip = $portVersion compat >= 0.60
	cmd:prezip_bin = $portVersion compat >= 0.60
	cmd:pspell_config = $portVersion compat >= 0.60
	cmd:run_with_aspell = $portVersion compat >= 0.60
	cmd:word_list_compress = $portVersion compat >= 0.60
	lib:libaspell = $portVersion compat >= 0.15
	lib:libpspell = $portVersion compat >= 0.15
	"

REQUIRES="
	haiku >= $haikuVersion
	lib:libncurses
	"

BUILD_REQUIRES="
	devel:libncurses
	"

BUILD_PREREQUIRES="
	haiku_devel >= $haikuVersion
	cmd:libtoolize
	cmd:aclocal
	cmd:autoconf
	cmd:automake
	cmd:make
	cmd:gcc
	cmd:perl
	"

PROVIDES_devel="
	aspell_devel = $portVersion compat >= 0.60
	devel:libaspell = $portVersion compat >= 0.15
	devel:libpspell = $portVersion compat >= 0.15
	"

REQUIRES_devel="
	aspell == $portVersion
	"


PATCH()
{
	sed -i "s,AM_CONFIG_HEADER,AC_CONFIG_HEADERS," configure.ac
}

BUILD()
{
	libtoolize --force --copy --install
	aclocal -I m4
	autoconf
	automake
	runConfigure ./configure \
	--enable-dict-dir=$dataDir/aspell-0.60
	make
}

INSTALL()
{
	make install
	prepareInstalledDevelLibs libaspell libpspell
	packageEntries devel $developDir
}
