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/R50.tar.gz"
|
|
sha256 "b9dc7ce904c6a3432df7491b7052bc4cf09ccf1e7a703053f8079a2267522f97"
|
|
license "LGPL-2.1"
|
|
head "https://github.com/vapoursynth/vapoursynth.git"
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "2fc13589c05a71af92cd1bb8b522f88651bbfcf21b1756cbb0f7133eb4177111" => :catalina
|
|
sha256 "45e9e716004b4b55da0d49df18d47ac3ccea18c26450d5b9fc71f16b4eacaf79" => :mojave
|
|
sha256 "5600dda1f2e5bca8bdb4a580eb14dcd691f4f5d3f865d4bdf2c8a91595465ade" => :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 "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.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.imwri"
|
|
end
|
|
end
|