diff options
| author | Thijs Vermeir | 2014-12-05 15:01:16 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2014-12-05 15:30:58 +0000 |
| commit | 6a3cf3a77630ed1c39e46cd477fbab7a7956b3a3 (patch) | |
| tree | e0916b1677254123ac5d3e3fb1eef78ec0e3546c /Library/Formula | |
| parent | 7a693f46397dd204faed2bd7964efbee42b1dff2 (diff) | |
| download | homebrew-6a3cf3a77630ed1c39e46cd477fbab7a7956b3a3.tar.bz2 | |
openh264 1.1 (new formula)
Closes #34703.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/openh264.rb | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Library/Formula/openh264.rb b/Library/Formula/openh264.rb new file mode 100644 index 000000000..eb464a4e9 --- /dev/null +++ b/Library/Formula/openh264.rb @@ -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 |
