aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2012-08-04 10:10:55 +0100
committerMike McQuaid2012-08-08 18:19:22 +0100
commit4ceed278129a4a98345abeb809a101132299b5fd (patch)
tree6d7a55bb2a70eb4940f3b91763fd987ee9a5afd1 /Library
parentccf25778a5f7025a99bcdfa5ddb31b687c7e67ae (diff)
downloadhomebrew-4ceed278129a4a98345abeb809a101132299b5fd.tar.bz2
cairo: optionally don't depend on X11
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/cairo.rb21
1 files changed, 13 insertions, 8 deletions
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