aboutsummaryrefslogtreecommitdiffstats
path: root/www/mod_geoip
diff options
context:
space:
mode:
authorseanc <seanc@FreeBSD.org>2003-05-20 06:11:33 +0800
committerseanc <seanc@FreeBSD.org>2003-05-20 06:11:33 +0800
commitf136826fc88c221daf956fc957ad6d5657514c09 (patch)
treebc14036e7770a097ff173e7308eaeee01478a30e /www/mod_geoip
parent689685b3eab81328ab57cfc91f812cd248241bd3 (diff)
downloadfreebsd-ports-gnome-f136826fc88c221daf956fc957ad6d5657514c09.tar.gz
freebsd-ports-gnome-f136826fc88c221daf956fc957ad6d5657514c09.tar.zst
freebsd-ports-gnome-f136826fc88c221daf956fc957ad6d5657514c09.zip
Fix mod_geoip with recent GeoIP.
Submitted by: kris/bento, Lew Payne <lew@clickbank.com>
Diffstat (limited to 'www/mod_geoip')
-rw-r--r--www/mod_geoip/Makefile4
-rw-r--r--www/mod_geoip/files/patch-mod_geoip.c41
2 files changed, 41 insertions, 4 deletions
diff --git a/www/mod_geoip/Makefile b/www/mod_geoip/Makefile
index 50abbe5228b2..70b86956c8ff 100644
--- a/www/mod_geoip/Makefile
+++ b/www/mod_geoip/Makefile
@@ -21,10 +21,6 @@ LIB_DEPENDS= GeoIP.3:${PORTSDIR}/net/GeoIP
.include <bsd.port.pre.mk>
-.if ${OSVERSION} >= 500113
-BROKEN= "Does not compile"
-.endif
-
APXS?= ${LOCALBASE}/sbin/apxs
APACHE_PORT?= ${PORTSDIR}/www/apache13
diff --git a/www/mod_geoip/files/patch-mod_geoip.c b/www/mod_geoip/files/patch-mod_geoip.c
new file mode 100644
index 000000000000..f3e959fc623e
--- /dev/null
+++ b/www/mod_geoip/files/patch-mod_geoip.c
@@ -0,0 +1,41 @@
+--- mod_geoip.c.orig Mon May 19 15:03:19 2003
++++ mod_geoip.c Mon May 19 15:08:36 2003
+@@ -209,7 +209,8 @@
+ }
+
+ databaseType = GeoIP_database_edition(cfg->gip);
+- if (databaseType == GEOIP_COUNTRY_EDITION) {
++ switch (databaseType) {
++ case GEOIP_COUNTRY_EDITION:
+ country_id = GeoIP_country_id_by_addr(cfg->gip, ipaddr);
+
+ if (country_id > 0) {
+@@ -224,7 +225,8 @@
+ ap_table_set(r->subprocess_env, "GEOIP_COUNTRY_NAME", country_name);
+ }
+ }
+- } else if (databaseType == GEOIP_REGION_EDITION) {
++ break;
++ case GEOIP_REGION_EDITION:
+ giregion = GeoIP_region_by_name (cfg->gip, ipaddr);
+ if (giregion != NULL) {
+ if (cfg->GeoIPOutput & GEOIP_NOTES) {
+@@ -241,7 +243,9 @@
+ }
+ GeoIPRegion_delete(giregion);
+ }
+- } else if (databaseType == GEOIP_CITY_EDITION) {
++ break;
++ case GEOIP_CITY_EDITION_REV0:
++ case GEOIP_CITY_EDITION_REV1:
+ gir = GeoIP_record_by_addr(cfg->gip, ipaddr);
+ if (gir != NULL) {
+ if (cfg->GeoIPOutput & GEOIP_NOTES) {
+@@ -261,6 +265,7 @@
+ ap_table_set(r->subprocess_env, "GEOIP_CITY", gir->city);
+ }
+ }
++ break;
+ }
+ return OK;
+ }