SUMMARY="A set of libraries and applications for Thesaurus"
DESCRIPTION="Aiksaurus is a set of libraries and applications which provide \
a thesaurus (currently English only, based on Guttenburg's Moby thesaurus) \
using native GUI on several platforms:
* UNIX (GTK+ & Qt)
* Win32 & MacOSX (Cocoa)
The core library itself is platform-independent. The principal language is \
C++, with some use of Cocoa/ObjC++; wrappers are provided for C and Cocoa/ObjC."
HOMEPAGE="http://aiksaurus.sourceforge.net"
COPYRIGHT="2001-2005 Jared Davis
	2004 Dom Lachowicz
	2001-2003 Francis J. Franklin
	2001-2002 John Levon
	2001 Michael D. Pritchett"
LICENSE="GNU GPL v2"
REVISION="1"
srcGitRev="c897e56c757df065463d50322b2590dfec0af067"
SOURCE_URI="https://github.com/AbiWord/aiksaurus/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="6fe47475d38a06d45cd1e29af397b2d46d225f99cd5ced35aa42f3e73d98a566"
SOURCE_FILENAME="aiksaurus-$portVersion.tar.gz"
SOURCE_DIR="aiksaurus-$srcGitRev"
PATCHES="aiksaurus-$portVersion.patchset"

ARCHITECTURES="all"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"

libVersion="1.0.1"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"

PROVIDES="
	aiksaurus$secondaryArchSuffix = $portVersion
	cmd:aiksaurus$secondaryArchSuffix = $portVersion
	cmd:caiksaurus$secondaryArchSuffix = $portVersion
	lib:libAiksaurus_1.2$secondaryArchSuffix = $libVersionCompat
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libintl$secondaryArchSuffix
	"

PROVIDES_devel="
	aiksaurus${secondaryArchSuffix}_devel = $portVersion
	devel:libAiksaurus$secondaryArchSuffix = $libVersionCompat
	"
REQUIRES_devel="
	aiksaurus$secondaryArchSuffix == $portVersion base
	"

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

defineDebugInfoPackage aiksaurus$secondaryArchSuffix \
	"$binDir"/aiksaurus \
	"$binDir"/caiksaurus \
	"$libDir"/libAiksaurus-1.2.so.$libVersion

BUILD()
{
	./autogen.sh
	runConfigure ./configure --datadir=$dataDir
	make $jobArgs
}

INSTALL()
{
	make install

	rm -f "$libDir"/*.la
	rm -r "$dataDir"/applications

	prepareInstalledDevelLib libAiksaurus
	fixPkgconfig

	packageEntries devel \
		$developDir
}
