homebrew-core/Formula/curl.rb
2019-09-29 10:43:30 +02:00

58 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.66.0.tar.bz2"
sha256 "6618234e0235c420a21f4cb4c2dd0badde76e6139668739085a70c4e2fe7a141"
bottle do
cellar :any
sha256 "0e6be8e3fafd61557a817ea454d8f9d8ece5326d543685b418911209b8eaf2e4" => :catalina
sha256 "40b832d7e108407eb3fb1b378163f08ca5b58492bde0e7c01c6c109a0f5419bd" => :mojave
sha256 "9b9613753b5ba8e11a1aacde92cc679f97e5b2e67c28fbb14951f29128ed0f6c" => :high_sierra
sha256 "a4eadb93e26d5a74b3395ca69a835df7798edadd23762822672dc8da36fb685d" => :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 "openssl"
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