[buildout]
extends =
  ../readline/buildout.cfg
  ../tcl/buildout.cfg
  ../xz-utils/buildout.cfg
  ../zlib/buildout.cfg
parts =
  sqlite3

[sqlite3]
recipe = slapos.recipe.cmmi
shared = true
# Some options need the canonical source code (i.e. not as an amalgamation).
url = https://deb.debian.org/debian/pool/main/s/sqlite3/sqlite3_3.40.1.orig.tar.xz
md5sum = 79f2507907721b770cbec98195cecece
configure-options =
  --disable-static
  --disable-tcl
  --enable-readline
# Increase MAX_VARIABLE_NUMBER like many os. For example:
# https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/sqlite
# NEO needs SQLITE_ENABLE_UPDATE_DELETE_LIMIT to drop partitions.
environment =
  CPPFLAGS=-I${readline:location}/include -I${ncurses:location}/include -I${zlib:location}/include -DSQLITE_MAX_VARIABLE_NUMBER=250000 -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1
  LDFLAGS=-L@@LOCATION@@ -Wl,-rpath=${readline:location}/lib -Wl,-rpath=${ncurses:location}/lib -L${readline:location}/lib -L${ncurses:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
  PATH=${tcl:location}/bin:${xz-utils:location}/bin:%(PATH)s
