homebrew-core/Formula/curl-openssl.rb
2019-01-25 14:41:27 +00: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.63.0.tar.bz2"
sha256 "9bab7ed4ecff77020a312d84cc5fb7eb02d58419d218f267477a724a17fd8dd8"
revision 1
bottle do
sha256 "9a87dd51c08f669a7c5c0ccd2637eba7638330157b043f9437f68c55a683f1fc" => :mojave
sha256 "b002813bf6bfce0852e157daf842caa14a10e91d1da3511726b429a2510e79ce" => :high_sierra
sha256 "db12566c19bcc3a96dbbb45a244f09dc8c5b2056f758250d8bbbda7e3dacb588" => :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