graphics/tesseract: Updated for version 3.04.00.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
LukenShiro 2015-11-05 01:28:51 +07:00 committed by Willy Sudiarto Raharjo
parent de0bd3394e
commit d30b4a1458
4 changed files with 21 additions and 27 deletions

View File

@ -5,14 +5,8 @@ by UNLV. It was open-sourced by HP and UNLV in 2005.
You will need to get one of the language packs in order to do anything You will need to get one of the language packs in order to do anything
useful with tesseract, and that language pack tarball should be present useful with tesseract, and that language pack tarball should be present
in the same directory as the SlackBuild script when the package is created. in the same directory as the SlackBuild script when the package is created.
See http://code.google.com/p/tesseract-ocr/downloads/list for a list of See the website for a list of all available language packs. Note that you
all available language packs. Note that you can install more than one can install more than one (or even all) of the language packs, as they do
(or even all) of the language packs, as they do not conflict with each not conflict with each other. The build script defaults to use English, but
other. The build script defaults to use English, but this is easily this is easily changed by passing an alternate value on the command line:
changed by passing an alternate value on the command line. edit the LANGNAM variable to switch to (or add) another language.
Here is the relevant code from the build script:
# Language pack(s) to use
# We'll install English by default, but you can pass another one.
# Edit the LANGNAM variable to switch to (or add) another language
# see https://code.google.com/p/tesseract-ocr/downloads/list for the list

View File

@ -13,7 +13,7 @@ tesseract: at HP between 1985 and 1995. In 1995, this engine was among the
tesseract: top 3 evaluated by UNLV. It was open-sourced by HP and UNLV in tesseract: top 3 evaluated by UNLV. It was open-sourced by HP and UNLV in
tesseract: 2005. tesseract: 2005.
tesseract: tesseract:
tesseract: http://code.google.com/p/tesseract-ocr/ tesseract:
tesseract: tesseract:
tesseract: tesseract:
tesseract: tesseract:

View File

@ -2,7 +2,7 @@
# Slackware build script for tesseract # Slackware build script for tesseract
# Copyright 2009-2010 Pierre Cazenave <pwcazenave {at} gmail [dot] com> # Copyright 2009-2010 Pierre Cazenave <pwcazenave {at} gmail [dot] com>
# Copyright 2013 LukenShiro, Italy # Copyright 2013-2015 LukenShiro, Italy
# All rights reserved. # All rights reserved.
# #
# Redistribution and use of this script, with or without modification, is # Redistribution and use of this script, with or without modification, is
@ -31,7 +31,7 @@
# Modified by Willy Sudiarto Raharjo <willysr@slackware-id.org> # Modified by Willy Sudiarto Raharjo <willysr@slackware-id.org>
PRGNAM=tesseract PRGNAM=tesseract
VERSION=${VERSION:-3.02.02} VERSION=${VERSION:-3.04.00}
BUILD=${BUILD:-1} BUILD=${BUILD:-1}
TAG=${TAG:-_SBo} TAG=${TAG:-_SBo}
@ -71,8 +71,7 @@ DOCFILES="AUTHORS COPYING ChangeLog INSTALL NEWS README ReleaseNotes"
# slk ron por pol nor nld msa mlt mkd mal lit lav kor kan ita_old ita isl # slk ron por pol nor nld msa mlt mkd mal lit lav kor kan ita_old ita isl
# ind chr hun hrv hin heb glg frm frk fra fin eus est equ epo enm ell due # ind chr hun hrv hin heb glg frm frk fra fin eus est equ epo enm ell due
# dan ces cat bul ben bel aze ara afr jpn chi_sim chi_tra rus vie # dan ces cat bul ben bel aze ara afr jpn chi_sim chi_tra rus vie
# see https://code.google.com/p/tesseract-ocr/downloads/list for complete list # see https://github.com/tesseract-ocr/tessdata/ for a list.
LANGVER=${LANGVER:-3.02}
LANGNAM=${LANGNAM:-"eng"} LANGNAM=${LANGNAM:-"eng"}
set -e set -e
@ -80,7 +79,7 @@ set -e
rm -rf $TMP/$PRGNAM-$VERSION $PKG rm -rf $TMP/$PRGNAM-$VERSION $PKG
mkdir -p $TMP $PKG $OUTPUT mkdir -p $TMP $PKG $OUTPUT
cd $TMP cd $TMP
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || tar xvf $CWD/$VERSION.tar.gz
cd $PRGNAM-$VERSION cd $PRGNAM-$VERSION
chown -R root:root . chown -R root:root .
find -L . \ find -L . \
@ -102,13 +101,14 @@ CFLAGS="$SLKCFLAGS" \
make make
make install DESTDIR=$PKG make install DESTDIR=$PKG
make training
make training-install DESTDIR=$PKG
# Extract language name described above; # Install language name described above;
# language files are not automatically installed. # language files are not automatically installed.
mkdir -p $PKG/usr/share/tessdata mkdir -p $PKG/usr/share/tessdata
for LNG in $LANGNAM; \ for LNG in $LANGNAM ; \
do tar xvf $CWD/tesseract-ocr-$LANGVER.$LNG.tar.gz ; \ do cp $CWD/$LNG.traineddata $PKG/usr/share/tessdata/ ; \
mv tesseract-ocr/tessdata/* $PKG/usr/share/tessdata/
done done
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \

View File

@ -1,10 +1,10 @@
PRGNAM="tesseract" PRGNAM="tesseract"
VERSION="3.02.02" VERSION="3.04.00"
HOMEPAGE="http://code.google.com/p/tesseract-ocr/" HOMEPAGE="https://github.com/tesseract-ocr"
DOWNLOAD="https://tesseract-ocr.googlecode.com/files/tesseract-3.02.02.tar.gz \ DOWNLOAD="https://github.com/tesseract-ocr/tesseract/archive/3.04.00.tar.gz \
https://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.eng.tar.gz" https://github.com/tesseract-ocr/tessdata/raw/3.04.00/eng.traineddata"
MD5SUM="3d57ee5777fa998632ad0693c13a0e9e \ MD5SUM="078130b9c7d28c558a0e49d432505864 \
3562250fe6f4e76229a329166b8ae853" 59a99c829aa385ae8cde35775e32e57f"
DOWNLOAD_x86_64="" DOWNLOAD_x86_64=""
MD5SUM_x86_64="" MD5SUM_x86_64=""
REQUIRES="leptonica" REQUIRES="leptonica"