Skip to content

Commit

Permalink
tesseract: install tools for training
Browse files Browse the repository at this point in the history
  • Loading branch information
equal-l2 authored and p-linnane committed Dec 30, 2022
1 parent 723d9a3 commit c61b48d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Formula/tesseract.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ class Tesseract < Formula
depends_on "automake" => :build
depends_on "libtool" => :build
depends_on "pkg-config" => :build
depends_on "cairo"
depends_on "icu4c"
depends_on "leptonica"
depends_on "libarchive"
depends_on "pango"

fails_with gcc: "5"

Expand Down Expand Up @@ -64,10 +67,10 @@ def install
"--disable-dependency-tracking",
"--datarootdir=#{HOMEBREW_PREFIX}/share"

system "make"
system "make", "training"

# make install in the local share folder to avoid permission errors
system "make", "install", "datarootdir=#{share}"
system "make", "install", "training-install", "datarootdir=#{share}"

resource("snum").stage { mv "snum.traineddata", share/"tessdata" }
resource("eng").stage { mv "eng.traineddata", share/"tessdata" }
Expand Down

0 comments on commit c61b48d

Please sign in to comment.