class Vips < Formula desc "Image processing library" homepage "https://github.com/jcupitt/libvips" url "https://github.com/jcupitt/libvips/releases/download/v8.5.9/vips-8.5.9.tar.gz" sha256 "5e2bc42074be92606e4c6f50c816c18a7df0046bc5243fd459c95ca28f7a4e15" bottle do sha256 "366cb92f9fe2d25f38233d5ad6a72bebd892d54dfc1664119669da965645f695" => :high_sierra sha256 "4a58ca3c72d9109000a07c0cab7e99f233100a3b3919d47761c6cc3aeb843db7" => :sierra sha256 "6a5f0bf7e6bb646286756f3dbefc510a762de831e0abb443d75701f074a054b2" => :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