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

parts = ghostscript

[ghostscript-common]
recipe = hexagonit.recipe.cmmi
depends =
  ${libtiff:version}
configure-options =
  --disable-cups
  --with-system-libtiff
  --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:${libtiff:location}/lib/pkgconfig
  LDFLAGS=-Wl,-rpath=${fontconfig:location}/lib -L${libjpeg:location}/lib -Wl,-rpath=${libjpeg: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.05.tar.bz2
md5sum = 8bcef1f33ddf8a4d12b2cf8da385c191