diff options
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/cairo.rb | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/Library/Formula/cairo.rb b/Library/Formula/cairo.rb index c4e04e1d0..7fdff0726 100644 --- a/Library/Formula/cairo.rb +++ b/Library/Formula/cairo.rb @@ -9,25 +9,20 @@ class Cairo < Formula "The Cairo provided by Leopard is too old for newer software to link against." \ if MacOS::X11.installed? - # Can't currently pass :recommended to the :x11 dep. - depends_on :libpng # => :recommended + option :universal + option 'without-x', 'Build without X11 support' + + depends_on :libpng depends_on 'pixman' depends_on 'pkg-config' => :build depends_on 'xz'=> :build - depends_on :x11 unless ARGV.include? '--without-x' - - def options - [ - ['--universal', 'Build a universal library'], - ['--without-x', 'Build without X11 support'], - ] - end + depends_on :x11 unless build.include? 'without-x' # Fixes a build error with clang & universal, where a function was implicit. def patches; DATA; end def install - ENV.universal_binary if ARGV.build_universal? + ENV.universal_binary if build.universal? pixman = Formula.factory('pixman') ENV['pixman_CFLAGS'] = "-I#{pixman.include}/pixman-1" @@ -35,9 +30,10 @@ class Cairo < Formula args = %W[ --disable-dependency-tracking - --prefix=#{prefix}] + --prefix=#{prefix} + ] - args << '--with-x' unless ARGV.include? '--without-x' + args << '--with-x' unless build.include? 'without-x' args << '--enable-xcb=no' if MacOS.leopard? system "./configure", *args |
