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 4
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "b6495a6e71b67427d075abbf334d41179593fd1576ab230f7a7da1f02f329500" => :catalina
|
|
sha256 "4e445388ec5eadeec544cc4f6dc119bd2c321194c1d7628ca61413d9ebdbe749" => :mojave
|
|
sha256 "8ff0f417a1455cc0c6f823ebb916c3be18f0a4cf8edecfda6970351060c07665" => :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
|