homebrew-core/Formula/mosh.rb

56 lines
1.7 KiB
Ruby

class Mosh < Formula
desc "Remote terminal application"
homepage "https://mosh.org"
license "GPL-3.0"
revision 15
stable do
url "https://mosh.org/mosh-1.3.2.tar.gz"
sha256 "da600573dfa827d88ce114e0fed30210689381bbdcff543c931e4d6a2e851216"
# Fix mojave build.
patch do
url "https://github.com/mobile-shell/mosh/commit/e5f8a826ef9ff5da4cfce3bb8151f9526ec19db0.patch?full_index=1"
sha256 "022bf82de1179b2ceb7dc6ae7b922961dfacd52fbccc30472c527cb7c87c96f0"
end
end
bottle do
sha256 cellar: :any, arm64_big_sur: "8714105f4d1a6e178b6f274f77c18f8b0989ccfb15c2dd654681ab76cf8fc4d6"
sha256 cellar: :any, big_sur: "32bdfeba5c00b7165fb9cac9482032d7584ea48794a51e61274991e61ec2fab4"
sha256 cellar: :any, catalina: "8bad7be2124a23ab6580868d326ec4bad177e175dd03bfa025c95ab335c83920"
sha256 cellar: :any, mojave: "18e66b8004547f8e6b7219f71c963cf847267398613fec6ab986a4e8f97f6dc5"
end
head do
url "https://github.com/mobile-shell/mosh.git", shallow: false
depends_on "autoconf" => :build
depends_on "automake" => :build
end
depends_on "pkg-config" => :build
depends_on "tmux" => :build
depends_on "openssl@1.1"
depends_on "protobuf"
uses_from_macos "ncurses"
uses_from_macos "zlib"
def install
ENV.cxx11
# teach mosh to locate mosh-client without referring
# PATH to support launching outside shell e.g. via launcher
inreplace "scripts/mosh.pl", "'mosh-client", "\'#{bin}/mosh-client"
system "./autogen.sh" if build.head?
system "./configure", "--prefix=#{prefix}", "--enable-completion"
system "make", "install"
end
test do
system bin/"mosh-client", "-c"
end
end