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 = ...@@ -5,12 +5,9 @@ extends =
../leptonica/buildout.cfg ../leptonica/buildout.cfg
parts = parts =
tesseract-eng-traineddata-unzip
tesseract tesseract
[tesseract-share] [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 recipe = plone.recipe.command
location = ${buildout:parts-directory}/${:_buildout_section_name_} location = ${buildout:parts-directory}/${:_buildout_section_name_}
command = mkdir -p ${:location} && mkdir -p ${:location}/tessdata command = mkdir -p ${:location} && mkdir -p ${:location}/tessdata
...@@ -39,9 +36,10 @@ configure-command = ...@@ -39,9 +36,10 @@ configure-command =
libtoolize --automake libtoolize --automake
autoheader -f autoheader -f
automake -c -a -f automake -c -a -f
autoconf -c -Wno-portability autoconf -Wno-portability
autoreconf -i ./configure --prefix=${buildout:parts-directory}/${:_buildout_section_name_} --disable-static --datarootdir=${tesseract-eng-traineddata:location}
./configure --prefix=${buildout:parts-directory}/${:_buildout_section_name_} --disable-static --datarootdir=${tesseract-share: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 # tesseract has a non-standard way of testing for leptonica, hence the
# LIBLEPT_HEADERSDIR entry below: # LIBLEPT_HEADERSDIR entry below:
...@@ -54,13 +52,6 @@ environment = ...@@ -54,13 +52,6 @@ environment =
[tesseract-eng-traineddata] [tesseract-eng-traineddata]
recipe = hexagonit.recipe.download recipe = hexagonit.recipe.download
download-only = true strip-top-level-dir = true
url = http://tesseract-ocr.googlecode.com/files/eng.traineddata.gz url = http://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.01.eng.tar.gz
md5sum = d91041ad156cf2db36664e91ef799451 md5sum = 89c139a73e0e7b1225809fc7b226b6c9
[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
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