wxpython: add --universal option

Closes Homebrew/homebrew#34470.
Closes Homebrew/homebrew#39555.
This commit is contained in:
Tim D. Smith 2015-05-09 10:09:39 -07:00
parent 9525a32b3f
commit 19fe486a18

View file

@ -1,5 +1,3 @@
require "formula"
class FrameworkPython < Requirement
fatal true
@ -30,9 +28,17 @@ class Wxpython < Formula
end
depends_on "wxmac"
option :universal
def install
ENV["WXWIN"] = buildpath
if build.universal?
ENV.universal_binary
else
ENV.append_to_cflags "-arch #{MacOS.preferred_arch}"
end
args = [
"WXPORT=osx_cocoa",
# Reference our wx-config
@ -45,20 +51,11 @@ class Wxpython < Formula
# OpenGL and stuff
"BUILD_GLCANVAS=1",
"BUILD_GIZMOS=1",
"BUILD_STC=1"
"BUILD_STC=1",
]
cd "wxPython" do
ENV.append_to_cflags "-arch #{MacOS.preferred_arch}"
system "python", "setup.py",
"build_ext",
*args
system "python", "setup.py",
"install",
"--prefix=#{prefix}",
*args
system "python", "setup.py", "install", "--prefix=#{prefix}", *args
end
end
end