homebrew-core/Formula/zimg.rb

41 lines
1.2 KiB
Ruby
Raw Normal View History

2015-12-26 09:59:11 +00:00
class Zimg < Formula
desc "Scaling, colorspace conversion, and dithering library"
homepage "https://github.com/sekrit-twc/zimg"
url "https://github.com/sekrit-twc/zimg/archive/release-2.1.tar.gz"
sha256 "e6d6c6c60b38ebaf74e2ab934b5b90b54e61f34e0a3f111c9da82958335f25da"
2015-12-26 09:59:11 +00:00
2015-12-26 20:17:05 +00:00
bottle do
cellar :any
2016-05-08 18:45:39 +00:00
sha256 "1451133127fe278b699906c8e7e345a7d5717fc61fe95aceec7aab7c071ecdb8" => :el_capitan
sha256 "a863b2c60d05fa9238ba9a07e21aab2fe9c8daab0a80d1c1247991122e8210dc" => :yosemite
sha256 "8300801f5849075c3251b3a0dfc5cdfad7b886894eda23fbb89a9d0fa2269d69" => :mavericks
2015-12-26 20:17:05 +00:00
end
2015-12-26 09:59:11 +00:00
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
def install
system "./autogen.sh"
system "./configure", "--prefix=#{prefix}"
system "make", "install"
end
test do
(testpath/"test.c").write <<-EOS.undent
#include <assert.h>
#include <zimg.h>
int main()
{
zimg_image_format format;
zimg_image_format_default(&format, ZIMG_API_VERSION);
assert(ZIMG_MATRIX_UNSPECIFIED == format.matrix_coefficients);
return 0;
}
EOS
system ENV.cc, "test.c", "-L#{lib}", "-lzimg", "-o", "test"
system "./test"
end
end