class Vips < Formula desc "Image processing library" homepage "https://github.com/jcupitt/libvips" url "https://github.com/jcupitt/libvips/releases/download/v8.6.3/vips-8.6.3.tar.gz" sha256 "f85adbb9f5f0f66b34a40fd2d2e60d52f6e992831f54af706db446f582e10992" revision 1 bottle do sha256 "6c2b0a986cea55fac585c32c56d67100fbc5e173cca2bb800289a10d1cc3c249" => :high_sierra sha256 "a8d798888662a6f4f1676ba3a0a4859c6c1c2f56bdc709a9cebd6c0e3d6676c1" => :sierra sha256 "fc2646439d6b7d67275a793d16dfc92767e5b38986557689aba218ea8878fe8d" => :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} --enable-pyvips8 PYTHON=#{Formula["python"].opt_bin}/python3 ] if build.with? "graphicsmagick" args << "--with-magick" << "--with-magickpackage=GraphicsMagick" end # Let the formula find optional jpeg libraries before the main # jpeg formula. if build.with? "jpeg-turbo" ENV.prepend_path "PKG_CONFIG_PATH", Formula["jpeg-turbo"].opt_lib/"pkgconfig" end if build.with? "mozjpeg" ENV.prepend_path "PKG_CONFIG_PATH", Formula["mozjpeg"].opt_lib/"pkgconfig" 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