class CurlOpenssl < 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.65.0.tar.bz2" sha256 "ea47c08f630e88e413c85793476e7e5665647330b6db35f5c19d72b3e339df5c" bottle do sha256 "db4002002996bf46d5b38a1904f0cd0855eda523dbd79ce67763034ed9eb1179" => :mojave sha256 "87e35725f492434de291638a86dfd63d40c455d180c9d265bcc9641876bb96f6" => :high_sierra sha256 "1e53175875edca714a8e6ac8931ac62488efc31595827c0890eda911fac1c292" => :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 depends_on "brotli" depends_on "c-ares" depends_on "libidn" depends_on "libmetalink" depends_on "libssh2" depends_on "nghttp2" depends_on "openldap" depends_on "openssl" depends_on "rtmpdump" def install system "./buildconf" if build.head? args = %W[ --disable-debug --disable-dependency-tracking --disable-silent-rules --prefix=#{prefix} --enable-ares=#{Formula["c-ares"].opt_prefix} --with-ca-bundle=#{etc}/openssl/cert.pem --with-ca-path=#{etc}/openssl/certs --with-gssapi --with-libidn2 --with-libmetalink --with-librtmp --with-libssh2 --with-ssl=#{Formula["openssl"].opt_prefix} ] system "./configure", *args system "make", "install" 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