2012-12-07 20:10:16 +00:00
|
|
|
class Cyassl < Formula
|
2014-06-21 20:22:21 +00:00
|
|
|
homepage "http://yassl.com/yaSSL/Products-cyassl.html"
|
2014-12-16 23:52:10 +00:00
|
|
|
url "https://github.com/cyassl/cyassl/archive/v3.3.0.tar.gz"
|
|
|
|
sha256 "585ca95b23a44da2d0e042bd0aef95ce770cd541028b76dc45f29ab62ad3ad4a"
|
2012-12-07 20:10:16 +00:00
|
|
|
|
2014-06-21 20:22:21 +00:00
|
|
|
head "https://github.com/cyassl/cyassl.git"
|
2012-12-07 20:10:16 +00:00
|
|
|
|
2014-09-14 14:20:36 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2014-12-17 00:04:01 +00:00
|
|
|
sha1 "47a068ee29646ef26b3f7e2a62268f62ed73dbec" => :yosemite
|
|
|
|
sha1 "57f47edc303e4f7f07d893a0724c67e068ca4883" => :mavericks
|
|
|
|
sha1 "c5de09829f89696a73a8f3818bbf413eae99e5ac" => :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
|
|
|
|
--disable-fortress
|
|
|
|
--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
|
|
|
|
--enable-ecc
|
|
|
|
--enable-eccencrypt
|
|
|
|
--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
|
|
|
|
system bin/"cyassl-config", "--cflags", "--libs", "--prefix"
|
2012-12-07 20:10:16 +00:00
|
|
|
end
|
|
|
|
end
|