# groonga - an open-source fulltext search engine and column store
# http://groonga.org/

[buildout]
parts =
  groonga

extends =
  ../jemalloc/buildout.cfg
  ../libstemmer/buildout.cfg
  ../patch/buildout.cfg
  ../pkgconfig/buildout.cfg
  ../zlib/buildout.cfg

[groonga]
recipe = slapos.recipe.cmmi
shared = true
url = https://packages.groonga.org/source/groonga/groonga-11.0.0.tar.gz
md5sum = 2ea277c19f21b9d45410547173ff41c2
groonga-plugin-dir =  @@LOCATION@@/lib/groonga/plugins/
# temporary patch to respect more tokens in natural language mode.
patches =
  ${:_profile_base_location_}/groonga.patch#9ed02fbe8400402d3eab47eee149978b
patch-options = -p1
configure-options =
  --disable-static
  --disable-glibtest
  --disable-benchmark
  --disable-document
  --disable-groonga-httpd
  --with-jemalloc
  --with-libstemmer
  --with-libstemmer-include=${libstemmer:location}/include
  --with-libstemmer-lib=${libstemmer:location}/lib
  --without-ruby
  --without-inkscape
  --without-lemon
  --without-lz4
  --without-mecab
  --without-kytea
  --without-libevent
environment =
  CPPFLAGS=-I${libstemmer:location}/include -I${libstemmer:location}/include -I${zlib:location}/include
  LDFLAGS=-Wl,-rpath=${jemalloc:location}/lib -L${jemalloc:location}/lib -Wl,-rpath=${libstemmer:location}/lib -L${libstemmer:location}/lib -Wl,-rpath=${zlib:location}/lib -L${zlib:location}/lib
  PATH=${patch:location}/bin:%(PATH)s


[groonga-normalizer-mysql]
recipe = slapos.recipe.cmmi
shared = true
url = https://packages.groonga.org/source/groonga-normalizer-mysql/groonga-normalizer-mysql-1.1.4.tar.gz
md5sum = effa67fb271d49810850a3b275d040f6

groonga-plugin-dir =  @@LOCATION@@/lib/groonga/plugins/
pre-configure = mkdir -p ${:groonga-plugin-dir}
make-targets = GROONGA_PLUGINS_DIR=${:groonga-plugin-dir} install
configure-options =
  --disable-static
environment =
  PATH=${pkgconfig:location}/bin:%(PATH)s
  PKG_CONFIG_PATH=${groonga:location}/lib/pkgconfig