libzt 1.3.1 (new formula)
Closes #39552. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
761c8ed137
commit
cc89586735
1 changed files with 30 additions and 0 deletions
30
Formula/libzt.rb
Normal file
30
Formula/libzt.rb
Normal file
|
@ -0,0 +1,30 @@
|
|||
class Libzt < Formula
|
||||
desc "Encrypted P2P networking library for applications (GPLv3)"
|
||||
homepage "https://www.zerotier.com"
|
||||
|
||||
url "https://github.com/zerotier/libzt.git",
|
||||
:tag => "1.3.1-hb1",
|
||||
:revision => "d5b064623e1161196fd5bc14668e83bec2c27717"
|
||||
|
||||
depends_on "cmake" => :build
|
||||
|
||||
def install
|
||||
system "cmake", ".", *std_cmake_args
|
||||
system "cmake", "--build", "."
|
||||
system "make", "install"
|
||||
prefix.install "LICENSE.GPL-3" => "LICENSE"
|
||||
end
|
||||
|
||||
test do
|
||||
(testpath/"test.cpp").write <<~EOS
|
||||
#include <cstdlib>
|
||||
#include <ZeroTier.h>
|
||||
int main()
|
||||
{
|
||||
return zts_socket(0,0,0) != -2;
|
||||
}
|
||||
EOS
|
||||
system ENV.cxx, "-v", "test.cpp", "-o", "test", "-L#{lib}", "-lzt"
|
||||
system "./test"
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue