From f6f35dba161b33c8d6db5db25d2a6cf179e6998e Mon Sep 17 00:00:00 2001 From: Travis Warlick Date: Sat, 21 Sep 2013 19:26:14 -0400 Subject: bind: add --with-brewed-openssl Signed-off-by: Adam Vandenberg --- Library/Formula/bind.rb | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'Library/Formula') diff --git a/Library/Formula/bind.rb b/Library/Formula/bind.rb index 86153bc24..82bb64e7f 100644 --- a/Library/Formula/bind.rb +++ b/Library/Formula/bind.rb @@ -5,7 +5,9 @@ class Bind < Formula url 'http://ftp.isc.org/isc/bind9/9.9.4/bind-9.9.4.tar.gz' sha1 'd7be390e6c2546f37a7280e1975e1cd134565f62' - depends_on "openssl" if MacOS.version <= :leopard + 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') def install ENV.libxml2 @@ -20,9 +22,13 @@ class Bind < Formula "--enable-ipv6", ] - # For Xcode-only systems we help a bit to find openssl. - # If CLT.installed?, it evaluates to "/usr", which works. - args << "--with-openssl=#{MacOS.sdk_path}/usr" unless MacOS.version <= :leopard + if build.with? 'brewed-openssl' + args << "--with-ssl-dir=#{Formula.factory('openssl').opt_prefix}" + elsif MacOS.version > :leopard + # For Xcode-only systems we help a bit to find openssl. + # If CLT.installed?, it evaluates to "/usr", which works. + args << "--with-openssl=#{MacOS.sdk_path}/usr" + end system "./configure", *args -- cgit v1.2.3