# This is software part of buildout for mysql with senna
# Originally made by Leonardo Rochael Almeida <leorochael@gmail.com> (thanks!)
# Original place: https://svn.erp5.org/repos/public/experimental/mysqlsenna.buildout/

[buildout]
parts =
    mysql-tritonn-5.0

[senna]
recipe = hexagonit.recipe.cmmi
url = http://sourceforge.jp/frs/redir.php?m=jaist&f=%2Fsenna%2F33763%2Fsenna-1.1.4.tar.gz
md5sum = 1d896f46ef1def47ebe0d72c7eb21a60
configure-options =
  --without-mecab
  --enable-nfkc=no

[mysql-5.0-tritonn-patch]
recipe = hexagonit.recipe.download
url = http://dl.sourceforge.jp/tritonn/44472/${:filename}
md5sum = 257abe9c4afdc9b08033687fd486a595
filename = tritonn-1.0.12-mysql-5.0.87.diff
download-only = true

[mysql-tritonn-5.0]
recipe = hexagonit.recipe.cmmi
url = http://downloads.mysql.com/archives/mysql-5.0/mysql-5.0.87.tar.gz
md5sum = 65e6229cc98b6a8d4c5206d7fe16c7be
pre-configure-hook = ${buildout:directory}/hooks/mysql-tritonn-hooks.py:pre_configure_hook
post-make-hook = ${buildout:directory}/hooks/mysql-tritonn-hooks.py:post_make_hook
# configure: how to avoid searching for my.cnf?
#  - like in mysql part in http://svn.zope.org/zodbshootout/trunk/buildout.cfg?view=markup
configure-options =
  --with-senna
  --without-mecab
  --enable-thread-safe-client
  --with-charset=utf8
  --with-collation=utf8_unicode_ci
  --with-server-suffix=mysql-tritonn-5.0

patch-options = -p1
patches = ${mysql-5.0-tritonn-patch:location}/${mysql-5.0-tritonn-patch:filename}
environment =
    PATH =${senna:location}/bin:%(PATH)s
    CFLAGS =-I${senna:location}/include
    CXXFLAGS =-I${senna:location}/include
    LDFLAGS =-L${senna:location}/lib

[requirements]
binary = automake flex bison patch gcc g++ libtool
development = /usr/include/termcap.h /usr/include/curses.h