60 lines
1.8 KiB
Ruby
60 lines
1.8 KiB
Ruby
class Vips < Formula
|
|
desc "Image processing library"
|
|
homepage "https://github.com/libvips/libvips"
|
|
url "https://github.com/libvips/libvips/releases/download/v8.8.4/vips-8.8.4.tar.gz"
|
|
sha256 "9f7ae87814d990b67913ae69dc5f26fe62719e29aa7e6cc8908066f31ee15a35"
|
|
|
|
bottle do
|
|
sha256 "37a80755048b73d6300a9a3aa5365ac4b8738ca446301387cbf20cf454229700" => :catalina
|
|
sha256 "6383094b1ba9901efa3f3ad9080f78ab2907b59886c55eacd33a78cdfcdbbb04" => :mojave
|
|
sha256 "3319c91a618088ed3a81baf07617bd45d0263520c24c920d3cec03d4fb2e4da8" => :high_sierra
|
|
end
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on "cfitsio"
|
|
depends_on "fftw"
|
|
depends_on "fontconfig"
|
|
depends_on "gettext"
|
|
depends_on "giflib"
|
|
depends_on "glib"
|
|
depends_on "imagemagick"
|
|
depends_on "libexif"
|
|
depends_on "libgsf"
|
|
depends_on "libheif"
|
|
depends_on "libmatio"
|
|
depends_on "libpng"
|
|
depends_on "librsvg"
|
|
depends_on "libtiff"
|
|
depends_on "little-cms2"
|
|
depends_on "mozjpeg"
|
|
depends_on "openexr"
|
|
depends_on "openslide"
|
|
depends_on "orc"
|
|
depends_on "pango"
|
|
depends_on "poppler"
|
|
depends_on "webp"
|
|
|
|
def install
|
|
# mozjpeg needs to appear before libjpeg, otherwise it's not used
|
|
ENV.prepend_path "PKG_CONFIG_PATH", Formula["mozjpeg"].opt_lib/"pkgconfig"
|
|
|
|
args = %W[
|
|
--disable-dependency-tracking
|
|
--prefix=#{prefix}
|
|
--with-magick
|
|
]
|
|
|
|
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
|
|
|
|
# --trellis-quant requires mozjpeg, vips warns if it's not present
|
|
cmd = "#{bin}/vips jpegsave #{test_fixtures("test.png")} #{testpath}/test.jpg --trellis-quant 2>&1"
|
|
assert_equal "", shell_output(cmd)
|
|
end
|
|
end
|