homebrew-core/Formula/cairo.rb

54 lines
1.3 KiB
Ruby
Raw Normal View History

2010-04-26 16:29:38 +00:00
require 'formula'
# Use a mirror because of:
# http://lists.cairographics.org/archives/cairo/2012-September/023454.html
2011-03-10 05:11:03 +00:00
class Cairo < Formula
2010-04-26 16:29:38 +00:00
homepage 'http://cairographics.org/'
2013-02-11 23:10:28 +00:00
url 'http://cairographics.org/releases/cairo-1.12.14.tar.xz'
mirror 'https://downloads.sourceforge.net/project/machomebrew/mirror/cairo-1.12.14.tar.xz'
sha256 '96d0d1e3f9b74d2ca3469ff187c5e5f25649b1ad35cf06f4f3a83847dff4ac13'
2010-04-26 16:29:38 +00:00
keg_only :provided_pre_mountain_lion
2012-08-04 09:10:55 +00:00
2012-08-10 04:47:23 +00:00
option :universal
option 'without-x', 'Build without X11 support'
depends_on 'pkg-config' => :build
depends_on 'xz'=> :build
# harfbuzz requires cairo-ft to build
depends_on 'freetype' if build.without? 'x'
depends_on :libpng
depends_on 'pixman'
depends_on 'glib' => :optional
2013-04-30 16:51:32 +00:00
depends_on :x11 if build.with? 'x'
2011-05-10 21:24:49 +00:00
env :std if build.universal?
2010-04-26 16:29:38 +00:00
def install
2012-08-10 04:47:23 +00:00
ENV.universal_binary if build.universal?
args = %W[
--disable-dependency-tracking
2012-08-10 04:47:23 +00:00
--prefix=#{prefix}
]
if build.without? 'x'
args << '--enable-xlib=no' << '--enable-xlib-xrender=no'
else
args << '--with-x'
end
if build.with? 'glib'
args << '--enable-gobject=yes'
else
args << '--enable-gobject=no'
end
2013-07-10 02:30:15 +00:00
args << '--enable-xcb=no' if MacOS.version <= :leopard
system "./configure", *args
2010-04-26 16:29:38 +00:00
system "make install"
end
end