summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Labedan <plabedan@gmail.com>2015-10-16 08:07:50 +0200
committerPaul Labedan <plabedan@gmail.com>2015-10-16 08:07:50 +0200
commit6d6843953d751ebac8aa0911912a118ed34aafe0 (patch)
tree6fbc4b765d8d8369dcdba34542ba7ab3573a9840 /media-gfx
parentadd bcpp-20150811 (diff)
downloadplab-6d6843953d751ebac8aa0911912a118ed34aafe0.tar.gz
plab-6d6843953d751ebac8aa0911912a118ed34aafe0.tar.bz2
plab-6d6843953d751ebac8aa0911912a118ed34aafe0.zip
add ocrfeeder 0.8.1
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/ocrfeeder/Manifest4
-rw-r--r--media-gfx/ocrfeeder/files/0001-Fix-PIL-imports.patch95
-rw-r--r--media-gfx/ocrfeeder/files/0002-Drop-bundled-odfpy-usage.patch60
-rw-r--r--media-gfx/ocrfeeder/ocrfeeder-0.8.1.ebuild79
4 files changed, 238 insertions, 0 deletions
diff --git a/media-gfx/ocrfeeder/Manifest b/media-gfx/ocrfeeder/Manifest
new file mode 100644
index 0000000..5007cbf
--- /dev/null
+++ b/media-gfx/ocrfeeder/Manifest
@@ -0,0 +1,4 @@
+AUX 0001-Fix-PIL-imports.patch 3099 SHA256 991325107c4cbdda7354847a4fce0e8e4fff292e8bbd30223306c8502cad94ef SHA512 2c58a37f29f0e6146b92c3290ce85158d5806f802602846230599021f247138404d43f69f68df70f05bf4da9fc84b1fb8e20ac7eacdf84af7b714bb62eaa7b84 WHIRLPOOL 8cd8e81bb97d16abf62730cf3de3bb10f829582dfd12af9057946ff709341e98f4b74be9ea1d51d2ab212bf441e0caab3694a0540b78239516ee6278d4876cb8
+AUX 0002-Drop-bundled-odfpy-usage.patch 2191 SHA256 875595186a03a0136a01a0c249f23697da3344983da00c84c552edf58fb2ae88 SHA512 9a764184e27cfa21cd813a33d422e021c9dbe065e684723372d274b2222ca5292ae92f6c4b4e13758d37b4411a362d71ee16a4c7b524ef341e63d65d91182f93 WHIRLPOOL 7e18b795a79d9c5e0b76db6737383e793ddd0a8c5ceea8cac359b0fdfed23324651a5c40ddafa154837e2e2dba07f6165df57dbdeb06fe2fb79a529c90893615
+DIST ocrfeeder-0.8.1.tar.xz 900692 SHA256 5816401c9b4bfce98fd9a7b649a3c7ecc3d6968a30f0e4d1b3677d172d55253b SHA512 77684cf752ea1f3b55a1373099d3be3cbfe812cead2b254bd0624f650ace5254d5f708c001f946c3e59fd34f6db52f39b94ff6865588370ed3a5ea6530be8113 WHIRLPOOL 182f7717c3b7638d1818b6172c660b2b00f232cc8ee43f4811ef417838aadbcce063281e241d176b19d353d6a654c1d7862cd4b9bda1fe1dec59a6e0493ca0b0
+EBUILD ocrfeeder-0.8.1.ebuild 1673 SHA256 3213fc8c03db25928cb78363983a8226ef2e6506adc6cfc4717f50401ed28f12 SHA512 56597677835b0099a27f213234956f0100e0a10945238a24e4c3eb9a1e6bae9d92ed90ca5b14c9cda19911318ce1529ec4acec25861d14e145e464a47aeaa9fa WHIRLPOOL 45f50610a18a438a8e3e9d830ccd237eaf20f2ce0edfdfbe886085b53fa06cb2f0d4a45f553645263b6161c045b7416d064953a15435dd0867b1228c97f1b7b8
diff --git a/media-gfx/ocrfeeder/files/0001-Fix-PIL-imports.patch b/media-gfx/ocrfeeder/files/0001-Fix-PIL-imports.patch
new file mode 100644
index 0000000..64fb523
--- /dev/null
+++ b/media-gfx/ocrfeeder/files/0001-Fix-PIL-imports.patch
@@ -0,0 +1,95 @@
+From 871bd69b4f00347b3533f54c665b1179f5c33702 Mon Sep 17 00:00:00 2001
+From: Sander Sweers <sander.sweers@gmail.com>
+Date: Sat, 7 Sep 2013 13:02:00 +0200
+Subject: [PATCH 1/2] Fix PIL imports
+
+---
+ src/ocrfeeder/feeder/imageManipulation.py | 2 +-
+ src/ocrfeeder/feeder/layoutAnalysis.py | 2 +-
+ src/ocrfeeder/studio/dataHolder.py | 2 +-
+ src/ocrfeeder/studio/widgetPresenter.py | 2 +-
+ src/ocrfeeder/util/graphics.py | 2 +-
+ src/ocrfeeder/util/lib.py | 2 +-
+ 6 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/src/ocrfeeder/feeder/imageManipulation.py b/src/ocrfeeder/feeder/imageManipulation.py
+index c7f01ec..ad94cf1 100644
+--- a/src/ocrfeeder/feeder/imageManipulation.py
++++ b/src/ocrfeeder/feeder/imageManipulation.py
+@@ -21,7 +21,7 @@
+ from ocrfeeder.util.lib import debug
+
+ import gettext
+-import Image, ImageDraw
++from PIL import Image, ImageDraw
+ import os.path
+ from ocrfeeder.util import graphics
+ import sys
+diff --git a/src/ocrfeeder/feeder/layoutAnalysis.py b/src/ocrfeeder/feeder/layoutAnalysis.py
+index edf69c7..80770e2 100644
+--- a/src/ocrfeeder/feeder/layoutAnalysis.py
++++ b/src/ocrfeeder/feeder/layoutAnalysis.py
+@@ -23,7 +23,7 @@ from ocrfeeder.util import graphics
+ from ocrfeeder.util.constants import OCRFEEDER_DEBUG, DTP
+ from ocrfeeder.studio.dataHolder import DataBox
+ from imageManipulation import ImageProcessor
+-import Image
++from PIL import Image
+ import re
+ import math
+
+diff --git a/src/ocrfeeder/studio/dataHolder.py b/src/ocrfeeder/studio/dataHolder.py
+index 084a345..df65f7a 100644
+--- a/src/ocrfeeder/studio/dataHolder.py
++++ b/src/ocrfeeder/studio/dataHolder.py
+@@ -20,7 +20,7 @@
+
+ import os.path
+ from ocrfeeder.util import graphics
+-import Image
++from PIL import Image
+ import gobject
+ from ocrfeeder.util.graphics import getImagePrintSize, getImageResolution
+ from ocrfeeder.util import TEXT_TYPE, IMAGE_TYPE, ALIGN_LEFT, lib
+diff --git a/src/ocrfeeder/studio/widgetPresenter.py b/src/ocrfeeder/studio/widgetPresenter.py
+index 0c447ab..a12c56a 100644
+--- a/src/ocrfeeder/studio/widgetPresenter.py
++++ b/src/ocrfeeder/studio/widgetPresenter.py
+@@ -26,7 +26,7 @@ from ocrfeeder.util.asyncworker import AsyncWorker
+ from ocrfeeder.util.constants import *
+ from ocrfeeder.util.graphics import convertPixbufToImage
+ from enchant.checker import SpellChecker
+-import Image
++from PIL import Image
+ import gettext
+ import gobject
+ import goocanvas
+diff --git a/src/ocrfeeder/util/graphics.py b/src/ocrfeeder/util/graphics.py
+index fc2049a..b93fc5f 100644
+--- a/src/ocrfeeder/util/graphics.py
++++ b/src/ocrfeeder/util/graphics.py
+@@ -19,7 +19,7 @@
+ ###########################################################################
+
+ from lib import debug
+-import Image
++from PIL import Image
+ import gtk
+ import math
+
+diff --git a/src/ocrfeeder/util/lib.py b/src/ocrfeeder/util/lib.py
+index c95318d..8fed1f2 100644
+--- a/src/ocrfeeder/util/lib.py
++++ b/src/ocrfeeder/util/lib.py
+@@ -20,7 +20,7 @@
+
+ import os
+ import mimetypes
+-import Image
++from PIL import Image
+ import tempfile
+ import gtk
+ import math
+--
+1.8.3.2
+
diff --git a/media-gfx/ocrfeeder/files/0002-Drop-bundled-odfpy-usage.patch b/media-gfx/ocrfeeder/files/0002-Drop-bundled-odfpy-usage.patch
new file mode 100644
index 0000000..1e9d779
--- /dev/null
+++ b/media-gfx/ocrfeeder/files/0002-Drop-bundled-odfpy-usage.patch
@@ -0,0 +1,60 @@
+From 8b4aefa3a981de1855a29c5221465b178c9ba303 Mon Sep 17 00:00:00 2001
+From: Sander Sweers <sander.sweers@gmail.com>
+Date: Sat, 7 Sep 2013 13:07:41 +0200
+Subject: [PATCH 2/2] Drop bundled odfpy usage
+
+---
+ configure.ac | 1 -
+ src/ocrfeeder/Makefile.am | 2 +-
+ src/ocrfeeder/feeder/documentGeneration.py | 8 ++++----
+ 3 files changed, 5 insertions(+), 6 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index bb95aa7..29e69c3 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -46,7 +46,6 @@ bin/ocrfeeder-cli
+ src/Makefile
+ src/ocrfeeder/Makefile
+ src/ocrfeeder/feeder/Makefile
+-src/ocrfeeder/odf/Makefile
+ src/ocrfeeder/studio/Makefile
+ src/ocrfeeder/util/Makefile
+ src/ocrfeeder/util/constants.py
+diff --git a/src/ocrfeeder/Makefile.am b/src/ocrfeeder/Makefile.am
+index 3bf4845..14803ce 100644
+--- a/src/ocrfeeder/Makefile.am
++++ b/src/ocrfeeder/Makefile.am
+@@ -7,7 +7,7 @@ SUBDIRS = \
+ feeder/ \
+ studio/ \
+ util/ \
+- odf/
++ $(NULL)
+
+ clean-local:
+ rm -rf *.pyc *.pyo
+\ No newline at end of file
+diff --git a/src/ocrfeeder/feeder/documentGeneration.py b/src/ocrfeeder/feeder/documentGeneration.py
+index 3c83796..f7ff955 100644
+--- a/src/ocrfeeder/feeder/documentGeneration.py
++++ b/src/ocrfeeder/feeder/documentGeneration.py
+@@ -18,11 +18,11 @@
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
+ ###########################################################################
+
+-from ocrfeeder.odf.draw import Frame, TextBox, Image
+-from ocrfeeder.odf.opendocument import OpenDocumentText
+-from ocrfeeder.odf.style import Style, MasterPage, GraphicProperties, ParagraphProperties, \
++from odf.draw import Frame, TextBox, Image
++from odf.opendocument import OpenDocumentText
++from odf.style import Style, MasterPage, GraphicProperties, ParagraphProperties, \
+ TextProperties, PageLayout, PageLayoutProperties
+-from ocrfeeder.odf.text import P, Page, PageSequence
++from odf.text import P, Page, PageSequence
+ from pango import WEIGHT_BOLD, WEIGHT_NORMAL, STYLE_ITALIC, STYLE_NORMAL, \
+ STYLE_OBLIQUE
+ from ocrfeeder.util import TEXT_TYPE, IMAGE_TYPE, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_CENTER, \
+--
+1.8.3.2
+
diff --git a/media-gfx/ocrfeeder/ocrfeeder-0.8.1.ebuild b/media-gfx/ocrfeeder/ocrfeeder-0.8.1.ebuild
new file mode 100644
index 0000000..8992c84
--- /dev/null
+++ b/media-gfx/ocrfeeder/ocrfeeder-0.8.1.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="5"
+GCONF_DEBUG="no"
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools eutils gnome2 python-r1
+
+DESCRIPTION="Document layout analysis and optical character recognition system"
+HOMEPAGE="https://wiki.gnome.org/Apps/OCRFeeder"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+COMMON_DEPEND="
+ ${PYTHON_DEPS}
+ app-text/gtkspell:3[introspection]
+ dev-libs/gobject-introspection
+ dev-python/lxml[${PYTHON_USEDEP}]
+ >=dev-python/odfpy-0.7[${PYTHON_USEDEP}]
+ dev-python/pyenchant[${PYTHON_USEDEP}]
+ dev-python/pygobject:3
+ dev-python/python-sane[${PYTHON_USEDEP}]
+ dev-python/reportlab[${PYTHON_USEDEP}]
+ virtual/python-imaging[${PYTHON_USEDEP}]
+ x11-libs/goocanvas:2.0[introspection]
+ x11-libs/gtk+:3[introspection]
+"
+RDEPEND="${COMMON_DEPEND}
+ media-gfx/sane-backends
+
+ app-text/unpaper
+ || (
+ app-text/tesseract
+ app-text/ocrad
+ app-text/gocr
+ app-text/cuneiform
+ )
+"
+DEPEND="${COMMON_DEPEND}
+ app-text/gnome-doc-utils[${PYTHON_USEDEP}]
+ >=dev-util/intltool-0.35
+"
+
+pkg_setup() {
+ python_setup
+}
+
+src_prepare() {
+ # Unbundle odfpy
+ #epatch "${FILESDIR}"/0002-Drop-bundled-odfpy-usage.patch
+ #rm -rf src/ocrfeeder/odf/ || die
+
+ #eautoreconf
+ gnome2_src_prepare
+ python_copy_sources
+}
+
+src_configure() {
+ python_foreach_impl run_in_build_dir gnome2_src_configure
+}
+
+src_compile() {
+ python_foreach_impl run_in_build_dir emake
+}
+
+src_test() {
+ python_foreach_impl run_in_build_dir emake check
+}
+
+src_install() {
+ python_foreach_impl run_in_build_dir gnome2_src_install
+ python_fix_shebang "${D}"/usr/bin
+}