Permalink
Browse files

wxmac: use new dsl

  • Loading branch information...
1 parent 37bfe95 commit 3ff7c481bb690495df5d11843870a48f93a3b7ce @adamv adamv committed Aug 23, 2012
Showing with 6 additions and 7 deletions.
  1. +6 −7 Library/Formula/wxmac.rb
View
13 Library/Formula/wxmac.rb
@@ -17,11 +17,9 @@ class Wxmac < Formula
url 'http://sourceforge.net/projects/wxpython/files/wxPython/2.9.4.0/wxPython-src-2.9.4.0.tar.bz2'
sha1 'c292cd45b51e29c558c4d9cacf93c4616ed738b9'
- def options
- [['--no-python', 'Do not build Python bindings']]
- end
+ option 'no-python', 'Do not build Python bindings'
- depends_on FrameworkPython.new unless ARGV.include? "--no-python"
+ depends_on FrameworkPython.new unless build.include? "no-python"
def install_wx_python
args = [
@@ -52,6 +50,7 @@ def install_wx_python
end
def install
+ # need to set with-macosx-version-min to avoid configure defaulting to 10.5
args = [
"--disable-debug",
"--prefix=#{prefix}",
@@ -69,13 +68,13 @@ def install
"--enable-webkit",
"--enable-svg",
"--with-expat",
- "--with-macosx-version-min=#{MacOS.version}" # need to set this, to avoid configure defaulting to 10.5
+ "--with-macosx-version-min=#{MacOS.version}"
]
system "./configure", *args
system "make install"
- unless ARGV.include? "--no-python"
+ unless build.include? "no-python"
ENV['WXWIN'] = Dir.getwd
# We have already downloaded wxPython in a bundle with wxWidgets
install_wx_python
@@ -85,7 +84,7 @@ def install
def caveats
s = ''
fp = FrameworkPython.new
- unless ARGV.include? '--no-python' or fp.satisfied?
+ unless build.include? 'no-python' or fp.satisfied?
s += fp.message
end

0 comments on commit 3ff7c48

Please sign in to comment.