102 lines
2.8 KiB
Ruby
102 lines
2.8 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/archive/v3.10.0-stable.tar.gz"
|
|
version "3.10.0"
|
|
sha256 "e3b16b857eb552d496eeff589ffd61cfe6de5845cf70c33b6fc1a78cdb5e86d9"
|
|
head "https://github.com/wolfSSL/wolfssl.git"
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "c757e73e6399dd391824eedbcfe995d8a5274dc150f9ae9b3bd227dbda47b72f" => :sierra
|
|
sha256 "3241c3fa890572cf99cc268a4846328605a4749833f77597ebb7c327a270d0c6" => :el_capitan
|
|
sha256 "0f90124a769af2037b0bfea48eb56945c31d3dfdb5ce144e41f00d1e0aa7c8f8" => :yosemite
|
|
end
|
|
|
|
option "without-test", "Skip compile-time tests"
|
|
|
|
deprecated_option "without-check" => "without-test"
|
|
|
|
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
|
|
]
|
|
|
|
if MacOS.prefer_64_bit?
|
|
args << "--enable-fastmath" << "--enable-fasthugemath"
|
|
else
|
|
args << "--disable-fastmath" << "--disable-fasthugemath"
|
|
end
|
|
|
|
args << "--enable-aesni" if Hardware::CPU.aes? && !build.bottle?
|
|
|
|
# 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" if MacOS.prefer_64_bit?
|
|
|
|
system "./autogen.sh"
|
|
system "./configure", *args
|
|
system "make"
|
|
system "make", "check" if build.with? "test"
|
|
system "make", "install"
|
|
end
|
|
|
|
test do
|
|
system bin/"wolfssl-config", "--cflags", "--libs", "--prefix"
|
|
end
|
|
end
|