diff --git a/Formula/chafa.rb b/Formula/chafa.rb new file mode 100644 index 0000000000..c89fe386f4 --- /dev/null +++ b/Formula/chafa.rb @@ -0,0 +1,23 @@ +class Chafa < Formula + desc "Versatile and fast Unicode/ASCII/ANSI graphics renderer" + homepage "https://hpjansson.org/chafa/" + url "https://hpjansson.org/chafa/releases/chafa-1.0.1.tar.xz" + sha256 "49d491a566a22daf56c51c043259f1373a1b1125d5c1c1fe321f7c25ca178e01" + + depends_on "pkg-config" => :build + depends_on "glib" + depends_on "imagemagick" + + def install + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + output = shell_output("#{bin}/chafa #{test_fixtures("test.png")}") + assert_equal 4, output.lines.count + end +end