Skip to content

Commit

Permalink
libssh2: update 1.11.0_1 bottle.
Browse files Browse the repository at this point in the history
  • Loading branch information
gromgit committed Sep 4, 2024
1 parent c2a302c commit 597cbc5
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions Formula/lib/libssh2.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
class Libssh2 < Formula
desc "C library implementing the SSH2 protocol"
homepage "https://libssh2.org/"
url "https://libssh2.org/download/libssh2-1.11.0.tar.gz"
mirror "https://github.com/libssh2/libssh2/releases/download/libssh2-1.11.0/libssh2-1.11.0.tar.gz"
mirror "http://download.openpkg.org/components/cache/libssh2/libssh2-1.11.0.tar.gz"
sha256 "3736161e41e2693324deb38c26cfdc3efe6209d634ba4258db1cecff6a5ad461"
license "BSD-3-Clause"
revision 1

livecheck do
url "https://libssh2.org/download/"
regex(/href=.*?libssh2[._-]v?(\d+(?:\.\d+)+)\./i)
end

bottle do
root_url "https://github.com/gromgit/homebrew-core-aarch64_linux/releases/download/libssh2-1.11.0"
sha256 cellar: :any_skip_relocation, aarch64_linux: "581e945c9bff2de61fb7bb1ffcfd72a4a57e1c957170dae093dd5deb246a8446"
end

head do
url "https://github.com/libssh2/libssh2.git", branch: "master"

depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
end

depends_on "openssl@3"

uses_from_macos "zlib"

def install
args = %W[
--disable-silent-rules
--disable-examples-build
--with-openssl
--with-libz
--with-libssl-prefix=#{Formula["openssl@3"].opt_prefix}
]

system "./buildconf" if build.head?
system "./configure", *std_configure_args, *args
system "make", "install"
end

test do
(testpath/"test.c").write <<~EOS
#include <libssh2.h>
int main(void)
{
libssh2_exit();
return 0;
}
EOS

system ENV.cc, "test.c", "-L#{lib}", "-lssh2", "-o", "test"
system "./test"
end
end

0 comments on commit 597cbc5

Please sign in to comment.