[buildout]
parts =
  cyrus-sasl
extends =
  ../autoconf/buildout.cfg
  ../automake/buildout.cfg
  ../gdbm/buildout.cfg
  ../libtool/buildout.cfg
  ../m4/buildout.cfg
  ../zlib/buildout.cfg

[cyrus-sasl]
recipe = slapos.recipe.cmmi
url = ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-2.1.26.tar.gz
md5sum = a7f4e5e559a0e37b3ffc438c9456e425
location = ${buildout:parts-directory}/${:_buildout_section_name_}
pre-configure =
  "${libtool:location}/bin/libtoolize" -c -f &&
  "${automake:location}/bin/aclocal" -I "${libtool:location}/share/aclocal" -I config -I cmulocal &&
  "${automake:location}/bin/automake" -c -a -f
configure-options =
  --disable-digest
  --disable-gssapi
  --disable-otp
  --with-dblib=gdbm
  --without-des
  --without-openssl
  --without-pam
  --without-saslauthd
  --with-plugindir=${:location}/lib/sasl2
# it seems that parallel build sometimes fails.
make-options =
  -j1

environment =
  PATH=${autoconf:location}/bin:${m4:location}/bin:%(PATH)s
  CPPFLAGS=-fPIC -I${zlib:location}/include -I${gdbm:location}/include
  LDFLAGS=-L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${gdbm:location}/lib -Wl,-rpath=${gdbm:location}/lib
