buildroot.busybox.net archive mirror
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/tesseract-ocr: bump to version 5.0.1
@ 2022-01-09 11:47 Gilles Talis
  2022-01-09 14:58 ` Peter Korsgaard
  0 siblings, 1 reply; 2+ messages in thread
From: Gilles Talis @ 2022-01-09 11:47 UTC (permalink / raw)
  To: buildroot; +Cc: Gilles Talis

- Updated language training data version to 4.1.0
- Removed current patch as not required anymore
- Added patch to fix uclibc failures
- Supported C++ version has moved from C++11 to C++17

Signed-off-by: Gilles Talis <gilles.talis@gmail.com>
---
 ...-if-platform-supports-feenableexcept.patch | 42 +++++++++++++++++++
 ...-Fix-timeval-structure-build-failure.patch | 27 ------------
 package/tesseract-ocr/Config.in               |  6 +--
 package/tesseract-ocr/tesseract-ocr.hash      |  2 +-
 package/tesseract-ocr/tesseract-ocr.mk        |  4 +-
 5 files changed, 48 insertions(+), 33 deletions(-)
 create mode 100644 package/tesseract-ocr/0001-Check-if-platform-supports-feenableexcept.patch
 delete mode 100644 package/tesseract-ocr/0001-Fix-timeval-structure-build-failure.patch

diff --git a/package/tesseract-ocr/0001-Check-if-platform-supports-feenableexcept.patch b/package/tesseract-ocr/0001-Check-if-platform-supports-feenableexcept.patch
new file mode 100644
index 0000000000..5280f01aba
--- /dev/null
+++ b/package/tesseract-ocr/0001-Check-if-platform-supports-feenableexcept.patch
@@ -0,0 +1,42 @@
+From 52484af83a58664c3cc91b8af07aeeea271f67ef Mon Sep 17 00:00:00 2001
+From: Gilles Talis <gilles.talis@gmail.com>
+Date: Sun, 9 Jan 2022 10:58:36 +0100
+Subject: [PATCH] Check if platform supports feenableexcept
+
+Signed-off-by: Gilles Talis <gilles.talis@gmail.com>
+---
+ configure.ac      | 4 ++++
+ src/tesseract.cpp | 2 +-
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 9177d64..80cd735 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -188,6 +188,10 @@ case "${host_cpu}" in
+ 
+ esac
+
++# check whether feenableexcept is supported. some C libraries (e.g. uclibc) don't.
++AC_CHECK_FUNC(feenableexcept, [feenableexcept=true], [feenableexcept=false])
++AM_CONDITIONAL([HAVE_FEENABLEEXCEPT], $feenableexcept)
++
+ AX_CHECK_COMPILE_FLAG([-fopenmp-simd], [openmp_simd=true], [openmp_simd=false], [$WERROR])
+ AM_CONDITIONAL([OPENMP_SIMD], $openmp_simd)
+ 
+diff --git a/src/tesseract.cpp b/src/tesseract.cpp
+index 933116e..9154db8 100644
+--- a/src/tesseract.cpp
++++ b/src/tesseract.cpp
+@@ -629,7 +629,7 @@ static void PreloadRenderers(tesseract::TessBaseAPI &api,
+  **********************************************************************/
+ 
+ int main(int argc, char **argv) {
+-#if defined(__USE_GNU)
++#if defined(__USE_GNU) && defined(HAVE_FEENABLEEXCEPT)
+   // Raise SIGFPE.
+ #  if defined(__clang__)
+   // clang creates code which causes some FP exceptions, so don't enable those.
+-- 
+2.32.0
+
diff --git a/package/tesseract-ocr/0001-Fix-timeval-structure-build-failure.patch b/package/tesseract-ocr/0001-Fix-timeval-structure-build-failure.patch
deleted file mode 100644
index 0b0bb1a899..0000000000
--- a/package/tesseract-ocr/0001-Fix-timeval-structure-build-failure.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From ea1e1ddfc0af9966a0c613a93087bc3e0a5979a7 Mon Sep 17 00:00:00 2001
-From: Gilles Talis <gilles.talis@gmail.com>
-Date: Fri, 19 Jul 2019 18:52:03 +0200
-Subject: [PATCH] Fix timeval structure build failure
-
-timeval structure definition requires <sys/time.h> to be included
-
-Signed-off-by: Gilles Talis <gilles.talis@gmail.com>
----
- src/ccutil/ocrclass.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/ccutil/ocrclass.h b/src/ccutil/ocrclass.h
-index d39a6dd..2a01118 100644
---- a/src/ccutil/ocrclass.h
-+++ b/src/ccutil/ocrclass.h
-@@ -28,6 +28,7 @@
- 
- #include <chrono>
- #include <ctime>
-+#include <sys/time.h>
- #ifdef _WIN32
- #include <winsock2.h> // for timeval
- #endif
--- 
-2.7.4
-
diff --git a/package/tesseract-ocr/Config.in b/package/tesseract-ocr/Config.in
index 3afaca771a..4d9b78733e 100644
--- a/package/tesseract-ocr/Config.in
+++ b/package/tesseract-ocr/Config.in
@@ -1,13 +1,13 @@
-comment "tesseract-ocr needs a toolchain w/ threads, C++, gcc >= 4.8, dynamic library, wchar"
+comment "tesseract-ocr needs a toolchain w/ threads, C++, gcc >= 7, dynamic library, wchar"
 	depends on BR2_USE_MMU
 	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
-		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || BR2_STATIC_LIBS || !BR2_USE_WCHAR
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_7 || BR2_STATIC_LIBS || !BR2_USE_WCHAR
 
 menuconfig BR2_PACKAGE_TESSERACT_OCR
 	bool "tesseract-ocr"
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_HAS_THREADS
-	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # C++17
 	depends on BR2_USE_MMU # fork()
 	depends on !BR2_STATIC_LIBS
 	depends on BR2_USE_WCHAR
diff --git a/package/tesseract-ocr/tesseract-ocr.hash b/package/tesseract-ocr/tesseract-ocr.hash
index 808ea174ef..9e526423d3 100644
--- a/package/tesseract-ocr/tesseract-ocr.hash
+++ b/package/tesseract-ocr/tesseract-ocr.hash
@@ -1,5 +1,5 @@
 # locally computed
-sha256  2a66ff0d8595bff8f04032165e6c936389b1e5727c3ce5a27b3e059d218db1cb  tesseract-ocr-4.1.1.tar.gz
+sha256  b5b0e561650ed67feb1e9de38d4746121d302ae4c876c95b99b8b6f9f89d5c58  tesseract-ocr-5.0.1.tar.gz
 sha256  cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30  LICENSE
 sha256  daa0c97d651c19fba3b25e81317cd697e9908c8208090c94c3905381c23fc047  eng.traineddata
 sha256  eac01c1d72540d6090facb7b2f42dd0a2ee8fc57c5be1b20548ae668e2761913  fra.traineddata
diff --git a/package/tesseract-ocr/tesseract-ocr.mk b/package/tesseract-ocr/tesseract-ocr.mk
index fc083c27f6..7e23e64136 100644
--- a/package/tesseract-ocr/tesseract-ocr.mk
+++ b/package/tesseract-ocr/tesseract-ocr.mk
@@ -4,8 +4,8 @@
 #
 ################################################################################
 
-TESSERACT_OCR_VERSION = 4.1.1
-TESSERACT_OCR_DATA_VERSION = 4.0.0
+TESSERACT_OCR_VERSION = 5.0.1
+TESSERACT_OCR_DATA_VERSION = 4.1.0
 TESSERACT_OCR_SITE = $(call github,tesseract-ocr,tesseract,$(TESSERACT_OCR_VERSION))
 TESSERACT_OCR_LICENSE = Apache-2.0
 TESSERACT_OCR_LICENSE_FILES = LICENSE
-- 
2.32.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Buildroot] [PATCH] package/tesseract-ocr: bump to version 5.0.1
  2022-01-09 11:47 [Buildroot] [PATCH] package/tesseract-ocr: bump to version 5.0.1 Gilles Talis
@ 2022-01-09 14:58 ` Peter Korsgaard
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2022-01-09 14:58 UTC (permalink / raw)
  To: Gilles Talis; +Cc: buildroot

>>>>> "Gilles" == Gilles Talis <gilles.talis@gmail.com> writes:

 > - Updated language training data version to 4.1.0
 > - Removed current patch as not required anymore
 > - Added patch to fix uclibc failures
 > - Supported C++ version has moved from C++11 to C++17

 > Signed-off-by: Gilles Talis <gilles.talis@gmail.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-09 14:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-09 11:47 [Buildroot] [PATCH] package/tesseract-ocr: bump to version 5.0.1 Gilles Talis
2022-01-09 14:58 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).