Commit dc8123d7 authored by Leonardo Rochael Almeida's avatar Leonardo Rochael Almeida Committed by Kazuhiko Shiozaki

Simplify tesseract build

Fix broken autoconf invocation

Use a trained data tarbal containing the correct datarootdir structure and the English data.
parent a1e822f0
......@@ -5,12 +5,9 @@ extends =
../leptonica/buildout.cfg
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
......@@ -39,9 +36,10 @@ configure-command =
libtoolize --automake
autoheader -f
automake -c -a -f
autoconf -c -Wno-portability
autoreconf -i
./configure --prefix=${buildout:parts-directory}/${:_buildout_section_name_} --disable-static --datarootdir=${tesseract-share:location}
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
# tesseract has a non-standard way of testing for leptonica, hence the
# LIBLEPT_HEADERSDIR entry below:
......@@ -54,13 +52,6 @@ environment =
[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
strip-top-level-dir = true
url = http://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.01.eng.tar.gz
md5sum = 89c139a73e0e7b1225809fc7b226b6c9
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment