homebrew-core/Formula/wget.rb

41 lines
982 B
Ruby
Raw Normal View History

require 'formula'
2011-03-10 05:11:03 +00:00
class Wget < Formula
homepage 'http://www.gnu.org/software/wget/'
url 'http://ftpmirror.gnu.org/wget/wget-1.13.4.tar.bz2'
mirror 'http://ftp.gnu.org/gnu/wget/wget-1.13.4.tar.bz2'
md5 '12115c3750a4d92f9c6ac62bac372e85'
2012-04-17 14:30:09 +00:00
head 'bzr://http://bzr.savannah.gnu.org/r/wget/trunk'
2011-04-08 18:16:37 +00:00
depends_on "openssl" if MacOS.leopard?
depends_on "libidn" if ARGV.include? "--enable-iri"
2012-04-17 14:30:09 +00:00
if ARGV.build_head?
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "gettext"
end
2010-07-24 04:46:22 +00:00
def options
[["--enable-iri", "Enable iri support."]]
2010-07-24 04:46:22 +00:00
end
def install
2012-04-17 14:30:09 +00:00
system "./bootstrap" if ARGV.build_head?
args = ["--disable-debug",
"--prefix=#{prefix}",
"--sysconfdir=#{etc}",
"--with-ssl=openssl"]
args << "--disable-iri" unless ARGV.include? "--enable-iri"
system "./configure", *args
system "make install"
end
2012-03-08 08:09:27 +00:00
def test
2012-03-09 05:45:11 +00:00
system "#{bin}/wget -O - www.google.com"
2012-03-08 08:09:27 +00:00
end
end