homebrew-core/Formula/wolfssl.rb
2019-03-13 11:20:14 +08:00

95 lines
2.5 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 => "v3.15.8",
:revision => "e87433e2b6682aa7162fcb4aafefb08e2fbd932b"
sha256 "4e15f494604e41725499f8b708798f8ddc2fcaa8f39b4369bcd000b3cab482d8"
head "https://github.com/wolfSSL/wolfssl.git"
bottle do
cellar :any
sha256 "90e2ffcaa3223fc54f17b7d87ca4e385bdca82f0aa2093ed6382a49405a6323a" => :mojave
sha256 "b34236c6dad889ab89201c0928ebcf1c7297fb645995aa8ab2923532b5b6ad34" => :high_sierra
sha256 "7908a097eea33154da7d1ccf6eccc047de98e6e4becd51533c4045a9d98fb87e" => :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