/
mhonarc.rb
42 lines (34 loc) 路 1.22 KB
/
mhonarc.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
42
class Mhonarc < Formula
desc "Mail-to-HTML converter"
homepage "https://www.mhonarc.org/"
url "https://www.mhonarc.org/release/MHonArc/tar/MHonArc-2.6.19.tar.bz2"
sha256 "08912eae8323997b940b94817c83149d2ee3ed11d44f29b3ef4ed2a39de7f480"
license "GPL-2.0-or-later"
revision 5
livecheck do
url :homepage
regex(/href=.*?MHonArc[._-]v?(\d+(?:\.\d+)+)\.t/i)
end
bottle do
sha256 cellar: :any_skip_relocation, all: "36c8e9cffa163c7bd5bd949899d4fcc586edd38c865ee8e4aea28bead134576e"
end
depends_on "perl"
# Apply a bugfix for syntax. https://savannah.nongnu.org/bugs/?49997
patch do
url "https://file.savannah.gnu.org/file/monharc.patch?file_id=39391"
sha256 "723ef1779474c6728fbc88b1f6e9a4ca2c22d76a8adc4d3bd8838793852e60c4"
end
def install
# Using Perl's `installprefix` rather than `prefix` allows install.me to use
# Homebrew Perl directory structure even if the prefixes are different paths.
inreplace "install.me", "$Config{'prefix'}", "$Config{'installprefix'}"
system "perl", "install.me",
"-batch",
"-perl", Formula["perl"].opt_bin/"perl",
"-prefix", prefix
bin.install "mhonarc"
end
test do
system "#{bin}/mhonarc", "-v"
end
end