aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/squid.rb
diff options
context:
space:
mode:
authorAdam Vandenberg2012-03-20 20:46:55 -0700
committerAdam Vandenberg2012-03-20 20:47:56 -0700
commit45f31c82926ab25eec5a7c85896f336cdd5ff625 (patch)
treeeebfd0bfe7793ceab9b65934f72e98e83e5374f6 /Library/Formula/squid.rb
parent68a17b82eca055273db591fe3081bf826c13a9f6 (diff)
downloadhomebrew-45f31c82926ab25eec5a7c85896f336cdd5ff625.tar.bz2
Squid: warn if bdb 5.x is installed
Diffstat (limited to 'Library/Formula/squid.rb')
-rw-r--r--Library/Formula/squid.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/Library/Formula/squid.rb b/Library/Formula/squid.rb
index f3eee0ba6..d65d83a9c 100644
--- a/Library/Formula/squid.rb
+++ b/Library/Formula/squid.rb
@@ -1,10 +1,27 @@
require 'formula'
+class NoBdb5 < Requirement
+ 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 dsniff
+ brew link berkeley-db
+ EOS
+ end
+ def satisfied?
+ f = Formula.factory("berkeley-db")
+ not f.installed?
+ end
+end
+
class Squid < Formula
url 'http://www.squid-cache.org/Versions/v3/3.1/squid-3.1.9.tar.bz2'
homepage 'http://www.squid-cache.org/'
md5 '896ace723445ac168986ba8854437ce3'
+ depends_on NoBdb5.new
+
def install
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}",