stunnel: always use Homebrew openssl

master
Jack Nagel 2014-03-14 23:09:01 -05:00
parent 8e29a517fb
commit 4e43d39123
1 changed files with 7 additions and 18 deletions

View File

@ -6,25 +6,9 @@ class Stunnel < Formula
mirror 'http://ftp.nluug.nl/pub/networking/stunnel/archive/4.x/stunnel-4.56.tar.gz'
sha256 '9cae2cfbe26d87443398ce50d7d5db54e5ea363889d5d2ec8d2778a01c871293'
# We need Homebrew OpenSSL for TLSv1.2 support
option 'with-brewed-openssl', 'Build with Homebrew OpenSSL instead of the system version'
depends_on "openssl" if MacOS.version <= :leopard or build.with?('brewed-openssl')
depends_on "openssl"
def install
args = [
"--disable-dependency-tracking",
"--disable-libwrap",
"--prefix=#{prefix}",
"--sysconfdir=#{etc}",
"--mandir=#{man}",
]
if MacOS.version <= :leopard or build.with?('brewed-openssl')
args << "--with-ssl-dir=#{Formula["openssl"].opt_prefix}"
end
# This causes a bogus .pem to be created in lieu of interactive cert generation.
File.open('tools/stunnel.cnf', 'w') do |f|
f.write <<-EOS
@ -60,7 +44,12 @@ nsCertType = server
EOS
end
system "./configure", *args
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}",
"--sysconfdir=#{etc}",
"--mandir=#{man}",
"--disable-libwrap",
"--with-ssl-dir=#{Formula["openssl"].opt_prefix}"
system "make install"
end