class Vips < Formula desc "Image processing library" homepage "https://github.com/libvips/libvips" url "https://github.com/libvips/libvips/releases/download/v8.7.1/vips-8.7.1.tar.gz" sha256 "1ab080fc7970e6f0a16b1499e44628ea55f80d34c991f5c015d21ede2e486bf0" bottle do sha256 "c511c6aa3b5a8a85e4fd8feaa0086fd864f0939cf2f2e3977163ede38a1ce479" => :mojave sha256 "6bf5f39ff9d5137a3d4d8c369fb4e2a43339ef1ce0d11206a5a91b4536d8a3d4" => :high_sierra sha256 "ef2b32a0cce490d39f65a92bf95f02b2cd19e64236555e35cab3b646eebe7eb8" => :sierra end depends_on "gobject-introspection" => :build depends_on "pkg-config" => :build depends_on "fontconfig" depends_on "gettext" depends_on "giflib" depends_on "glib" 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 "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} ] 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