description="Word processing similar to MS® Word, suitable for a wide variety of word processing tasks"
url="https://www.abisource.com/"

packager="spiky <spiky@nutyx.org>"
contributors="Pierre.,Greg,Tnut"

makedepends=(icu boost cairo aspell fribidi enchant wv
             librsvg gtk2 redland
             rasqal gtk3 autoconf-archive)
run=(desktop-file-utils)

name=abiword
version=3.0.5
release=4

source=(${url}downloads/$name/$version/source/$name-$version.tar.gz
        https://download.tuxfamily.org/nutyx/files/$name-3.0.4-consolidate-1.patch)
		
prepare() {

cd $name-$version
patch -Np1 -i ../$name-3.0.4-consolidate-1.patch

find plugins -name plugin.m4 | xargs cat > plugin-configure.m4
sed -i 's/enchant >=/enchant-2 >=/' configure.ac

libtoolize --force
autoreconf -fiv
}

build() {

cd $name-$version

./configure --prefix=/usr \
    --disable-static
make DESTDIR=$PKG install

}
