ap/tesseract: Upgraded to tesseract-3.01.

slackware-14.2
Damien Goutte-Gattat 2012-02-26 19:24:42 +01:00
parent 3aa0ab25af
commit 7daeff65e4
3 changed files with 19 additions and 24 deletions

View File

@ -1,3 +1,3 @@
40292c8d206090c4ab342f6b7814ea41c075abce tesseract-2.00.eng.tar.gz
24f58cab2b1418816ba09e6f28e33aee34605889 tesseract-2.00.fra.tar.gz
850c42c92a4471c5f41d4384c57045e812fde26a tesseract-2.04.tar.gz
c0b605d7192b3071842fe535c82b89c65f2d9c67 tesseract-3.01.tar.gz
f2d57eea524ead247612bd027375037c21e22463 tesseract-ocr-3.01.eng.tar.gz
8d698bb3b659e862b3274970a57b3214de76f1ff fra.traineddata.gz

View File

@ -1,11 +0,0 @@
diff -Naur tesseract-2.04.orig/viewer/svutil.cpp tesseract-2.04/viewer/svutil.cpp
--- tesseract-2.04.orig/viewer/svutil.cpp 2009-06-03 18:29:38.000000000 +0200
+++ tesseract-2.04/viewer/svutil.cpp 2010-06-27 23:52:26.104167212 +0200
@@ -34,6 +34,7 @@
#include <semaphore.h>
#include <signal.h>
#include <stdlib.h>
+#include <stdio.h>
#include <string.h>
#include <netdb.h>
#include <sys/socket.h>

View File

@ -1,6 +1,6 @@
#!/bin/bash
# Build script for Slackware
# Copyright (C) 2010 Damien Goutte-Gattat
# Copyright (C) 2010,2012 Damien Goutte-Gattat
#
# Redistribution and use of this script, with or without modifications,
# is permitted provided that the following conditions are met:
@ -24,10 +24,12 @@
#
# Latest tesseract sourcecode is available at:
# <http://code.google.com/p/tesseract-ocr/>.
#
# Depends: l/leptonica
# Source package infos
NAMESRC=${NAMESRC:-tesseract}
VERSION=${VERSION:-2.04}
VERSION=${VERSION:-3.01}
WGET=${WGET:-http://tesseract-ocr.googlecode.com/files/}
# Build infos
@ -80,27 +82,31 @@ done
sha1sum -c checksums
NAME=$NAMESRC-$VERSION
# Extract everything
# Extract source
cd $TMP
echo "Building $NAME..."
tar xf $CWD/$NAME.tar.gz
cd $NAME
tar xf $CWD/tesseract-2.00.eng.tar.gz
tar xf $CWD/tesseract-2.00.fra.tar.gz
# Compile
patch -p 1 < $CWD/tesseract-2.04-snprintf.patch
./autogen.sh
CFLAGS=$CPUOPT \
CXXFLAGS=$CPUOPT \
./configure \
--prefix=/usr \
--libdir=/usr/lib$LIBDIRSUFFIX
--libdir=/usr/lib$LIBDIRSUFFIX \
--mandir=/usr/man \
--disable-static
make -j $JOBS
make install DESTDIR=$PKG
# Strip binaries
find $PKG | xargs file | grep "ELF \(32\|64\)-bit LSB" | cut -d : -f 1 | \
xargs strip --strip-unneeded 2> /dev/null
# Compress man pages
find $PKG/usr/man -type f -exec gzip -9 {} \;
# Install language data
gzip -dc $CWD/fra.traineddata.gz > $PKG/usr/share/tessdata/fra.traineddata
tar xf $CWD/tesseract-ocr-3.01.eng.tar.gz tesseract-ocr/tessdata/eng.traineddata
install -m 644 tesseract-ocr/tessdata/eng.traineddata $PKG/usr/share/tessdata/
# Install the documentation
mkdir -p $PKG/usr/doc/$NAME