Skip to content

Commit 2d7cfbd

Browse files
committed
Fix builds for Tesseract
1 parent 64df513 commit 2d7cfbd

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

tesseract/tesseract.patch

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,27 @@ diff -ruN tesseract-5.5.3/src/ccutil/ccutil.cpp tesseract-5.5.3-patch/src/ccutil
159159
datadir = subdir;
160160
}
161161
}
162+
diff -ruN tesseract-5.5.3/src/classify/intfx.cpp tesseract-5.5.3-patch/src/classify/intfx.cpp
163+
--- tesseract-5.5.3/src/classify/intfx.cpp 2026-07-25 03:27:02.000000000 +0900
164+
+++ tesseract-5.5.3-patch/src/classify/intfx.cpp 2026-08-05 16:18:27.908508600 +0900
165+
@@ -50,13 +50,14 @@
166+
----------------------------------------------------------------------------**/
167+
168+
void InitIntegerFX() {
169+
- static std::once_flag flag;
170+
- std::call_once(flag, []() {
171+
+ static int flag = 0;
172+
+ if (!flag) {
173+
+ flag = 1;
174+
for (int i = 0; i < INT_CHAR_NORM_RANGE; ++i) {
175+
cos_table[i] = cos(i * 2 * M_PI / INT_CHAR_NORM_RANGE + M_PI);
176+
sin_table[i] = sin(i * 2 * M_PI / INT_CHAR_NORM_RANGE + M_PI);
177+
}
178+
- });
179+
+ };
180+
}
181+
182+
// Returns a vector representing the direction of a feature with the given
162183
diff -ruN tesseract-5.5.3/unittest/pagesegmode_test.cc tesseract-5.5.3-patch/unittest/pagesegmode_test.cc
163184
--- tesseract-5.5.3/unittest/pagesegmode_test.cc 2026-07-25 03:27:02.000000000 +0900
164185
+++ tesseract-5.5.3-patch/unittest/pagesegmode_test.cc 2026-07-31 20:51:25.274856499 +0900

0 commit comments

Comments
 (0)