homebrew-core/Formula/wolfssl.rb
2019-11-03 17:04:39 +11:00

95 lines
2.6 KiB
Ruby

class Wolfssl < Formula
desc "Embedded SSL Library written in C"
homepage "https://www.wolfssl.com/wolfSSL/Home.html"
url "https://github.com/wolfSSL/wolfssl.git",
:tag => "v4.2.0-stable",
:revision => "48c4b2fedcee4d61b6a76c5ce9e33ab212d6ab4a"
sha256 "4e15f494604e41725499f8b708798f8ddc2fcaa8f39b4369bcd000b3cab482d8"
head "https://github.com/wolfSSL/wolfssl.git"
bottle do
cellar :any
sha256 "cbeb92db86356a2f0ab9add4e1648f235c45771f85dea088dbbabc5e19f48fd2" => :catalina
sha256 "dfd3c89b0ecd94631cc48af24aad0f3b90f285e1b9b8309fa6e9b0a4f64abc92" => :mojave
sha256 "0ed429c6131d3802d733bda32249d05b154cac0bc3192f5e1f272fd777445f17" => :high_sierra
end
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
def install
# https://github.com/Homebrew/homebrew-core/pull/1046
# https://github.com/Homebrew/brew/pull/251
ENV.delete("SDKROOT")
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://wolfssl.com/wolfSSL/Docs-wolfssl-manual-2-building-wolfssl.html
# 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