jackett 0.22.1382
[Homebrew/homebrew-core.git] / Formula / c / cfonts.rb
blobd06ce5fe8ca8847b16c3b8e291e98294f1b508e3
1 class Cfonts < Formula
2   desc "Sexy ANSI fonts for the console"
3   homepage "https://github.com/dominikwilkowski/cfonts"
4   url "https://github.com/dominikwilkowski/cfonts/archive/refs/tags/v1.2.0rust.tar.gz"
5   sha256 "8337423201558b43ae48e0749058a58623700cfb777288f3a520dcdb0d723a6f"
6   license "GPL-3.0-or-later"
7   head "https://github.com/dominikwilkowski/cfonts.git", branch: "released"
9   livecheck do
10     url :stable
11     regex(/^v?(\d+(?:\.\d+)+)[._-]?rust$/i)
12   end
14   bottle do
15     sha256 cellar: :any_skip_relocation, arm64_sequoia:  "0820bec21514d04c1f5195a1cd072eb0bebde76762c6684938610253886122dd"
16     sha256 cellar: :any_skip_relocation, arm64_sonoma:   "378d7e5f0548372945a13f72f2caf4deafbf2a27bfb3d9b8f26bcc01bde8d52f"
17     sha256 cellar: :any_skip_relocation, arm64_ventura:  "7844d07086770b7ff3d8103dfe7c150370b857cf3dcee5d6812fc34bdb350b4a"
18     sha256 cellar: :any_skip_relocation, arm64_monterey: "5a2d0be69dedd298b3217ca427c0dc2c429a911a82f847e4e37da811a0f20d43"
19     sha256 cellar: :any_skip_relocation, sonoma:         "270fc6508128e7972125b2342f1b0da0d7d9af02dced036b4033b734aea0711a"
20     sha256 cellar: :any_skip_relocation, ventura:        "3ac4832acea4e04ab4cf44fe47c07cbbadc961caef1320bbf5783e98b3be14da"
21     sha256 cellar: :any_skip_relocation, monterey:       "a64c35cd812bb2118c8cb47a6f5c47b3fd0ccaf1cd26e7603feb7f050da0b260"
22     sha256 cellar: :any_skip_relocation, x86_64_linux:   "4324fb2da4a6d701d32cf3ed3c2bda2e9e9508f17443edfd5252f55516e48325"
23   end
25   depends_on "rust" => :build
27   def install
28     chdir "rust" do
29       system "make"
30       system "cargo", "install", *std_cargo_args
31       bin.install "target/release/cfonts"
32     end
33   end
35   test do
36     system bin/"cfonts", "--version"
37     assert_match <<~EOS, shell_output("#{bin}/cfonts t")
38       \n
39        ████████╗
40        ╚══██╔══╝
41           ██║  \s
42           ██║  \s
43           ██║  \s
44           ╚═╝  \s
45       \n
46     EOS
47     assert_match "\n\ntest\n\n\n", shell_output("#{bin}/cfonts test -f console")
48   end
49 end