homebrew-core/Formula/squid.rb
edified@gmail.com 52f0e83bc0 squid: disable EUI
Added --disable-eui otherwise you get a bunch of
ERROR: ARP / MAC / EUI-* operations not supported on this operating system.

on OS X Server 10.8.3 and presumably others, reported for 10.6.8 here: http://squid-web-proxy-cache.1019090.n4.nabble.com/ERROR-ARP-MAC-EUI-operations-not-supported-on-this-operating-system-td4659335.html

Closes Homebrew/homebrew#19751.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-05-15 08:56:58 -07:00

64 lines
1.6 KiB
Ruby

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.2/squid-3.2.9.tar.gz'
sha1 'c1f5f8de4e622a1fe98e9f854507237fbae06be2'
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
]
system "./configure", *args
system "make install"
end
def plist; <<-EOS.undent
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>#{plist_name}</string>
<key>ProgramArguments</key>
<array>
<string>#{opt_prefix}/sbin/squid</string>
<string>-N</string>
<string>-d 1</string>
<string>-D</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>WorkingDirectory</key>
<string>#{var}</string>
</dict>
</plist>
EOS
end
end