homebrew-core/Formula/vapoursynth.rb
2018-03-01 21:39:00 -08:00

49 lines
1.7 KiB
Ruby

class Vapoursynth < Formula
include Language::Python::Virtualenv
desc "Video processing framework with simplicity in mind"
homepage "http://www.vapoursynth.com"
url "https://github.com/vapoursynth/vapoursynth/archive/R43.tar.gz"
sha256 "5c80d583f6891f4f5840edf09bc207c2e71653786b07606fdb4a164fd67470c2"
revision 1
head "https://github.com/vapoursynth/vapoursynth.git"
bottle do
sha256 "296cd57f8aea8cbf97fe1325fa879ccd8c0c5e011cfaddd32111bee5efaa9fa8" => :high_sierra
sha256 "a89dcb8ca4f715707df722378e829d2bac07e93b156dbb64a48c8f3be1297efe" => :sierra
sha256 "299e2ccec5ba1bf5275543df569ba8b84507fbe7bb384fa948a4bf0762d97d53" => :el_capitan
end
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
depends_on "pkg-config" => :build
depends_on "nasm" => :build
depends_on "libass"
depends_on :macos => :el_capitan # due to zimg dependency
depends_on "python"
depends_on "tesseract"
depends_on "zimg"
resource "Cython" do
url "https://files.pythonhosted.org/packages/ee/2a/c4d2cdd19c84c32d978d18e9355d1ba9982a383de87d0fcb5928553d37f4/Cython-0.27.3.tar.gz"
sha256 "6a00512de1f2e3ce66ba35c5420babaef1fe2d9c43a8faab4080b0dbcc26bc64"
end
def install
venv = virtualenv_create(buildpath/"cython", "python3")
venv.pip_install "Cython"
system "./autogen.sh"
system "./configure", "--prefix=#{prefix}",
"--with-cython=#{buildpath}/cython/bin/cython"
system "make", "install"
end
test do
py3 = Language::Python.major_minor_version "python3"
ENV.prepend_path "PYTHONPATH", lib/"python#{py3}/site-packages"
system "python3", "-c", "import vapoursynth"
system bin/"vspipe", "--version"
end
end