homebrew-core/Formula/wget.rb

43 lines
1.2 KiB
Ruby
Raw Normal View History

require 'formula'
2012-08-10 03:16:49 +00:00
# NOTE: Configure will fail if using awk 20110810 from dupes.
# Upstream issue: https://savannah.gnu.org/bugs/index.php?37063
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.14.tar.gz'
mirror 'http://ftp.gnu.org/gnu/wget/wget-1.14.tar.gz'
sha1 'c487bce740b3a1847a35fb29b5c6700c46f639b8'
head 'git://git.savannah.gnu.org/wget.git'
2012-04-17 14:30:09 +00:00
2012-08-09 14:19:40 +00:00
option "enable-iri", "Enable iri support"
option "enable-debug", "Build with debug support"
2012-08-09 14:19:40 +00:00
2013-07-10 02:30:15 +00:00
depends_on "openssl" if MacOS.version <= :leopard
2012-08-09 15:51:54 +00:00
depends_on "libidn" if build.include? "enable-iri"
2012-08-09 14:19:40 +00:00
if build.head?
2012-04-17 14:30:09 +00:00
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "xz" => :build
2012-04-17 14:30:09 +00:00
depends_on "gettext"
end
def install
2012-08-09 14:19:40 +00:00
system "./bootstrap" if build.head?
args = ["--prefix=#{prefix}",
"--sysconfdir=#{etc}",
"--with-ssl=openssl"]
args << "--disable-debug" unless build.include? "enable-debug"
2012-08-09 15:51:54 +00:00
args << "--disable-iri" unless build.include? "enable-iri"
system "./configure", *args
system "make install"
end
2012-03-08 08:09:27 +00:00
def test
system "#{bin}/wget", "-O", "-", "www.google.com"
2012-03-08 08:09:27 +00:00
end
end