aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorJuhee Cho <juhee.cho@lge.com>2016-10-05 21:32:11 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2016-10-21 18:20:43 +0200
commit37967410b35de588cae1c12b62f1e68c24810edd (patch)
treee11b8a30b9280f602b851d1cf0b597584a7bfbb4 /contrib
parent0cc3d0613abde1c903e408081a2b18c6a562daab (diff)
downloadmeta-openembedded-37967410b35de588cae1c12b62f1e68c24810edd.tar.gz
meta-openembedded-37967410b35de588cae1c12b62f1e68c24810edd.tar.bz2
meta-openembedded-37967410b35de588cae1c12b62f1e68c24810edd.zip
tesseract: upgrade to 3.04
* use do_split_packages instead of many separate recipes * fetch from github Signed-off-by: Juhee Cho <juhee.cho@lge.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/tesseract-langs.sh92
1 files changed, 0 insertions, 92 deletions
diff --git a/contrib/tesseract-langs.sh b/contrib/tesseract-langs.sh
deleted file mode 100755
index 50873c139..000000000
--- a/contrib/tesseract-langs.sh
+++ /dev/null
@@ -1,92 +0,0 @@
-#! /bin/sh
-
-# Copyright (C) 2014, O.S. Systems Software Ltda. All Rights Reserved
-# Released under the MIT license (see meta-openembedded layer's COPYING.MIT)
-
-PV='3.02'
-
-# Sometimes the software package has a minor version, but language
-# packages have not. Example:
-# software package: tesseract-ocr-3.02.02.tar.gz
-# language package: tesseract-ocr-3.02.por.tar.gz
-MINOR_PV=02
-
-recipes_dir=$1
-
-usage() {
- echo "Usage: `basename $0` <recipes dir> [ <download dir> ]"
-}
-
-if [ -z "$recipes_dir" ]; then
- usage
- exit 1
-fi
-mkdir -p "$recipes_dir"
-
-file_list_uri='https://code.google.com/p/tesseract-ocr/downloads/list'
-file_list=`mktemp`
-
-remove_dl_dir=
-if [ -z "$2" ]; then
- remove_dl_dir=1
- dl_dir=`mktemp -d`
-else
- dl_dir="$2"
-fi
-
-mkdir -p $dl_dir
-
-tesseract_langs() {
- wget -q -O "$file_list" "$file_list_uri"
-
- grep -E 'a href="detail\?name=tesseract-ocr-'${PV}'\.[^\.]+.tar.gz&amp;can=2&amp;q=">' "$file_list" | \
- sed -r -e 's/.*tesseract-ocr-'${PV}'\.*([^\.]+)\.tar\.gz.*/\1/' | \
- grep -Ev '('${MINOR_PV}'|'${MINOR_PV}'-doc-html)' | \
- sort -u
-}
-
-download_lang_files() {
- local langs="$1"
- local uri
- for lang in $langs; do
- if [ ! -e "$dl_dir/tesseract-ocr-${PV}.${lang}.tar.gz" ]; then
- uri="https://tesseract-ocr.googlecode.com/files/tesseract-ocr-${PV}.${lang}.tar.gz"
- echo "Downloading $uri"
- wget -q -P "$dl_dir" "$uri"
- fi
- done
-}
-
-create_recipe() {
- local lang=$1
- local tarball
-
- tarball="$dl_dir/tesseract-ocr-${PV}.${lang}.tar.gz"
-
- md5sum=`md5sum $tarball | awk '{print $1}'`
- sha256sum=`sha256sum $tarball | awk '{print $1}'`
-
- cat > $recipes_dir/tesseract-lang-`echo ${lang} | sed s/_/-/g`_${PV}.bb <<EOF
-# Copyright (C) 2014, O.S. Systems Software Ltda. All Rights Reserved
-# Released under the MIT license (see meta-openembedded layer's COPYING.MIT)
-
-TESSERACT_LANG = "$lang"
-
-require tesseract-lang.inc
-
-SRC_URI[md5sum] = "${md5sum}"
-SRC_URI[sha256sum] = "${sha256sum}"
-EOF
-}
-
-
-LANGS=`tesseract_langs`
-
-download_lang_files "$LANGS"
-
-for lang in $LANGS; do
- create_recipe $lang
-done
-
-[ -n "$remove_dl_dir" ] && rm -rf $dl_dir
-rm -f $file_list