2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-06-04 18:21:19 +00:00
|
|
|
|
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
|
2009-09-24 17:49:32 +00:00
|
|
|
homepage 'http://www.gnu.org/software/wget/'
|
2012-08-06 19:26:07 +00:00
|
|
|
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'
|
2009-06-04 18:21:19 +00:00
|
|
|
|
2012-07-03 17:15:40 +00:00
|
|
|
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"
|
2012-09-02 19:36:55 +00:00
|
|
|
option "enable-debug", "Build with debug support"
|
2012-08-09 14:19:40 +00:00
|
|
|
|
2012-09-05 04:04:01 +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"
|
2010-04-19 18:32:58 +00:00
|
|
|
|
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
|
2012-12-15 11:21:02 +00:00
|
|
|
depends_on "xz" => :build
|
2012-04-17 14:30:09 +00:00
|
|
|
depends_on "gettext"
|
|
|
|
end
|
|
|
|
|
2009-06-04 18:21:19 +00:00
|
|
|
def install
|
2012-08-09 14:19:40 +00:00
|
|
|
system "./bootstrap" if build.head?
|
2012-09-02 19:36:55 +00:00
|
|
|
args = ["--prefix=#{prefix}",
|
2012-01-05 05:47:20 +00:00
|
|
|
"--sysconfdir=#{etc}",
|
2011-08-31 01:10:58 +00:00
|
|
|
"--with-ssl=openssl"]
|
2012-09-02 19:36:55 +00:00
|
|
|
args << "--disable-debug" unless build.include? "enable-debug"
|
2012-08-09 15:51:54 +00:00
|
|
|
args << "--disable-iri" unless build.include? "enable-iri"
|
2010-04-19 18:32:58 +00:00
|
|
|
|
|
|
|
system "./configure", *args
|
2009-06-04 18:21:19 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
2012-03-08 08:09:27 +00:00
|
|
|
|
|
|
|
def test
|
2012-05-15 21:36:45 +00:00
|
|
|
system "#{bin}/wget", "-O", "-", "www.google.com"
|
2012-03-08 08:09:27 +00:00
|
|
|
end
|
2009-09-24 17:49:32 +00:00
|
|
|
end
|