summaryrefslogtreecommitdiff
path: root/macosx-setup.sh
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-04-13 14:46:08 -0700
committerGuy Harris <guy@alum.mit.edu>2017-04-13 21:48:07 +0000
commit3fefb191680e55294bc4d1f45f541b15c8df2ae0 (patch)
treee4dabcb8e23d289ce149cb7b961ba5a0fe664ef1 /macosx-setup.sh
parent3f71262bb1e7dd0b0fe062b6ec20f2cb2291255a (diff)
downloadwireshark-3fefb191680e55294bc4d1f45f541b15c8df2ae0.tar.gz
Update to GeoIP 1.6.10.
That's the most recent version of the GeoIP legacy API. GeoIP 1.6.1, and later, are available from GitHub, but not from MaxMind's Web site. Change-Id: I67b1b5b47761beac2fc303e18e39d9accac86e3b Reviewed-on: https://code.wireshark.org/review/21081 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'macosx-setup.sh')
-rwxr-xr-xmacosx-setup.sh22
1 files changed, 15 insertions, 7 deletions
diff --git a/macosx-setup.sh b/macosx-setup.sh
index 5b3234e4c7..e3302fd3ef 100755
--- a/macosx-setup.sh
+++ b/macosx-setup.sh
@@ -138,12 +138,7 @@ PORTAUDIO_VERSION=pa_stable_v19_20111121
SNAPPY_VERSION=1.1.3
LZ4_VERSION=r131
SBC_VERSION=1.3
-#
-# XXX - they appear to have an unversioned gzipped tarball for the
-# current version; should we just download that, with some other
-# way of specifying whether to download the GeoIP API?
-#
-GEOIP_VERSION=1.4.8
+GEOIP_VERSION=1.6.10
CARES_VERSION=1.12.0
@@ -1467,7 +1462,20 @@ uninstall_portaudio() {
install_geoip() {
if [ "$GEOIP_VERSION" -a ! -f geoip-$GEOIP_VERSION-done ] ; then
echo "Downloading, building, and installing GeoIP API:"
- [ -f GeoIP-$GEOIP_VERSION.tar.gz ] || curl -L -O http://geolite.maxmind.com/download/geoip/api/c/GeoIP-$GEOIP_VERSION.tar.gz || exit 1
+ GEOIP_MAJOR_VERSION="`expr $GEOIP_VERSION : '\([0-9][0-9]*\).*'`"
+ GEOIP_MINOR_VERSION="`expr $GEOIP_VERSION : '[0-9][0-9]*\.\([0-9][0-9]*\).*'`"
+ GEOIP_DOTDOT_VERSION="`expr $GEOIP_VERSION : '[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\).*'`"
+ if [[ $GEOIP_MAJOR_VERSION -gt 1 ||
+ $GEOIP_MINOR_VERSION -gt 6 ||
+ ($GEOIP_MINOR_VERSION -eq 6 && $GEOIP_DOTDOT_VERSION -ge 1) ]]
+ then
+ #
+ # Starting with GeoIP 1.6.1, the tarballs are on GitHub.
+ #
+ [ -f GeoIP-$GEOIP_VERSION.tar.gz ] || curl -L -O https://github.com/maxmind/geoip-api-c/releases/download/v$GEOIP_VERSION/GeoIP-$GEOIP_VERSION.tar.gz || exit 1
+ else
+ [ -f GeoIP-$GEOIP_VERSION.tar.gz ] || curl -L -O http://geolite.maxmind.com/download/geoip/api/c/GeoIP-$GEOIP_VERSION.tar.gz || exit 1
+ fi
gzcat GeoIP-$GEOIP_VERSION.tar.gz | tar xf - || exit 1
cd GeoIP-$GEOIP_VERSION
CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" CXXFLAGS="$CXXFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1