wireshark: modernize style
This commit is contained in:
parent
c21d456bac
commit
84e595869b
1 changed files with 6 additions and 7 deletions
|
@ -5,6 +5,9 @@ class Wireshark < Formula
|
|||
url 'http://www.wireshark.org/download/src/wireshark-1.8.6.tar.bz2'
|
||||
sha1 '0f51ed901b5e07cceb1373f3368f739be8f1e827'
|
||||
|
||||
option 'with-x', 'Include X11 support'
|
||||
option 'with-python', 'Enable experimental Python bindings'
|
||||
|
||||
depends_on 'pkg-config' => :build
|
||||
depends_on 'gnutls2' => :optional
|
||||
depends_on 'libgcrypt' => :optional
|
||||
|
@ -12,24 +15,21 @@ class Wireshark < Formula
|
|||
depends_on 'pcre' => :optional
|
||||
depends_on 'glib'
|
||||
|
||||
if build.include? 'with-x'
|
||||
if build.with? 'x'
|
||||
depends_on :x11
|
||||
depends_on 'gtk+'
|
||||
end
|
||||
|
||||
option 'with-x', 'Include X11 support'
|
||||
option 'with-python', 'Enable experimental Python bindings'
|
||||
|
||||
def install
|
||||
args = ["--disable-dependency-tracking", "--prefix=#{prefix}"]
|
||||
|
||||
# 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 build.include? 'with-python'
|
||||
args << '--without-python' unless build.with? 'python'
|
||||
|
||||
# actually just disables the GTK GUI
|
||||
args << '--disable-wireshark' unless build.include? 'with-x'
|
||||
args << '--disable-wireshark' unless build.with? 'x'
|
||||
|
||||
system "./configure", *args
|
||||
system "make"
|
||||
|
@ -55,4 +55,3 @@ class Wireshark < Formula
|
|||
EOS
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue