aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorKerry Wright2011-04-01 22:24:01 -0700
committerAdam Vandenberg2011-04-02 16:46:44 -0700
commit7ad17a8fc60921f583cec137614e4bab949bd486 (patch)
treeb1380af225d5b27e6c190fe25896e46a2e1101e1 /Library
parent6e4f46b77d96d11735589460af5d763d6cff4cf3 (diff)
downloadhomebrew-7ad17a8fc60921f583cec137614e4bab949bd486.tar.bz2
Updated tesseract to version 3.00
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/tesseract.rb27
1 files changed, 17 insertions, 10 deletions
diff --git a/Library/Formula/tesseract.rb b/Library/Formula/tesseract.rb
index 174ec3394..99a1c9c63 100644
--- a/Library/Formula/tesseract.rb
+++ b/Library/Formula/tesseract.rb
@@ -1,27 +1,34 @@
require 'formula'
+require 'download_strategy'
+
+# Normal strategy tries to untar as well
+class GzipOnlyDownloadStrategy < CurlDownloadStrategy
+ def stage
+ FileUtils.mv @tarball_path, File.basename(@url)
+ safe_system '/usr/bin/gunzip', '-f', File.basename(@url)
+ end
+end
class TesseractEnglishData < Formula
- url 'http://tesseract-ocr.googlecode.com/files/tesseract-2.00.eng.tar.gz'
- md5 'b8291d6b3a63ce7879d688e845e341a9'
- version '2.00'
+ url 'http://tesseract-ocr.googlecode.com/files/eng.traineddata.gz',
+ :using => GzipOnlyDownloadStrategy
+ md5 'd91041ad156cf2db36664e91ef799451'
+ version '3.00'
end
class Tesseract < Formula
- url 'http://tesseract-ocr.googlecode.com/files/tesseract-2.04.tar.gz'
+ url 'http://tesseract-ocr.googlecode.com/files/tesseract-3.00.tar.gz'
homepage 'http://code.google.com/p/tesseract-ocr/'
- md5 'b44eba1a9f4892ac62e484c807fe0533'
+ md5 'cc812a261088ea0c3d2da735be35d09f'
depends_on 'libtiff'
fails_with_llvm "Executable 'tesseract' segfaults on 10.6 when compiled with llvm-gcc", :build => "2206"
def install
- # 'make install' expects the language data files in the build directory
- d = Dir.getwd
- TesseractEnglishData.new.brew { cp Dir["*"], "#{d}/tessdata/" }
-
- system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"
+ system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
system "make install"
+ TesseractEnglishData.new.brew { mv "eng.traineddata", "#{share}/tessdata/" }
end
def caveats; <<-EOF.undent