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.68.0.tar.bz2" sha256 "207f54917dd6a2dc733065ccf18d61bb5bebeaceb5df49cd9445483e8623eeb9" bottle do sha256 "c4dd2e8a36d2e4487d9d8c483d42be8b2aa3c5a0a326c10b35aeca82fccd8c0f" => :catalina sha256 "1ef15e091d6e7071a0864195f371d297c0e2bbc39e58b5e0e193de924e4528a0" => :mojave sha256 "736aca75c77ed54e1c15ede808b0630afa9bd1e166c6262a2223f673a51cac9d" => :high_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@1.1" 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@1.1/cert.pem --with-ca-path=#{etc}/openssl@1.1/certs --with-gssapi --with-libidn2 --with-libmetalink --with-librtmp --with-libssh2 --with-ssl=#{Formula["openssl@1.1"].opt_prefix} --without-libpsl ] 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