aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorJack Nagel2012-03-12 11:48:49 -0500
committerJack Nagel2012-03-12 11:50:10 -0500
commitcb0979d7de6f273d8a49f2d6741a10925708f42e (patch)
tree5aa2171c4ef5ae61c559e7dff2e9c5ede6d74ded /Library/Formula
parentfedb26e968c762c5276ed45b0b4ac9a61fa15b8b (diff)
downloadhomebrew-cb0979d7de6f273d8a49f2d6741a10925708f42e.tar.bz2
py2cairo: enable 32-bit and document universal option
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/py2cairo.rb15
1 files changed, 13 insertions, 2 deletions
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