require 'formula' class NoBdb5 < Requirement satisfy(:build_env => false) { !Formula.factory("berkeley-db").installed? } def message; <<-EOS.undent This software can fail to compile when Berkeley-DB 5.x is installed. You may need to try: brew unlink berkeley-db brew install squid brew link berkeley-db EOS end end class Squid < Formula homepage 'http://www.squid-cache.org/' url 'http://www.squid-cache.org/Versions/v3/3.3/squid-3.3.5.tar.gz' sha1 '66210259645f50bd4af0f6aa4e871381c0bf35be' depends_on NoBdb5 def install # For --disable-eui, see: # http://squid-web-proxy-cache.1019090.n4.nabble.com/ERROR-ARP-MAC-EUI-operations-not-supported-on-this-operating-system-td4659335.html args =%W[ --disable-debug --disable-dependency-tracking --prefix=#{prefix} --localstatedir=#{var} --enable-ssl --enable-ssl-crtd --disable-eui --enable-ipfw-transparent ] system "./configure", *args system "make install" end def plist; <<-EOS.undent KeepAlive Label #{plist_name} ProgramArguments #{opt_prefix}/sbin/squid -N -d 1 -D RunAtLoad WorkingDirectory #{var} EOS end end