summaryrefslogtreecommitdiff
path: root/app-text/tesseract/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 20:56:41 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 20:56:41 +0100
commitd87262dd706fec50cd150aab3e93883b6337466d (patch)
tree246b44c33ad7a57550430b0a60fa0df86a3c9e68 /app-text/tesseract/files
parent71bc00c87bba1ce31de0dac6c3b7fd1aee6917fc (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'app-text/tesseract/files')
-rw-r--r--app-text/tesseract/files/tesseract-3.04.01-use-system-piccolo2d.patch27
-rw-r--r--app-text/tesseract/files/tesseract-3.05.00-no_graphics.patch74
-rw-r--r--app-text/tesseract/files/tesseract-4.00.00-use-system-piccolo2d.patch27
-rw-r--r--app-text/tesseract/files/tesseract-4.00.00_alpha-isnan.patch28
-rw-r--r--app-text/tesseract/files/tesseract-4.00.00_alpha-no_graphics.patch143
-rw-r--r--app-text/tesseract/files/tesseract-4.00.00_alpha-openmp.patch111
6 files changed, 0 insertions, 410 deletions
diff --git a/app-text/tesseract/files/tesseract-3.04.01-use-system-piccolo2d.patch b/app-text/tesseract/files/tesseract-3.04.01-use-system-piccolo2d.patch
deleted file mode 100644
index a9dd00419347..000000000000
--- a/app-text/tesseract/files/tesseract-3.04.01-use-system-piccolo2d.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-diff -U 3 -dHrN tesseract-3.04.01/java/Makefile.am tesseract-3.04.01-scrollview/java/Makefile.am
---- tesseract-3.04.01/java/Makefile.am 2016-02-16 22:27:01.000000000 +0100
-+++ tesseract-3.04.01-scrollview/java/Makefile.am 2016-08-09 13:18:12.810503862 +0200
-@@ -36,10 +36,9 @@
- com/google/scrollview/ScrollView.class
-
- SCROLLVIEW_LIBS = \
-- $(srcdir)/piccolo2d-core-3.0.jar \
-- $(srcdir)/piccolo2d-extras-3.0.jar
-+ /usr/share/piccolo2d/lib/piccolo2d.jar
-
--CLASSPATH = $(srcdir)/piccolo2d-core-3.0.jar:$(srcdir)/piccolo2d-extras-3.0.jar
-+CLASSPATH = /usr/share/piccolo2d/lib/piccolo2d.jar
-
- ScrollView.jar : $(SCROLLVIEW_CLASSES)
- $(JAR) cfm $@ Manifest.txt com/google/scrollview/*.class \
-diff -U 3 -dHrN tesseract-3.04.01/viewer/Makefile.am tesseract-3.04.01-scrollview/viewer/Makefile.am
---- tesseract-3.04.01/viewer/Makefile.am 2016-02-16 22:27:01.000000000 +0100
-+++ tesseract-3.04.01-scrollview/viewer/Makefile.am 2016-08-09 13:20:57.788318147 +0200
-@@ -17,3 +17,7 @@
-
- libtesseract_viewer_la_SOURCES = \
- scrollview.cpp svmnode.cpp svutil.cpp svpaint.cpp
-+
-+if !GRAPHICS_DISABLED
-+AM_CPPFLAGS += -DSCROLLVIEW_PATH=/usr/share/tessdata/
-+endif
diff --git a/app-text/tesseract/files/tesseract-3.05.00-no_graphics.patch b/app-text/tesseract/files/tesseract-3.05.00-no_graphics.patch
deleted file mode 100644
index d6250d66c056..000000000000
--- a/app-text/tesseract/files/tesseract-3.05.00-no_graphics.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 4141de7f8ddb5ac3c39fd9c1fc77ed911c768c3d Mon Sep 17 00:00:00 2001
-From: Bernard Cafarelli <bernard.cafarelli@gmail.com>
-Date: Fri, 27 Jan 2017 12:02:54 +0100
-Subject: [PATCH] Provide SVSync::StartThread() with GRAPHICS_DISABLED
-
----
- viewer/svutil.cpp | 44 +++++++++++++++++++++-----------------------
- 1 file changed, 21 insertions(+), 23 deletions(-)
-
-diff --git a/viewer/svutil.cpp b/viewer/svutil.cpp
-index 34a2286..84a4b94 100644
---- a/viewer/svutil.cpp
-+++ b/viewer/svutil.cpp
-@@ -83,6 +83,27 @@ void SVMutex::Unlock() {
- #endif
- }
-
-+// Create new thread.
-+void SVSync::StartThread(void *(*func)(void*), void* arg) {
-+#ifdef _WIN32
-+ LPTHREAD_START_ROUTINE f = (LPTHREAD_START_ROUTINE) func;
-+ DWORD threadid;
-+ HANDLE newthread = CreateThread(
-+ NULL, // default security attributes
-+ 0, // use default stack size
-+ f, // thread function
-+ arg, // argument to thread function
-+ 0, // use default creation flags
-+ &threadid); // returns the thread identifier
-+#else
-+ pthread_t helper;
-+ pthread_attr_t attr;
-+ pthread_attr_init(&attr);
-+ pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
-+ pthread_create(&helper, &attr, func, arg);
-+#endif
-+}
-+
- #ifndef GRAPHICS_DISABLED
-
- const int kMaxMsgSize = 4096;
-@@ -186,29 +207,6 @@ void SVSemaphore::Wait() {
- #endif
- }
-
--
--// Create new thread.
--
--void SVSync::StartThread(void *(*func)(void*), void* arg) {
--#ifdef _WIN32
-- LPTHREAD_START_ROUTINE f = (LPTHREAD_START_ROUTINE) func;
-- DWORD threadid;
-- HANDLE newthread = CreateThread(
-- NULL, // default security attributes
-- 0, // use default stack size
-- f, // thread function
-- arg, // argument to thread function
-- 0, // use default creation flags
-- &threadid); // returns the thread identifier
--#else
-- pthread_t helper;
-- pthread_attr_t attr;
-- pthread_attr_init(&attr);
-- pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
-- pthread_create(&helper, &attr, func, arg);
--#endif
--}
--
- // Place a message in the message buffer (and flush it).
- void SVNetwork::Send(const char* msg) {
- mutex_send_->Lock();
---
-2.12.0
-
diff --git a/app-text/tesseract/files/tesseract-4.00.00-use-system-piccolo2d.patch b/app-text/tesseract/files/tesseract-4.00.00-use-system-piccolo2d.patch
deleted file mode 100644
index ad1f0f3df208..000000000000
--- a/app-text/tesseract/files/tesseract-4.00.00-use-system-piccolo2d.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-diff -Naur tesseract.orig/java/Makefile.am tesseract/java/Makefile.am
---- tesseract.orig/java/Makefile.am 2017-01-30 17:20:23.135458366 +0100
-+++ tesseract/java/Makefile.am 2017-01-30 17:21:29.834462557 +0100
-@@ -36,10 +36,9 @@
- com/google/scrollview/ScrollView.class
-
- SCROLLVIEW_LIBS = \
-- piccolo2d-core-3.0.jar \
-- piccolo2d-extras-3.0.jar
-+ /usr/share/piccolo2d/lib/piccolo2d.jar
-
--CLASSPATH = piccolo2d-core-3.0.jar:piccolo2d-extras-3.0.jar
-+CLASSPATH = /usr/share/piccolo2d/lib/piccolo2d.jar
-
- ScrollView.jar : $(SCROLLVIEW_CLASSES)
- $(JAR) cfm $@ $(srcdir)/Manifest.txt com/google/scrollview/*.class \
-diff -Naur tesseract.orig/viewer/Makefile.am tesseract/viewer/Makefile.am
---- tesseract.orig/viewer/Makefile.am 2017-01-30 17:20:23.176458368 +0100
-+++ tesseract/viewer/Makefile.am 2017-01-30 17:22:39.281467163 +0100
-@@ -17,3 +17,7 @@
-
- libtesseract_viewer_la_SOURCES = \
- scrollview.cpp svmnode.cpp svutil.cpp svpaint.cpp
-+
-+if !GRAPHICS_DISABLED
-+AM_CPPFLAGS += -DSCROLLVIEW_PATH=/usr/share/tessdata/
-+endif
diff --git a/app-text/tesseract/files/tesseract-4.00.00_alpha-isnan.patch b/app-text/tesseract/files/tesseract-4.00.00_alpha-isnan.patch
deleted file mode 100644
index 4ae4c8150a61..000000000000
--- a/app-text/tesseract/files/tesseract-4.00.00_alpha-isnan.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From beb564df82204078563bcbde4e569caac2f7a2ac Mon Sep 17 00:00:00 2001
-From: Stefan Weil <sw@weilnetz.de>
-Date: Tue, 22 Nov 2016 11:31:01 +0100
-Subject: [PATCH] lstm: Fix compilation (undeclared 'isnan')
-
-gcc report:
-
-lstm/lstmrecognizer.cpp:608:47: error: 'isnan' was not declared in this scope
- ASSERT_HOST(!isnan(output.f(t)[null_char_]));
-
-Signed-off-by: Stefan Weil <sw@weilnetz.de>
----
- lstm/lstmrecognizer.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lstm/lstmrecognizer.cpp b/lstm/lstmrecognizer.cpp
-index f648e16..babfe50 100644
---- a/lstm/lstmrecognizer.cpp
-+++ b/lstm/lstmrecognizer.cpp
-@@ -600,7 +600,7 @@ void LSTMRecognizer::LabelsViaThreshold(const NetworkIO& output,
- ++t;
- }
- while (t < width) {
-- ASSERT_HOST(!isnan(output.f(t)[null_char_]));
-+ ASSERT_HOST(!std::isnan(output.f(t)[null_char_]));
- int label = output.BestLabel(t, null_char_, null_char_, NULL);
- int char_start = t++;
- while (t < width && !NullIsBest(output, null_thr, null_char_, t) &&
diff --git a/app-text/tesseract/files/tesseract-4.00.00_alpha-no_graphics.patch b/app-text/tesseract/files/tesseract-4.00.00_alpha-no_graphics.patch
deleted file mode 100644
index 6707ff093644..000000000000
--- a/app-text/tesseract/files/tesseract-4.00.00_alpha-no_graphics.patch
+++ /dev/null
@@ -1,143 +0,0 @@
-diff --git a/lstm/lstmrecognizer.cpp b/lstm/lstmrecognizer.cpp
-index 1d4f0f3..7192ba7 100644
---- a/lstm/lstmrecognizer.cpp
-+++ b/lstm/lstmrecognizer.cpp
-@@ -16,6 +16,11 @@
- // limitations under the License.
- ///////////////////////////////////////////////////////////////////////
-
-+// Include automatically generated configuration file if running autoconf.
-+#ifdef HAVE_CONFIG_H
-+#include "config_auto.h"
-+#endif
-+
- #include "lstmrecognizer.h"
-
- #include "allheaders.h"
-diff --git a/lstm/lstmtrainer.cpp b/lstm/lstmtrainer.cpp
-index ab66702..fd3f247 100644
---- a/lstm/lstmtrainer.cpp
-+++ b/lstm/lstmtrainer.cpp
-@@ -16,6 +16,11 @@
- // limitations under the License.
- ///////////////////////////////////////////////////////////////////////
-
-+// Include automatically generated configuration file if running autoconf.
-+#ifdef HAVE_CONFIG_H
-+#include "config_auto.h"
-+#endif
-+
- #include "lstmtrainer.h"
- #include <string>
-
-diff --git a/lstm/network.cpp b/lstm/network.cpp
-index 795d4a5..791848a 100644
---- a/lstm/network.cpp
-+++ b/lstm/network.cpp
-@@ -16,6 +16,11 @@
- // limitations under the License.
- ///////////////////////////////////////////////////////////////////////
-
-+// Include automatically generated configuration file if running autoconf.
-+#ifdef HAVE_CONFIG_H
-+#include "config_auto.h"
-+#endif
-+
- #include "network.h"
-
- #include <stdlib.h>
-@@ -277,27 +282,31 @@ double Network::Random(double range) {
- return randomizer_->SignedRand(range);
- }
-
--#ifndef GRAPHICS_DISABLED
- // === Debug image display methods. ===
- // Displays the image of the matrix to the forward window.
- void Network::DisplayForward(const NetworkIO& matrix) {
-+#ifndef GRAPHICS_DISABLED // do nothing if there's no graphics
- Pix* image = matrix.ToPix();
- ClearWindow(false, name_.string(), pixGetWidth(image),
- pixGetHeight(image), &forward_win_);
- DisplayImage(image, forward_win_);
- forward_win_->Update();
-+#endif // GRAPHICS_DISABLED
- }
-
- // Displays the image of the matrix to the backward window.
- void Network::DisplayBackward(const NetworkIO& matrix) {
-+#ifndef GRAPHICS_DISABLED // do nothing if there's no graphics
- Pix* image = matrix.ToPix();
- STRING window_name = name_ + "-back";
- ClearWindow(false, window_name.string(), pixGetWidth(image),
- pixGetHeight(image), &backward_win_);
- DisplayImage(image, backward_win_);
- backward_win_->Update();
-+#endif // GRAPHICS_DISABLED
- }
-
-+#ifndef GRAPHICS_DISABLED
- // Creates the window if needed, otherwise clears it.
- void Network::ClearWindow(bool tess_coords, const char* window_name,
- int width, int height, ScrollView** window) {
-diff --git a/viewer/svutil.cpp b/viewer/svutil.cpp
-index 34a2286..84a4b94 100644
---- a/viewer/svutil.cpp
-+++ b/viewer/svutil.cpp
-@@ -83,6 +83,27 @@ void SVMutex::Unlock() {
- #endif
- }
-
-+// Create new thread.
-+void SVSync::StartThread(void *(*func)(void*), void* arg) {
-+#ifdef _WIN32
-+ LPTHREAD_START_ROUTINE f = (LPTHREAD_START_ROUTINE) func;
-+ DWORD threadid;
-+ HANDLE newthread = CreateThread(
-+ NULL, // default security attributes
-+ 0, // use default stack size
-+ f, // thread function
-+ arg, // argument to thread function
-+ 0, // use default creation flags
-+ &threadid); // returns the thread identifier
-+#else
-+ pthread_t helper;
-+ pthread_attr_t attr;
-+ pthread_attr_init(&attr);
-+ pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
-+ pthread_create(&helper, &attr, func, arg);
-+#endif
-+}
-+
- #ifndef GRAPHICS_DISABLED
-
- const int kMaxMsgSize = 4096;
-@@ -186,29 +207,6 @@ void SVSemaphore::Wait() {
- #endif
- }
-
--
--// Create new thread.
--
--void SVSync::StartThread(void *(*func)(void*), void* arg) {
--#ifdef _WIN32
-- LPTHREAD_START_ROUTINE f = (LPTHREAD_START_ROUTINE) func;
-- DWORD threadid;
-- HANDLE newthread = CreateThread(
-- NULL, // default security attributes
-- 0, // use default stack size
-- f, // thread function
-- arg, // argument to thread function
-- 0, // use default creation flags
-- &threadid); // returns the thread identifier
--#else
-- pthread_t helper;
-- pthread_attr_t attr;
-- pthread_attr_init(&attr);
-- pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
-- pthread_create(&helper, &attr, func, arg);
--#endif
--}
--
- // Place a message in the message buffer (and flush it).
- void SVNetwork::Send(const char* msg) {
- mutex_send_->Lock();
diff --git a/app-text/tesseract/files/tesseract-4.00.00_alpha-openmp.patch b/app-text/tesseract/files/tesseract-4.00.00_alpha-openmp.patch
deleted file mode 100644
index d07fb58157fe..000000000000
--- a/app-text/tesseract/files/tesseract-4.00.00_alpha-openmp.patch
+++ /dev/null
@@ -1,111 +0,0 @@
-Backport from upstream 6140be6a5575e9159e3678adf4ee9e673b3ff2cc
-
-diff -Naur tesseract-4.00.00alpha.orig/api/Makefile.am tesseract-4.00.00alpha/api/Makefile.am
---- tesseract-4.00.00alpha.orig/api/Makefile.am 2016-11-08 00:38:07.000000000 +0100
-+++ tesseract-4.00.00alpha/api/Makefile.am 2017-01-26 10:27:59.269712914 +0100
-@@ -88,9 +88,7 @@
-
- tesseract_LDFLAGS = $(OPENCL_LDFLAGS)
-
--if OPENMP
- tesseract_LDADD += $(OPENMP_CFLAGS)
--endif
-
- if T_WIN
- tesseract_LDADD += -lws2_32
-@@ -99,4 +97,3 @@
- if ADD_RT
- tesseract_LDADD += -lrt
- endif
--
-diff -Naur tesseract-4.00.00alpha.orig/ccmain/Makefile.am tesseract-4.00.00alpha/ccmain/Makefile.am
---- tesseract-4.00.00alpha.orig/ccmain/Makefile.am 2016-11-08 00:38:07.000000000 +0100
-+++ tesseract-4.00.00alpha/ccmain/Makefile.am 2017-01-26 10:27:59.269712914 +0100
-@@ -8,6 +8,7 @@
- -I$(top_srcdir)/textord -I$(top_srcdir)/opencl
-
- AM_CPPFLAGS += $(OPENCL_CPPFLAGS)
-+AM_CPPFLAGS += $(OPENMP_CXXFLAGS)
-
- if VISIBILITY
- AM_CPPFLAGS += -DTESS_EXPORTS \
-diff -Naur tesseract-4.00.00alpha.orig/ccmain/par_control.cpp tesseract-4.00.00alpha/ccmain/par_control.cpp
---- tesseract-4.00.00alpha.orig/ccmain/par_control.cpp 2016-11-08 00:38:07.000000000 +0100
-+++ tesseract-4.00.00alpha/ccmain/par_control.cpp 2017-01-26 10:27:59.269712914 +0100
-@@ -18,9 +18,9 @@
- ///////////////////////////////////////////////////////////////////////
-
- #include "tesseractclass.h"
--#ifdef OPENMP
-+#ifdef _OPENMP
- #include <omp.h>
--#endif // OPENMP
-+#endif // _OPENMP
-
- namespace tesseract {
-
-@@ -53,7 +53,9 @@
- }
- // Pre-classify all the blobs.
- if (tessedit_parallelize > 1) {
-+#ifdef _OPENMP
- #pragma omp parallel for num_threads(10)
-+#endif // _OPENMP
- for (int b = 0; b < blobs.size(); ++b) {
- *blobs[b].choices =
- blobs[b].tesseract->classify_blob(blobs[b].blob, "par", White, NULL);
-diff -Naur tesseract-4.00.00alpha.orig/configure.ac tesseract-4.00.00alpha/configure.ac
---- tesseract-4.00.00alpha.orig/configure.ac 2016-11-08 00:38:07.000000000 +0100
-+++ tesseract-4.00.00alpha/configure.ac 2017-01-26 10:28:45.636688839 +0100
-@@ -170,14 +170,7 @@
- fi
-
- # check whether to build OpenMP support
--AM_CONDITIONAL([OPENMP], false)
- AC_OPENMP
--AS_IF([test "x$OPENMP_CFLAGS" != "x"],
-- [AM_CONDITIONAL([OPENMP], true)
-- AC_SUBST([AM_CPPFLAGS], ["$OPENMP_CXXFLAGS"])
-- AC_DEFINE([OPENMP], [], [Defined when compiled with OpenMP support])]
--)
--
-
- # check whether to build opencl version
- AC_MSG_CHECKING([--enable-opencl argument])
-diff -Naur tesseract-4.00.00alpha.orig/lstm/lstm.cpp tesseract-4.00.00alpha/lstm/lstm.cpp
---- tesseract-4.00.00alpha.orig/lstm/lstm.cpp 2016-11-08 00:38:07.000000000 +0100
-+++ tesseract-4.00.00alpha/lstm/lstm.cpp 2017-01-26 10:27:59.269712914 +0100
-@@ -18,7 +18,7 @@
-
- #include "lstm.h"
-
--#ifndef ANDROID_BUILD
-+#ifdef _OPENMP
- #include <omp.h>
- #endif
- #include <stdio.h>
-diff -Naur tesseract-4.00.00alpha.orig/lstm/Makefile.am tesseract-4.00.00alpha/lstm/Makefile.am
---- tesseract-4.00.00alpha.orig/lstm/Makefile.am 2016-11-08 00:38:07.000000000 +0100
-+++ tesseract-4.00.00alpha/lstm/Makefile.am 2017-01-26 10:27:59.269712914 +0100
-@@ -4,7 +4,7 @@
- -I$(top_srcdir)/dict -I$(top_srcdir)/lstm
- AUTOMAKE_OPTIONS = subdir-objects
- SUBDIRS =
--AM_CXXFLAGS = -fopenmp
-+AM_CXXFLAGS = $(OPENMP_CXXFLAGS)
-
- if !NO_TESSDATA_PREFIX
- AM_CXXFLAGS += -DTESSDATA_PREFIX=@datadir@/
-diff -Naur tesseract-4.00.00alpha.orig/lstm/parallel.cpp tesseract-4.00.00alpha/lstm/parallel.cpp
---- tesseract-4.00.00alpha.orig/lstm/parallel.cpp 2016-11-08 00:38:07.000000000 +0100
-+++ tesseract-4.00.00alpha/lstm/parallel.cpp 2017-01-26 10:27:59.269712914 +0100
-@@ -18,7 +18,9 @@
-
- #include "parallel.h"
-
-+#ifdef _OPENMP
- #include <omp.h>
-+#endif
-
- #include "functions.h" // For conditional undef of _OPENMP.
- #include "networkscratch.h"