blob: 8269a4aa92478b1df0aff1119cc6937573429fbc (
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
 | require 'formula'
class Libcaca < Formula
  homepage 'http://caca.zoy.org/wiki/libcaca'
  url 'http://fossies.org/linux/privat/libcaca-0.99.beta19.tar.gz'
  version '0.99b19'
  sha1 'ed138f3717648692113145b99a80511178548010'
  bottle do
    cellar :any
    revision 1
    sha1 "d377e78210582b24626f9f2d7bbb1d1442c1131d" => :yosemite
    sha1 "5dd773ce055c6cb9a754c3d691c30c05bf7dbc18" => :mavericks
  end
  depends_on 'pkg-config' => :build
  depends_on 'imlib2' => :optional
  depends_on :x11 if build.with? "imlib2"
  fails_with :llvm do
    cause "Unsupported inline asm: input constraint with a matching output constraint of incompatible type"
  end
  def install
    # Some people can't compile when Java is enabled. See:
    # https://github.com/Homebrew/homebrew/issues/issue/2049
    # Don't build csharp bindings
    # Don't build ruby bindings; fails for adamv w/ Homebrew Ruby 1.9.2
    # Fix --destdir issue.
    #   ../.auto/py-compile: Missing argument to --destdir.
    inreplace 'python/Makefile.in', '$(am__py_compile) --destdir "$(DESTDIR)"', "$(am__py_compile) --destdir \"$(cacadir)\""
    args = ["--disable-dependency-tracking",
            "--prefix=#{prefix}",
            "--disable-doc",
            "--disable-slang",
            "--disable-java",
            "--disable-csharp",
            "--disable-ruby"]
    # fix missing x11 header check: https://github.com/Homebrew/homebrew/issues/28291
    args << "--disable-x11" if build.without? "imlib2"
    system "./configure", *args
    system "make"
    ENV.j1 # Or install can fail making the same folder at the same time
    system "make install"
  end
  test do
    system "#{bin}/img2txt", "--version"
  end
end
 |