aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/geoip.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula/geoip.rb')
-rw-r--r--Library/Formula/geoip.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/Library/Formula/geoip.rb b/Library/Formula/geoip.rb
index d0427474f..bf8c5f118 100644
--- a/Library/Formula/geoip.rb
+++ b/Library/Formula/geoip.rb
@@ -5,12 +5,25 @@ class Geoip < Formula
homepage 'http://www.maxmind.com/app/c'
md5 '05b7300435336231b556df5ab36f326d'
+ # These are needed for the autoreconf it always tries to run.
+ if MacOS.xcode_version.to_f >= 4.3
+ depends_on 'automake' => :build
+ depends_on 'libtool' => :build
+ end
+
def options
[["--universal", "Build a universal binary."]]
end
def install
ENV.universal_binary if ARGV.build_universal?
+
+ # Fixes a build error on Lion when configure does a variant of autoreconf
+ # that results in a botched Makefile, causing this error:
+ # No rule to make target '../libGeoIP/libGeoIP.la', needed by 'geoiplookup'
+ # This works on Snow Leopard also when it tries but fails to run autoreconf.
+ system "autoreconf", "-ivf"
+
system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking"
system "make install"
end