2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-06-06 22:54:52 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Wireshark < Formula
|
2012-02-18 18:00:39 +00:00
|
|
|
homepage 'http://www.wireshark.org'
|
2013-03-09 01:48:41 +00:00
|
|
|
url 'http://www.wireshark.org/download/src/wireshark-1.8.6.tar.bz2'
|
|
|
|
sha1 '0f51ed901b5e07cceb1373f3368f739be8f1e827'
|
2012-01-31 02:08:07 +00:00
|
|
|
|
2013-04-14 02:03:41 +00:00
|
|
|
option 'with-x', 'Include X11 support'
|
|
|
|
option 'with-python', 'Enable experimental Python bindings'
|
|
|
|
|
2012-02-18 18:00:39 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
2013-01-21 04:01:53 +00:00
|
|
|
depends_on 'gnutls2' => :optional
|
2012-11-15 18:27:17 +00:00
|
|
|
depends_on 'libgcrypt' => :optional
|
2012-02-18 18:00:39 +00:00
|
|
|
depends_on 'c-ares' => :optional
|
2010-04-27 15:32:57 +00:00
|
|
|
depends_on 'pcre' => :optional
|
2010-01-13 13:50:24 +00:00
|
|
|
depends_on 'glib'
|
2012-07-03 13:35:29 +00:00
|
|
|
|
2013-04-14 02:03:41 +00:00
|
|
|
if build.with? 'x'
|
2012-07-03 13:35:29 +00:00
|
|
|
depends_on :x11
|
|
|
|
depends_on 'gtk+'
|
|
|
|
end
|
2010-11-03 06:16:44 +00:00
|
|
|
|
2009-06-06 22:54:52 +00:00
|
|
|
def install
|
2010-11-03 06:16:44 +00:00
|
|
|
args = ["--disable-dependency-tracking", "--prefix=#{prefix}"]
|
|
|
|
|
2012-02-18 18:00:39 +00:00
|
|
|
# Optionally enable experimental python bindings; is known to cause
|
|
|
|
# some runtime issues, e.g.
|
|
|
|
# "dlsym(0x8fe467fc, py_create_dissector_handle): symbol not found"
|
2013-04-14 02:03:41 +00:00
|
|
|
args << '--without-python' unless build.with? 'python'
|
2011-12-02 23:16:03 +00:00
|
|
|
|
2010-11-03 06:16:44 +00:00
|
|
|
# actually just disables the GTK GUI
|
2013-04-14 02:03:41 +00:00
|
|
|
args << '--disable-wireshark' unless build.with? 'x'
|
2010-11-03 06:16:44 +00:00
|
|
|
|
|
|
|
system "./configure", *args
|
2010-04-27 15:32:57 +00:00
|
|
|
system "make"
|
2012-02-18 18:00:39 +00:00
|
|
|
ENV.deparallelize # parallel install fails
|
2009-06-06 22:54:52 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
2011-03-03 02:23:35 +00:00
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
2012-06-04 04:00:47 +00:00
|
|
|
If your list of available capture interfaces is empty
|
|
|
|
(default OS X behavior), try the following commands:
|
2011-03-03 02:23:35 +00:00
|
|
|
|
2012-06-04 04:00:47 +00:00
|
|
|
curl https://bugs.wireshark.org/bugzilla/attachment.cgi?id=3373 -o ChmodBPF.tar.gz
|
|
|
|
tar zxvf ChmodBPF.tar.gz
|
|
|
|
open ChmodBPF/Install\\ ChmodBPF.app
|
2011-03-03 02:23:35 +00:00
|
|
|
|
2012-06-04 04:00:47 +00:00
|
|
|
This adds a launch daemon that changes the permissions of your BPF
|
|
|
|
devices so that all users in the 'admin' group - all users with
|
|
|
|
'Allow user to administer this computer' turned on - have both read
|
|
|
|
and write access to those devices.
|
2011-03-03 02:23:35 +00:00
|
|
|
|
2012-06-04 04:00:47 +00:00
|
|
|
See bug report:
|
|
|
|
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3760
|
2011-03-03 02:23:35 +00:00
|
|
|
EOS
|
|
|
|
end
|
2009-06-06 22:54:52 +00:00
|
|
|
end
|