openh264 1.1 (new formula)
Closes Homebrew/homebrew#34703. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
35e68f08a3
commit
1e54539d88
1 changed files with 29 additions and 0 deletions
29
Formula/openh264.rb
Normal file
29
Formula/openh264.rb
Normal file
|
@ -0,0 +1,29 @@
|
|||
require "formula"
|
||||
|
||||
class Openh264 < Formula
|
||||
homepage "http://www.openh264.org"
|
||||
url "https://github.com/cisco/openh264/archive/v1.1.tar.gz"
|
||||
sha256 "d1d8e0087adfd372c22fd84746092a04627355468e70420451b2c2dbd4c37699"
|
||||
head "https://github.com/cisco/openh264.git"
|
||||
|
||||
depends_on "nasm" => :build
|
||||
|
||||
def install
|
||||
system "make", "install-shared", "PREFIX=#{prefix}"
|
||||
chmod 0444, "#{lib}/libopenh264.dylib"
|
||||
end
|
||||
|
||||
test do
|
||||
(testpath/"test.c").write <<-EOS.undent
|
||||
#include <wels/codec_api.h>
|
||||
int main() {
|
||||
ISVCDecoder *dec;
|
||||
WelsCreateDecoder (&dec);
|
||||
WelsDestroyDecoder (dec);
|
||||
return 0;
|
||||
}
|
||||
EOS
|
||||
system ENV.cc, "test.c", "-lopenh264", "-o", "test"
|
||||
system "./test"
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue