tor: use Homebrew openssl

This commit is contained in:
Jack Nagel 2014-03-19 11:12:30 -05:00
parent 47187293fa
commit 7213fa7366

View file

@ -11,10 +11,8 @@ class Tor < Formula
sha1 '80f4697dfc0473bf5ec642b074cee4ce95fd0fa6'
end
option "with-brewed-openssl", "Build with Homebrew's OpenSSL instead of the system version" if MacOS.version > :leopard
depends_on 'libevent'
depends_on 'openssl' if build.with?('brewed-openssl') || MacOS.version < :snow_leopard
depends_on 'openssl'
def install
# Fix the path to the control cookie.
@ -23,14 +21,9 @@ class Tor < Formula
'TOR_COOKIE="/var/lib/tor/data/control_auth_cookie"',
'TOR_COOKIE="$HOME/.tor/control_auth_cookie"'
args = %W[
--disable-dependency-tracking
--prefix=#{prefix}
]
args << "-with-ssl=#{Formula["openssl"].opt_prefix}" if build.with?("brewed-openssl") || MacOS.version < :snow_leopard
system "./configure", *args
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}",
"--with-openssl-dir=#{Formula["openssl"].opt_prefix}"
system "make install"
bin.install "contrib/tor-ctrl.sh" => "tor-ctrl"