class Mosh < Formula desc "Remote terminal application" homepage "https://mosh.org" url "https://mosh.org/mosh-1.3.2.tar.gz" sha256 "da600573dfa827d88ce114e0fed30210689381bbdcff543c931e4d6a2e851216" revision 3 bottle do sha256 "6d4442adae6a27f8b7a22d94eff88f34e8532428efa13147b337b7927aa12963" => :mojave sha256 "bc9e1b4d9ff55429b1ea74bd05beaf4ffad81b608430faba57754bc36844f4f6" => :high_sierra sha256 "895bc6be02f94d3a1ec72888c1041e0da6da043c8db0606e99400c5baa995443" => :sierra sha256 "cf167b6469d428c011fe9c00e1a488470895a9fdaed3e804b05adf8e6c280111" => :el_capitan end head do url "https://github.com/mobile-shell/mosh.git", :shallow => false depends_on "autoconf" => :build depends_on "automake" => :build end option "with-test", "Run build-time tests" deprecated_option "without-check" => "without-test" depends_on "pkg-config" => :build depends_on "protobuf" depends_on "tmux" => :build if build.with?("test") || build.bottle? needs :cxx11 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" if build.with?("test") || build.bottle? system "make", "install" end test do system bin/"mosh-client", "-c" end end