aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'graphics')
-rw-r--r--graphics/tesseract/README3
-rw-r--r--graphics/tesseract/slack-desc10
-rw-r--r--graphics/tesseract/svutil.cpp-include_stdio_h.diff11
-rw-r--r--graphics/tesseract/tesseract.SlackBuild55
-rw-r--r--graphics/tesseract/tesseract.info10
5 files changed, 42 insertions, 47 deletions
diff --git a/graphics/tesseract/README b/graphics/tesseract/README
index f83336cf36ad4..5feadb549d467 100644
--- a/graphics/tesseract/README
+++ b/graphics/tesseract/README
@@ -14,6 +14,5 @@ changed by passing an alternate value on the command line.
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 another language
- # Please use full package name on that variable (including the extension)
+ # Edit the LANGNAM variable to switch to (or add) another language
# see https://code.google.com/p/tesseract-ocr/downloads/list for the list
diff --git a/graphics/tesseract/slack-desc b/graphics/tesseract/slack-desc
index 76b812683788c..1d12c699e1ef7 100644
--- a/graphics/tesseract/slack-desc
+++ b/graphics/tesseract/slack-desc
@@ -1,9 +1,9 @@
# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
tesseract: Tesseract (OCR Engine)
diff --git a/graphics/tesseract/svutil.cpp-include_stdio_h.diff b/graphics/tesseract/svutil.cpp-include_stdio_h.diff
deleted file mode 100644
index b2a55a9514fc9..0000000000000
--- a/graphics/tesseract/svutil.cpp-include_stdio_h.diff
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -Nur tesseract-2.04.orig//viewer/svutil.cpp tesseract-2.04/viewer/svutil.cpp
---- tesseract-2.04.orig//viewer/svutil.cpp 2009-06-03 11:29:38.000000000 -0500
-+++ tesseract-2.04/viewer/svutil.cpp 2010-07-01 00:03:45.253070024 -0500
-@@ -35,6 +35,7 @@
- #include <signal.h>
- #include <stdlib.h>
- #include <string.h>
-+#include <stdio.h>
- #include <netdb.h>
- #include <sys/socket.h>
- #ifdef __linux__
diff --git a/graphics/tesseract/tesseract.SlackBuild b/graphics/tesseract/tesseract.SlackBuild
index a66096916ae48..5f1423c7ae2cc 100644
--- a/graphics/tesseract/tesseract.SlackBuild
+++ b/graphics/tesseract/tesseract.SlackBuild
@@ -2,6 +2,7 @@
# Slackware build script for tesseract
# Copyright 2009-2010 Pierre Cazenave <pwcazenave {at} gmail [dot] com>
+# Copyright 2013 LukenShiro, Italy
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -30,16 +31,10 @@
# Modified by Willy Sudiarto Raharjo <willysr@slackware-id.org>
PRGNAM=tesseract
-VERSION=${VERSION:-3.01}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-3.02.02}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-# language file name
-# replace this with the filename of the language you want to install
-# filename differs from one language to another, so it's very unpredictable
-# see https://code.google.com/p/tesseract-ocr/downloads/list for complete list
-LANGNAM=${LANGNAM:-"tesseract-ocr-3.01.eng.tar.gz"}
-
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
@@ -67,6 +62,19 @@ else
LIBDIRSUFFIX=""
fi
+DOCFILES="AUTHORS COPYING ChangeLog INSTALL NEWS README ReleaseNotes"
+# Language data files
+# replace this with the 3-character ISO 639-2 language code of the language(s)
+# you want to install: different language data files can coexist nicely.
+# Available languages are (in no particular order):
+# grc epo_alt eng ukr tur tha tgl tel tam swe swa srp sqi spa_old spa slv
+# 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
+# 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
+LANGVER=${LANGVER:-3.02}
+LANGNAM=${LANGNAM:-"eng"}
+
set -e
rm -rf $TMP/$PRGNAM-$VERSION $PKG
@@ -75,16 +83,11 @@ cd $TMP
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-find . \
- \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
-
-# Fix missing snprintf()
-patch -p1 < $CWD/svutil.cpp-include_stdio_h.diff
-
-sed -i '1,1i#include <unistd.h>' viewer/svutil.cpp
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
./autogen.sh
CFLAGS="$SLKCFLAGS" \
@@ -98,20 +101,24 @@ CFLAGS="$SLKCFLAGS" \
--build=$ARCH-slackware-linux
make
-
-# Extract language name described above
-tar xvf $CWD/$LANGNAM
-
make install DESTDIR=$PKG
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+# Extract language name described above;
+# language files are not automatically installed.
+mkdir -p $PKG/usr/share/tessdata
+for LNG in $LANGNAM; \
+ do tar xvf $CWD/tesseract-ocr-$LANGVER.$LNG.tar.gz ; \
+ mv tesseract-ocr/tessdata/* $PKG/usr/share/tessdata/
+done
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS COPYING ChangeLog INSTALL NEWS README ReleaseNotes \
+cp -a $DOCFILES \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \;
diff --git a/graphics/tesseract/tesseract.info b/graphics/tesseract/tesseract.info
index 4d2a17ecb50f3..9d0e42ae69663 100644
--- a/graphics/tesseract/tesseract.info
+++ b/graphics/tesseract/tesseract.info
@@ -1,10 +1,10 @@
PRGNAM="tesseract"
-VERSION="3.01"
+VERSION="3.02.02"
HOMEPAGE="http://code.google.com/p/tesseract-ocr/"
-DOWNLOAD="https://tesseract-ocr.googlecode.com/files/tesseract-3.01.tar.gz \
- https://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.01.eng.tar.gz"
-MD5SUM="1ba496e51a42358fb9d3ffe781b2d20a \
- 89c139a73e0e7b1225809fc7b226b6c9"
+DOWNLOAD="https://tesseract-ocr.googlecode.com/files/tesseract-3.02.02.tar.gz \
+ https://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.eng.tar.gz"
+MD5SUM="3d57ee5777fa998632ad0693c13a0e9e \
+ 3562250fe6f4e76229a329166b8ae853"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="leptonica"