APP=abiword
VERSION=3.0.4
BUILD=2sml
HOMEPAGE="www.abisource.com"
DOWNLOAD="https://www.abisource.com/downloads/abiword/3.0.4/source/abiword-3.0.4.tar.gz"
DESC="Opensource full-featured word processor"
REQUIRES="desktop-file-utils enchant libical goffice libgsf librsvg libsoup wv gtk3 "

build() {
  mkandenterbuilddir
  rm -rf $APP-$VERSION

  tar xf $SRCDIR/$APP-$VERSION.tar.?z*
  cd $APP-$VERSION
  fixbuilddirpermissions

_plugins="applix babelfish bmp clarisworks collab docbook eml epub \
	 freetranslation garble gdict gimp google hancom hrtext iscii kword \
	 latex loadbindings mht mif mswrite openwriter openxml opml paint \
	 passepartout pdb pdf presentation s5 sdw t602 urldict wikipedia wml \
	 xslfo"

  patch -p1 < $SRCDIR/enchant_checker.cpp.patch
  patch -p1 < $SRCDIR/unixmouse.diff

  ./configure \
    --prefix="" \
    --sysconfdir=/etc \
    --enable-shared \
    --disable-static \
    --enable-plugins="$_plugins"

  make
  make install DESTDIR=$PKG

  cp COPY* $PKGDOCS/

  mkfinalpkg
}

SHA512SUMS="
d0a7fd6873862e4da9cd4ecc384b9cc8ec8f2bbf23bdec8c4c56fed16ca274fbecedf11dc80c6d835eaad8b316b143e3cb3adea162fc74984fa4725c906c5821  abiword-3.0.4.tar.lz
0163d3275a7f260431885d9ea20bcb0c2cd52e19a062141422187f4df2f51c9613a90f1b7151fd50e2c1b7f511b767f1a2082c30792e59939ab0f3cf1c8aca65  enchant_checker.cpp.patch
b8634c410485b2a5c8495bf5bcbdda027aca2e7028efc6ea06763d1df121409434cab53f370b55d409fb99e6dbb72819b99cb596ee735fe97aa235d0ed7b0124  unixmouse.diff
"
