60 lines
1.8 KiB
Ruby
60 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.6.1/vips-8.6.1.tar.gz"
|
|
sha256 "f9ba6235ebc3e4d20af5f1604436bcd9686a3fecbe40838325d542f0c21a9270"
|
|
|
|
bottle do
|
|
sha256 "1edfd16cea55bfeafc6e0d00c244dc7e9265fefc2d9e5bf234b2545822e752f6" => :high_sierra
|
|
sha256 "cc02a499f0ab5247908160b97c266a2ca4a4a1e8cf49dd5e785d46abbc75ce52" => :sierra
|
|
sha256 "2c685e4b788abab61204aede5e74f71cdf6195019b3b85cf9ad6045773a83545" => :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
|