diff options
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/exim.rb | 22 |
1 files changed, 6 insertions, 16 deletions
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 |
