homebrew-core/Formula/vips.rb
2017-10-03 02:16:21 -07:00

61 lines
1.8 KiB
Ruby

class Vips < Formula
desc "Image processing library"
homepage "https://github.com/jcupitt/libvips"
url "https://github.com/jcupitt/libvips/releases/download/v8.5.8/vips-8.5.8.tar.gz"
sha256 "07a3b8966a816a834dd60dc1745ae1930f3bbe604e826986a5a2bbd7f45c5426"
revision 1
bottle do
sha256 "16e5dffcc348cd5de86f7405dfefcc7ad7c2347a66d567bbd0307193ef458246" => :high_sierra
sha256 "2cfeecbedc726347f5c93cd9a58d1dcbde2563a60aafeb5850e6158ea48d38d7" => :sierra
sha256 "f08b3cf6e255ea92955f95f3f6336e68e0fb5a6611ad01b8b771d45046f3d956" => :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