32 lines
901 B
Ruby
32 lines
901 B
Ruby
|
class Jrtplib < Formula
|
||
|
desc "Fully featured C++ Library for RTP (Real-time Transport Protocol)"
|
||
|
homepage "https://research.edm.uhasselt.be/jori/jrtplib"
|
||
|
url "https://research.edm.uhasselt.be/jori/jrtplib/jrtplib-3.11.1.tar.bz2"
|
||
|
sha256 "e24745f22418fb5d741b6b9871b89ed43964870f292dda92fd11cfbb5d6d0e43"
|
||
|
|
||
|
depends_on "cmake" => :build
|
||
|
depends_on "pkg-config" => :build
|
||
|
depends_on "jthread"
|
||
|
|
||
|
def install
|
||
|
system "cmake", ".", *std_cmake_args
|
||
|
system "make", "install"
|
||
|
end
|
||
|
|
||
|
test do
|
||
|
(testpath/"test.cpp").write <<~EOS
|
||
|
#include <jrtplib3/rtpsessionparams.h>
|
||
|
using namespace jrtplib;
|
||
|
int main() {
|
||
|
RTPSessionParams sessionparams;
|
||
|
sessionparams.SetOwnTimestampUnit(1.0/8000.0);
|
||
|
return 0;
|
||
|
}
|
||
|
EOS
|
||
|
|
||
|
system ENV.cxx, "test.cpp", "-I#{include}", "-L#{lib}", "-ljrtp",
|
||
|
"-o", "test"
|
||
|
system "./test"
|
||
|
end
|
||
|
end
|