aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/libagg.rb
blob: c3da841b5d2c2823752b34f264fc5a98914de692 (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
require 'formula'

class Libagg < Formula
  homepage 'http://www.antigrain.com'
  url 'http://www.antigrain.com/agg-2.5.tar.gz'
  sha1 '08f23da64da40b90184a0414369f450115cdb328'

  depends_on :autoconf
  depends_on :automake
  depends_on :libtool
  depends_on 'pkg-config' => :build
  depends_on 'sdl'
  depends_on :freetype => :optional

  fails_with :clang do
    cause <<-EOS.undent
      AGG tries to return a const reference as a non-const reference, which is
      rejected by clang 3.1 but accepted by gcc
    EOS
  end

  def install
    # AM_C_PROTOTYPES was removed in automake 1.12, as it's only needed for
    # pre-ANSI compilers
    inreplace 'configure.in', 'AM_C_PROTOTYPES', ''
    inreplace 'autogen.sh', 'libtoolize', 'glibtoolize'

    system "sh", "autogen.sh",
                 "--disable-dependency-tracking",
                 "--prefix=#{prefix}",
                 "--disable-platform", # Causes undefined symbols
                 "--disable-ctrl",     # No need to run these during configuration
                 "--disable-examples",
                 "--disable-sdltest"
    system "make install"
  end
end