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
|
2010-04-07 05:58:35 +00:00
|
|
|
homepage 'http://www.bitwizard.nl/mtr/'
|
2014-03-17 02:35:21 +00:00
|
|
|
|
|
|
|
stable do
|
|
|
|
url "ftp://ftp.bitwizard.nl/mtr/mtr-0.85.tar.gz"
|
|
|
|
sha1 "6e79584265f733bea7f1b2cb13eeb48f10e96bba"
|
|
|
|
|
|
|
|
patch do
|
2014-04-11 23:07:51 +00:00
|
|
|
url "https://github.com/traviscross/mtr/commit/edd425.diff"
|
|
|
|
sha1 "c1ed669cdf65d607f75abc729a333b180ee42343"
|
2014-03-17 02:35:21 +00:00
|
|
|
end
|
|
|
|
end
|
2009-09-11 19:13:26 +00:00
|
|
|
|
2013-09-22 01:47:29 +00:00
|
|
|
head do
|
|
|
|
url 'https://github.com/traviscross/mtr.git'
|
2013-11-13 17:01:29 +00:00
|
|
|
depends_on :autoconf
|
2013-09-22 01:47:29 +00:00
|
|
|
depends_on :automake
|
|
|
|
end
|
2013-07-16 22:45:41 +00:00
|
|
|
|
2013-02-10 05:53:28 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
2013-01-26 17:57:11 +00:00
|
|
|
depends_on 'gtk+' => :optional
|
2013-11-01 18:13:17 +00:00
|
|
|
depends_on 'glib' => :optional
|
|
|
|
|
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"
|
2012-08-10 22:36:53 +00:00
|
|
|
args = %W[
|
|
|
|
--disable-dependency-tracking
|
|
|
|
--prefix=#{prefix}
|
|
|
|
]
|
2013-01-26 17:57:11 +00:00
|
|
|
args << "--without-gtk" if build.without? 'gtk+'
|
2013-11-01 18:13:17 +00:00
|
|
|
args << "--without-glib" if build.without? 'glib'
|
2013-07-16 22:45:41 +00:00
|
|
|
system "./bootstrap.sh" if build.head?
|
2010-12-30 06:16:42 +00:00
|
|
|
system "./configure", *args
|
2009-09-11 19:13:26 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
2009-12-02 10:53:00 +00:00
|
|
|
|
2012-04-11 20:00:03 +00:00
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
mtr requires superuser privileges. You can either run the program
|
|
|
|
via `sudo`, or change its ownership to root and set the setuid bit:
|
|
|
|
|
|
|
|
sudo chown root:wheel #{sbin}/mtr
|
|
|
|
sudo chmod u+s #{sbin}/mtr
|
|
|
|
|
|
|
|
In any case, you should be certain that you trust the software you
|
|
|
|
are executing with elevated privileges.
|
|
|
|
EOS
|
2009-12-02 10:53:00 +00:00
|
|
|
end
|
2009-09-11 19:13:26 +00:00
|
|
|
end
|