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
icpz 2021-05-08 17:18:33 +08:00 committed by BrewTestBot
parent e9307b5c9f
commit 930b075496
No known key found for this signature in database
GPG Key ID: 82D7D104050B0F0F
3 changed files with 35 additions and 0 deletions

1
Aliases/7-zip Symbolic link
View File

@ -0,0 +1 @@
../Formula/sevenzip.rb

1
Aliases/7zip Symbolic link
View File

@ -0,0 +1 @@
../Formula/sevenzip.rb

33
Formula/sevenzip.rb Normal file
View File

@ -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