47 lines
1.7 KiB
Ruby
47 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/R52.tar.gz"
|
|
sha256 "4d5dc7950f4357da695d29708bc98013bc3e0bd72fc5d697f8c91ce3c4a4b2ac"
|
|
license "LGPL-2.1-or-later"
|
|
head "https://github.com/vapoursynth/vapoursynth.git"
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "cfcc6facbd1f40b54d6d0530187233f0db36bb71bda5095d5b49ef17c70ab74b" => :big_sur
|
|
sha256 "11f86645d5a0eebd7250373a5ac4a04a6df630366afada2fc3f1af8d0ea69793" => :catalina
|
|
sha256 "07794b0baa5f4a3f544d6bd0a1d990066596c8c99d03f29474a33bca101ec408" => :mojave
|
|
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
|
|
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", "from vapoursynth import core; core.imwri"
|
|
end
|
|
end
|