86dab11a2a
Been meaning to do this for a while. Tweaks the cyassl build, essentially. Fixes the audit flags, reconfigures the args for style and modernisation, added a basic test. Fades out MD4 support because upstream strongly recommends nobody builds with MD4 any more, and frankly, MD4 sucks. Adds a bundle of new cipher support. Nothing too radical here though, to be honest. Closes Homebrew/homebrew#35492. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
87 lines
2.3 KiB
Ruby
87 lines
2.3 KiB
Ruby
class Cyassl < Formula
|
|
homepage "http://yassl.com/yaSSL/Products-cyassl.html"
|
|
url "https://github.com/cyassl/cyassl/archive/v3.3.0.tar.gz"
|
|
sha256 "585ca95b23a44da2d0e042bd0aef95ce770cd541028b76dc45f29ab62ad3ad4a"
|
|
|
|
head "https://github.com/cyassl/cyassl.git"
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha1 "47a068ee29646ef26b3f7e2a62268f62ed73dbec" => :yosemite
|
|
sha1 "57f47edc303e4f7f07d893a0724c67e068ca4883" => :mavericks
|
|
sha1 "c5de09829f89696a73a8f3818bbf413eae99e5ac" => :mountain_lion
|
|
end
|
|
|
|
option "without-check", "Skip compile-time tests."
|
|
|
|
depends_on "autoconf" => :build
|
|
depends_on "automake" => :build
|
|
depends_on "libtool" => :build
|
|
|
|
def install
|
|
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
|
|
]
|
|
|
|
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.
|
|
# http://yassl.com/yaSSL/Docs-cyassl-manual-2-building-cyassl.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? "check"
|
|
system "make", "install"
|
|
end
|
|
|
|
test do
|
|
system bin/"cyassl-config", "--cflags", "--libs", "--prefix"
|
|
end
|
|
end
|