homebrew-core/Formula/wolfssl.rb
2019-10-15 23:59:51 +02:00

96 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.1.0-stable",
:revision => "50fbdb961fd8c2d8123064e567ae8ec44167732d"
sha256 "4e15f494604e41725499f8b708798f8ddc2fcaa8f39b4369bcd000b3cab482d8"
head "https://github.com/wolfSSL/wolfssl.git"
bottle do
cellar :any
sha256 "7a7f8e0e186e4a7d95914442c719415839070d3d71ba8c53c3303d06d557a671" => :catalina
sha256 "43bb226ebb919ab0f2f890b90bc2802cadc0cdf95b22d6e065d5ba646c0f7f33" => :mojave
sha256 "d1e20d0c48d9a3ec0b20242960cdb5b5e17bed0fbd023bb5e59b0b46dfbedd68" => :high_sierra
sha256 "a12383cdd9e68ca5a8a73a158fbaec733c9a7d9de550d4424d2f5723155115b5" => :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