From cb0979d7de6f273d8a49f2d6741a10925708f42e Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Mon, 12 Mar 2012 11:48:49 -0500 Subject: py2cairo: enable 32-bit and document universal option Signed-off-by: Jack Nagel --- Library/Formula/py2cairo.rb | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'Library') diff --git a/Library/Formula/py2cairo.rb b/Library/Formula/py2cairo.rb index b1b60eea9..1d6d445a5 100644 --- a/Library/Formula/py2cairo.rb +++ b/Library/Formula/py2cairo.rb @@ -1,15 +1,26 @@ require 'formula' class Py2cairo < Formula - url 'http://cairographics.org/releases/py2cairo-1.10.0.tar.bz2' homepage 'http://cairographics.org/pycairo/' + url 'http://cairographics.org/releases/py2cairo-1.10.0.tar.bz2' md5 '20337132c4ab06c1146ad384d55372c5' depends_on 'cairo' + def options + [['--universal', 'Build universal binaries']] + end + def install # Python extensions default to universal but cairo may not be universal - ENV['ARCHFLAGS'] = "-arch x86_64" unless ARGV.build_universal? + unless ARGV.build_universal? + ENV['ARCHFLAGS'] = if MacOS.prefer_64_bit? + "-arch x86_64" + else + "-arch i386" + end + end + system "./waf", "configure", "--prefix=#{prefix}", "--nopyc", "--nopyo" system "./waf", "install" end -- cgit v1.2.3