[buildout]
parts =
  aspell
  aspell-en-dictionary

extends =
  ../ncurses/buildout.cfg
  ../patch/buildout.cfg
  ../perl/buildout.cfg
  buildout.hash.cfg


[aspell-dictionary-common]
# Macro to install an aspell dictionnary and create an aspell wrapper using
# this dictionnary.
# The aspell wrapper is exported as ${:bin-aspell}
bin-aspell = @@LOCATION@@/bin/aspell

recipe = slapos.recipe.cmmi
shared = true
configure-command = ./configure --vars ASPELL=${aspell:location}/bin/aspell PREZIP=${aspell:location}/bin/prezip-bin
dict-dir = @@LOCATION@@/lib/aspell/
data-dir = @@LOCATION@@/lib/aspell/
make-options =
  dictdir=${:dict-dir}
  datadir=${:data-dir}
make-targets = install
post-make-hook = ${:_profile_base_location_}/${aspell-create-wrapper:filename}#${aspell-create-wrapper:md5sum}:post_make_hook


[aspell]
recipe = slapos.recipe.cmmi
shared = true
url = https://ftp.gnu.org/gnu/aspell/aspell-0.60.8.1.tar.gz
md5sum = 187bd142f522ada555c7aa6b9cbf56e6
configure-options =
  --enable-curses="-lncursesw -ltinfow"
environment =
  PATH=${patch:location}/bin:${perl:location}/bin:%(PATH)s
  CPPFLAGS=-I${ncurses:location}/include
  LDFLAGS=-L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib
# aspell parallel build sometimes fail
make-options = -j1

[aspell-en-dictionary]
<= aspell-dictionary-common
url = ftp://ftp.gnu.org/gnu/aspell/dict/en/aspell6-en-7.1-0.tar.bz2
md5sum = beba5e8f3afd3ed1644653bb685b2dfb
