#!/bin/sh

NAME="aspell"
DESC="A spell checker designed to eventually replace Ispell"

MAKEDEPS=" ncurses perl gettext"

PKG_VER=0.60.8
SOURCE="https://ftp.gnu.org/gnu/aspell/aspell-$PKG_VER.tar.gz"

ADDITIONAL="
CVE-2019-25051.patch
"

prepare() {
    apply_patches
}

build() {
	LDFLAGS="-lintl" \
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--enable-dict-dir=/usr/share/aspell \
		--enable-pkgdatadir=/usr/share/aspell \
		--enable-compile-in-filters
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$PKG_DEST" install
}