homebrew-core/Formula/libssh2.rb
Dominyk Tiller f4eb2b4efd 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 Homebrew/homebrew#34499.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-12-03 15:07:36 +00:00

48 lines
1.2 KiB
Ruby

require "formula"
class Libssh2 < Formula
homepage "http://www.libssh2.org/"
url "http://www.libssh2.org/download/libssh2-1.4.3.tar.gz"
sha1 "c27ca83e1ffeeac03be98b6eef54448701e044b0"
revision 1
option "with-libressl", "build with LibreSSL instead of OpenSSL"
head do
url "git://git.libssh2.org/libssh2.git"
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
end
bottle do
cellar :any
revision 2
sha1 "6e9fd52d513692ea5db968de524dbe2b81e2f018" => :yosemite
sha1 "bbe16ac0d85f7aed7794ba5f2220aa3a533298aa" => :mavericks
sha1 "6de15a0a9400554c51858092e0276bb9ddd15c42" => :mountain_lion
end
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", *args
system "make", "install"
end
end