homebrew-core/Formula/ffms2.rb

52 lines
1.6 KiB
Ruby

class Ffms2 < Formula
desc "Libav/ffmpeg based source library and Avisynth plugin"
homepage "https://github.com/FFMS/ffms2"
url "https://github.com/FFMS/ffms2/archive/2.40.tar.gz"
mirror "https://deb.debian.org/debian/pool/main/f/ffms2/ffms2_2.40.orig.tar.gz"
sha256 "82e95662946f3d6e1b529eadbd72bed196adfbc41368b2d50493efce6e716320"
# The FFMS2 source is licensed under the MIT license, but its binaries
# are licensed under the GPL because GPL components of FFmpeg are used.
license "GPL-2.0"
head "https://github.com/FFMS/ffms2.git"
bottle do
cellar :any
sha256 "92afbeb075eeca3216cb58eadd0b817bab752bdcddb1fca128c62d3196386168" => :big_sur
sha256 "696f811f1c101374d98efe609b27bea6a5f51b97a1e0df0c0642b411c33d4023" => :catalina
sha256 "e360ea4cd0d1d36526965804e8a324d00961817e41e91b8792d63586c35c0cc7" => :mojave
end
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "pkg-config" => :build
depends_on "ffmpeg"
resource "videosample" do
url "https://samples.mplayerhq.hu/V-codecs/lm20.avi"
sha256 "a0ab512c66d276fd3932aacdd6073f9734c7e246c8747c48bf5d9dd34ac8b392"
end
def install
# For Mountain Lion
ENV.libcxx
args = %W[
--disable-debug
--disable-dependency-tracking
--enable-avresample
--prefix=#{prefix}
]
system "./autogen.sh", *args
system "make", "install"
end
test do
# download small sample and check that the index was created
resource("videosample").stage do
system bin/"ffmsindex", "lm20.avi"
assert_predicate Pathname.pwd/"lm20.avi.ffindex", :exist?
end
end
end