class Memcached < Formula desc "High performance, distributed memory object caching system" homepage "https://memcached.org/" url "https://www.memcached.org/files/memcached-1.4.36.tar.gz" sha256 "773b6bb20bf80223ca6a15d75f570fbab346ad11ec98595e5af5e33f54bd82d8" bottle do cellar :any sha256 "bdd0aa093595f71eb60f5d80d2db4cf1c648695f5ba5244671a77450cd69f20c" => :sierra sha256 "1cfff2115f1a6c8336e5575d0512d6ea03178720a3e57967cc02ba07675b0b5e" => :el_capitan sha256 "12d6c28f78cae0b7ca22dfabe35d631489430b48560cb3bd71c123b2842b3928" => :yosemite end option "with-sasl", "Enable SASL support -- disables ASCII protocol!" option "with-sasl-pwdb", "Enable SASL with memcached's own plain text password db support -- disables ASCII protocol!" depends_on "libevent" deprecated_option "enable-sasl" => "with-sasl" deprecated_option "enable-sasl-pwdb" => "with-sasl-pwdb" conflicts_with "mysql-cluster", :because => "both install `bin/memcached`" def install args = ["--prefix=#{prefix}", "--disable-coverage"] args << "--enable-sasl" if build.with? "sasl" args << "--enable-sasl-pwdb" if build.with? "sasl-pwdb" system "./configure", *args system "make", "install" end plist_options :manual => "#{HOMEBREW_PREFIX}/opt/memcached/bin/memcached" def plist; <<-EOS.undent Label #{plist_name} KeepAlive ProgramArguments #{opt_bin}/memcached -l localhost RunAtLoad WorkingDirectory #{HOMEBREW_PREFIX} EOS end test do system "#{bin}/memcached", "-h" end end