# 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.tar.xz" mirror "https://ftp.gnu.org/gnu/wget/wget-1.17.tar.xz" sha256 "bd69d63acbf329a8286ccebbe63cd4fecc998718131a0d4b2ab9239542d2bb87" bottle do revision 1 sha256 "ec06201cecf6beca781a1e697fe37ff35358d5f428f440bc693346e787458ddf" => :el_capitan sha256 "8e0f1538b771d17f6ff15267d12132632318b88a78f98521332fe7530c4b78bf" => :yosemite sha256 "1b9188a5659b32b804cbbbcfc15b9b5a5711a13808546029fd436df5d95eca34" => :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