102 lines
3.0 KiB
Ruby
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.1.0-stable",
|
|
revision: "2b670c026debc8e70621eb5c75b60931c9aa0bc5"
|
|
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: "04e711736887b37180e2345f983607ae69de4fa4d069060102e536fc5c30d85c"
|
|
sha256 cellar: :any, arm64_big_sur: "b717cd564c42d1b56513e3b3b271cf09594e3e7c82d50f22f58f1e943d5b67de"
|
|
sha256 cellar: :any, monterey: "430d939c2f5fb807a4178f57f2da1478946a0ea1c6b24c45eee3691aac4d291b"
|
|
sha256 cellar: :any, big_sur: "9dddae6126c2a8f8a044f243d3f4568853011aa16e9cdfe00ed9b4a19fa0875b"
|
|
sha256 cellar: :any, catalina: "59eecbc1d6707c1769a3eec2e34fc4b84c2e89f780b130ddab9a4f8e7bbc957d"
|
|
sha256 cellar: :any_skip_relocation, x86_64_linux: "8a5a7cb68843b0097c533263a39ec9d7ba321eb461e52a2bad2858f5683f2d57"
|
|
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
|