From 4ceed278129a4a98345abeb809a101132299b5fd Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sat, 4 Aug 2012 10:10:55 +0100 Subject: cairo: optionally don't depend on X11 --- Library/Formula/cairo.rb | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'Library') diff --git a/Library/Formula/cairo.rb b/Library/Formula/cairo.rb index ac1e8dbfe..5b68e1e00 100644 --- a/Library/Formula/cairo.rb +++ b/Library/Formula/cairo.rb @@ -5,16 +5,21 @@ class Cairo < Formula url 'http://cairographics.org/releases/cairo-1.12.2.tar.xz' sha256 'b786bc4a70542bcb09f2d9d13e5e6a0c86408cbf6d1edde5f0de807eecf93f96' + keg_only :provided_by_osx, + "The Cairo provided by Leopard is too old for newer software to link against." \ + if MacOS.x11_installed? + + depends_on :libpng => :recommended + depends_on :pixman depends_on 'pkg-config' => :build depends_on 'xz'=> :build - depends_on 'pixman' - depends_on :x11 - - keg_only :provided_by_osx, - "The Cairo provided by Leopard is too old for newer software to link against." + depends_on :x11 unless ARGV.include? '--without-x' def options - [['--universal', 'Build a universal library']] + [ + ['--universal', 'Build a universal library'], + ['--without-x', 'Build without X11 support'], + ] end # Fixes a build error with clang & universal, where a function was implicit. @@ -29,9 +34,9 @@ class Cairo < Formula args = %W[ --disable-dependency-tracking - --prefix=#{prefix} - --with-x] + --prefix=#{prefix}] + args << '--with-x' unless ARGV.include? '--without-x' args << '--enable-xcb=no' if MacOS.leopard? system "./configure", *args -- cgit v1.2.3