From b93cc1f32468bb606e1078a17703630529d2a763 Mon Sep 17 00:00:00 2001 From: Bryce Glover Date: Sat, 4 Mar 2017 17:16:41 -0500 Subject: [PATCH] tesseract: depend on libtiff, fix building `--with-opencl` Resolves #10380 Closes #10596. Signed-off-by: JCount --- Formula/tesseract.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Formula/tesseract.rb b/Formula/tesseract.rb index 774696bb3578b..042be5dcc5519 100644 --- a/Formula/tesseract.rb +++ b/Formula/tesseract.rb @@ -3,6 +3,7 @@ class Tesseract < Formula homepage "https://github.com/tesseract-ocr/" url "https://github.com/tesseract-ocr/tesseract/archive/3.05.00.tar.gz" sha256 "3fe83e06d0f73b39f6e92ed9fc7ccba3ef734877b76aa5ddaaa778fac095d996" + revision 1 bottle do sha256 "d2ec7a1ef8859c28dd0d1e2e5a4bf54224bf971e11863bef693687fb3f166180" => :sierra @@ -31,7 +32,7 @@ class Tesseract < Formula depends_on "pkg-config" => :build depends_on "leptonica" - depends_on "libtiff" => :recommended + depends_on "libtiff" if build.with? "training-tools" depends_on "libtool" => :build @@ -64,6 +65,14 @@ class Tesseract < Formula sha256 "36f772980ff17c66a767f584a0d80bf2302a1afa585c01a226c1863afcea1392" end + # remove on next release, > 3.05.00 + # upstream fix for building with OpenCL enabled + # https://github.com/tesseract-ocr/tesseract/pull/814 + patch do + url "https://github.com/tesseract-ocr/tesseract/commit/b18cad4.patch" + sha256 "10c59baa54c3406fcd03f36cd0f1e3cc2ba150f082d14f919274a541b3cff7b2" + end + def install if build.head? # ld: symbol(s) not found for _clSetKernelArg and other symbols