default_pre_build &&
cd "$SOURCE_DIRECTORY" &&

# require minimum 1.49 Boost libraries, drop static version
patch -p0 < "$SPELL_DIRECTORY/boost-detect.patch" &&

# drop deprecated MySQL headers, since DBI is used now instead
patch -p0 < "$SPELL_DIRECTORY/dbi.patch" &&

# fix build with new Boost >= 1.49
patch -p0 < "$SPELL_DIRECTORY/boost-149.patch" &&

# optional: display threshold in timeout defer message
if [[ $GREYLIST_TIMEOUT == y ]]; then
  patch -p0 < "$SPELL_DIRECTORY/timeout.patch"
fi &&

# fix collecting triplets (timeout=0)
patch -p0 < "$SPELL_DIRECTORY/collect.patch" &&

# fixed SQL syntax error when doing query on table
# (missing ` after table name in case with no 'where' clause)
patch -p0 < "$SPELL_DIRECTORY/query.patch"
