/
lha.rb
41 lines (35 loc) 路 1.88 KB
/
lha.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
class Lha < Formula
desc "Utility for creating and opening lzh archives"
homepage "https://github.com/jca02266/lha/"
url "https://github.com/jca02266/lha/archive/refs/tags/release-20211125.tar.gz"
version "1.14i-ac20211125"
sha256 "8761edac9613cf1c06cbc341259fb2abd804f8f5bb8ba25970779062701e8a46"
license "MIT"
head "https://github.com/jca02266/lha.git", branch: "master"
bottle do
sha256 cellar: :any_skip_relocation, arm64_sonoma: "e42f198ac84b3b9b7be6358792ecb7125de6f404def713744e7caac480afdf14"
sha256 cellar: :any_skip_relocation, arm64_ventura: "c7a59e14fef6de2726498fb18a67c4eab1361ca60563fddff7e98bb4cbd5b0ae"
sha256 cellar: :any_skip_relocation, arm64_monterey: "2b2b35c5e133e6d1e129bfe863a926d8f271c88572ed61b39da8fceabe072024"
sha256 cellar: :any_skip_relocation, sonoma: "41136df3dd0dda91fe8044b6d3478d410310a17bc9b7ac3f048de1279eaf433f"
sha256 cellar: :any_skip_relocation, ventura: "8b4acdd2bc29dadcc998d34d3fa8ce69f2d51b3de3c173d9e646b2c6fb8ea8a3"
sha256 cellar: :any_skip_relocation, monterey: "c502509c3aedc222e706f37ce333c2bb7ceaea113e21c8e7e06f19d3d4ed0cfb"
sha256 cellar: :any_skip_relocation, x86_64_linux: "350b62bf10fb130b75a0fa2e778e92e94e49e519385a59d9b6b1c128e78519ba"
end
depends_on "autoconf" => :build
depends_on "automake" => :build
conflicts_with "lhasa", because: "both install a `lha` binary"
def install
# Fix compile with newer Clang
ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1200
system "autoreconf", "-fvi"
system "./configure", "--mandir=#{man}",
*std_configure_args
system "make", "install"
end
test do
(testpath/"foo").write "test"
system "#{bin}/lha", "c", "foo.lzh", "foo"
assert_equal "::::::::\nfoo\n::::::::\ntest",
shell_output("#{bin}/lha p foo.lzh")
end
end