Skip to content

Commit

Permalink
Merge pull request OCR-D#240 from OCR-D/update-tessdata-variable
Browse files Browse the repository at this point in the history
adapt TESSDATA to resmgr default
  • Loading branch information
kba authored Mar 5, 2021
2 parents 89c570f + 8c0aa2e commit f251ffd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,9 @@ CUSTOM_DEPS += g++ make automake libleptonica-dev
# but since we are building statically, we need more (static) libs at build time
CUSTOM_DEPS += libarchive-dev libcurl4-nss-dev libgif-dev libjpeg-dev libpng-dev libtiff-dev

TESSDATA := $(VIRTUAL_ENV)/share/tessdata
XDG_DATA_HOME ?= $(if $(HOME),$(HOME)/.local/share,/usr/local/share)
DEFAULT_RESLOC ?= $(XDG_DATA_HOME)/ocrd-resources
TESSDATA ?= $(DEFAULT_RESLOC)/ocrd-tesserocr-recognize
TESSDATA_URL := https://github.com/tesseract-ocr/tessdata_fast
TESSERACT_TRAINEDDATA = $(ALL_TESSERACT_MODELS:%=$(TESSDATA)/%.traineddata)

Expand Down Expand Up @@ -683,7 +685,7 @@ tesseract/Makefile.in: tesseract
TESSERACT_CONFIG ?= --disable-openmp --disable-shared CXXFLAGS="-g -O2 -fPIC"
$(BIN)/tesseract: tesseract/Makefile.in
mkdir -p $(VIRTUAL_ENV)/build/tesseract
cd $(VIRTUAL_ENV)/build/tesseract && $(CURDIR)/tesseract/configure --prefix="$(VIRTUAL_ENV)" $(TESSERACT_CONFIG)
cd $(VIRTUAL_ENV)/build/tesseract && $(CURDIR)/tesseract/configure --disable-tessdata-prefix $(TESSERACT_CONFIG)
cd $(VIRTUAL_ENV)/build/tesseract && $(MAKE) install

# Build and install Tesseract training tools.
Expand Down

0 comments on commit f251ffd

Please sign in to comment.