Commit Graph

5910 Commits

Author SHA1 Message Date
Stefan Weil
7ea97552c6 Remove some local functions from class LineFinder
This allows optimizations like inlining by the compiler.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2022-02-05 15:58:49 +01:00
Stefan Weil
554d14d275 Fix comment
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2022-02-05 15:37:12 +01:00
Egor Pugin
8b5571f8bf
Merge pull request #3742 from stweil/robustness
Catch nullptr in PageIterator::Orientation to improve robustness
2022-02-03 14:57:42 +03:00
Stefan Weil
76faf16006 Fix old TODO (STATS::rangemax_)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2022-02-03 09:15:31 +01:00
Stefan Weil
443933a75a Catch nullptr in PageIterator::Orientation to improve robustness
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2022-02-03 08:31:31 +01:00
Stefan Weil
31a968432d Additional fix for CI action autotools-macos for MacPorts
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2022-01-17 09:08:20 +01:00
Stefan Weil
f6d2658ce5 Fix CI action autotools-macos for MacPorts
Remove the existing installation of Homebrew for tests with MacPorts.
Allow also to run the CI on demand manually.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2022-01-17 08:35:54 +01:00
Stefan Weil
fe420fa718
Require cmake 3.10 or newer (#3724)
CMakeLists.txt uses TREE (supported since cmake 3.8) and
check_ipo_supported (supported since cmake 3.9).

Require 3.10 which is provided by Ubuntu bionic and newer distributions.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2022-01-16 22:30:08 +02:00
Stefan Weil
24e68b9140 Add new parameter curl_timeout for curl_easy_setop
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2022-01-16 14:58:06 +01:00
Stefan Weil
ad55cec472 Add missing include file for std::max, std::min
This fixes a build issue with VS 2019 Version 16.11.9
and platform toolset v141.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2022-01-13 22:15:50 +01:00
Stefan Weil
d9f232aef6 ci: Setting PKG_CONFIG_PATH is no longer needed for autoconf builds on MacOS
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2022-01-12 19:21:53 +01:00
Stefan Weil
22ec41fb66 autoconf: Set PKG_CONFIG_PATH required for Homebrew (macOS)
If no PKG_CONFIG_PATH was provided by the user, it is now set
automatically on hosts which have the `brew` command.

MacOS with Homebrew needs PKG_CONFIG_PATH to find icu4c and libarchive.

Signed-off-by: Stefan Weil <stweil@notebook11.fritz.box>
2022-01-12 18:59:33 +01:00
Egor Pugin
853aa66962
Merge pull request #3716 from ffontaine/main
Check if platform supports feenableexcept
2022-01-11 22:05:08 +03:00
Gilles Talis
be15b46c60 Check if platform supports feenableexcept
feenableexcept is not supported by uclibc

Signed-off-by: Gilles Talis <gilles.talis@gmail.com>
[Retrieved (and updated to add cmake support and simplify configure.ac)
from
https://git.buildroot.net/buildroot/tree/package/tesseract-ocr/0001-Check-if-platform-supports-feenableexcept.patch]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2022-01-11 15:23:56 +01:00
Stefan Weil
5d5cd77e3d Create new release 5.0.1
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2022-01-07 13:43:52 +01:00
Stefan Weil
e28154ab1e Update documentation for release 5.0.1
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2022-01-07 10:39:59 +01:00
Egor Pugin
ded6108756
Merge pull request #3712 from stweil/cmake
cmake: TIFF is only used for WIN32
2022-01-07 00:02:55 +03:00
Stefan Weil
5113ed1b71 cmake: TIFF is only used for WIN32
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2022-01-06 20:52:49 +01:00
Piotr Kubaj
790f3bd104 Fix build on non-x86 non-ARM with clang
Clang doesn't exit with error on powerpc64* after adding -mfpu=neon,
but merely ignores the argument and prints a warning, which incorrectly
makes it defined as ARM with NEON.
2022-01-06 17:16:09 +01:00
Egor Pugin
890cf3ec8f
Merge pull request #3705 from stweil/cmake
Fix build with cmake 3.10.2 (Ubuntu bionic)
2022-01-03 19:03:33 +03:00
Stefan Weil
04a66b91e6 Don't use <XXX>_LINK_LIBRARIES for cmake before version 3.12
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2022-01-03 16:34:10 +01:00
Stefan Weil
28f854186f cmake: reformat with cmake-format
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2022-01-03 16:34:10 +01:00
Stefan Weil
b8b2ab225f Simplify cmake check for Pango related modules
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2022-01-03 16:34:10 +01:00
Stefan Weil
f2af305600 Update required packages for CI
A full build requires libarchive and libcurl.

The brew formula for pango depends on cairo and icu4c,
so it is not necessary to install them explicitly.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2022-01-03 14:44:21 +01:00
Egor Pugin
a02c80c3ed
Merge pull request #3704 from stweil/cmake-fixes
Two fixes for cmake builds
2022-01-02 17:00:52 +03:00
Stefan Weil
68a2aea135 cmake: Add project include paths before others
This fixes cmake builds with old tesseract header files in /usr/local.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2022-01-02 14:58:08 +01:00
Stefan Weil
c3c734e5ab cmake: Fix check for CURL_LIBRARIES
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2022-01-02 14:58:08 +01:00
Stefan Weil
e1764e1bc8 Use cmake policy CMP0074 only with version 3.12 or newer
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2022-01-01 23:00:47 +01:00
Stefan Weil
a185c068d1 Update submodule googletest to release v1.11.0
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2022-01-01 18:50:24 +01:00
Stefan Weil
6727aae7e9 Remove unused include statement
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-12-30 19:44:00 +01:00
Stefan Weil
df227caa87 Add function ERRCODE::error with only 2 parameters
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-12-30 18:46:48 +01:00
Stefan Weil
84e6f44455 Fix some compiler warnings (implicit float to double conversion)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-12-30 17:58:36 +01:00
Stefan Weil
25d25b5e09 Remove unused forward declaration
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-12-30 17:52:29 +01:00
Egor Pugin
512587a6e6
Merge pull request #3699 from stweil/bugfix
Remove duplicate parameter certainty_scale
2021-12-30 13:24:50 +03:00
Stefan Weil
e87969033b Remove duplicate parameter certainty_scale
It was also declared in class Dict and mostly used from that class.
Setting it via API or command line never changed that used value.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-12-30 10:36:37 +01:00
zdenop
86158d3978
Merge pull request #3697 from stweil/opt
Small optimizations and fixes for some compiler warnings
2021-12-29 20:13:38 +01:00
Stefan Weil
d754593a31 Catch nullptr in STATS::pile_count (fix isse #3694)
Add also a test case for this issue.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-12-29 17:26:32 +01:00
Stefan Weil
22e86fa75d Eliminate function NetworkIO::ZeroTimeStepGeneral
This allows more inline code (optimization).

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-12-29 17:17:57 +01:00
Stefan Weil
03e82271bb Fix clang compiler warnings in functions.h
The new code avoids some conversions between double and float,
so it should also have a small positive effect on the performance.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-12-27 15:39:46 +01:00
Stefan Weil
7277963e11 Update generator for lookup tables to use TFloat instead of double
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-12-27 10:31:42 +01:00
Stefan Weil
706d3bac62 Fix some clang compiler warnings
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-12-26 17:45:16 +01:00
Egor Pugin
bf7c134ba6
Merge pull request #3690 from stweil/SPDX
Clean header comments in public include files
2021-12-25 23:32:58 +03:00
Stefan Weil
3ab060ffbc Clean header comments in public include files
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-12-25 20:53:06 +01:00
Stefan Weil
5057483ec8 Add SPDX-License-Identifier to public include files
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-12-25 20:50:49 +01:00
Stefan Weil
7a218f1d6c Fix compiler warning [-Wsign-compare]
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-12-25 17:02:45 +01:00
Stefan Weil
34311179f5 Allow printing of bitfield with variadic templates
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-12-23 16:38:00 +01:00
Stefan Weil
edf5c91ab9 Fix compiler warnings caused by empty statements
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-12-23 16:35:47 +01:00
Stefan Weil
a8bdc78985 Replace tprintf comment in API header
tprintf is not part of the public API, so replace it by printf.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-12-23 15:53:11 +01:00
zdenop
07e319afa8
Cmake install (#3685)
* cmake: install configs
2021-12-22 21:48:52 +03:00
zdenop
f65fae82ac clean up condition to detect MSCV 2021-12-22 18:57:13 +01:00