Skip to content

Commit

Permalink
tesseract: add 5.3.0 bottle.
Browse files Browse the repository at this point in the history
  • Loading branch information
gromgit committed Jan 26, 2023
1 parent 9f26811 commit 4a7bd27
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions Formula/tesseract.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class Tesseract < Formula
desc "OCR (Optical Character Recognition) engine"
homepage "https://github.com/tesseract-ocr/"
url "https://github.com/tesseract-ocr/tesseract/archive/5.2.0.tar.gz"
sha256 "eba4deb2f92a3f89a6623812074af8c53b772079525b3c263aa70bbf7b748b3c"
url "https://github.com/tesseract-ocr/tesseract/archive/5.3.0.tar.gz"
sha256 "7e70870f8341e5ea228af2836ce79a36eefa11b01b56177b4a8997f330c014b8"
license "Apache-2.0"
head "https://github.com/tesseract-ocr/tesseract.git", branch: "main"

Expand All @@ -13,16 +13,18 @@ class Tesseract < Formula

bottle do
root_url "https://github.com/gromgit/homebrew-core-mojave/releases/download/tesseract"
rebuild 2
sha256 cellar: :any_skip_relocation, mojave: "6800a05a59ac5780e764a013deef82765fb56d849200e32f77cd94046f92427f"
sha256 cellar: :any, mojave: "54328a8fc1144e80c4e4ee1872cf8b0148f0e2896bfd2bf09a3e31857e85734b"
end

depends_on "autoconf" => :build
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 @@ -58,10 +60,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 4a7bd27

Please sign in to comment.