67 lines
1.8 KiB
Ruby
67 lines
1.8 KiB
Ruby
class Tmux < Formula
|
|
desc "Terminal multiplexer"
|
|
homepage "https://tmux.github.io/"
|
|
url "https://github.com/tmux/tmux/releases/download/3.1b/tmux-3.1b.tar.gz"
|
|
sha256 "d93f351d50af05a75fe6681085670c786d9504a5da2608e481c47cf5e1486db9"
|
|
|
|
bottle do
|
|
cellar :any
|
|
rebuild 1
|
|
sha256 "785c1b2e2518478621eb5ac894b3f0ed06d8fdc4d223dd476451ab26974e3803" => :catalina
|
|
sha256 "a8fb2df02c2e094404b6c56e2b9d15a35abd012913771ad311e08cc3572f0e4b" => :mojave
|
|
sha256 "5d43e03fc71740ec38c98b309adb2b6d198a20fcb14f76bc163232fda61fac23" => :high_sierra
|
|
end
|
|
|
|
head do
|
|
url "https://github.com/tmux/tmux.git"
|
|
|
|
depends_on "autoconf" => :build
|
|
depends_on "automake" => :build
|
|
depends_on "libtool" => :build
|
|
end
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on "libevent"
|
|
depends_on "ncurses"
|
|
|
|
# Old versions of macOS libc disagree with utf8proc character widths.
|
|
# https://github.com/tmux/tmux/issues/2223
|
|
depends_on "utf8proc" if MacOS.version >= :high_sierra
|
|
|
|
resource "completion" do
|
|
url "https://raw.githubusercontent.com/imomaliev/tmux-bash-completion/homebrew_1.0.0/completions/tmux"
|
|
sha256 "05e79fc1ecb27637dc9d6a52c315b8f207cf010cdcee9928805525076c9020ae"
|
|
end
|
|
|
|
def install
|
|
system "sh", "autogen.sh" if build.head?
|
|
|
|
args = %W[
|
|
--disable-dependency-tracking
|
|
--prefix=#{prefix}
|
|
--sysconfdir=#{etc}
|
|
]
|
|
|
|
args << "--enable-utf8proc" if MacOS.version >= :high_sierra
|
|
|
|
ENV.append "LDFLAGS", "-lresolv"
|
|
system "./configure", *args
|
|
|
|
system "make", "install"
|
|
|
|
pkgshare.install "example_tmux.conf"
|
|
bash_completion.install resource("completion")
|
|
end
|
|
|
|
def caveats
|
|
<<~EOS
|
|
Example configuration has been installed to:
|
|
#{opt_pkgshare}
|
|
EOS
|
|
end
|
|
|
|
test do
|
|
system "#{bin}/tmux", "-V"
|
|
end
|
|
end
|