class Memcached < Formula desc "High performance, distributed memory object caching system" homepage "https://memcached.org/" url "https://www.memcached.org/files/memcached-1.4.34.tar.gz" sha256 "5064c87f91a37d822dfeab8768490c55fe686a742f07f67c7121101e48d87c79" bottle do cellar :any sha256 "33401132b315c880aad55bf32425ea899d73c9f1f5c5b6497228b077d74159f9" => :sierra sha256 "05fce3b42333e971374b0a62db3c4ff693a618815c47fafed6b3911b07730ef5" => :el_capitan sha256 "13ab24869c5517dae4c9c5acbdf8e18630cff37814ad45906c2f880c0a4b5a78" => :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