aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorAdam Vandenberg2012-08-09 21:39:20 -0700
committerAdam Vandenberg2012-08-09 21:39:20 -0700
commit55fb38b6c409e59a7101595ac05eab001ab2693f (patch)
treeab2b0f2690778fb52efb29c55db56d2814f07d09 /Library/Formula
parent8ab3b16876f33f31560d7f303c9082fb4c35690b (diff)
downloadhomebrew-55fb38b6c409e59a7101595ac05eab001ab2693f.tar.bz2
yasm: use options dsl
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/yasm.rb19
1 files changed, 10 insertions, 9 deletions
diff --git a/Library/Formula/yasm.rb b/Library/Formula/yasm.rb
index 6cb671240..ef3a16d36 100644
--- a/Library/Formula/yasm.rb
+++ b/Library/Formula/yasm.rb
@@ -7,21 +7,22 @@ class Yasm < Formula
head 'https://github.com/yasm/yasm.git'
- def options
- [['--enable-python', 'Enable Python bindings support.']]
- end
+ option 'enable-python', 'Enable Python bindings'
- if ARGV.build_head?
+ if build.head?
depends_on 'gettext'
depends_on :automake
end
- depends_on 'Cython' => :python if ARGV.include? '--enable-python'
+ depends_on 'Cython' => :python if build.include? '--enable-python'
def install
- args = %W[--prefix=#{prefix} --disable-debug]
+ args = %W[
+ --disable-debug
+ --prefix=#{prefix}
+ ]
- if ARGV.include? '--enable-python'
+ if build.include? '--enable-python'
args << '--enable-python'
args << '--enable-python-bindings'
end
@@ -29,13 +30,13 @@ class Yasm < Formula
# Avoid "ld: library not found for -lcrt1.10.6.o" on Xcode without CLT
ENV['LIBS'] = ENV.ldflags
ENV['INCLUDES'] = ENV.cppflags
- system './autogen.sh' if ARGV.build_head?
+ system './autogen.sh' if build.head?
system './configure', *args
system 'make install'
end
def caveats
- if ARGV.include? '--enable-python' then <<-EOS.undent
+ if build.include? '--enable-python' then <<-EOS.undent
Python bindings installed to:
#{HOMEBREW_PREFIX}/lib/#{which_python}/site-packages