From 76ede4ecd4558cfa0ca2a22778fb0b46d638574f Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Sun, 28 Oct 2012 14:42:31 -0700 Subject: exim: build against bdb 4.x --- Library/Formula/exim.rb | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) (limited to 'Library/Formula') diff --git a/Library/Formula/exim.rb b/Library/Formula/exim.rb index 78035b026..b747258dc 100644 --- a/Library/Formula/exim.rb +++ b/Library/Formula/exim.rb @@ -1,20 +1,5 @@ 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 exim - brew link berkeley-db - EOS - end - def satisfied? - f = Formula.factory("berkeley-db") - not f.installed? - end -end - class Exim < Formula homepage 'http://exim.org' url 'http://ftp.exim.org/pub/exim/exim4/exim-4.80.1.tar.gz' @@ -23,7 +8,7 @@ class Exim < Formula option 'support-maildir', 'Support delivery in Maildir format' depends_on 'pcre' - depends_on NoBdb5.new + depends_on 'berkeley-db4' def install cp 'src/EDITME', 'Local/Makefile' @@ -44,8 +29,13 @@ class Exim < Formula s << "LOOKUP_LIBS=-L#{HOMEBREW_PREFIX}/lib\n" end + bdb4 = Formula.factory("berkeley-db4") + inreplace 'OS/Makefile-Darwin' do |s| s.remove_make_var! %w{CC CFLAGS} + # Add include and lib paths for BDB 4 + s.gsub! "# Exim: OS-specific make file for Darwin (Mac OS X).", "INCLUDE=-I${bdb4.include}" + s.gsub! "DBMLIB =", "DBMLIB=#{bdb4.lib}/libdb-4.dylib" end # The compile script ignores CPPFLAGS -- cgit v1.2.3