wireshark: use options DSL
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
parent
e44ddb934b
commit
8d4681b83b
1 changed files with 5 additions and 9 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue