76 lines
3.0 KiB
Ruby
76 lines
3.0 KiB
Ruby
class Vapoursynth < Formula
|
|
desc "Video processing framework with simplicity in mind"
|
|
homepage "http://www.vapoursynth.com"
|
|
url "https://github.com/vapoursynth/vapoursynth/archive/R52.tar.gz"
|
|
sha256 "4d5dc7950f4357da695d29708bc98013bc3e0bd72fc5d697f8c91ce3c4a4b2ac"
|
|
license "LGPL-2.1-or-later"
|
|
head "https://github.com/vapoursynth/vapoursynth.git"
|
|
|
|
livecheck do
|
|
url :stable
|
|
regex(/^R(\d+(?:\.\d+)*?)$/i)
|
|
end
|
|
|
|
bottle do
|
|
sha256 cellar: :any, arm64_big_sur: "b3c19ccf1ca5ced181f926a8bf4216161e1768d32206a1a37d9622429d58c1a1"
|
|
sha256 cellar: :any, big_sur: "3c71ee0d92d3187ddab6500dac2a36597268efa50cee90c854ffb69d75d5e6e7"
|
|
sha256 cellar: :any, catalina: "4e4668fb68c7df01857472c070dfcf562fd392c48200204f637856a1368181b8"
|
|
sha256 cellar: :any, mojave: "3d1e521272e5b5cff323d6678ff56f959945b9756f938c5ad46a797a345959c1"
|
|
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.9"
|
|
depends_on "zimg"
|
|
|
|
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"
|
|
system "make", "install"
|
|
%w[eedi3 miscfilters morpho removegrain vinverse vivtc].each do |filter|
|
|
rm prefix/"vapoursynth/lib#{filter}.la"
|
|
end
|
|
end
|
|
|
|
def post_install
|
|
(HOMEBREW_PREFIX/"lib/vapoursynth").mkpath
|
|
%w[eedi3 miscfilters morpho removegrain vinverse vivtc].each do |filter|
|
|
(HOMEBREW_PREFIX/"lib/vapoursynth").install_symlink \
|
|
prefix/"vapoursynth/lib#{filter}.dylib" => "lib#{filter}.dylib"
|
|
end
|
|
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/libffms2.dylib"
|
|
For more information regarding plugins, please visit:
|
|
\x1B[4mhttp://www.vapoursynth.com/doc/plugins.html\x1B[0m
|
|
EOS
|
|
end
|
|
|
|
test do
|
|
xy = Language::Python.major_minor_version Formula["python@3.9"].opt_bin/"python3"
|
|
ENV.prepend_path "PYTHONPATH", lib/"python#{xy}/site-packages"
|
|
system Formula["python@3.9"].opt_bin/"python3", "-c", "import vapoursynth"
|
|
system bin/"vspipe", "--version"
|
|
end
|
|
end
|