Skip to content
Permalink
Browse files

curl-openssl 7.62.0 (new formula)

Provides an alternative to curl that builds with openssl without options.
  • Loading branch information...
kabel authored and fxcoudert committed Nov 10, 2018
1 parent 1e09030 commit 7d1b059cab9c06f129d6bb86106a47e4e4488499
Showing with 52 additions and 0 deletions.
  1. +52 −0 Formula/curl-openssl.rb
@@ -0,0 +1,52 @@
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

1 comment on commit 7d1b059

@vszakats

This comment has been minimized.

Copy link
Member

vszakats commented on 7d1b059 Nov 26, 2018

Was there any particular reason for not using openssl@1.1? curl supports it just fine, and OpenSSL 1.1 provides much more than the 1.0.2 version.

Please sign in to comment.
You can’t perform that action at this time.