[buildout]
extends =
  ../numpy/buildout.cfg
  ../curl/buildout.cfg
  ../geos/buildout.cfg
  ../giflib/buildout.cfg
  ../jasper/buildout.cfg
  ../libexpat/buildout.cfg
  ../pcre/buildout.cfg
  ../proj4/buildout.cfg
  ../sqlite3/buildout.cfg
  ../xz-utils/buildout.cfg

parts =
  gdal-python

[gdal]
recipe = slapos.recipe.cmmi
version = 1.11.1
url = http://download.osgeo.org/gdal/${:version}/gdal-${:version}.tar.xz
md5sum = 2e126d7c6605691d38f3e71b945f5c73
configure-options =
  --with-curl=${curl:location}/bin/curl-config
  --with-expat=${libexpat:location}
  --with-geos=${geos:location}/bin/geos-config
  --with-gif=${giflib:location}
  --with-jasper=${jasper:location}
  --with-jpeg=${libjpeg:location}
  --with-libtiff=${libtiff:location}
  --with-libz=${zlib:location}
  --with-png=${libpng:location}
  --with-static-proj4=${proj4:location}
  --with-sqlite3=${sqlite3:location}
  --with-xml2=${libxml2:location}/bin/xml2-config
  --without-webp
environment =
  PATH=${xz-utils:location}/bin:%(PATH)s
  CPPFLAGS=-I${pcre:location}/include
  LDFLAGS=-L${pcre:location}/lib -Wl,-rpath=${buildout:parts-directory}/${:_buildout_section_name_}/lib -Wl,-rpath=${curl:location}/lib -Wl,-rpath=${geos:location}/lib -Wl,-rpath=${giflib:location}/lib -Wl,-rpath=${jasper:location}/lib -Wl,-rpath=${jbigkit:location}/lib -Wl,-rpath=${libexpat:location}/lib -Wl,-rpath=${libjpeg:location}/lib -Wl,-rpath=${libpng:location}/lib -Wl,-rpath=${libtiff:location}/lib -Wl,-rpath=${libxml2:location}/lib -Wl,-rpath=${openssl:location}/lib -Wl,-rpath=${pcre:location}/lib -Wl,-rpath=${sqlite3:location}/lib -Wl,-rpath=${zlib:location}/lib

[gdal-python]
recipe = zc.recipe.egg:custom
egg = GDAL ==${gdal:version}
setup-eggs = ${numpy:egg}
rpath = ${:library-dirs}
include-dirs =
  ${gdal:location}/include
library-dirs =
  ${gdal:location}/lib
environment = gdal-python-env

[gdal-python-env]
PATH = ${gdal:location}/bin:%(PATH)s
