57 lines
1.7 KiB
Ruby
57 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.4.tar.gz"
|
|
mirror "https://ftpmirror.gnu.org/wget/wget-1.19.4.tar.gz"
|
|
sha256 "93fb96b0f48a20ff5be0d9d9d3c4a986b469cb853131f9d5fe4cc9cecbc8b5b5"
|
|
revision 1
|
|
|
|
bottle do
|
|
sha256 "7989ae0ee0d212237ba31e8024189ba57a4296be67e08aeeea879d603ca66b59" => :high_sierra
|
|
sha256 "e4b88af13d56bd1aadbef96abdfff0a3919da8da96acc2e7ffd3ef812232a687" => :sierra
|
|
sha256 "3091698e33a73f706918967dddc3ce1d295f1ae351b5d32932cd3e9013ee5283" => :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"
|
|
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"].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
|