# Maintainer: PktSurf <smlinux@pktsurf.in>
app=abiword
version=3.0.5
build=1sml
homepage="https://www.abisource.com"
download="https://www.abisource.com/downloads/abiword/$version/source/abiword-$version.tar.gz"
desc="Opensource full-featured word processor"
requires="desktop-file-utils enchant libical goffice libgsf librsvg libsoup wv gtk3"

prepbuilddir() {
  mkandenterbuilddir
  rm -rf $app-$version

  tar xf $srcdir/$app-$version.tar.?z*
  cd $app-$version
  fixbuilddirpermissions

  applypatch $srcdir/enchant_checker.cpp.patch
  applypatch $srcdir/unixmouse.diff
  applypatch $srcdir/musl-1.2.3.patch
}

build() {

_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"

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

  make
  make install DESTDIR=$pkg

  cp COPY* $pkgdocs/

  mkfinalpkg
}

sha512sums="
4c3f0c8fb67b7036946dd13d31ac6964379af4ee0d3ca8a69ed093be82a6411a29071856b4535c578864940773c8f280025384b738ea99aadce5d88095ee6d80  abiword-3.0.5.tar.lz
0163d3275a7f260431885d9ea20bcb0c2cd52e19a062141422187f4df2f51c9613a90f1b7151fd50e2c1b7f511b767f1a2082c30792e59939ab0f3cf1c8aca65  enchant_checker.cpp.patch
a4ee1de8df01a6570eb4d069a1b1abd38c39181020f862ce632ab5b863650a58fcaeadc4c988e7fcae3aade5841399d3d5d482d280d44a48286c24e3701e7969  musl-1.2.3.patch
b8634c410485b2a5c8495bf5bcbdda027aca2e7028efc6ea06763d1df121409434cab53f370b55d409fb99e6dbb72819b99cb596ee735fe97aa235d0ed7b0124  unixmouse.diff
"
