class Curl < Formula desc "Get a file from an HTTP, HTTPS or FTP server" homepage "https://curl.haxx.se/" url "https://curl.haxx.se/download/curl-7.64.1.tar.bz2" sha256 "4cc7c738b35250d0680f29e93e0820c4cb40035f43514ea3ec8d60322d41a45d" bottle do cellar :any sha256 "78f8672e9458cf3ed13f1695269e8554148fb5bd74a668123970a5faf46b6d46" => :mojave sha256 "df8ce79cb806192943d07b93ab0bfa9c18f938261f733ce0eaefb73c17c78949" => :high_sierra sha256 "d4c2fe1328ac7ac25d4e22605b772fd640ba505d205691ffbce53df2946396d7" => :sierra end head do url "https://github.com/curl/curl.git" depends_on "autoconf" => :build depends_on "automake" => :build depends_on "libtool" => :build end keg_only :provided_by_macos depends_on "pkg-config" => :build def install system "./buildconf" if build.head? args = %W[ --disable-debug --disable-dependency-tracking --disable-silent-rules --prefix=#{prefix} --with-darwinssl --without-ca-bundle --without-ca-path ] system "./configure", *args system "make", "install" system "make", "install", "-C", "scripts" libexec.install "lib/mk-ca-bundle.pl" end test do # Fetch the curl tarball and see that the checksum matches. # This requires a network connection, but so does Homebrew in general. filename = (testpath/"test.tar.gz") system "#{bin}/curl", "-L", stable.url, "-o", filename filename.verify_checksum stable.checksum system libexec/"mk-ca-bundle.pl", "test.pem" assert_predicate testpath/"test.pem", :exist? assert_predicate testpath/"certdata.txt", :exist? end end