homebrew-core/Formula/curl-openssl.rb
2019-11-06 17:17:05 +09:00

70 lines
2 KiB
Ruby

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.67.0.tar.bz2"
sha256 "dd5f6956821a548bf4b44f067a530ce9445cc8094fd3e7e3fc7854815858586c"
bottle do
sha256 "1513f434fa288a92307da632fc73f7e32fbc2f2f03441335415d8573a7205598" => :catalina
sha256 "20fde33adf324818aa5662669d280709e0844e08b8be73ba3f24fd2f6dce1b76" => :mojave
sha256 "3ad764fae92511f2a14bffc6e69158998acd18cd10dcca85c2928116a1e0f6f5" => :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