2011-12-19 07:53:51 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Py2cairo < Formula
|
|
|
|
homepage 'http://cairographics.org/pycairo/'
|
2012-03-12 16:48:49 +00:00
|
|
|
url 'http://cairographics.org/releases/py2cairo-1.10.0.tar.bz2'
|
2011-12-19 07:53:51 +00:00
|
|
|
md5 '20337132c4ab06c1146ad384d55372c5'
|
|
|
|
|
|
|
|
depends_on 'cairo'
|
|
|
|
|
2012-03-12 16:48:49 +00:00
|
|
|
def options
|
|
|
|
[['--universal', 'Build universal binaries']]
|
|
|
|
end
|
|
|
|
|
2011-12-19 07:53:51 +00:00
|
|
|
def install
|
|
|
|
# Python extensions default to universal but cairo may not be universal
|
2012-03-12 16:48:49 +00:00
|
|
|
unless ARGV.build_universal?
|
|
|
|
ENV['ARCHFLAGS'] = if MacOS.prefer_64_bit?
|
|
|
|
"-arch x86_64"
|
|
|
|
else
|
|
|
|
"-arch i386"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2011-12-19 07:53:51 +00:00
|
|
|
system "./waf", "configure", "--prefix=#{prefix}", "--nopyc", "--nopyo"
|
|
|
|
system "./waf", "install"
|
|
|
|
end
|
|
|
|
end
|