63 lines
1.7 KiB
Ruby
63 lines
1.7 KiB
Ruby
class Curl < 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.71.1.tar.bz2"
|
|
sha256 "9d52a4d80554f9b0d460ea2be5d7be99897a1a9f681ffafe739169afd6b4f224"
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "36dc71f1899b803ab093e727c920b40f91b197402d9c73124c86d02feb0023c5" => :catalina
|
|
sha256 "99d574c0dec0a50f21ce736d77759038353f2301c7d7a64d5855d311aac4b506" => :mojave
|
|
sha256 "083d119978d82e86d68567b5fc48faf3d80bf66bf3f6e1c21400a2462d3c460c" => :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
|
|
|
|
uses_from_macos "zlib"
|
|
|
|
on_linux do
|
|
depends_on "openssl@1.1"
|
|
end
|
|
|
|
def install
|
|
system "./buildconf" if build.head?
|
|
|
|
args = %W[
|
|
--disable-debug
|
|
--disable-dependency-tracking
|
|
--disable-silent-rules
|
|
--prefix=#{prefix}
|
|
--with-secure-transport
|
|
--without-ca-bundle
|
|
--without-ca-path
|
|
]
|
|
|
|
system "./configure", *args
|
|
system "make", "install"
|
|
system "make", "install", "-C", "scripts"
|
|
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
|