[buildout]
extends =
  ../fontconfig/buildout.cfg
  ../freetype/buildout.cfg
  ../libtiff/buildout.cfg
  ../libxml2/buildout.cfg
  ../pkgconfig/buildout.cfg

parts = ghostscript

[ghostscript-common]
recipe = slapos.recipe.cmmi
pkg_config_depends = ${libtiff:location}/lib/pkgconfig:${fontconfig:location}/lib/pkgconfig:${fontconfig:pkg_config_depends}
configure-options =
  --disable-cups
  --disable-threadsafe
  --with-system-libtiff
  --without-libidn
  --without-x
  --with-drivers=FILES
  --with-fontpath=${ghostscript-fonts:location}
# it seems that parallel build sometimes fails for ghostscript.
make-options = -j1
environment =
  PATH=${pkgconfig:location}/bin:%(PATH)s
  PKG_CONFIG_PATH=${:pkg_config_depends}
  LDFLAGS=-Wl,-rpath=${fontconfig:location}/lib -Wl,-rpath=${freetype:location}/lib -Wl,-rpath=${libtiff:location}/lib
  LD_LIBRARY_PATH=${fontconfig:location}/lib:${freetype:location}/lib:${libtiff:location}/lib:${libxml2:location}/lib

[ghostscript]
<= ghostscript-9

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

[ghostscript-fonts]
recipe = hexagonit.recipe.download
ignore-existing = true
url = http://downloads.sourceforge.net/project/gs-fonts/gs-fonts/8.11%20%28base%2035%2C%20GPL%29/ghostscript-fonts-std-8.11.tar.gz
md5sum = 6865682b095f8c4500c54b285ff05ef6
strip-top-level-dir = true
