Skip to content

Commit 597cbc5

Browse files
committed
libssh2: update 1.11.0_1 bottle.
1 parent c2a302c commit 597cbc5

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

Formula/lib/libssh2.rb

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
class Libssh2 < Formula
2+
desc "C library implementing the SSH2 protocol"
3+
homepage "https://libssh2.org/"
4+
url "https://libssh2.org/download/libssh2-1.11.0.tar.gz"
5+
mirror "https://github.com/libssh2/libssh2/releases/download/libssh2-1.11.0/libssh2-1.11.0.tar.gz"
6+
mirror "http://download.openpkg.org/components/cache/libssh2/libssh2-1.11.0.tar.gz"
7+
sha256 "3736161e41e2693324deb38c26cfdc3efe6209d634ba4258db1cecff6a5ad461"
8+
license "BSD-3-Clause"
9+
revision 1
10+
11+
livecheck do
12+
url "https://libssh2.org/download/"
13+
regex(/href=.*?libssh2[._-]v?(\d+(?:\.\d+)+)\./i)
14+
end
15+
16+
bottle do
17+
root_url "https://github.com/gromgit/homebrew-core-aarch64_linux/releases/download/libssh2-1.11.0"
18+
sha256 cellar: :any_skip_relocation, aarch64_linux: "581e945c9bff2de61fb7bb1ffcfd72a4a57e1c957170dae093dd5deb246a8446"
19+
end
20+
21+
head do
22+
url "https://github.com/libssh2/libssh2.git", branch: "master"
23+
24+
depends_on "autoconf" => :build
25+
depends_on "automake" => :build
26+
depends_on "libtool" => :build
27+
end
28+
29+
depends_on "openssl@3"
30+
31+
uses_from_macos "zlib"
32+
33+
def install
34+
args = %W[
35+
--disable-silent-rules
36+
--disable-examples-build
37+
--with-openssl
38+
--with-libz
39+
--with-libssl-prefix=#{Formula["openssl@3"].opt_prefix}
40+
]
41+
42+
system "./buildconf" if build.head?
43+
system "./configure", *std_configure_args, *args
44+
system "make", "install"
45+
end
46+
47+
test do
48+
(testpath/"test.c").write <<~EOS
49+
#include <libssh2.h>
50+
51+
int main(void)
52+
{
53+
libssh2_exit();
54+
return 0;
55+
}
56+
EOS
57+
58+
system ENV.cc, "test.c", "-L#{lib}", "-lssh2", "-o", "test"
59+
system "./test"
60+
end
61+
end

0 commit comments

Comments
 (0)