homebrew-core/Formula/libzzip.rb

35 lines
1.3 KiB
Ruby

class Libzzip < Formula
desc "Library providing read access on ZIP-archives"
homepage "https://github.com/gdraheim/zziplib"
url "https://github.com/gdraheim/zziplib/archive/v0.13.72.tar.gz"
sha256 "93ef44bf1f1ea24fc66080426a469df82fa631d13ca3b2e4abaeab89538518dc"
license any_of: ["LGPL-2.0-or-later", "MPL-1.1"]
revision 1
bottle do
rebuild 1
sha256 cellar: :any, arm64_big_sur: "43fbba2b7e506170bf0f03a8c281c142b04cd1b95365392d36dcc014e5f24743"
sha256 cellar: :any, big_sur: "f4471c0801590824b9fa2de9a5f25c14fc42dc8d87a5efcdf16144a116d5b997"
sha256 cellar: :any, catalina: "0d0827679b5108d79b6bcbf8a3f1ede078d547bb1986d4b7808d6cdb77104023"
sha256 cellar: :any, mojave: "f165f79a37ac61eeb25c2f9b4756848f4c3a9ddcb7250b9de0e6cc5640b00598"
end
depends_on "cmake" => :build
depends_on "pkg-config" => :build
depends_on "python@3.9" => :build
def install
mkdir "build" do
system "cmake", "..", *std_cmake_args, "-DZZIPTEST=OFF", "-DZZIPSDL=OFF", "-DCMAKE_INSTALL_RPATH=#{rpath}"
system "make", "man"
system "make", "install"
end
end
test do
(testpath/"README.txt").write("Hello World!")
system "/usr/bin/zip", "test.zip", "README.txt"
assert_equal "Hello World!", shell_output("#{bin}/zzcat test/README.txt")
end
end