aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/libssh2.rb
diff options
context:
space:
mode:
authorDominyk Tiller2014-11-27 13:49:49 +0000
committerMike McQuaid2014-12-03 15:07:36 +0000
commit4a87355c3572b3c7e36a90b9552f820b51a58214 (patch)
tree0ebdc5ca74ac4161ef7f0d98ff0aaa2a3221a564 /Library/Formula/libssh2.rb
parentccb69d8fe36d0717e4fb58e311c1ba3f006d2ab8 (diff)
downloadhomebrew-4a87355c3572b3c7e36a90b9552f820b51a58214.tar.bz2
curl: libressl support
New ground has been broken. New seeds have been sowed, etc etc. This makes the necessary changes to LibreSSL and cURL to enable the latter to be built with the former. This has been supported upstream for the last 3 months, and cURL officially supports LibreSSL [now](http://daniel.haxx.se/blog/2014/08/05/libressl-vs-boringssl-for-cu rl/) and [has done](http://curl.haxx.se/changes.html) since 7.38.0. A recompile of LibreSSL and cURL is necessary if you wish to adopt this locally, but the dependents of cURL should not need to be recompiled. Closes #34499. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula/libssh2.rb')
-rw-r--r--Library/Formula/libssh2.rb29
1 files changed, 20 insertions, 9 deletions
diff --git a/Library/Formula/libssh2.rb b/Library/Formula/libssh2.rb
index c89a34b48..c088cebb8 100644
--- a/Library/Formula/libssh2.rb
+++ b/Library/Formula/libssh2.rb
@@ -1,4 +1,4 @@
-require 'formula'
+require "formula"
class Libssh2 < Formula
homepage "http://www.libssh2.org/"
@@ -6,6 +6,8 @@ class Libssh2 < Formula
sha1 "c27ca83e1ffeeac03be98b6eef54448701e044b0"
revision 1
+ option "with-libressl", "build with LibreSSL instead of OpenSSL"
+
head do
url "git://git.libssh2.org/libssh2.git"
@@ -22,16 +24,25 @@ class Libssh2 < Formula
sha1 "6de15a0a9400554c51858092e0276bb9ddd15c42" => :mountain_lion
end
- depends_on "openssl"
+ depends_on "openssl" => :recommended
+ depends_on "libressl" => :optional
def install
+ args = [ "--prefix=#{prefix}",
+ "--disable-debug",
+ "--disable-dependency-tracking",
+ "--with-openssl",
+ "--with-libz"
+ ]
+
+ if build.with? "libressl"
+ args << "--with-libssl-prefix=#{Formula["libressl"].opt_prefix}"
+ else
+ args << "--with-libssl-prefix=#{Formula["openssl"].opt_prefix}"
+ end
+
system "./buildconf" if build.head?
- system "./configure", "--prefix=#{prefix}",
- "--disable-debug",
- "--disable-dependency-tracking",
- "--with-openssl",
- "--with-libssl-prefix=#{Formula['openssl'].opt_prefix}",
- "--with-libz"
- system "make install"
+ system "./configure", *args
+ system "make", "install"
end
end