SUMMARY="A simple thesaurus"
DESCRIPTION="MyThes is a simple thesaurus that used a structured text \
data file and an index file with binary search to lookup words \
and phrases and return information on part of speech, \
meanings, and synonyms.

- written in C++ to make it easier to interface with \
LibreOffice, OpenOffice, AbiWord, Pspell, etc
- it is stateless, uses no static variables and \
should be completely reentrant with no ifdefs  
- it compiles with -ansi and -pedantic and -Wall \
with no warnigns so it shouldbe quite portable
- it uses a simple perl program to read the structured \
text file and create the index needed for binary \
searching
- it is very simple with *lots* of comments. \
The main "smarts" are in the structure of the \
text file that makes up the thesaurus data
- It comes with a ready-to-go structured thesaurus \
data file for en_US extracted from the WordNet-2.0 data.
- Please see WordNet_license.txt and WordNet_readme.txt \
for more information on the very useful project!
- See http://www.danielnaber.de/wn2ooo/ for utilities to \
regenerate an up to date English thesaurus from the most \
recent WordNet data."
HOMEPAGE="http://sourceforge.net/projects/hunspell/files/MyThes/1.2.4"
SOURCE_URI="http://prdownloads.sf.net/hunspell/mythes-1.2.4.tar.gz"
CHECKSUM_SHA256="1e81f395d8c851c3e4e75b568e20fa2fa549354e75ab397f9de4b0e0790a305f"
COPYRIGHT="1994 - 2009 Free Software Foundation, Inc."
LICENSE="BSD (2-clause)"
REVISION="1"

PROVIDES="
	mythes$secondaryArchSuffix = $portVersion
	cmd:mythes = $portVersion
	cmd:th_gen_idx.pl
	lib:libmythes_1.2$secondaryArchSuffix = $portVersion
	"

PROVIDES_devel="
	devel:libmythes_1.2$secondaryArchSuffix = $portVersion
	mythes${secondaryArchSuffix}_devel = $portVersion
	"

ARCHITECTURES="x86_gcc2"
SECONDARY_ARCHITECTURES="x86"

REQUIRES="
	haiku$secondaryArchSuffix
	lib:libhunspell_1.3$secondaryArchSuffix
	cmd:perl
	"

REQUIRES_devel="
	mythes$secondaryArchSuffix == $portVersion base
	"

BUILD_REQUIRES="
	devel:libhunspell_1.3$secondaryArchSuffix
	"

BUILD_PREREQUIRES="
	cmd:gcc$secondaryArchSuffix
	cmd:make
	cmd:pkg_config$secondaryArchSuffix
	cmd:awk
	haiku${secondaryArchSuffix}_devel
	"

BUILD()
{
	runConfigure ./configure
	make $jobArgs
}

INSTALL()
{
	make install

	prepareInstalledDevelLibs \
		libmythes-1.2
	packageEntries devel \
		$developDir
}