2012-12-07 20:10:16 +00:00
|
|
|
class Cyassl < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Embedded SSL Library written in C"
|
2015-06-10 15:07:53 +00:00
|
|
|
homepage "https://www.wolfssl.com/wolfSSL/Home.html"
|
|
|
|
url "https://github.com/wolfSSL/wolfssl/archive/v3.4.8.tar.gz"
|
|
|
|
sha256 "50243fa7124a1af611acb916ec11d98a2a91ac5079b7a6a51562e8970cbd942e"
|
2015-03-06 04:36:35 +00:00
|
|
|
head "https://github.com/wolfSSL/wolfssl.git"
|
2012-12-07 20:10:16 +00:00
|
|
|
|
2014-09-14 14:20:36 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2015-03-07 00:01:56 +00:00
|
|
|
sha256 "17893cd56326d12cb3c8d0d7158255ad7ca5df30e5fa160b0309e8ab6805eaa8" => :yosemite
|
|
|
|
sha256 "452f4d57bbba4f48c9e148c5c4311236143d5f15933051d5bae6f5148ffd427f" => :mavericks
|
|
|
|
sha256 "3eeb925899dd6b339a1eb4d3f303e3bf628fa25dc6e5b93a2ed7bd079a2d4195" => :mountain_lion
|
2014-09-14 14:20:36 +00:00
|
|
|
end
|
|
|
|
|
2015-01-03 07:52:58 +00:00
|
|
|
option "without-check", "Skip compile-time tests."
|
|
|
|
|
2014-06-21 20:22:21 +00:00
|
|
|
depends_on "autoconf" => :build
|
|
|
|
depends_on "automake" => :build
|
|
|
|
depends_on "libtool" => :build
|
2012-12-07 20:10:16 +00:00
|
|
|
|
|
|
|
def install
|
2015-01-03 07:52:58 +00:00
|
|
|
args = %W[
|
|
|
|
--disable-silent-rules
|
|
|
|
--disable-dependency-tracking
|
|
|
|
--infodir=#{info}
|
|
|
|
--mandir=#{man}
|
|
|
|
--prefix=#{prefix}
|
|
|
|
--sysconfdir=#{etc}
|
|
|
|
--disable-bump
|
2015-03-06 04:36:35 +00:00
|
|
|
--disable-examples
|
2015-01-03 07:52:58 +00:00
|
|
|
--disable-fortress
|
2015-06-10 15:07:53 +00:00
|
|
|
--disable-md5
|
2015-01-03 07:52:58 +00:00
|
|
|
--disable-sniffer
|
|
|
|
--disable-webserver
|
|
|
|
--enable-aesccm
|
|
|
|
--enable-aesgcm
|
|
|
|
--enable-blake2
|
|
|
|
--enable-camellia
|
|
|
|
--enable-certgen
|
|
|
|
--enable-certreq
|
|
|
|
--enable-chacha
|
|
|
|
--enable-crl
|
|
|
|
--enable-crl-monitor
|
|
|
|
--enable-dtls
|
2015-03-06 04:36:35 +00:00
|
|
|
--enable-dh
|
2015-01-03 07:52:58 +00:00
|
|
|
--enable-ecc
|
|
|
|
--enable-eccencrypt
|
2015-03-06 04:36:35 +00:00
|
|
|
--enable-ecc25519
|
2015-01-03 07:52:58 +00:00
|
|
|
--enable-filesystem
|
|
|
|
--enable-hc128
|
|
|
|
--enable-hkdf
|
|
|
|
--enable-inline
|
|
|
|
--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
|
2012-12-07 20:10:16 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
if MacOS.prefer_64_bit?
|
2014-06-21 20:22:21 +00:00
|
|
|
args << "--enable-fastmath" << "--enable-fasthugemath"
|
2012-12-07 20:10:16 +00:00
|
|
|
else
|
2014-06-21 20:22:21 +00:00
|
|
|
args << "--disable-fastmath" << "--disable-fasthugemath"
|
2012-12-07 20:10:16 +00:00
|
|
|
end
|
|
|
|
|
2015-01-03 07:52:58 +00:00
|
|
|
args << "--enable-aesni" if Hardware::CPU.aes? && !build.bottle?
|
|
|
|
|
2012-12-07 20:10:16 +00:00
|
|
|
# Extra flag is stated as a needed for the Mac platform.
|
|
|
|
# http://yassl.com/yaSSL/Docs-cyassl-manual-2-building-cyassl.html
|
|
|
|
# Also, only applies if fastmath is enabled.
|
2014-06-21 20:22:21 +00:00
|
|
|
ENV.append_to_cflags "-mdynamic-no-pic" if MacOS.prefer_64_bit?
|
2012-12-07 20:10:16 +00:00
|
|
|
|
2013-11-07 19:50:08 +00:00
|
|
|
system "./autogen.sh"
|
2012-12-07 20:10:16 +00:00
|
|
|
system "./configure", *args
|
|
|
|
system "make"
|
2015-01-03 07:52:58 +00:00
|
|
|
system "make", "check" if build.with? "check"
|
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
2015-03-06 04:36:35 +00:00
|
|
|
system bin/"wolfssl-config", "--cflags", "--libs", "--prefix"
|
2012-12-07 20:10:16 +00:00
|
|
|
end
|
|
|
|
end
|