homebrew-core/Formula/wolfssl.rb

102 lines
3.0 KiB
Ruby

class Wolfssl < Formula
desc "Embedded SSL Library written in C"
homepage "https://www.wolfssl.com"
url "https://github.com/wolfSSL/wolfssl.git",
tag: "v5.4.0-stable",
revision: "57aac1c50b45275c7a99eca32ad985998b292dc8"
license "GPL-2.0-or-later"
head "https://github.com/wolfSSL/wolfssl.git", branch: "master"
livecheck do
url :stable
strategy :github_latest
regex(%r{href=.*?/tag/v?(\d+(?:\.\d+)+)[._-]stable["' >]}i)
end
bottle do
sha256 cellar: :any, arm64_monterey: "dde40d1dde31b31fbefaf7199e7601da88368c3e7498533e39ec76a5117be5aa"
sha256 cellar: :any, arm64_big_sur: "eb2370b57889ab6ec9e47ae0c5fb64b8d25d4b26e7d3ae518754fdbdbccb936b"
sha256 cellar: :any, monterey: "418c31afa89bdc3e260377196461640eaa540bbe606aa3303036065ed7e3dedd"
sha256 cellar: :any, big_sur: "ec9cd488f155d42caaa2b8dfb0dad8f18cba5cf7afaada1f54166425c9c94637"
sha256 cellar: :any, catalina: "b54725c4ce968ad01a7fcb7cb46e0bb994449e298c3fe84ed5d7a167e1b94ba0"
sha256 cellar: :any_skip_relocation, x86_64_linux: "133091fece0cf88bed521e40271630b7c0e0ede0ec8111f79b863d5c51021dea"
end
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
def install
args = %W[
--disable-silent-rules
--disable-dependency-tracking
--infodir=#{info}
--mandir=#{man}
--prefix=#{prefix}
--sysconfdir=#{etc}
--disable-bump
--disable-examples
--disable-fortress
--disable-md5
--disable-sniffer
--disable-webserver
--enable-aesccm
--enable-aesgcm
--enable-alpn
--enable-blake2
--enable-camellia
--enable-certgen
--enable-certreq
--enable-chacha
--enable-crl
--enable-crl-monitor
--enable-curve25519
--enable-dtls
--enable-dh
--enable-ecc
--enable-eccencrypt
--enable-ed25519
--enable-filesystem
--enable-hc128
--enable-hkdf
--enable-inline
--enable-ipv6
--enable-jni
--enable-keygen
--enable-ocsp
--enable-opensslextra
--enable-poly1305
--enable-psk
--enable-rabbit
--enable-ripemd
--enable-savesession
--enable-savecert
--enable-sessioncerts
--enable-sha512
--enable-sni
--enable-supportedcurves
--enable-tls13
--enable-sp
--enable-fastmath
--enable-fasthugemath
]
if OS.mac?
# Extra flag is stated as a needed for the Mac platform.
# https://www.wolfssl.com/docs/wolfssl-manual/ch2/
# Also, only applies if fastmath is enabled.
ENV.append_to_cflags "-mdynamic-no-pic"
end
system "./autogen.sh"
system "./configure", *args
system "make"
system "make", "check"
system "make", "install"
end
test do
system bin/"wolfssl-config", "--cflags", "--libs", "--prefix"
end
end