homebrew-core/Formula/mobile-shell.rb
ilovezfs 0117719e3c mobile-shell: remove in-formula clock_gettime workaround (#8352)
ac_cv_search_clock_gettime=no is now set by superenv for 10.11
2016-12-31 04:30:43 -08:00

47 lines
1.5 KiB
Ruby

class MobileShell < Formula
desc "Remote terminal application"
homepage "https://mosh.org"
url "https://mosh.org/mosh-1.2.6.tar.gz"
sha256 "7e82b7fbfcc698c70f5843bb960dadb8e7bd7ac1d4d2151c9d979372ea850e85"
revision 3
bottle do
sha256 "bc1a1ce96af199e577ee7eecd75688f43aaa6bddec09a7973c487f8d4233e60f" => :sierra
sha256 "73f0c2c60aae22d886f44421034fe1e43e2c643dba10913026d9f2935b3c0ddc" => :el_capitan
sha256 "0d4e77bc71d3413788995fc3029ae29df2789ef6eed7871862a823ffeee7f12d" => :yosemite
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 :perl => "5.14" if MacOS.version <= :mountain_lion
depends_on "tmux" => :build if build.with?("test") || build.bottle?
def install
# 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"
# Upstream prefers O2:
# https://github.com/keithw/mosh/blob/master/README.md
ENV.O2
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