require 'formula' class TesseractEnglishData "2206" # '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 "make install" end def caveats; <<-EOF.undent 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 end