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.7.3a.tar.gz" sha256 "e27086b9c7df640737b15c2b28f22dfd73c13775258917410d44dd0469cddc48" head "https://github.com/sekrit-twc/zimg.git" bottle do cellar :any sha256 "01e59683ac824d730d7e5c2539e3391f596382087a415659ea695ba8753b9503" => :high_sierra sha256 "acdf930eaec23fdf53829d042d8d73362d44f284e81f70009461e6cd74c1381d" => :sierra sha256 "382d8eedca9c55132a7dc16dc269a247597a8a28c9348231bf895acc5fc214c0" => :el_capitan end depends_on "autoconf" => :build depends_on "automake" => :build depends_on "libtool" => :build # Upstream has decided not to fix https://github.com/sekrit-twc/zimg/issues/52 depends_on :macos => :el_capitan def install system "./autogen.sh" system "./configure", "--prefix=#{prefix}" system "make", "install" end test do (testpath/"test.c").write <<~EOS #include #include 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