homebrew-core/Formula/tesseract.rb
Adam Vandenberg e1bb919734 Add "fails_with_llvm" to formula to document LLVM build breaks.
Replaced ENV.gcc_4_2 + comments with calls to "fails_with_llvm",
to specifically message to the user when a formula is known or suspected
to not build with LLVM. If the user specifies "--use-llvm", the message
will be displayed, but compilation will be tried anyway.

Since using LLVM is now an advanced/hidden feature instead of the
default on 10.6, we'll let the user try anyway (and submit patches
if things are now working.)
2010-06-16 11:50:36 -07:00

37 lines
1.1 KiB
Ruby

require 'formula'
class TesseractEnglishData <Formula
url 'http://tesseract-ocr.googlecode.com/files/tesseract-2.00.eng.tar.gz'
md5 'b8291d6b3a63ce7879d688e845e341a9'
version '2.00'
end
class Tesseract <Formula
url 'http://tesseract-ocr.googlecode.com/files/tesseract-2.04.tar.gz'
homepage 'http://code.google.com/p/tesseract-ocr/'
md5 'b44eba1a9f4892ac62e484c807fe0533'
depends_on 'libtiff'
def about
<<-EOF
Tesseract is an OCR (Optical Character Recognition) engine.
The easiest way to use it is to convert the source to a Grayscale tiff:
`convert source.png -type Grayscale terre_input.tif`
then run tesseract:
`tesseract terre_input.tif output`
EOF
end
def install
fails_with_llvm "Executable 'tesseract' segfaults on 10.6 when compiled with llvm-gcc", :build => "2206"
# 'make install' expects the language data files in the build directory
d = Dir.getwd
TesseractEnglishData.new.brew { FileUtils.cp Dir["*"], "#{d}/tessdata/" }
system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"
system "make install"
end
end