homebrew-core/Formula/vips.rb
2019-11-30 21:41:53 -05:00

61 lines
1.8 KiB
Ruby

class Vips < Formula
desc "Image processing library"
homepage "https://github.com/libvips/libvips"
url "https://github.com/libvips/libvips/releases/download/v8.8.3/vips-8.8.3.tar.gz"
sha256 "c5e4dd5a5c6a777c129037d19ca606769b3f1d405fcc9c8eeda906a61491f790"
revision 3
bottle do
sha256 "261c88feda43fbf3da5ea298a4d16b74fa6125f896ce38d9069e007f460e768e" => :catalina
sha256 "8981625145a1775cf8cc4b385a97262229fd5bfb61fe7be2ab4bb249f4f13f2d" => :mojave
sha256 "eecfa10af511e9da060bb449f538eba0f053a87295d22af210d072fe06af8a12" => :high_sierra
end
depends_on "pkg-config" => :build
depends_on "cfitsio"
depends_on "fftw"
depends_on "fontconfig"
depends_on "gettext"
depends_on "giflib"
depends_on "glib"
depends_on "imagemagick"
depends_on "libexif"
depends_on "libgsf"
depends_on "libheif"
depends_on "libmatio"
depends_on "libpng"
depends_on "librsvg"
depends_on "libtiff"
depends_on "little-cms2"
depends_on "mozjpeg"
depends_on "openexr"
depends_on "openslide"
depends_on "orc"
depends_on "pango"
depends_on "poppler"
depends_on "webp"
def install
# mozjpeg needs to appear before libjpeg, otherwise it's not used
ENV.prepend_path "PKG_CONFIG_PATH", Formula["mozjpeg"].opt_lib/"pkgconfig"
args = %W[
--disable-dependency-tracking
--prefix=#{prefix}
--with-magick
]
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
# --trellis-quant requires mozjpeg, vips warns if it's not present
cmd = "#{bin}/vips jpegsave #{test_fixtures("test.png")} #{testpath}/test.jpg --trellis-quant 2>&1"
assert_equal "", shell_output(cmd)
end
end