tesseract: fix HEAD build with training-tools

Closes Homebrew/homebrew#49663.

Signed-off-by: Alex Dunn <dunn.alex@gmail.com>
This commit is contained in:
pitpit 2016-02-29 23:47:03 +01:00 committed by Alex Dunn
parent 782f63fcc8
commit b5cfb3eaac

View file

@ -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"