2011-03-10 05:11:03 +00:00
|
|
|
class Libzip < Formula
|
2015-01-06 06:07:14 +00:00
|
|
|
homepage "http://www.nih.at/libzip/"
|
|
|
|
url "http://www.nih.at/libzip/libzip-0.11.2.tar.gz"
|
|
|
|
sha1 "eeb3b5567fcf3532fa4bcb6440a87c7ad8507d2d"
|
2011-01-24 15:31:45 +00:00
|
|
|
|
2014-02-24 16:45:09 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2015-01-06 06:34:59 +00:00
|
|
|
revision 2
|
|
|
|
sha1 "714257f1e187a42f11c50c8f777d79d8beba28c6" => :yosemite
|
|
|
|
sha1 "65b31e70e363879aad9f8d1845e17bf7f2dcaeb3" => :mavericks
|
|
|
|
sha1 "f1571198224aa96ea539e282c24097ee4d9096d6" => :mountain_lion
|
2014-02-24 16:45:09 +00:00
|
|
|
end
|
|
|
|
|
2014-01-23 14:34:30 +00:00
|
|
|
option :universal
|
|
|
|
|
2011-01-24 15:31:45 +00:00
|
|
|
def install
|
2014-01-23 14:34:30 +00:00
|
|
|
ENV.universal_binary if build.universal?
|
2013-01-29 05:07:34 +00:00
|
|
|
system "./configure", "--prefix=#{prefix}",
|
|
|
|
"--mandir=#{man}",
|
|
|
|
"CXX=#{ENV.cxx}",
|
|
|
|
"CXXFLAGS=#{ENV.cflags}"
|
2015-01-06 06:07:14 +00:00
|
|
|
system "make", "install"
|
2011-01-24 15:31:45 +00:00
|
|
|
end
|
2015-01-06 06:21:08 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
touch "file1"
|
|
|
|
system "zip", "file1.zip", "file1"
|
|
|
|
touch "file2"
|
|
|
|
system "zip", "file2.zip", "file1", "file2"
|
|
|
|
assert_match /\+.*file2/, shell_output("#{bin}/zipcmp -v file1.zip file2.zip", 1)
|
|
|
|
end
|
2011-01-24 15:31:45 +00:00
|
|
|
end
|