summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Dartiguelongue <eva@gentoo.org>2015-09-07 02:05:06 +0200
committerGilles Dartiguelongue <eva@gentoo.org>2015-09-07 02:05:06 +0200
commit6985718be6fbc4b3dc4d8a8e1236285b8f50ca5b (patch)
treefeee994a58a6c8a07d5f9483b4c78b2bedc0cc9b /media-gfx/ocrfeeder/files
parentdev-python/python-sane: initial ebuild (diff)
downloadeva-6985718be6fbc4b3dc4d8a8e1236285b8f50ca5b.tar.gz
eva-6985718be6fbc4b3dc4d8a8e1236285b8f50ca5b.tar.bz2
eva-6985718be6fbc4b3dc4d8a8e1236285b8f50ca5b.zip
media-gfx/ocrfeeder: initial ebuild
A far from perfect first attempt at packaging OCRFeeder. Appears to work ok with Tesseract. Probably needs some REQUIRED_USE for tiff handling.
Diffstat (limited to 'media-gfx/ocrfeeder/files')
-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
2 files changed, 155 insertions, 0 deletions
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
+