diff options
| author | Adam Vandenberg | 2012-10-28 14:42:31 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2012-10-31 06:56:58 -0700 |
| commit | 76ede4ecd4558cfa0ca2a22778fb0b46d638574f (patch) | |
| tree | f9dcfc7e8ae170a41d039fa9d30e48474cb1a1c0 /Library/Formula | |
| parent | 18f811a14394c20c10dfe9aaf46be2d413275cc5 (diff) | |
| download | homebrew-76ede4ecd4558cfa0ca2a22778fb0b46d638574f.tar.bz2 | |
exim: build against bdb 4.x
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 |
