From c24fd6c0032905678a38f72736e061368484ebfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20St=C4=99pie=C5=84?= Date: Tue, 11 Feb 2014 17:31:52 +0100 Subject: [PATCH] zpaq 6.49 Closes Homebrew/homebrew#26625. Signed-off-by: Adam Vandenberg --- Formula/zpaq.rb | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Formula/zpaq.rb diff --git a/Formula/zpaq.rb b/Formula/zpaq.rb new file mode 100644 index 0000000000..96eddc6c57 --- /dev/null +++ b/Formula/zpaq.rb @@ -0,0 +1,26 @@ +require "formula" + +class Zpaq < Formula + homepage "http://mattmahoney.net/dc/zpaq.html" + url "http://mattmahoney.net/dc/zpaq649.zip" + sha1 "aa0d8241679f314d0be8a43e7a87e5b4d4529017" + version "6.49" + + def install + ENV.append_to_cflags "-Dunix -O3" + system "make", "libzpaq.o", "divsufsort.o", "zpaq.o" + system "ar", "-r", "libzpaq.a", "libzpaq.o", "divsufsort.o" + system ENV.cxx, "-o", "zpaq", "libzpaq.a", "zpaq.o" + lib.install "libzpaq.a" + include.install "libzpaq.h" + bin.install "zpaq" + end + + test do + archive = testpath/'test.zpaq' + zpaq = bin/"zpaq" + system zpaq, "a", archive, "#{include}/libzpaq.h" + system zpaq, "t", archive + archive.read(4) == "7kSt" + end +end