SUMMARY="A free word processing program similar to Microsoft® Word"
DESCRIPTION="AbiWord is a free word processing program similar to Microsoft® \
Word. It is suitable for a wide variety of word processing tasks.

AbiWord allows you to collaborate with multiple people on one document at the \
same time. It is tightly integrated with the AbiCollab.net web service, which \
lets you store documents online, allows easy document sharing with your \
friends, and performs format conversions on the fly.
"
HOMEPAGE="http://www.abiword.org"
REVISION="2"
LICENSE="GNU GPL v2"
COPYRIGHT="1998-2014 the AbiSource community"
ARCHITECTURES="x86_gcc2 x86"

SOURCE_URI="git+https://github.com/HaikuArchives/AbiWord.git#12071fa238640022e7160415ce0a960ebd7591db"

PROVIDES="
	abiword = $portVersion
	app:AbiWord
"

REQUIRES="
	lib:libfribidi
	lib:libexpat
	lib:libiconv
	lib:libpng
	lib:libpopt
	lib:libpsiconv
	lib:libxml2
	lib:libz
	lib:libstdc++
"

BUILD_REQUIRES="
	devel:libfribidi
	devel:libexpat
	devel:libiconv
	devel:libpng
	devel:libpopt
	devel:libpsiconv
	devel:libxml2
	devel:libz
"

BUILD_PREREQUIRES="
	haiku_devel
	cmd:gcc
	cmd:make
	cmd:ld
"

BUILD()
{
	chmod +x abi/configure
	chmod +x wv/configure
	cd abi/src
	# AbiWord doesn't build with multiple jobs specified
	make
}

INSTALL()
{
	mkdir $appsDir
	cp abi/src/*/bin/* $appsDir
	addAppDeskbarSymlink $appsDir/AbiWord AbiWord
}
