Skip to content

Commit aab57ba

Browse files
Update tesseract to 4.1.1
Reordered libtiff and leptonica builds as well to fix some errors from leptonica not compiling with libtiff before
1 parent 722a0bd commit aab57ba

File tree

2 files changed

+39
-3
lines changed

2 files changed

+39
-3
lines changed

cross_compile_ffmpeg.sh

+6-3
Original file line numberDiff line numberDiff line change
@@ -848,14 +848,17 @@ build_lensfun() {
848848
}
849849

850850
build_libtesseract() {
851-
build_libleptonica
852851
build_libtiff # no disable configure option for this in tesseract? odd...
853-
do_git_checkout https://github.com/tesseract-ocr/tesseract.git tesseract_git a2e72f258a3bd6811cae226a01802d # #315
852+
build_libleptonica
853+
do_git_checkout https://github.com/tesseract-ocr/tesseract.git tesseract_git 4.1.1
854854
cd tesseract_git
855-
generic_configure_make_install
856855
if [[ $compiler_flavors != "native" ]]; then
856+
apply_patch file://$patch_dir/tesseract-4.1.1_mingw-std-threads.patch
857+
generic_configure "--disable-openmp"
858+
do_make_and_make_install
857859
sed -i.bak 's/-ltesseract.*$/-ltesseract -lstdc++ -lws2_32 -llept -ltiff -llzma -ljpeg -lz/' $PKG_CONFIG_PATH/tesseract.pc # why does it needs winsock? LOL plus all of libtiff's <sigh>
858860
else
861+
generic_configure_make_install
859862
sed -i.bak 's/-ltesseract.*$/-ltesseract -lstdc++ -llept -ltiff -llzma -ljpeg -lz -lgomp/' $PKG_CONFIG_PATH/tesseract.pc # see above, gomp for linux native
860863
fi
861864
cd ..
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
--- src/viewer/svutil.cpp.bak 2020-05-12 19:01:52.564756952 +0000
2+
+++ src/viewer/svutil.cpp 2020-05-12 19:02:22.172975935 +0000
3+
@@ -31,7 +31,7 @@
4+
#include <iostream>
5+
#include <memory>
6+
#include <string>
7+
-#include <thread> // for std::this_thread
8+
+#include <mingw.thread.h> // for std::this_thread
9+
#include <vector>
10+
11+
#ifdef _WIN32
12+
--- src/training/lstmtester.cpp.bak 2020-05-12 19:02:43.605134452 +0000
13+
+++ src/training/lstmtester.cpp 2020-05-12 19:04:43.658022655 +0000
14+
@@ -16,7 +16,7 @@
15+
// limitations under the License.
16+
///////////////////////////////////////////////////////////////////////
17+
18+
-#include <thread> // for std::thread
19+
+#include <mingw.thread.h> // for std::thread
20+
#include "fileio.h" // for LoadFileLinesToStrings
21+
#include "lstmtester.h"
22+
#include "genericvector.h"
23+
--- src/ccstruct/imagedata.cpp.bak 2020-05-12 19:05:28.882357325 +0000
24+
+++ src/ccstruct/imagedata.cpp 2020-05-12 19:05:43.954468876 +0000
25+
@@ -26,7 +26,7 @@
26+
#if defined(__MINGW32__)
27+
#include <unistd.h>
28+
#else
29+
-#include <thread>
30+
+#include <mingw.thread.h>
31+
#endif
32+
33+
#include "allheaders.h" // for pixDestroy, pixGetHeight, pixGetWidth, lept_...

0 commit comments

Comments
 (0)