2011-04-12 17:42:25 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Libagg < Formula
|
|
|
|
homepage 'http://www.antigrain.com'
|
|
|
|
url 'http://www.antigrain.com/agg-2.5.tar.gz'
|
2012-09-03 18:33:56 +00:00
|
|
|
sha1 '08f23da64da40b90184a0414369f450115cdb328'
|
2011-04-12 17:42:25 +00:00
|
|
|
|
2012-07-07 18:08:22 +00:00
|
|
|
depends_on :automake
|
2012-12-22 23:28:23 +00:00
|
|
|
depends_on :libtool
|
2011-04-12 17:42:25 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
|
|
|
depends_on 'sdl'
|
2013-02-03 01:21:27 +00:00
|
|
|
depends_on :freetype => :optional
|
2011-04-12 17:42:25 +00:00
|
|
|
|
2012-05-23 21:26:25 +00:00
|
|
|
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
|
|
|
|
|
2011-04-12 17:42:25 +00:00
|
|
|
def install
|
2012-05-23 21:26:25 +00:00
|
|
|
# AM_C_PROTOTYPES was removed in automake 1.12, as it's only needed for
|
|
|
|
# pre-ANSI compilers
|
|
|
|
inreplace 'configure.in', 'AM_C_PROTOTYPES', ''
|
|
|
|
|
2011-04-12 17:42:25 +00:00
|
|
|
# No configure script. We need to run autoreconf, and aclocal and automake
|
|
|
|
# need some direction.
|
2012-02-27 03:44:55 +00:00
|
|
|
ENV['ACLOCAL'] = "aclocal -I#{HOMEBREW_PREFIX}/share/aclocal" # To find SDL m4 files
|
2011-04-12 17:42:25 +00:00
|
|
|
# This part snatched from MacPorts
|
2012-02-27 03:44:55 +00:00
|
|
|
ENV['AUTOMAKE'] = "automake --foreign --add-missing --ignore-deps"
|
|
|
|
system "autoreconf -fi"
|
2011-04-12 17:42:25 +00:00
|
|
|
|
|
|
|
system "./configure",
|
|
|
|
"--disable-debug",
|
|
|
|
"--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
|