homebrew-core/Formula/vapoursynth-sub.rb

48 lines
1.7 KiB
Ruby

class VapoursynthSub < Formula
desc "VapourSynth filters - Subtitling filter"
homepage "http://www.vapoursynth.com"
url "https://github.com/vapoursynth/vapoursynth/archive/R50.tar.gz"
sha256 "b9dc7ce904c6a3432df7491b7052bc4cf09ccf1e7a703053f8079a2267522f97"
revision 1
head "https://github.com/vapoursynth/vapoursynth.git"
bottle do
cellar :any
sha256 "61aa955a21de088cb8f53ef014a6ed0bbca3435ee70ac958f38bdec42540ca79" => :catalina
sha256 "deeea5620be2867e3fab4a89bbf93074bf9e8d10a3b01fba9e8161f333293bd3" => :mojave
sha256 "1f4e14c3572fcb8e1e65b59f41639bab5a7e28ff4509de6af42afc8e7f8931ff" => :high_sierra
end
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
depends_on "nasm" => :build
depends_on "pkg-config" => :build
depends_on "ffmpeg"
depends_on "libass"
depends_on "vapoursynth"
def install
system "./autogen.sh"
inreplace "Makefile.in", "pkglibdir = $(libdir)", "pkglibdir = $(exec_prefix)"
system "./configure", "--prefix=#{prefix}",
"--disable-core",
"--disable-vsscript",
"--disable-plugins",
"--enable-subtext"
system "make", "install"
rm prefix/"vapoursynth/libsubtext.la"
end
def post_install
(HOMEBREW_PREFIX/"lib/vapoursynth").mkpath
(HOMEBREW_PREFIX/"lib/vapoursynth").install_symlink prefix/"vapoursynth/libsubtext.dylib" => "libsubtext.dylib"
end
test do
xy = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3"
ENV.prepend_path "PYTHONPATH", lib/"python#{xy}/site-packages"
system Formula["python@3.8"].opt_bin/"python3", "-c", "from vapoursynth import core; core.sub"
end
end