aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authornibbles 2bits2012-04-02 18:55:58 -0700
committerJack Nagel2012-04-03 16:06:47 -0500
commit1eaa107520d03a3b3080bcda2f4b9248c951871a (patch)
tree5510a0d974c3d403c31e685c38a2c8210a174b82 /Library/Formula
parent89b562ef0bf483229450c96d8522f7c2f728dde1 (diff)
downloadhomebrew-1eaa107520d03a3b3080bcda2f4b9248c951871a.tar.bz2
geoip: fix compile error using deps + autoreconf
geoip-1.4.8 always calls a form of autoreconf after configure, then reruns configure. This causes a build error on Lion when it crafts a broken Makefile that is missing the rule to make the target `../libGeoIP/libGeoIP.a`. * Add deps on autoconf, automake, and libtool if XCode >= 4.3. * Add a command to run `autoreconf -ivf` before configure, which works on Lion and SL. Previously, the autoreconf on SL would fail to work because it tries to use shell `--missing` versions. Both the universal and native builds compile and pass make check using all five compilers from XCode-4.3.2 and 4.0.2, on both Lion and 64bit Snow Leopard. Fixes #11402. Closes #11405. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Formula')
-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