homebrew-core/Formula/git-gui.rb

56 lines
1.7 KiB
Ruby

class GitGui < Formula
desc "Tcl/Tk UI for the git revision control system"
homepage "https://git-scm.com"
url "https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.39.0.tar.xz"
sha256 "ba199b13fb5a99ca3dec917b0bd736bc0eb5a9df87737d435eddfdf10d69265b"
license "GPL-2.0-only"
head "https://github.com/git/git.git", branch: "master"
livecheck do
formula "git"
end
bottle do
sha256 cellar: :any_skip_relocation, all: "e899c51b75544d766209f3e5fb01f4db7104cd969249c43e7c96a96fdd9ddeaa"
end
depends_on "tcl-tk"
# Patch to fix Homebrew/homebrew-core#68798.
# Remove when the following PR has been merged
# and included in a release:
# https://github.com/git/git/pull/944
patch do
url "https://github.com/git/git/commit/1db62e44b7ec93b6654271ef34065b31496cd02e.patch?full_index=1"
sha256 "0c7816ee9c8ddd7aa38aa29541c9138997650713bce67bdef501b1de0b50f539"
end
def install
# build verbosely
ENV["V"] = "1"
# By setting TKFRAMEWORK to a non-existent directory we ensure that
# the git makefiles don't install a .app for git-gui
# We also tell git to use the homebrew-installed wish binary from tcl-tk.
# See https://github.com/Homebrew/homebrew-core/issues/36390
tcl_bin = Formula["tcl-tk"].opt_bin
args = %W[
TKFRAMEWORK=/dev/null
prefix=#{prefix}
gitexecdir=#{bin}
sysconfdir=#{etc}
CC=#{ENV.cc}
CFLAGS=#{ENV.cflags}
LDFLAGS=#{ENV.ldflags}
TCL_PATH=#{tcl_bin}/tclsh
TCLTK_PATH=#{tcl_bin}/wish
]
system "make", "-C", "git-gui", "install", *args
system "make", "-C", "gitk-git", "install", *args
end
test do
system bin/"git-gui", "--version"
end
end