Remove remaining parts of tessopt (fix autotools build)

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2021-01-05 23:06:17 +01:00
parent db43bb43dc
commit d000df7e00
3 changed files with 9 additions and 25 deletions

View File

@ -741,7 +741,7 @@ training-install: $(EXTRA_PROGRAMS)
training-uninstall: training-uninstall:
# Some unit tests use code from training. # Some unit tests use code from training.
check: libtesseract_training.la libtesseract_tessopt.la check: libtesseract_training.la
# dawg_test runs dawg2wordlist and wordlist2dawg. # dawg_test runs dawg2wordlist and wordlist2dawg.
check: dawg2wordlist wordlist2dawg check: dawg2wordlist wordlist2dawg
@ -812,7 +812,6 @@ noinst_HEADERS += src/training/common/networkbuilder.h
noinst_HEADERS += src/training/unicharset/normstrngs.h noinst_HEADERS += src/training/unicharset/normstrngs.h
noinst_HEADERS += src/training/pango/pango_font_info.h noinst_HEADERS += src/training/pango/pango_font_info.h
noinst_HEADERS += src/training/pango/stringrenderer.h noinst_HEADERS += src/training/pango/stringrenderer.h
noinst_HEADERS += src/training/tessopt.h
noinst_HEADERS += src/training/pango/tlog.h noinst_HEADERS += src/training/pango/tlog.h
noinst_HEADERS += src/training/unicharset/unicharset_training_utils.h noinst_HEADERS += src/training/unicharset/unicharset_training_utils.h
noinst_HEADERS += src/training/unicharset/validate_grapheme.h noinst_HEADERS += src/training/unicharset/validate_grapheme.h
@ -832,7 +831,7 @@ noinst_HEADERS += src/training/common/trainingsampleset.h
endif endif
EXTRA_LTLIBRARIES = libtesseract_training.la libtesseract_tessopt.la EXTRA_LTLIBRARIES = libtesseract_training.la
libtesseract_training_la_CPPFLAGS = $(training_CPPFLAGS) libtesseract_training_la_CPPFLAGS = $(training_CPPFLAGS)
libtesseract_training_la_SOURCES = src/training/pango/boxchar.cpp libtesseract_training_la_SOURCES = src/training/pango/boxchar.cpp
@ -867,9 +866,6 @@ libtesseract_training_la_SOURCES += src/training/common/sampleiterator.cpp
libtesseract_training_la_SOURCES += src/training/common/trainingsampleset.cpp libtesseract_training_la_SOURCES += src/training/common/trainingsampleset.cpp
endif endif
libtesseract_tessopt_la_CPPFLAGS = $(training_CPPFLAGS)
libtesseract_tessopt_la_SOURCES = src/training/tessopt.cpp
trainingtools = combine_lang_model trainingtools = combine_lang_model
trainingtools += combine_tessdata trainingtools += combine_tessdata
trainingtools += dawg2wordlist trainingtools += dawg2wordlist
@ -903,36 +899,33 @@ if !DISABLED_LEGACY_ENGINE
ambiguous_words_CPPFLAGS = $(training_CPPFLAGS) ambiguous_words_CPPFLAGS = $(training_CPPFLAGS)
ambiguous_words_SOURCES = src/training/ambiguous_words.cpp ambiguous_words_SOURCES = src/training/ambiguous_words.cpp
ambiguous_words_LDADD = libtesseract_training.la ambiguous_words_LDADD = libtesseract_training.la
ambiguous_words_LDADD += libtesseract_tessopt.la
ambiguous_words_LDADD += $(extralib) ambiguous_words_LDADD += $(extralib)
classifier_tester_CPPFLAGS = $(training_CPPFLAGS) classifier_tester_CPPFLAGS = $(training_CPPFLAGS)
classifier_tester_SOURCES = src/training/classifier_tester.cpp classifier_tester_SOURCES = src/training/classifier_tester.cpp
classifier_tester_LDADD = libtesseract_training.la classifier_tester_LDADD = libtesseract_training.la
classifier_tester_LDADD += libtesseract_tessopt.la
classifier_tester_LDADD += $(extralib) classifier_tester_LDADD += $(extralib)
cntraining_CPPFLAGS = $(training_CPPFLAGS) cntraining_CPPFLAGS = $(training_CPPFLAGS)
cntraining_SOURCES = src/training/cntraining.cpp cntraining_SOURCES = src/training/cntraining.cpp
cntraining_LDADD = libtesseract_training.la libtesseract_tessopt.la cntraining_LDADD = libtesseract_training.la
cntraining_LDADD += $(extralib) cntraining_LDADD += $(extralib)
mftraining_CPPFLAGS = $(training_CPPFLAGS) mftraining_CPPFLAGS = $(training_CPPFLAGS)
mftraining_SOURCES = src/training/mftraining.cpp src/training/mergenf.cpp mftraining_SOURCES = src/training/mftraining.cpp src/training/mergenf.cpp
mftraining_LDADD = libtesseract_training.la libtesseract_tessopt.la mftraining_LDADD = libtesseract_training.la
mftraining_LDADD += $(ICU_UC_LIBS) mftraining_LDADD += $(ICU_UC_LIBS)
mftraining_LDADD += $(extralib) mftraining_LDADD += $(extralib)
shapeclustering_CPPFLAGS = $(training_CPPFLAGS) shapeclustering_CPPFLAGS = $(training_CPPFLAGS)
shapeclustering_SOURCES = src/training/shapeclustering.cpp shapeclustering_SOURCES = src/training/shapeclustering.cpp
shapeclustering_LDADD = libtesseract_training.la libtesseract_tessopt.la shapeclustering_LDADD = libtesseract_training.la
shapeclustering_LDADD += $(extralib) shapeclustering_LDADD += $(extralib)
endif endif
combine_lang_model_CPPFLAGS = $(training_CPPFLAGS) combine_lang_model_CPPFLAGS = $(training_CPPFLAGS)
combine_lang_model_SOURCES = src/training/combine_lang_model.cpp combine_lang_model_SOURCES = src/training/combine_lang_model.cpp
combine_lang_model_LDADD = libtesseract_training.la combine_lang_model_LDADD = libtesseract_training.la
combine_lang_model_LDADD += libtesseract_tessopt.la
combine_lang_model_LDADD += $(ICU_I18N_LIBS) $(ICU_UC_LIBS) combine_lang_model_LDADD += $(ICU_I18N_LIBS) $(ICU_UC_LIBS)
combine_lang_model_LDADD += $(extralib) combine_lang_model_LDADD += $(extralib)
@ -942,38 +935,33 @@ combine_tessdata_LDADD = $(extralib)
dawg2wordlist_CPPFLAGS = $(training_CPPFLAGS) dawg2wordlist_CPPFLAGS = $(training_CPPFLAGS)
dawg2wordlist_SOURCES = src/training/dawg2wordlist.cpp dawg2wordlist_SOURCES = src/training/dawg2wordlist.cpp
dawg2wordlist_LDADD = libtesseract_tessopt.la dawg2wordlist_LDADD = $(extralib)
dawg2wordlist_LDADD += $(extralib)
lstmeval_CPPFLAGS = $(training_CPPFLAGS) lstmeval_CPPFLAGS = $(training_CPPFLAGS)
lstmeval_SOURCES = src/training/lstmeval.cpp lstmeval_SOURCES = src/training/lstmeval.cpp
lstmeval_LDADD = libtesseract_training.la lstmeval_LDADD = libtesseract_training.la
lstmeval_LDADD += libtesseract_tessopt.la
lstmeval_LDADD += $(ICU_UC_LIBS) lstmeval_LDADD += $(ICU_UC_LIBS)
lstmeval_LDADD += $(extralib) lstmeval_LDADD += $(extralib)
lstmtraining_CPPFLAGS = $(training_CPPFLAGS) lstmtraining_CPPFLAGS = $(training_CPPFLAGS)
lstmtraining_SOURCES = src/training/lstmtraining.cpp lstmtraining_SOURCES = src/training/lstmtraining.cpp
lstmtraining_LDADD = libtesseract_training.la lstmtraining_LDADD = libtesseract_training.la
lstmtraining_LDADD += libtesseract_tessopt.la
lstmtraining_LDADD += $(ICU_I18N_LIBS) $(ICU_UC_LIBS) lstmtraining_LDADD += $(ICU_I18N_LIBS) $(ICU_UC_LIBS)
lstmtraining_LDADD += $(extralib) lstmtraining_LDADD += $(extralib)
merge_unicharsets_CPPFLAGS = $(training_CPPFLAGS) merge_unicharsets_CPPFLAGS = $(training_CPPFLAGS)
merge_unicharsets_SOURCES = src/training/merge_unicharsets.cpp merge_unicharsets_SOURCES = src/training/merge_unicharsets.cpp
merge_unicharsets_LDADD = libtesseract_tessopt.la merge_unicharsets_LDADD = $(extralib)
merge_unicharsets_LDADD += $(extralib)
set_unicharset_properties_CPPFLAGS = $(training_CPPFLAGS) set_unicharset_properties_CPPFLAGS = $(training_CPPFLAGS)
set_unicharset_properties_SOURCES = src/training/set_unicharset_properties.cpp set_unicharset_properties_SOURCES = src/training/set_unicharset_properties.cpp
set_unicharset_properties_LDADD = libtesseract_training.la set_unicharset_properties_LDADD = libtesseract_training.la
set_unicharset_properties_LDADD += libtesseract_tessopt.la
set_unicharset_properties_LDADD += $(ICU_I18N_LIBS) $(ICU_UC_LIBS) set_unicharset_properties_LDADD += $(ICU_I18N_LIBS) $(ICU_UC_LIBS)
set_unicharset_properties_LDADD += $(extralib) set_unicharset_properties_LDADD += $(extralib)
text2image_CPPFLAGS = $(training_CPPFLAGS) text2image_CPPFLAGS = $(training_CPPFLAGS)
text2image_SOURCES = src/training/text2image.cpp text2image_SOURCES = src/training/text2image.cpp
text2image_LDADD = libtesseract_training.la libtesseract_tessopt.la text2image_LDADD = libtesseract_training.la
text2image_LDADD += $(ICU_I18N_LIBS) $(ICU_UC_LIBS) text2image_LDADD += $(ICU_I18N_LIBS) $(ICU_UC_LIBS)
text2image_LDADD += $(extralib) text2image_LDADD += $(extralib)
text2image_LDADD += $(ICU_UC_LIBS) $(cairo_LIBS) text2image_LDADD += $(ICU_UC_LIBS) $(cairo_LIBS)
@ -982,14 +970,12 @@ text2image_LDADD += $(pango_LIBS) $(pangocairo_LIBS) $(pangoft2_LIBS)
unicharset_extractor_CPPFLAGS = $(training_CPPFLAGS) unicharset_extractor_CPPFLAGS = $(training_CPPFLAGS)
unicharset_extractor_SOURCES = src/training/unicharset_extractor.cpp unicharset_extractor_SOURCES = src/training/unicharset_extractor.cpp
unicharset_extractor_LDADD = libtesseract_training.la unicharset_extractor_LDADD = libtesseract_training.la
unicharset_extractor_LDADD += libtesseract_tessopt.la
unicharset_extractor_LDADD += $(ICU_I18N_LIBS) $(ICU_UC_LIBS) unicharset_extractor_LDADD += $(ICU_I18N_LIBS) $(ICU_UC_LIBS)
unicharset_extractor_LDADD += $(extralib) unicharset_extractor_LDADD += $(extralib)
wordlist2dawg_CPPFLAGS = $(training_CPPFLAGS) wordlist2dawg_CPPFLAGS = $(training_CPPFLAGS)
wordlist2dawg_SOURCES = src/training/wordlist2dawg.cpp wordlist2dawg_SOURCES = src/training/wordlist2dawg.cpp
wordlist2dawg_LDADD = libtesseract_tessopt.la wordlist2dawg_LDADD = $(extralib)
wordlist2dawg_LDADD += $(extralib)
# fuzzer-api is used for fuzzing tests. # fuzzer-api is used for fuzzing tests.
# They are run by OSS-Fuzz https://oss-fuzz.com/, but can also be run locally. # They are run by OSS-Fuzz https://oss-fuzz.com/, but can also be run locally.

View File

@ -18,7 +18,6 @@
#ifdef DISABLED_LEGACY_ENGINE #ifdef DISABLED_LEGACY_ENGINE
#include "params.h" #include "params.h"
#include "tessopt.h"
#include "tprintf.h" #include "tprintf.h"
INT_PARAM_FLAG(debug_level, 0, "Level of Trainer debugging"); INT_PARAM_FLAG(debug_level, 0, "Level of Trainer debugging");

View File

@ -122,7 +122,6 @@ TESS_LIBS = $(GTEST_LIBS)
TESS_LIBS += $(top_builddir)/libtesseract.la $(libarchive_LIBS) TESS_LIBS += $(top_builddir)/libtesseract.la $(libarchive_LIBS)
TESS_LIBS += $(TENSORFLOW_LIBS) TESS_LIBS += $(TENSORFLOW_LIBS)
TRAINING_LIBS = $(top_builddir)/libtesseract_training.la TRAINING_LIBS = $(top_builddir)/libtesseract_training.la
TRAINING_LIBS += $(top_builddir)/libtesseract_tessopt.la
TRAINING_LIBS += $(TESS_LIBS) TRAINING_LIBS += $(TESS_LIBS)
AM_CPPFLAGS += -isystem $(top_srcdir)/googletest/googletest/include \ AM_CPPFLAGS += -isystem $(top_srcdir)/googletest/googletest/include \
-isystem $(top_srcdir)/googletest/googlemock/include -isystem $(top_srcdir)/googletest/googlemock/include