homebrew-core/Formula/libarchive.rb
ilovezfs e256828972 libarchive 3.3.2
Closes #15649.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
2017-07-16 23:53:29 -07:00

43 lines
1.5 KiB
Ruby

class Libarchive < Formula
desc "Multi-format archive and compression library"
homepage "https://www.libarchive.org"
url "https://www.libarchive.org/downloads/libarchive-3.3.2.tar.gz"
sha256 "ed2dbd6954792b2c054ccf8ec4b330a54b85904a80cef477a1c74643ddafa0ce"
bottle do
cellar :any
sha256 "c292cbb509f53a599811a8bdcd656eeccc5f04613f087eaa353c2e36773f7ed7" => :sierra
sha256 "c2d7ccd488fc0df27bc60ee245fba03dd239e6a81e36f1d163870d54419c2cf2" => :el_capitan
sha256 "3e7cd1b774b991b8810026d71dfd4ed84b5850bf3ac7bfb321469cfab61c5fc2" => :yosemite
end
keg_only :provided_by_osx
depends_on "xz" => :recommended
depends_on "lz4" => :optional
depends_on "lzop" => :optional
def install
system "./configure",
"--prefix=#{prefix}",
"--without-lzo2", # Use lzop binary instead of lzo2 due to GPL
"--without-nettle", # xar hashing option but GPLv3
"--without-xml2", # xar hashing option but tricky dependencies
"--without-openssl", # mtree hashing now possible without OpenSSL
"--with-expat" # best xar hashing option
system "make", "install"
# Just as apple does it.
ln_s bin/"bsdtar", bin/"tar"
ln_s bin/"bsdcpio", bin/"cpio"
ln_s man1/"bsdtar.1", man1/"tar.1"
ln_s man1/"bsdcpio.1", man1/"cpio.1"
end
test do
(testpath/"test").write("test")
system bin/"bsdtar", "-czvf", "test.tar.gz", "test"
assert_match /test/, shell_output("#{bin}/bsdtar -xOzf test.tar.gz")
end
end