buildout.cfg 1.94 KB
Newer Older
1 2
[buildout]
extends =
3
  ../automake/buildout.cfg
4 5
  ../libtool/buildout.cfg
  ../leptonica/buildout.cfg
6 7 8 9 10 11 12 13 14 15 16

parts =
  tesseract

[tesseract-share]
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

17 18 19 20 21 22 23 24

[tesseract-gcc-4.7-build-patch]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
download-only = true
filename = tesseract-3.00-gcc-4.7-build.patch
md5sum = ca80db3ec489c547b03f3ee48879c1b1

25 26
[tesseract]
recipe = hexagonit.recipe.cmmi
27 28
url = http://tesseract-ocr.googlecode.com/files/tesseract-3.01.tar.gz
md5sum = 1ba496e51a42358fb9d3ffe781b2d20a
29 30 31 32
patch-options =
  -p1
patches =
  ${tesseract-gcc-4.7-build-patch:location}/${tesseract-gcc-4.7-build-patch:filename}
33
configure-command =
34 35 36 37 38
  aclocal -I ${libtool:location}/share/aclocal -I config
  libtoolize -f -c
  libtoolize --automake
  autoheader -f
  automake -c -a -f
39 40 41 42
  autoconf -Wno-portability
  ./configure --prefix=${buildout:parts-directory}/${:_buildout_section_name_} --disable-static --datarootdir=${tesseract-eng-traineddata:location}
# XXX: tesseract seems not easily configurable at runtime about where to find
# its trained data, so we set its datarootdir above to a controlled location
43 44 45

# tesseract has a non-standard way of testing for leptonica, hence the
# LIBLEPT_HEADERSDIR entry below:
46
environment =
47
  PATH=${autoconf:location}/bin:${automake-1.11:location}/bin:${libtool:location}/bin:%(PATH)s
48
  ACLOCAL_ARGS=-I${libtool:location}/share/aclocal
49
  LIBLEPT_HEADERSDIR=${leptonica:location}/include
50 51
  CPPFLAGS=-I${leptonica:location}/include
  LDFLAGS =-L${leptonica:location}/lib -Wl,-rpath=${leptonica:location}/lib
52 53 54

[tesseract-eng-traineddata]
recipe = hexagonit.recipe.download
55 56 57
strip-top-level-dir = true
url = http://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.01.eng.tar.gz
md5sum = 89c139a73e0e7b1225809fc7b226b6c9