mtr: Make GTK+ opt-in.
This is what MacPorts does.
This commit is contained in:
parent
26c4451365
commit
06a0b767ad
1 changed files with 7 additions and 4 deletions
|
@ -5,17 +5,20 @@ class Mtr < Formula
|
|||
url 'ftp://ftp.bitwizard.nl/mtr/mtr-0.82.tar.gz'
|
||||
sha1 'f1319de27324d85898a9df0a293a438bbaaa12b5'
|
||||
|
||||
depends_on 'gtk+' unless ARGV.include? "--no-gtk"
|
||||
depends_on 'gtk+' if ARGV.include? "--with-gtk"
|
||||
|
||||
def options
|
||||
[['--no-gtk', "Don't build with Gtk+ support"]]
|
||||
[['--with-gtk', "Build with Gtk+ support"]]
|
||||
end
|
||||
|
||||
def install
|
||||
# We need to add this because nameserver8_compat.h has been removed in Snow Leopard
|
||||
ENV['LIBS'] = "-lresolv"
|
||||
args = %W[--prefix=#{prefix} --disable-dependency-tracking]
|
||||
args << "--without-gtk" if ARGV.include? "--no-gtk"
|
||||
args = %W[
|
||||
--disable-dependency-tracking
|
||||
--prefix=#{prefix}
|
||||
]
|
||||
args << "--without-gtk" unless ARGV.include? "--with-gtk"
|
||||
system "./configure", *args
|
||||
system "make install"
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue