56 lines
1.7 KiB
Ruby
56 lines
1.7 KiB
Ruby
class Wget < Formula
|
|
desc "Internet file retriever"
|
|
homepage "https://www.gnu.org/software/wget/"
|
|
url "https://ftp.gnu.org/gnu/wget/wget-1.19.3.tar.gz"
|
|
mirror "https://ftpmirror.gnu.org/wget/wget-1.19.3.tar.gz"
|
|
sha256 "9801174275b4a47f85f5a3c2a99a84436cfe90815eafb5ee26c6100499528c76"
|
|
|
|
bottle do
|
|
sha256 "b0c590d6654401dc2b86efd33e253f12543d505af91317200ecb84007d8f0e39" => :high_sierra
|
|
sha256 "aed3a7adf0b7ea635628ec653b7c61652738208c7e30371f38cd0bada2288a0d" => :sierra
|
|
sha256 "da3c80b71192b6a08c2c9b7451bb048f3deb25017f53bcb6ec47eb666693caad" => :el_capitan
|
|
end
|
|
|
|
head do
|
|
url "https://git.savannah.gnu.org/git/wget.git"
|
|
|
|
depends_on "autoconf" => :build
|
|
depends_on "automake" => :build
|
|
depends_on "xz" => :build
|
|
depends_on "gettext"
|
|
end
|
|
|
|
deprecated_option "enable-debug" => "with-debug"
|
|
|
|
option "with-debug", "Build with debug support"
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on "pod2man" => :build if MacOS.version <= :snow_leopard
|
|
depends_on "libidn2"
|
|
depends_on "openssl@1.1"
|
|
depends_on "pcre" => :optional
|
|
depends_on "libmetalink" => :optional
|
|
depends_on "gpgme" => :optional
|
|
|
|
def install
|
|
args = %W[
|
|
--prefix=#{prefix}
|
|
--sysconfdir=#{etc}
|
|
--with-ssl=openssl
|
|
--with-libssl-prefix=#{Formula["openssl@1.1"].opt_prefix}
|
|
]
|
|
|
|
args << "--disable-debug" if build.without? "debug"
|
|
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", "/dev/null", "https://google.com"
|
|
end
|
|
end
|