2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-11 19:13:26 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Mtr < Formula
|
2012-03-19 13:41:44 +00:00
|
|
|
url 'ftp://ftp.bitwizard.nl/mtr/mtr-0.82.tar.gz'
|
2010-04-07 05:58:35 +00:00
|
|
|
homepage 'http://www.bitwizard.nl/mtr/'
|
2012-03-19 13:41:44 +00:00
|
|
|
sha1 'f1319de27324d85898a9df0a293a438bbaaa12b5'
|
2009-09-11 19:13:26 +00:00
|
|
|
|
2010-12-30 06:16:42 +00:00
|
|
|
depends_on 'gtk+' unless ARGV.include? "--no-gtk"
|
|
|
|
|
|
|
|
def options
|
|
|
|
[
|
|
|
|
['--no-gtk', "Don't build with Gtk+ support"]
|
|
|
|
]
|
|
|
|
end
|
|
|
|
|
2009-09-11 19:13:26 +00:00
|
|
|
def install
|
|
|
|
# We need to add this because nameserver8_compat.h has been removed in Snow Leopard
|
2010-04-07 05:58:35 +00:00
|
|
|
ENV['LIBS'] = "-lresolv"
|
2010-12-30 06:16:42 +00:00
|
|
|
args = ["--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"]
|
|
|
|
args << "--without-gtk" if ARGV.include? "--no-gtk"
|
|
|
|
system "./configure", *args
|
2009-09-11 19:13:26 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
2009-12-02 10:53:00 +00:00
|
|
|
|
|
|
|
def caveats
|
|
|
|
"Run mtr sudo'd in order to avoid the error: `unable to get raw sockets'"
|
|
|
|
end
|
2009-09-11 19:13:26 +00:00
|
|
|
end
|