2010-04-26 16:29:38 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Cairo < Formula
|
2010-04-26 16:29:38 +00:00
|
|
|
homepage 'http://cairographics.org/'
|
2012-03-31 11:31:23 +00:00
|
|
|
url 'http://cairographics.org/releases/cairo-1.12.2.tar.xz'
|
|
|
|
sha256 'b786bc4a70542bcb09f2d9d13e5e6a0c86408cbf6d1edde5f0de807eecf93f96'
|
2010-04-26 16:29:38 +00:00
|
|
|
|
2010-09-19 17:21:57 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
2012-03-31 11:31:23 +00:00
|
|
|
depends_on 'xz'=> :build
|
2010-04-26 16:29:38 +00:00
|
|
|
depends_on 'pixman'
|
2012-03-31 11:31:23 +00:00
|
|
|
depends_on :x11
|
2010-04-26 16:29:38 +00:00
|
|
|
|
2011-03-16 05:01:31 +00:00
|
|
|
keg_only :provided_by_osx,
|
|
|
|
"The Cairo provided by Leopard is too old for newer software to link against."
|
2010-04-26 16:29:38 +00:00
|
|
|
|
2012-06-20 06:09:40 +00:00
|
|
|
def options
|
|
|
|
[['--universal', 'Build a universal library']]
|
2012-03-18 20:33:24 +00:00
|
|
|
end
|
2011-05-10 21:24:49 +00:00
|
|
|
|
2012-06-20 06:09:40 +00:00
|
|
|
# Fixes a build error with clang & universal, where a function was implicit.
|
|
|
|
def patches; DATA; end
|
|
|
|
|
2010-04-26 16:29:38 +00:00
|
|
|
def install
|
2012-03-31 11:31:23 +00:00
|
|
|
ENV.universal_binary if ARGV.build_universal?
|
|
|
|
|
2012-02-16 20:41:29 +00:00
|
|
|
args = %W[
|
|
|
|
--disable-dependency-tracking
|
|
|
|
--prefix=#{prefix}
|
2012-03-31 11:31:23 +00:00
|
|
|
--with-x]
|
|
|
|
|
|
|
|
args << '--enable-xcb=no' if MacOS.leopard?
|
2012-02-16 20:41:29 +00:00
|
|
|
|
|
|
|
system "./configure", *args
|
2010-04-26 16:29:38 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|
2012-06-20 06:09:40 +00:00
|
|
|
|
|
|
|
__END__
|
2012-03-31 11:31:23 +00:00
|
|
|
diff --git a/configure b/configure
|
|
|
|
index b75757d..1230da2 100755
|
|
|
|
--- a/configure
|
|
|
|
+++ b/configure
|
|
|
|
@@ -17939,7 +17939,7 @@ CAIRO_NONPKGCONFIG_LIBS="$LIBS"
|
2012-06-20 06:09:40 +00:00
|
|
|
|
|
|
|
MAYBE_WARN="-Wall -Wextra \
|
|
|
|
-Wold-style-definition -Wdeclaration-after-statement \
|
|
|
|
--Wmissing-declarations -Werror-implicit-function-declaration \
|
|
|
|
+-Wmissing-declarations -Wimplicit-function-declaration \
|
|
|
|
-Wnested-externs -Wpointer-arith -Wwrite-strings \
|
|
|
|
-Wsign-compare -Wstrict-prototypes -Wmissing-prototypes \
|
|
|
|
-Wpacked -Wswitch-enum -Wmissing-format-attribute \
|