homebrew-core/Formula/wget.rb
2015-12-16 14:44:24 +00:00

66 lines
2.1 KiB
Ruby

# NOTE: Configure will fail if using awk 20110810 from dupes.
# Upstream issue: https://savannah.gnu.org/bugs/index.php?37063
class Wget < Formula
desc "Internet file retriever"
homepage "https://www.gnu.org/software/wget/"
url "http://ftpmirror.gnu.org/wget/wget-1.17.1.tar.xz"
mirror "https://ftp.gnu.org/gnu/wget/wget-1.17.1.tar.xz"
sha256 "fe559b61eb9cc01635ac6206a14e02cb51591838c35fa83c7a4aacae0bdd97c9"
bottle do
sha256 "95942c6d5567f921180a68478b81512a367e7bb28578ddeaa4271f1044a0d8a6" => :el_capitan
sha256 "340d6525d8fa2ff17a96ec9187442388fa61e1a646d3de21934ea284f0117cb7" => :yosemite
sha256 "d52ef32746799c21505da02c757cc3cdf1498b6c8dd29002cb8a422fc219db04" => :mavericks
end
head do
url "git://git.savannah.gnu.org/wget.git"
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "xz" => :build
depends_on "gettext"
end
deprecated_option "enable-iri" => "with-iri"
deprecated_option "enable-debug" => "with-debug"
option "with-iri", "Enable iri support"
option "with-debug", "Build with debug support"
depends_on "pkg-config" => :build
depends_on "openssl" => :recommended
depends_on "libressl" => :optional
depends_on "libidn" if build.with? "iri"
depends_on "pcre" => :optional
depends_on "libmetalink" => :optional
depends_on "gpgme" => :optional
def install
args = %W[
--prefix=#{prefix}
--sysconfdir=#{etc}
--with-ssl=openssl
]
if build.with? "libressl"
args << "--with-libssl-prefix=#{Formula["libressl"].opt_prefix}"
else
args << "--with-libssl-prefix=#{Formula["openssl"].opt_prefix}"
end
args << "--disable-debug" if build.without? "debug"
args << "--disable-iri" if build.without? "iri"
args << "--disable-pcre" if build.without? "pcre"
args << "--with-metalink" if build.with? "libmetalink"
args << "--with-gpgme-prefix=#{Formula["gpgme"].opt_prefix}" if build.with? "gpgme"
system "./bootstrap" if build.head?
system "./configure", *args
system "make", "install"
end
test do
system bin/"wget", "-O", "-", "https://google.com"
end
end