diff --git a/Formula/tesseract.rb b/Formula/tesseract.rb index 82faea8050..1570c7f099 100644 --- a/Formula/tesseract.rb +++ b/Formula/tesseract.rb @@ -65,6 +65,12 @@ class Tesseract < Formula end def install + if build.with? "training-tools" + icu4c = Formula["icu4c"] + ENV.append "CFLAGS", "-I#{icu4c.opt_include}" + ENV.append "LDFLAGS", "-L#{icu4c.opt_lib}" + end + # explicitly state leptonica header location, as the makefile defaults to /usr/local/include, # which doesn't work for non-default homebrew location ENV["LIBLEPT_HEADERSDIR"] = HOMEBREW_PREFIX/"include"