blob: 2f6f1e7d81d8433915f7907db3529f4e6585f51e (
plain)
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
  | 
require 'formula'
class Leptonica < Formula
  homepage 'http://www.leptonica.org/'
  url 'http://www.leptonica.org/source/leptonica-1.69.tar.gz'
  sha1 '91199f99d2e78b15b76ffa6fc4e86ee458a330e8'
  revision 1
  depends_on 'libpng' => :recommended
  depends_on 'jpeg' => :recommended
  depends_on 'libtiff' => :optional
  conflicts_with 'osxutils',
    :because => "both leptonica and osxutils ship a `fileinfo` executable."
  def install
    args = %W[
      --disable-dependency-tracking
      --prefix=#{prefix}
    ]
    %w[libpng jpeg libtiff].each do |dep|
      args << "--without-#{dep}" if build.without?(dep)
    end
    system "./configure", *args
    system "make install"
  end
  test do
    system "#{bin}/yuvtest"
  end
end
  |