forked from NickBeeuwsaert/homebrew-native
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcairo-native.rb
52 lines (44 loc) · 1.54 KB
/
cairo-native.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
require 'formula'
# Documentation: https://github.com/mxcl/homebrew/wiki/Formula-Cookbook
# /usr/local/Library/Contributions/example-formula.rb
# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST!
class CairoNative < Formula
homepage 'http://www.cairographics.org/'
url 'http://cairographics.org/releases/cairo-1.12.16.tar.xz'
sha1 '4f6e337d5d3edd7ea79d1426f575331552b003ec'
depends_on 'pkg-config' => :build
depends_on 'xz'=> :build
depends_on :freetype
depends_on :fontconfig
depends_on :libpng
depends_on 'pixman'
depends_on 'glib'
conflicts_with "cairo", :because=>"installs the same binaries"
def install
# ENV.j1 # if your formula's build system can't parallelize
args = %W[
--disable-dependency-tracking
--prefix=#{prefix}
--enable-gobject=yes
--enable-quartz=yes
--enable-quartz-image
--enable-xlib=no
--enable-xlib-xrender=no
--without-x
--enable-xcb-shm=no
--enable-ft=yes
--enable-fc=yes
]
args << '--enable-xcb=no' if MacOS.version <= :leopard
system "./configure", *args
system "make", "install" # if this fails, try separate make/make install steps
end
test do
# `test do` will create, run in and delete a temporary directory.
#
# This test will fail and we won't accept that! It's enough to just replace
# "false" with the main program this formula installs, but it'd be nice if you
# were more thorough. Run the test with `brew test cairo-native`.
system "false"
end
end