class Vips < Formula desc "Image processing library" homepage "https://github.com/jcupitt/libvips" url "https://github.com/jcupitt/libvips/releases/download/v8.6.2/vips-8.6.2.tar.gz" sha256 "9486bcda927e0f03baf07c671d19eb21d73434991907b2a4f4897000c0e412a2" bottle do sha256 "66dbce7b752b81aa4149bcf469c33ed608f6fbb88cd25f7199333d1428ebfab3" => :high_sierra sha256 "c79532f23ff6b3dcee183e3b9dade8fdbcc0fea4235d50016823fac428f133a9" => :sierra sha256 "2887d8bad4088870f20da7e13176825a410020444b76acd5b669bd6adda6ae37" => :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 "fftw" => :recommended depends_on "poppler" => :recommended depends_on "graphicsmagick" => :optional depends_on "imagemagick" => :optional depends_on "jpeg-turbo" => :optional depends_on "mozjpeg" => :optional depends_on "openexr" => :optional depends_on "openslide" => :optional depends_on "webp" => :optional def install args = %W[ --disable-dependency-tracking --prefix=#{prefix} ] if build.with? "graphicsmagick" args << "--with-magick" << "--with-magickpackage=GraphicsMagick" end args << "--without-libwebp" if build.without? "webp" 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