# Watch: https://github.com/tesseract-ocr/tesseract/tags
source $GRIMOIRE/CMAKE_FUNCTIONS
           SPELL=tesseract
         VERSION=5.5.1
         LANGVER=4.1.0
     SOURCE_HASH=sha512:37c9cc2ac1bcd26b783f76a0cd8ef266d2dd54746c73d983202d150bf885b50fd32d9f1745d1df65f4cddccd9fc24b1b871e8dea8dcba3454a27363297423cdd
             URI=https://github.com/tesseract-ocr/tesseract/archive
             DAT=https://github.com/tesseract-ocr/tessdata/raw/$LANGVER
          SOURCE=$SPELL-$VERSION.tar.gz
   SOURCE_URL[0]=$URI/$VERSION.tar.gz
for LL in $TESS_LANG; do
 case $LL in
   eng)
         SOURCE2=tessdata-$LANGVER-$LL.traineddata
  SOURCE2_URL[0]=$DAT/$LL.traineddata
    SOURCE2_HASH=sha512:bf1a730ce314fbafa065547e40703a1ffbe7f080557c59088a1b59944af3b94bd7da51cec0f322558d72ab3bdaec14ae96eb43aac705859ed5422702028a8b77
    ;;
   fra)
         SOURCE3=tessdata-$LANGVER-$LL.traineddata
  SOURCE3_URL[0]=$DAT/$LL.traineddata
    SOURCE3_HASH=sha512:abd84d1f0a9436ec4a9089ba288d9d21af8c6bd8897c3fc991c2ffdaa16224c084b6705606b91cd17152cc5e647fe2f781af0c5e392bb10f5693d7ebbda0838b
    ;;
   ita)
         SOURCE4=tessdata-$LANGVER-$LL.traineddata
  SOURCE4_URL[0]=$DAT/$LL.traineddata
    SOURCE4_HASH=sha512:91699d0b8d775b57961eb31f75696a157658256bb4515c71f64c6bba45dc236455d1dbe08b677d606249eab7630cba0cc4f371c4add353e056af11ed4f4f884c
    ;;
   nld)
         SOURCE5=tessdata-$LANGVER-$LL.traineddata
  SOURCE5_URL[0]=$DAT/$LL.traineddata
    SOURCE5_HASH=sha512:6ebd2f8a06cb60d480de2658745e2ffb84922ef6f81fa56cb4469ab265bb261c4f3bfd8c459cfbcc5a69ead2bbe7904fba64a74d5984f2b64037fb7e262abbdf
    ;;
   spa)
         SOURCE6=tessdata-$LANGVER-$LL.traineddata
  SOURCE6_URL[0]=$DAT/$LL.traineddata
    SOURCE6_HASH=sha512:12a861a78d38904663e189079083a9f2f7de05f084061e5b3208dddf31d7aca6f7b7e2c6c64d0c4df9e0824891dff5ce9433f49458bf7c239d702ef452f49fec
    ;;
   deu)
         SOURCE7=tessdata-$LANGVER-$LL.traineddata
  SOURCE7_URL[0]=$DAT/$LL.traineddata
    SOURCE7_HASH=sha512:3f8396d12291476b37990f5ae54231e2d631b9fbf9cc8a61d2aac89f908ab9a857c53bd6c1fa59ba43db97c68f796057599853a755496b991be25f888970a0d6
    ;;
   *)
    message language $LL not yet supported
    ;;
  esac
done
SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION
        WEB_SITE=https://github.com/tesseract-ocr/tesseract
      LICENSE[0]=APACHE
         ENTERED=20060509
        KEYWORDS="ocr"
           SHORT="ocr engine"
cat << EOF
This package contains an OCR engine - libtesseract and a command line 
program - tesseract. Tesseract 4 adds a new neural net (LSTM) based OCR 
engine which is focused on line recognition, but also still supports the 
legacy Tesseract OCR engine of Tesseract 3 which works by recognizing 
character patterns. Compatibility with Tesseract 3 is enabled by using the 
Legacy OCR Engine mode (--oem 0). It also needs traineddata files which 
support the legacy engine, for example those from the tessdata repository.
EOF
