Skip to content

Commit

Permalink
Merge pull request #202110 from Homebrew/prr-libgit2
Browse files Browse the repository at this point in the history
prr: add libgit2 1.8 support patch
  • Loading branch information
BrewTestBot authored Dec 22, 2024
2 parents 98a1606 + fc702fa commit b1b2b0e
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions Formula/p/prr.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,38 @@ class Prr < Formula
url "https://github.com/danobi/prr/archive/refs/tags/v0.19.0.tar.gz"
sha256 "76d101fefe42456d0c18a64e6f57b9d3a84baaecaf1e3a5e94b93657a6773c11"
license "GPL-2.0-only"
revision 1
head "https://github.com/danobi/prr.git", branch: "master"

bottle do
sha256 cellar: :any, arm64_sequoia: "2d51ff33fe7be93b0e1c9d1ec9d5b86792d68c59cf1bd43fb61a8cdf88a4391b"
sha256 cellar: :any, arm64_sonoma: "5a217d0b50c1169f3526faf7c04c8d871cb2795097234635de65aab5287d126f"
sha256 cellar: :any, arm64_ventura: "00fbe685b7669440fd8752c4622a125646196a35ac4fd6b13f5b289e5785b1e8"
sha256 cellar: :any, sonoma: "7818bb0712e26930334fb9777ad7cd295092c3f7f3cbd77ffaf0ef0033940877"
sha256 cellar: :any, ventura: "d2c4c34d50b30f461ae9ffd77515b750499fafe62b66e0efee1ea2d33a8c78ab"
sha256 cellar: :any_skip_relocation, x86_64_linux: "867d5a7dee57560d17126ff0892654a8a55e7a26036d17bfedbf0e5bdc1070fb"
sha256 cellar: :any, arm64_sequoia: "f634382fcb02db3ba4d30894e994117cd8a38ebbd8c59bd19caa86e865a38e65"
sha256 cellar: :any, arm64_sonoma: "7e64bdd9af0fa0502337cec76811263226351e59859b91011d3cafee34a0bbcc"
sha256 cellar: :any, arm64_ventura: "f1eb7e059742c7150f6233c07251ef1919f46b2bd19ca9189233b85616849419"
sha256 cellar: :any, sonoma: "4aee5a6c4ba227554e7d2a1fe8ed25b3d9eb1969f3456f1d3e575410dbcb1dc3"
sha256 cellar: :any, ventura: "dc6bfa37161a2fc3764ceddd17af3f78a67e879ec3bbc27480fd281f207f5025"
sha256 cellar: :any_skip_relocation, x86_64_linux: "9932fc8ab7379376270cd927e2aa981c080ddcaf105672ddf64a4ceb54bc9142"
end

depends_on "pkgconf" => :build
depends_on "rust" => :build
depends_on "libgit2@1.7"
depends_on "libgit2"
depends_on "openssl@3"

uses_from_macos "zlib"

# support libgit2 1.8, upstream pr ref, https://github.com/MitMaro/git-interactive-rebase-tool/pull/948
patch do
url "https://github.com/danobi/prr/commit/c860f3d29c3607b10885e6526bea4cfd242815b5.patch?full_index=1"
sha256 "208bbbdf4358f98c01b567146d0da2d1717caa53e4d2e5ea55ae29f5adaaaae2"
end

def install
ENV["LIBGIT2_NO_VENDOR"] = "1"
# Ensure the declared `openssl@3` dependency will be picked up.
# https://docs.rs/openssl/latest/openssl/#manual
ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix
ENV["OPENSSL_NO_VENDOR"] = "1"

ENV["LIBGIT2_NO_VENDOR"] = "1"
system "cargo", "install", *std_cargo_args
end

Expand All @@ -44,7 +51,7 @@ def check_binary_linkage(binary, library)
assert_match "Failed to read config", shell_output("#{bin}/prr get Homebrew/homebrew-core/6 2>&1", 1)

[
Formula["libgit2@1.7"].opt_lib/shared_library("libgit2"),
Formula["libgit2"].opt_lib/shared_library("libgit2"),
Formula["openssl@3"].opt_lib/shared_library("libssl"),
Formula["openssl@3"].opt_lib/shared_library("libcrypto"),
].each do |library|
Expand Down

0 comments on commit b1b2b0e

Please sign in to comment.