48 lines
1.4 KiB
Ruby
48 lines
1.4 KiB
Ruby
class Mosh < Formula
|
|
desc "Remote terminal application"
|
|
homepage "https://mosh.org"
|
|
url "https://mosh.org/mosh-1.3.2.tar.gz"
|
|
sha256 "da600573dfa827d88ce114e0fed30210689381bbdcff543c931e4d6a2e851216"
|
|
revision 7
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "269ffd3e40e7ab0dcbd395efa77978c4131948a583b1d4902d466d1758573338" => :mojave
|
|
sha256 "ccda87110067c1cbc49f9b30f48cd3c1cfa0e5262a799f2bafe5ce42f736dbc9" => :high_sierra
|
|
sha256 "26d38ffc1b21888d31db472f41771884fd0160a7116b746add2503f8fe24ec0a" => :sierra
|
|
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 "protobuf@3.7"
|
|
|
|
# Fix mojave build.
|
|
patch do
|
|
url "https://github.com/mobile-shell/mosh/commit/e5f8a826ef9ff5da4cfce3bb8151f9526ec19db0.patch?full_index=1"
|
|
sha256 "022bf82de1179b2ceb7dc6ae7b922961dfacd52fbccc30472c527cb7c87c96f0"
|
|
end
|
|
|
|
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", "check"
|
|
system "make", "install"
|
|
end
|
|
|
|
test do
|
|
system bin/"mosh-client", "-c"
|
|
end
|
|
end
|