# MariaDB - a database server that offers drop-in replacement functionality for MySQL.
# http://mariadb.org/

[buildout]
extends =
  ../zlib/buildout.cfg
  ../groonga/buildout.cfg
  ../ncurses/buildout.cfg
  ../pkgconfig/buildout.cfg
  ../readline/buildout.cfg

parts =
  mariadb

[mariadb]
recipe = hexagonit.recipe.cmmi
version = 5.3.3-rc
url = http://downloads.askmonty.org/f/mariadb-${:version}/kvm-tarbake-jaunty-x86/mariadb-${:version}.tar.gz/from/http:/ftp.osuosl.org/pub/mariadb
md5sum = 715c61bb101acc7d37e893f6a9de9267
# compile directory is required to build mysql plugins.
keep-compile-dir = true
# configure: how to avoid searching for my.cnf?
#  - like in mysql part in http://svn.zope.org/zodbshootout/trunk/buildout.cfg?view=markup
# we use embeded yassl instead of openssl to avoid compilation errors on sphinx search engine.
configure-options =
  --prefix=${buildout:parts-directory}/${:_buildout_section_name_}
  --disable-static
  --enable-thread-safe-client
  --enable-local-infile
  --enable-assembler
  --with-pic
  --with-fast-mutexes
  --with-charset=utf8
  --with-collation=utf8_unicode_ci
  --without-readline
  --with-ssl
  --with-zlib-dir=${zlib:location}

environment =
  CPPFLAGS=-I${ncurses:location}/include -I${readline5:location}/include
  LDFLAGS=-Wl,-rpath=${libevent:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib -L${readline5:location}/lib -Wl,-rpath=${readline5:location}/lib -Wl,-rpath=${zlib:location}/lib

[groonga-storage-engine-mariadb]
recipe = hexagonit.recipe.cmmi
url = http://github.com/downloads/mroonga/mroonga/groonga-storage-engine-0.5.tar.gz
md5sum = 52fed75d97a91f239750a1011ea9e468
configure-options =
  --with-mysql-source=${mariadb:location}__compile__/mariadb-${mariadb:version}
  --with-mysql-config=${mariadb:location}/bin/mysql_config
environment =
  PATH=${groonga:location}/bin:${pkgconfig:location}/bin:%(PATH)s
  CPPFLAGS=-I${groonga:location}/include/groonga
  LDFLAGS=-L${groonga:location}/lib
  PKG_CONFIG_PATH=${groonga:location}/lib/pkgconfig