2018-12-12 09:37:34 +00:00
|
|
|
class Dav1d < Formula
|
|
|
|
desc "AV1 decoder targeted to be small and fast"
|
|
|
|
homepage "https://code.videolan.org/videolan/dav1d"
|
2019-03-27 16:20:58 +00:00
|
|
|
url "https://code.videolan.org/videolan/dav1d/-/archive/0.2.1/dav1d-0.2.1.tar.bz2"
|
|
|
|
sha256 "887f672f0afad9ff66735997e4d55d03b72a098238e291ecb17ae529adc7dd23"
|
2018-12-12 09:37:34 +00:00
|
|
|
|
2018-12-12 13:32:27 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2019-03-27 17:04:22 +00:00
|
|
|
sha256 "980226a7f72417587b363e1b2cc50d030933ee45b99ed540deeb7551d869b69d" => :mojave
|
|
|
|
sha256 "8f33230eca60063c0b207c688b7b39cd6000d02cbabe746d1b32e8402108870c" => :high_sierra
|
|
|
|
sha256 "fa6efd99966022d742b4d1606b63edfe05963896965ecfd8bcd7648acaaa1a25" => :sierra
|
2018-12-12 13:32:27 +00:00
|
|
|
end
|
|
|
|
|
2018-12-12 09:37:34 +00:00
|
|
|
depends_on "meson" => :build
|
|
|
|
depends_on "nasm" => :build
|
|
|
|
depends_on "ninja" => :build
|
|
|
|
|
|
|
|
resource "00000000.ivf" do
|
2019-03-04 17:33:39 +00:00
|
|
|
url "https://code.videolan.org/videolan/dav1d-test-data/raw/master/8-bit/data/00000000.ivf"
|
2018-12-12 09:37:34 +00:00
|
|
|
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
|