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="https://www.abisource.com/"
COPYRIGHT="1998-2014 the AbiSource community"
LICENSE="GNU GPL v2"
REVISION="4"
srcGitRev="217fbb622ee64efc181cd67d2742d6a60a086e2d"
SOURCE_URI="https://github.com/HaikuArchives/AbiWord/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="7ec2ddca905c8ccb923315d952d04e90a4c124d50dc42dddbd1957a8ee6e915e"
SOURCE_DIR="AbiWord-$srcGitRev"

ARCHITECTURES="!all x86_gcc2"

PROVIDES="
	abiword = $portVersion
	app:AbiWord
	"
REQUIRES="
	haiku
	lib:libexpat
	lib:libfribidi
	lib:libiconv
	lib:libpng16
	lib:libpopt
	lib:libpsiconv
	lib:libxml2
	lib:libz
	"

BUILD_REQUIRES="
	haiku_devel
	devel:libexpat
	devel:libfribidi
	devel:libiconv
	devel:libpng16
	devel:libpopt
	devel:libpsiconv
	devel:libxml2
	devel:libz
	"
BUILD_PREREQUIRES="
	cmd:cmp
	cmd:gcc
	cmd:ld
	cmd:make
	"

BUILD()
{
	chmod +x abi/configure 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
}
