62 lines
1.7 KiB
Ruby
62 lines
1.7 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.23.tar.gz"
|
|
mirror "https://deb.debian.org/debian/pool/main/f/ffms2/ffms2_2.23.orig.tar.gz"
|
|
sha256 "b09b2aa2b1c6f87f94a0a0dd8284b3c791cbe77f0f3df57af99ddebcd15273ed"
|
|
# 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"
|
|
revision 5
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "2d7dec5996e8f1aa94ed24852ad8cf9abf2ff50721492d98cb245a5ff1f852d4" => :catalina
|
|
sha256 "1748aa600727eb0d214bff7b8b73acae50ee59c4e7a6e46b9d5933ec58593bd9" => :mojave
|
|
sha256 "d12367149ca820122c2f2104bf676130032358b0e27fa7195ccd8d342677c777" => :high_sierra
|
|
end
|
|
|
|
head do
|
|
url "https://github.com/FFMS/ffms2.git"
|
|
|
|
depends_on "autoconf" => :build
|
|
depends_on "automake" => :build
|
|
end
|
|
|
|
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}
|
|
]
|
|
|
|
if build.head?
|
|
system "./autogen.sh", *args
|
|
else
|
|
system "./configure", *args
|
|
end
|
|
|
|
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
|