[Erp5-report] r43026 luke - /erp5/trunk/buildout/software-profiles/tesseract.cfg
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Feb 4 11:31:29 CET 2011
Author: luke
Date: Fri Feb 4 11:31:29 2011
New Revision: 43026
URL: http://svn.erp5.org?rev=43026&view=rev
Log:
- put share of tesseract to different location to avoid its deleteion during package upgrade
- point tesseract to this location and put there trained data
Modified:
erp5/trunk/buildout/software-profiles/tesseract.cfg
Modified: erp5/trunk/buildout/software-profiles/tesseract.cfg
URL: http://svn.erp5.org/erp5/trunk/buildout/software-profiles/tesseract.cfg?rev=43026&r1=43025&r2=43026&view=diff
==============================================================================
--- erp5/trunk/buildout/software-profiles/tesseract.cfg [utf8] (original)
+++ erp5/trunk/buildout/software-profiles/tesseract.cfg [utf8] Fri Feb 4 11:31:29 2011
@@ -7,14 +7,22 @@ extends =
zlib.cfg
parts =
- tesseract
- tesseract-eng-traineddata
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
+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 = --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
LDFLAGS =-Wl,-rpath -L${zlib:location}/lib -Wl,${zlib:location}/lib -L${jbigkit:location}/lib -Wl,-rpath -Wl,${jbigkit:location}/lib -L${libjpeg:location}/lib -Wl,-rpath -Wl,${libjpeg:location}/lib -L${libtiff:location}/lib -Wl,-rpath -Wl,${libtiff:location}/lib -L${libpng:location}/lib -Wl,-rpath -Wl,${libpng:location}/lib
@@ -26,7 +34,8 @@ url = http://tesseract-ocr.googlecode.co
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:location}/share/tessdata/eng.traineddata
+command = gunzip ${tesseract-eng-traineddata:location}/eng.traineddata.gz -c > ${tesseract-share:location}/tessdata/eng.traineddata
update-command = ${:command}
stop-on-error = yes
More information about the Erp5-report
mailing list