69 lines
2 KiB
Ruby
69 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.64.0.tar.bz2"
|
|
sha256 "d573ba1c2d1cf9d8533fadcce480d778417964e8d04ccddcc76e591d544cf2eb"
|
|
|
|
bottle do
|
|
sha256 "97d32ac24c5a62f93c832fcb881ade6fc8a895e36bf1af0837b535216dce16f3" => :mojave
|
|
sha256 "bd020df28b99355990348b6f0312f5b8af65febceff0e4f4ab8ac6fff9caf3ba" => :high_sierra
|
|
sha256 "bbc385ef19240944c7efa57df51b9c7384cf88e2515153044b554124cd56dd7f" => :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
|