64 lines
1.9 KiB
Ruby
64 lines
1.9 KiB
Ruby
class Vips < Formula
|
|
desc "Image processing library"
|
|
homepage "https://github.com/jcupitt/libvips"
|
|
url "https://github.com/jcupitt/libvips/releases/download/v8.6.4/vips-8.6.4.tar.gz"
|
|
sha256 "4631a080c92b2b371379252e451818604858942b754c924b09843a7f528a8af4"
|
|
|
|
bottle do
|
|
sha256 "e0ae4bd9399cab21063048cdea3c2d2230f0ef545548d83df16706970d136852" => :high_sierra
|
|
sha256 "59a6d27c07630775bee1d28385d23de06877faeec2791859591d290048f58c50" => :sierra
|
|
sha256 "3a6aeb51bb03ebefcc32763ad69527af6c08b3f0f128e42db16a86bf987aab81" => :el_capitan
|
|
end
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on "fontconfig"
|
|
depends_on "gettext"
|
|
depends_on "giflib"
|
|
depends_on "glib"
|
|
depends_on "gobject-introspection"
|
|
depends_on "jpeg"
|
|
depends_on "libexif"
|
|
depends_on "libgsf"
|
|
depends_on "libpng"
|
|
depends_on "librsvg"
|
|
depends_on "libtiff"
|
|
depends_on "little-cms2"
|
|
depends_on "orc"
|
|
depends_on "pango"
|
|
depends_on "pygobject3"
|
|
depends_on "webp"
|
|
depends_on "fftw" => :recommended
|
|
depends_on "graphicsmagick" => :recommended
|
|
depends_on "poppler" => :recommended
|
|
depends_on "imagemagick" => :optional
|
|
depends_on "openexr" => :optional
|
|
depends_on "openslide" => :optional
|
|
|
|
if build.with?("graphicsmagick") && build.with?("imagemagick")
|
|
odie "vips: --with-imagemagick requires --without-graphicsmagick"
|
|
end
|
|
|
|
def install
|
|
args = %W[
|
|
--disable-dependency-tracking
|
|
--prefix=#{prefix}
|
|
--enable-pyvips8
|
|
PYTHON=#{Formula["python"].opt_bin}/python3
|
|
]
|
|
|
|
if build.with? "graphicsmagick"
|
|
args << "--with-magick" << "--with-magickpackage=GraphicsMagick"
|
|
elsif build.with? "imagemagick"
|
|
args << "--with-magick"
|
|
end
|
|
|
|
system "./configure", *args
|
|
system "make", "install"
|
|
end
|
|
|
|
test do
|
|
system "#{bin}/vips", "-l"
|
|
cmd = "#{bin}/vipsheader -f width #{test_fixtures("test.png")}"
|
|
assert_equal "8", shell_output(cmd).chomp
|
|
end
|
|
end
|