buildout.cfg 1.77 KB
Newer Older
1 2
[buildout]
extends =
Łukasz Nowak's avatar
Łukasz Nowak committed
3 4 5 6 7
  ../jbigkit/buildout.cfg
  ../libjpeg/buildout.cfg
  ../libpng/buildout.cfg
  ../libtiff/buildout.cfg
  ../zlib/buildout.cfg
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

parts =
  tesseract-eng-traineddata-unzip
  tesseract

[tesseract-share]
# XXX: tesseract seems not easy configurable on runtime about where to find
# its trained data, so just move out its datadir to own controlled location
recipe = plone.recipe.command
location = ${buildout:parts-directory}/${:_buildout_section_name_}
command = mkdir -p ${:location} && mkdir -p ${:location}/tessdata
update-command = ${:command}
stop-on-error = yes

[tesseract]
recipe = hexagonit.recipe.cmmi
url = http://tesseract-ocr.googlecode.com/files/tesseract-3.00.tar.gz
md5sum = cc812a261088ea0c3d2da735be35d09f
configure-options =
  --disable-static
  --datarootdir=${tesseract-share:location}
environment =
  CPPFLAGS=-I${zlib:location}/include -I${jbigkit:location}/include -I${libjpeg:location}/include -I${libtiff:location}/include -I${libpng:location}/include
31
  LDFLAGS =-L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${jbigkit:location}/lib -Wl,-rpath=${jbigkit:location}/lib -L${libjpeg:location}/lib -Wl,-rpath=${libjpeg:location}/lib -L${libtiff:location}/lib -Wl,-rpath=${libtiff:location}/lib -L${libpng:location}/lib -Wl,-rpath=${libpng:location}/lib
32 33 34 35 36 37 38 39 40 41 42 43 44

[tesseract-eng-traineddata]
recipe = hexagonit.recipe.download
download-only = true
url = http://tesseract-ocr.googlecode.com/files/eng.traineddata.gz
md5sum = d91041ad156cf2db36664e91ef799451

[tesseract-eng-traineddata-unzip]
location = ${buildout:parts-directory}/${:_buildout_section_name_}
recipe = plone.recipe.command
command = gunzip ${tesseract-eng-traineddata:location}/eng.traineddata.gz -c > ${tesseract-share:location}/tessdata/eng.traineddata
update-command = ${:command}
stop-on-error = yes