aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorClemens Gruber2013-06-11 11:26:16 +0200
committerAdam Vandenberg2013-06-11 07:47:23 -0700
commitba68cea9a57d9a4f5b9c8b1e0d46fa4eda113717 (patch)
tree73334a8af1696dbd6942d1735bd84ca1a4dfdc8a /Library/Formula
parent8278a7914c60e5c6e7a095c96840d28bfe5d7834 (diff)
downloadhomebrew-ba68cea9a57d9a4f5b9c8b1e0d46fa4eda113717.tar.bz2
nginx: use correct openssl for SPDY
Closes #20404. Fixes #20336. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/nginx.rb17
1 files changed, 15 insertions, 2 deletions
diff --git a/Library/Formula/nginx.rb b/Library/Formula/nginx.rb
index 319617464..843a71741 100644
--- a/Library/Formula/nginx.rb
+++ b/Library/Formula/nginx.rb
@@ -15,6 +15,10 @@ class Nginx < Formula
env :userpaths
depends_on 'pcre'
+ # SPDY needs openssl >= 1.0.1 for NPN; see:
+ # https://tools.ietf.org/agenda/82/slides/tls-3.pdf
+ # http://www.openssl.org/news/changelog.html
+ depends_on 'openssl' if build.with? 'spdy'
option 'with-passenger', 'Compile with support for Phusion Passenger module'
option 'with-webdav', 'Compile with support for WebDAV module'
@@ -43,13 +47,22 @@ class Nginx < Formula
end
def install
+ cc_opt = "-I#{HOMEBREW_PREFIX}/include"
+ ld_opt = "-L#{HOMEBREW_PREFIX}/lib"
+
+ if build.with? 'spdy'
+ openssl_path = Formula.factory("openssl").opt_prefix
+ cc_opt += " -I#{openssl_path}/include"
+ ld_opt += " -L#{openssl_path}/lib"
+ end
+
args = ["--prefix=#{prefix}",
"--with-http_ssl_module",
"--with-pcre",
"--with-ipv6",
"--sbin-path=#{bin}/nginx",
- "--with-cc-opt=-I#{HOMEBREW_PREFIX}/include",
- "--with-ld-opt=-L#{HOMEBREW_PREFIX}/lib",
+ "--with-cc-opt=#{cc_opt}",
+ "--with-ld-opt=#{ld_opt}",
"--conf-path=#{etc}/nginx/nginx.conf",
"--pid-path=#{var}/run/nginx.pid",
"--lock-path=#{var}/run/nginx.lock",