46 lines
1.7 KiB
Ruby
46 lines
1.7 KiB
Ruby
class VapoursynthImwri < Formula
|
|
desc "VapourSynth filters - ImageMagick HDRI writer/reader"
|
|
homepage "http://www.vapoursynth.com"
|
|
url "https://github.com/vapoursynth/vapoursynth/archive/R46.tar.gz"
|
|
sha256 "e0b6e538cc54a021935e89a88c5fdae23c018873413501785c80b343c455fe7f"
|
|
head "https://github.com/vapoursynth/vapoursynth.git"
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "d7b115173c65bb66391d3f8c3297e07ac203fb2929cc40ebdb80eb1b0f58b7b5" => :mojave
|
|
sha256 "6012ccaf4fad0aa145d898aabb23ec5842add504ed0c2168404284fe438caf3b" => :high_sierra
|
|
sha256 "44af216de34c0d9cb725e5cb390894a0d4d45316a167776dfd0f617e2ec61b14" => :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 "imagemagick"
|
|
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-imwri"
|
|
system "make", "install"
|
|
rm prefix/"vapoursynth/libimwri.la"
|
|
end
|
|
|
|
def post_install
|
|
(HOMEBREW_PREFIX/"lib/vapoursynth").mkpath
|
|
(HOMEBREW_PREFIX/"lib/vapoursynth").install_symlink prefix/"vapoursynth/libimwri.dylib" => "libimwri.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.imwri"
|
|
end
|
|
end
|