Merge pull request #207020 from Homebrew/bump-qpdf-11.10.0
[Homebrew/homebrew-core.git] / Formula / t / tig.rb
blob9ba2559a07380776880e60848f88ef889c843e72
1 class Tig < Formula
2   desc "Text interface for Git repositories"
3   homepage "https://jonas.github.io/tig/"
4   url "https://github.com/jonas/tig/releases/download/tig-2.5.12/tig-2.5.12.tar.gz"
5   sha256 "5dda8a098810bb499096e17fc9f69c0a5915a23f46be27209fc8195d7a792108"
6   license "GPL-2.0-or-later"
8   bottle do
9     sha256 cellar: :any,                 arm64_sequoia: "ec253fa15a03de0700d9c0f9a14c3ae7b08f571699b3825998206ccabd71064d"
10     sha256 cellar: :any,                 arm64_sonoma:  "edb0ab2037d0f64854b02b1a833112a5270a5dbe141b4e75308c738b6e27d020"
11     sha256 cellar: :any,                 arm64_ventura: "6b982e872791e8a01725f6e1db1c488d9c77e321a0b6769568c503284bb4df1b"
12     sha256 cellar: :any,                 sonoma:        "f01d03e19a861f8bd0f0d98cfefed23d5c981ee985c7493c7db8c5d1cf2665b4"
13     sha256 cellar: :any,                 ventura:       "b0a904409d4bd3b97ec6462c54764284783d2ddf93b66ada941b997215c7abd5"
14     sha256 cellar: :any_skip_relocation, x86_64_linux:  "4a4b4183690c0a092452acce166b01db0e86c0fda649dae1b87ca8f5a2de206f"
15   end
17   head do
18     url "https://github.com/jonas/tig.git", branch: "master"
20     depends_on "asciidoc" => :build
21     depends_on "autoconf" => :build
22     depends_on "automake" => :build
23     depends_on "xmlto" => :build
24   end
26   depends_on "pkgconf" => :build
27   # https://github.com/jonas/tig/issues/1210
28   depends_on "ncurses"
29   depends_on "pcre2"
30   depends_on "readline"
32   def install
33     system "./autogen.sh" if build.head?
34     system "./configure", "--prefix=#{prefix}", "--sysconfdir=#{etc}"
35     system "make"
36     # Ensure the configured `sysconfdir` is used during runtime by
37     # installing in a separate step.
38     system "make", "install", "sysconfdir=#{pkgshare}/examples"
39     system "make", "install-doc-man"
40     bash_completion.install "contrib/tig-completion.bash"
41     zsh_completion.install "contrib/tig-completion.zsh" => "_tig"
42     cp "#{bash_completion}/tig-completion.bash", zsh_completion
43   end
45   def caveats
46     <<~EOS
47       A sample of the default configuration has been installed to:
48         #{opt_pkgshare}/examples/tigrc
49       to override the system-wide default configuration, copy the sample to:
50         #{etc}/tigrc
51     EOS
52   end
54   test do
55     assert_match version.to_s, shell_output("#{bin}/tig -v")
56   end
57 end