From c57802ee7d0f7a72612ffce22f672f7ef208967c Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Mon, 13 Aug 2012 09:35:48 -0500 Subject: wireshark: use options DSL Signed-off-by: Jack Nagel --- Library/Formula/wireshark.rb | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'Library') diff --git a/Library/Formula/wireshark.rb b/Library/Formula/wireshark.rb index ee83575e5..871cb655c 100644 --- a/Library/Formula/wireshark.rb +++ b/Library/Formula/wireshark.rb @@ -11,17 +11,13 @@ class Wireshark < Formula depends_on 'pcre' => :optional depends_on 'glib' - if ARGV.include? '--with-x' + if build.include? 'with-x' depends_on :x11 depends_on 'gtk+' end - def options - [ - ['--with-x', 'Include X11 support'], - ['--with-python', 'Enable experimental python bindings'] - ] - end + option 'with-x', 'Include X11 support' + option 'with-python', 'Enable experimental Python bindings' def install args = ["--disable-dependency-tracking", "--prefix=#{prefix}"] @@ -29,10 +25,10 @@ class Wireshark < Formula # Optionally enable experimental python bindings; is known to cause # some runtime issues, e.g. # "dlsym(0x8fe467fc, py_create_dissector_handle): symbol not found" - args << '--without-python' unless ARGV.include? '--with-python' + args << '--without-python' unless build.include? 'with-python' # actually just disables the GTK GUI - args << '--disable-wireshark' unless ARGV.include? '--with-x' + args << '--disable-wireshark' unless build.include? 'with-x' system "./configure", *args system "make" -- cgit v1.2.3