53 lines
1.6 KiB
Ruby
53 lines
1.6 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.62.0.tar.bz2"
|
||
|
mirror "http://curl.mirror.anstey.ca/curl-7.62.0.tar.bz2"
|
||
|
sha256 "7802c54076500be500b171fde786258579d60547a3a35b8c5a23d8c88e8f9620"
|
||
|
|
||
|
keg_only :provided_by_macos
|
||
|
|
||
|
depends_on "pkg-config" => :build
|
||
|
depends_on "brotli"
|
||
|
depends_on "nghttp2"
|
||
|
depends_on "openldap"
|
||
|
depends_on "openssl"
|
||
|
|
||
|
def install
|
||
|
# Allow to build on Lion, lowering from the upstream setting of 10.8
|
||
|
ENV.append_to_cflags "-mmacosx-version-min=10.7" if MacOS.version <= :lion
|
||
|
|
||
|
args = %W[
|
||
|
--disable-debug
|
||
|
--disable-dependency-tracking
|
||
|
--disable-silent-rules
|
||
|
--prefix=#{prefix}
|
||
|
--disable-ares
|
||
|
--with-ca-bundle=#{etc}/openssl/cert.pem
|
||
|
--with-ca-path=#{etc}/openssl/certs
|
||
|
--with-gssapi
|
||
|
--without-libidn2
|
||
|
--without-libmetalink
|
||
|
--without-librtmp
|
||
|
--without-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
|