class Wolfssl < Formula desc "Embedded SSL Library written in C" homepage "https://www.wolfssl.com" url "https://github.com/wolfSSL/wolfssl.git", tag: "v4.7.0-stable", revision: "830de9a9fb99e30f9ac9caa0a7f7bba29c3b4863" license "GPL-2.0-or-later" head "https://github.com/wolfSSL/wolfssl.git" livecheck do url :stable strategy :github_latest regex(%r{href=.*?/tag/v?(\d+(?:\.\d+)+)[._-]stable["' >]}i) end bottle do sha256 cellar: :any, arm64_big_sur: "d3c1a0238f4bff3d6bbe97c95f28c0b48eba899acc86fdf780611f26ccb5f790" sha256 cellar: :any, big_sur: "d01ee339331c0c96fe0512667e879a442790e5c9af2a7629a8458a43901c1b9d" sha256 cellar: :any, catalina: "4bc15cd6d682ab0319e44bb002e33277e749764b13c1333d0c2f61fee8599eb0" sha256 cellar: :any, mojave: "495873f14e34b81d5d4e56b131b70678f1445495de50dc8fc897463b16e3652a" 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 ] # 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" 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