2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-11 19:13:26 +00:00
|
|
|
|
|
|
|
class Mtr <Formula
|
2010-11-30 00:56:18 +00:00
|
|
|
url 'ftp://ftp.bitwizard.nl/mtr/mtr-0.80.tar.gz'
|
2010-04-07 05:58:35 +00:00
|
|
|
homepage 'http://www.bitwizard.nl/mtr/'
|
2010-11-30 00:56:18 +00:00
|
|
|
md5 'fa68528eaec1757f52bacf9fea8c68a9'
|
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
|