[buildout]
extends =
  ../fontconfig/buildout.cfg
  ../libjpeg/buildout.cfg
  ../libtiff/buildout.cfg
  ../pkgconfig/buildout.cfg

parts = ghostscript

[ghostscript-common]
recipe = hexagonit.recipe.cmmi
configure-options =
  --disable-cups
  --disable-cairo
  --without-x
  --with-drivers=FILES
# it seems that parallel build sometimes fails for ghostscript.
make-options = -j1
environment =
  PATH=${pkgconfig:location}/bin:%(PATH)s
  PKG_CONFIG_PATH=${fontconfig:location}/lib/pkgconfig
  CPPFLAGS=-I${libtiff:location}/include
  LDFLAGS=-Wl,-rpath=${fontconfig:location}/lib -L${libjpeg:location}/lib -Wl,-rpath=${libjpeg:location}/lib -L${libtiff:location}/lib -Wl,-rpath=${libtiff:location}/lib
  LD_LIBRARY_PATH=${fontconfig:location}/lib

[ghostscript]
<= ghostscript-9

[ghostscript-9]
<= ghostscript-common
url = http://downloads.ghostscript.com/public/ghostscript-9.04.tar.bz2
md5sum = 9f6899e821ab6d78ab2c856f10fa3023