forked from sjackman/linuxbrew-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgocr.rb
42 lines (35 loc) · 1.42 KB
/
gocr.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
class Gocr < Formula
desc "Optical Character Recognition (OCR), converts images back to text"
homepage "https://wasd.urz.uni-magdeburg.de/jschulen/ocr/"
url "https://wasd.urz.uni-magdeburg.de/jschulen/ocr/gocr-0.52.tar.gz"
sha256 "df906463105f5f4273becc2404570f187d4ea52bd5769d33a7a8661a747b8686"
revision 1
bottle do
cellar :any
sha256 "d0408f223b941c6d81c0edd843ab5916475a4ea4b94892b548da6403e4c3af2a" => :catalina
sha256 "d173d60e8d8f139b4e7e310b84d1bfc56e406eb026c51beba9d4b2facaac3ae1" => :mojave
sha256 "2a5cfa5a815706b2ecb11658ad9132bba21de5304e4541118d8d061a5bb7779a" => :high_sierra
sha256 "a272a1edb6c30560b8b4ed0ce44968f1d01c3f66615bce816c9f4ae598f25803" => :x86_64_linux
end
depends_on "jpeg"
depends_on "netpbm"
# Edit makefile to install libs per developer documentation
patch do
url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/gocr/0.50.patch"
sha256 "0ed4338c3233a8d1d165f687d6cbe6eee3d393628cdf711a4f8f06b5edc7c4dc"
end
def install
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--prefix=#{prefix}"
# --mandir doesn't work correctly; fix broken Makefile
inreplace "man/Makefile" do |s|
s.change_make_var! "mandir", "/share/man"
end
system "make", "libs"
system "make", "install"
end
test do
system "#{bin}/gocr", "--help"
end
end