71 lines
2.3 KiB
Ruby
71 lines
2.3 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 "https://ftpmirror.gnu.org/wget/wget-1.18.tar.xz"
|
|
mirror "https://ftp.gnu.org/gnu/wget/wget-1.18.tar.xz"
|
|
sha256 "b5b55b75726c04c06fe253daec9329a6f1a3c0c1878e3ea76ebfebc139ea9cc1"
|
|
|
|
bottle do
|
|
sha256 "6f23f874cf3997bb0635e5f7706db92c9e98b5089df3b3098045afe071dc992b" => :el_capitan
|
|
sha256 "358e6f9ed3467579b1994e88403ce434afff75d8d5992e81b938a07ed4b62436" => :yosemite
|
|
sha256 "550c915afa5dc225699bfb9d6f98291594ca62402ce6280c43be6438cfed05fe" => :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 "pod2man" => :build if MacOS.version <= :snow_leopard
|
|
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
|
|
# Fixes undefined symbols _iconv, _iconv_close, _iconv_open
|
|
# Reported 10 Jun 2016: https://savannah.gnu.org/bugs/index.php?48193
|
|
ENV.append "LDFLAGS", "-liconv"
|
|
|
|
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
|