Merge pull request #207020 from Homebrew/bump-qpdf-11.10.0
[Homebrew/homebrew-core.git] / Formula / t / tmux-sessionizer.rb
blob7f113f3b67e9280273338a6fe8d1e1855ada038c
1 class TmuxSessionizer < Formula
2   desc "Tool for opening git repositories as tmux sessions"
3   homepage "https://github.com/jrmoulton/tmux-sessionizer/"
4   url "https://github.com/jrmoulton/tmux-sessionizer/archive/refs/tags/v0.4.4.tar.gz"
5   sha256 "9dfbe99a3c1fe7f48be0c1ab9056e49f36c4f85d023e24f874254f6791a9894e"
6   license "MIT"
7   revision 2
9   bottle do
10     sha256 cellar: :any,                 arm64_sequoia: "36296ed7973d20aa0bb90e6b500a0136ed4f367553608f2c4dd1ef658345523f"
11     sha256 cellar: :any,                 arm64_sonoma:  "53b15bddb62d79bde6f63a5cfc18910fee1e0c3f7201ee7c9dd1e0aab367ace9"
12     sha256 cellar: :any,                 arm64_ventura: "f0eadc021f990f7d2db80142244a4eb679aa1125984589e50b77b6d8a6d9c2a3"
13     sha256 cellar: :any,                 sonoma:        "10ee6f3d53591391cb711b5ed9876bc152a4bdaddb9488ab0bd27315f6c98fc5"
14     sha256 cellar: :any,                 ventura:       "9369b6cea10b3b085a0d92fd59dba3e9951ab319e378f1b4a47e02623b67a038"
15     sha256 cellar: :any_skip_relocation, x86_64_linux:  "e65235329ebce9f8e96e603c471bcab6b377234c6a90171b837fce670f617ecf"
16   end
18   depends_on "pkgconf" => :build
19   depends_on "rust" => :build
20   depends_on "libgit2"
21   depends_on "libssh2"
22   depends_on "openssl@3"
24   uses_from_macos "zlib"
26   # patch to use libgit2 1.9, upstream pr ref, https://github.com/jrmoulton/tmux-sessionizer/pull/144
27   patch :DATA
29   def install
30     # Ensure that the `openssl` crate picks up the intended library.
31     ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix
32     ENV["OPENSSL_NO_VENDOR"] = "1"
34     ENV["LIBGIT2_NO_VENDOR"] = "1"
35     ENV["LIBSSH2_SYS_USE_PKG_CONFIG"] = "1"
37     system "cargo", "install", *std_cargo_args
39     generate_completions_from_executable(bin/"tms", "--generate")
40   end
42   test do
43     require "utils/linkage"
45     assert_match "Configuration has been stored", shell_output("#{bin}/tms config -p /dev/null")
46     assert_match version.to_s, shell_output("#{bin}/tms --version")
48     [
49       Formula["libgit2"].opt_lib/shared_library("libgit2"),
50       Formula["libssh2"].opt_lib/shared_library("libssh2"),
51       Formula["openssl@3"].opt_lib/shared_library("libssl"),
52       Formula["openssl@3"].opt_lib/shared_library("libcrypto"),
53     ].each do |library|
54       assert Utils.binary_linked_to_library?(bin/"tms", library),
55              "No linkage with #{library.basename}! Cargo is likely using a vendored version."
56     end
57   end
58 end
60 __END__
61 diff --git a/Cargo.lock b/Cargo.lock
62 index 2274afd..18ec520 100644
63 --- a/Cargo.lock
64 +++ b/Cargo.lock
65 @@ -1,6 +1,6 @@
66  # This file is automatically @generated by Cargo.
67  # It is not intended for manual editing.
68 -version = 3
69 +version = 4
71  [[package]]
72  name = "aho-corasick"
73 @@ -392,9 +392,9 @@ dependencies = [
75  [[package]]
76  name = "git2"
77 -version = "0.19.0"
78 +version = "0.20.0"
79  source = "registry+https://github.com/rust-lang/crates.io-index"
80 -checksum = "b903b73e45dc0c6c596f2d37eccece7c1c8bb6e4407b001096387c63d0d93724"
81 +checksum = "3fda788993cc341f69012feba8bf45c0ba4f3291fcc08e214b4d5a7332d88aff"
82  dependencies = [
83   "bitflags",
84   "libc",
85 @@ -496,9 +496,9 @@ checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1"
87  [[package]]
88  name = "libgit2-sys"
89 -version = "0.17.0+1.8.1"
90 +version = "0.18.0+1.9.0"
91  source = "registry+https://github.com/rust-lang/crates.io-index"
92 -checksum = "10472326a8a6477c3c20a64547b0059e4b0d086869eee31e6d7da728a8eb7224"
93 +checksum = "e1a117465e7e1597e8febea8bb0c410f1c7fb93b1e1cddf34363f8390367ffec"
94  dependencies = [
95   "cc",
96   "libc",
97 diff --git a/Cargo.toml b/Cargo.toml
98 index d1ebcd4..bbf59e3 100644
99 --- a/Cargo.toml
100 +++ b/Cargo.toml
101 @@ -17,7 +17,7 @@ exclude = ["images/*"]
103  [dependencies]
105 -git2 = { version= "0.19", features = [ "vendored-openssl" ] }
106 +git2 = { version= "0.20", features = [ "vendored-openssl" ] }
107  clap = { version = "4.5", features = ["cargo", "derive"] }
108  serde_derive = "1.0"
109  serde = "1.0"