2010-04-26 16:29:38 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2012-09-21 03:09:29 +00:00
|
|
|
# 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-02 05:57:52 +00:00
|
|
|
url 'http://cairographics.org/releases/cairo-1.12.12.tar.xz'
|
|
|
|
mirror 'http://ftp-nyc.osuosl.org/pub/gentoo/distfiles/cairo-1.12.12.tar.xz'
|
|
|
|
mirror 'ftp://anduin.linuxfromscratch.org/BLFS/conglomeration/cairo/cairo-1.12.12.tar.xz'
|
|
|
|
sha256 '14f693759ecc87472355ae8f0c34731a8578b408b607cfd0b5d34331ff05d81a'
|
2010-04-26 16:29:38 +00:00
|
|
|
|
2012-08-23 16:49:08 +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'
|
|
|
|
|
2012-10-20 04:48:41 +00:00
|
|
|
env :std if build.universal?
|
|
|
|
|
2012-08-10 04:47:23 +00:00
|
|
|
depends_on :libpng
|
2012-08-09 06:05:21 +00:00
|
|
|
depends_on 'pixman'
|
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
|
2012-08-25 04:29:59 +00:00
|
|
|
depends_on 'glib' unless build.include? 'without-x'
|
2012-08-10 04:47:23 +00:00
|
|
|
depends_on :x11 unless build.include? 'without-x'
|
2011-05-10 21:24:49 +00:00
|
|
|
|
2010-04-26 16:29:38 +00:00
|
|
|
def install
|
2012-08-10 04:47:23 +00:00
|
|
|
ENV.universal_binary if build.universal?
|
2012-03-31 11:31:23 +00:00
|
|
|
|
2012-02-16 20:41:29 +00:00
|
|
|
args = %W[
|
|
|
|
--disable-dependency-tracking
|
2012-08-10 04:47:23 +00:00
|
|
|
--prefix=#{prefix}
|
|
|
|
]
|
2012-03-31 11:31:23 +00:00
|
|
|
|
2012-10-27 11:00:50 +00:00
|
|
|
if build.include? 'without-x'
|
|
|
|
args << '--enable-xlib=no' << '--enable-xlib-xrender=no'
|
|
|
|
else
|
|
|
|
args << '--with-x'
|
|
|
|
end
|
|
|
|
|
2012-09-05 04:04:01 +00:00
|
|
|
args << '--enable-xcb=no' if MacOS.version == :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
|