Skip to content

Commit 70a7141

Browse files
committed
git-workspace: update to use libgit2 1.9
Signed-off-by: Rui Chen <[email protected]>
1 parent 01eebec commit 70a7141

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Formula/g/git-workspace.rb

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ class GitWorkspace < Formula
44
url "https://github.com/orf/git-workspace/archive/refs/tags/v1.8.0.tar.gz"
55
sha256 "b6499b70362730dbe1674fd07bd9aefef0bcd45ba4504ed0cce62ef2c7ecad1f"
66
license "MIT"
7-
revision 1
7+
revision 2
88

99
bottle do
1010
sha256 cellar: :any, arm64_sequoia: "7e3014c3ae6e598214600ff258e9feff56f15c8e7c9adca97531b3b0da45f741"
@@ -17,9 +17,15 @@ class GitWorkspace < Formula
1717

1818
depends_on "pkgconf" => :build
1919
depends_on "rust" => :build
20-
depends_on "libgit2@1.8" # needs https://github.com/rust-lang/git2-rs/issues/1109 to support libgit2 1.9
20+
depends_on "libgit2"
2121
depends_on "openssl@3"
2222

23+
# patch to support libgit2 1.9, upstream pr ref, https://github.com/orf/git-workspace/pull/390
24+
patch do
25+
url "https://github.com/orf/git-workspace/commit/9250483b38f24ac60a025ddcd49b21f847d37b60.patch?full_index=1"
26+
sha256 "3d8201522021b5aacfb9b332c02ddac4c1ca409857cbe4acca226f229fd5ae8f"
27+
end
28+
2329
def install
2430
ENV["LIBGIT2_NO_VENDOR"] = "1"
2531
system "cargo", "install", *std_cargo_args
@@ -36,7 +42,7 @@ def install
3642
linkage_with_libgit2 = (bin/"git-workspace").dynamically_linked_libraries.any? do |dll|
3743
next false unless dll.start_with?(HOMEBREW_PREFIX.to_s)
3844

39-
File.realpath(dll) == (Formula["libgit2@1.8"].opt_lib/shared_library("libgit2")).realpath.to_s
45+
File.realpath(dll) == (Formula["libgit2"].opt_lib/shared_library("libgit2")).realpath.to_s
4046
end
4147

4248
assert linkage_with_libgit2, "No linkage with libgit2! Cargo is likely using a vendored version."

0 commit comments

Comments
 (0)