dav1d 0.1.0 (new formula)

Closes #35027.

Signed-off-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
zengxs 2018-12-12 17:37:34 +08:00 committed by FX Coudert
parent 90b9037c5a
commit f24252d8c2

28
Formula/dav1d.rb Normal file
View file

@ -0,0 +1,28 @@
class Dav1d < Formula
desc "AV1 decoder targeted to be small and fast"
homepage "https://code.videolan.org/videolan/dav1d"
url "https://code.videolan.org/videolan/dav1d/-/archive/0.1.0/dav1d-0.1.0.tar.bz2"
sha256 "923f78d17aed08252608790eaed06a3d530763168fd6a8fc74e3306d7e01e6a5"
depends_on "meson" => :build
depends_on "nasm" => :build
depends_on "ninja" => :build
resource "00000000.ivf" do
url "https://people.xiph.org/~tterribe/av1/samples-all/00000000.ivf"
sha256 "52b4351f9bc8a876c8f3c9afc403d9e90f319c1882bfe44667d41c8c6f5486f3"
end
def install
system "meson", "--prefix=#{prefix}", "build", "--buildtype", "release"
system "ninja", "install", "-C", "build"
end
test do
testpath.install resource("00000000.ivf")
system bin/"dav1d", "-i", testpath/"00000000.ivf", "-o", testpath/"00000000.md5"
assert_predicate (testpath/"00000000.md5"), :exist?
assert_match "0b31f7ae90dfa22cefe0f2a1ad97c620", (testpath/"00000000.md5").read
end
end