sevenzip 21.06 (new formula)
Closes #90127. Signed-off-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>master
parent
e9307b5c9f
commit
930b075496
|
@ -0,0 +1 @@
|
|||
../Formula/sevenzip.rb
|
|
@ -0,0 +1 @@
|
|||
../Formula/sevenzip.rb
|
|
@ -0,0 +1,33 @@
|
|||
class Sevenzip < Formula
|
||||
desc "7-Zip is a file archiver with a high compression ratio"
|
||||
homepage "https://7-zip.org"
|
||||
url "https://7-zip.org/a/7z2106-src.7z"
|
||||
version "21.06"
|
||||
sha256 "675eaa90de3c6a3cd69f567bba4faaea309199ca75a6ad12bac731dcdae717ac"
|
||||
license all_of: ["LGPL-2.1-or-later", "BSD-3-Clause"]
|
||||
|
||||
def install
|
||||
cd "CPP/7zip/Bundles/Alone2" do
|
||||
mac_suffix = Hardware::CPU.intel? ? "x64" : Hardware::CPU.arch
|
||||
mk_suffix, directory = if OS.mac?
|
||||
["mac_#{mac_suffix}", "m_#{mac_suffix}"]
|
||||
else
|
||||
["gcc", "g"]
|
||||
end
|
||||
|
||||
system "make", "-f", "../../cmpl_#{mk_suffix}.mak"
|
||||
|
||||
# Cherry pick the binary manually. This should be changed to something
|
||||
# like `make install' if the upstream adds an install target.
|
||||
# See: https://sourceforge.net/p/sevenzip/discussion/45797/thread/1d5b04f2f1/
|
||||
bin.install "b/#{directory}/7zz"
|
||||
end
|
||||
end
|
||||
|
||||
test do
|
||||
(testpath/"foo.txt").write("hello world!\n")
|
||||
system bin/"7zz", "a", "-t7z", "foo.7z", "foo.txt"
|
||||
system bin/"7zz", "e", "foo.7z", "-oout"
|
||||
assert_equal "hello world!\n", (testpath/"out/foo.txt").read
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue