[buildout]
parts = ocropus

[ocropus-patch-scons]
recipe = hexagonit.recipe.download
download-only = true
filename = ocropus.SConstruct-local-installation.patch
url = ${:_profile_base_location_}/${:filename}
md5sum = 08710ec022f3ce13e5c0b584dfee2c1c

[ocropus]
recipe = slapos.recipe.cmmi
url = http://www.nexedi.org/static/packages/source/ocropus/ocropus-0.4.4.tar.gz
md5sum = 1485dbe9aab27574bfe3c8b4395cf3ce
configure-options =
  ${iulib:location}
patches = ${ocropus-patch-scons:location}/${ocropus-patch-scons:filename}
patch-options = -p1
environment =
  PATH =${scons-bin:destination_directory}:%(PATH)s

[scons-local]
recipe = hexagonit.recipe.download
url = http://prdownloads.sourceforge.net/scons/scons-local-2.0.1.tar.gz

[scons-bin]
recipe = plone.recipe.command
destination_directory = ${scons-local:location}
command =
  ln -sf ${scons-local:location}/scons.py ${:destination_directory}/scons

[iulib-patch-scons]
recipe = hexagonit.recipe.download
download-only = true
filename = iulib.SConstruct-libtiff-detection.patch
url = ${:_profile_base_location_}/${:filename}
md5sum = dbbdf909814fb84ffe47e2ff59980db7

[iulib]
recipe = slapos.recipe.cmmi
url = http://www.nexedi.org/static/packages/source/ocropus/iulib-0.4.4.tar.gz
md5sum = 3d9754dbd64c56029ce1cd7c2f61894c
# workaround http://code.google.com/p/iulib/issues/detail?id=27
patches = ${iulib-patch-scons:location}/${iulib-patch-scons:filename}
patch-options = -p1
environment =
  PATH =${scons-bin:destination_directory}:%(PATH)s