48 lines
1.7 KiB
Ruby
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/R48.tar.gz"
|
|
sha256 "3e98d134e16af894cf7040e4383e4ef753cafede34d5d77c42a2bb89790c50a8"
|
|
head "https://github.com/vapoursynth/vapoursynth.git"
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "9e4629c90fa4d444cb4fd21b62ca9455378551e88f74312f153a6d8da5e93e92" => :catalina
|
|
sha256 "4d9002ee7df4d4e652f4712f23b949c731ae15e26c266610c9ab46716ca02d59" => :mojave
|
|
sha256 "ce15ff4951abbb44aabf88da25439eaf6d581cede6c22b548780433c0ff8c074" => :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
|
|
py3 = Language::Python.major_minor_version "python3"
|
|
ENV.prepend_path "PYTHONPATH", lib/"python#{py3}/site-packages"
|
|
system "python3", "-c", "from vapoursynth import core; core.sub"
|
|
end
|
|
end
|