homebrew-core/Formula/vapoursynth.rb

74 lines
3.0 KiB
Ruby

class Vapoursynth < Formula
desc "Video processing framework with simplicity in mind"
homepage "https://www.vapoursynth.com"
url "https://github.com/vapoursynth/vapoursynth/archive/R59.tar.gz"
sha256 "d713f767195cb3a9a7ccb97b1e61e0cf5a9332eed86c6362badfff6857792a86"
license "LGPL-2.1-or-later"
revision 1
head "https://github.com/vapoursynth/vapoursynth.git", branch: "master"
livecheck do
url :stable
regex(/^R(\d+(?:\.\d+)*?)$/i)
end
bottle do
sha256 cellar: :any, arm64_monterey: "8559b899be40688892a57aadfd4da4626048034cc4a11de8d63172d68c0bebff"
sha256 cellar: :any, arm64_big_sur: "640e82eaf761570b464d966b5fdfe3568c13404d06431653a6f27530b099200d"
sha256 cellar: :any, monterey: "be0fa0c82118b584b22ff7a55cd57f8a9984c7275dca8f922fbbbfbc8792ba05"
sha256 cellar: :any, big_sur: "b47f129bbc6475aeca840f688a3f948d19d74db278e4db182a2f5e5be5189d08"
sha256 cellar: :any, catalina: "8d372167dc396acf90c667b8c5250d7967ddb057558ecb17867b8d20293e3305"
sha256 cellar: :any_skip_relocation, x86_64_linux: "a156dfffc5b2d4dce4432691c3e71f52a1508234583960164d1c7112b026e384"
end
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "cython" => :build
depends_on "libtool" => :build
depends_on "nasm" => :build
depends_on "pkg-config" => :build
depends_on "python@3.10"
depends_on "zimg"
on_linux do
depends_on "gcc"
end
fails_with gcc: "5"
def install
system "./autogen.sh"
inreplace "Makefile.in", "pkglibdir = $(libdir)", "pkglibdir = $(exec_prefix)"
system "./configure", "--prefix=#{prefix}",
"--disable-silent-rules",
"--disable-dependency-tracking",
"--with-cython=#{Formula["cython"].bin}/cython",
"--with-plugindir=#{HOMEBREW_PREFIX}/lib/vapoursynth",
"--with-python_prefix=#{prefix}",
"--with-python_exec_prefix=#{prefix}"
system "make", "install"
end
def caveats
<<~EOS
This formula does not contain optional filters that require extra dependencies.
To use \x1B[3m\x1B[1mvapoursynth.core.sub\x1B[0m, execute:
brew install vapoursynth-sub
To use \x1B[3m\x1B[1mvapoursynth.core.ocr\x1B[0m, execute:
brew install vapoursynth-ocr
To use \x1B[3m\x1B[1mvapoursynth.core.imwri\x1B[0m, execute:
brew install vapoursynth-imwri
To use \x1B[3m\x1B[1mvapoursynth.core.ffms2\x1B[0m, execute the following:
brew install ffms2
ln -s "../libffms2.dylib" "#{HOMEBREW_PREFIX}/lib/vapoursynth/#{shared_library("libffms2")}"
For more information regarding plugins, please visit:
\x1B[4mhttp://www.vapoursynth.com/doc/plugins.html\x1B[0m
EOS
end
test do
system Formula["python@3.10"].opt_bin/"python3", "-c", "import vapoursynth"
system bin/"vspipe", "--version"
end
end