blob: 1c2e9455b513a15cc589d808d27046ed2433656a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
  | 
require 'formula'
class Wget < Formula
  homepage 'http://www.gnu.org/software/wget/'
  url 'http://ftp.gnu.org/gnu/wget/wget-1.12.tar.bz2'
  md5 '308a5476fc096a8a525d07279a6f6aa3'
  depends_on "openssl" if MACOS_VERSION < 10.6
  depends_on "libidn" if ARGV.include? "--enable-iri"
  def options
    [["--enable-iri", "Enable iri support."]]
  end
  def patches
    # Fixes annoying TLS Subject Alternative Name bug encountered especially when using GitHub
    # Remove when 1.12.1 is released.
    # See https://savannah.gnu.org/bugs/?23934
    "http://savannah.gnu.org/file/wget-1.12-subjectAltNames.diff?file_id=18828"
  end
  def install
    args = ["--disable-debug", "--prefix=#{prefix}"]
    args << "--disable-iri" unless ARGV.include? "--enable-iri"
    system "./configure", *args
    system "make install"
  end
end
  |