summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'www-apache')
-rw-r--r--www-apache/mod_geoip2/ChangeLog10
-rw-r--r--www-apache/mod_geoip2/files/mod_geoip2-1.2.7-httpd24.patch35
-rw-r--r--www-apache/mod_geoip2/mod_geoip2-1.2.7-r1.ebuild36
3 files changed, 79 insertions, 2 deletions
diff --git a/www-apache/mod_geoip2/ChangeLog b/www-apache/mod_geoip2/ChangeLog
index 7da66e71766c..65ba02bc6fa3 100644
--- a/www-apache/mod_geoip2/ChangeLog
+++ b/www-apache/mod_geoip2/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for www-apache/mod_geoip2
-# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_geoip2/ChangeLog,v 1.3 2012/11/27 19:19:04 pacho Exp $
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_geoip2/ChangeLog,v 1.4 2013/01/03 19:15:55 pacho Exp $
+
+*mod_geoip2-1.2.7-r1 (03 Jan 2013)
+
+ 03 Jan 2013; Pacho Ramos <pacho@gentoo.org>
+ +files/mod_geoip2-1.2.7-httpd24.patch, +mod_geoip2-1.2.7-r1.ebuild:
+ Apply fedora patch to fix apache 2.4 compat
27 Nov 2012; Pacho Ramos <pacho@gentoo.org> metadata.xml:
Drop apache herd as discussed in http://www.gossamer-
diff --git a/www-apache/mod_geoip2/files/mod_geoip2-1.2.7-httpd24.patch b/www-apache/mod_geoip2/files/mod_geoip2-1.2.7-httpd24.patch
new file mode 100644
index 000000000000..563e35b1137e
--- /dev/null
+++ b/www-apache/mod_geoip2/files/mod_geoip2-1.2.7-httpd24.patch
@@ -0,0 +1,35 @@
+--- mod_geoip.c.geoip
++++ mod_geoip.c
+@@ -66,6 +66,7 @@
+ #include "http_config.h"
+ #include "http_protocol.h"
+ #include "http_log.h"
++#include "util_script.h"
+ #include "ap_config.h"
+ #include "apr_strings.h"
+ #include <GeoIP.h>
+@@ -320,7 +321,11 @@
+ return DECLINED;
+
+ if (!cfg->scanProxyHeaders) {
++#if AP_MODULE_MAGIC_AT_LEAST(20111130,0)
++ ipaddr = r->useragent_ip;
++#else
+ ipaddr = r->connection->remote_ip;
++#endif
+ }
+ else {
+ ap_add_common_vars(r);
+@@ -338,7 +343,11 @@
+ }
+ if (!ipaddr_ptr) {
+ ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, 0, r->server, "[mod_geoip]: Error while getting ipaddr from proxy headers. Using REMOTE_ADDR.");
+- ipaddr = r->connection->remote_ip;
++#if AP_MODULE_MAGIC_AT_LEAST(20111130,0)
++ ipaddr = r->useragent_ip;
++#else
++ ipaddr = r->connection->remote_ip;
++#endif
+ }
+ else {
+ ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, 0, r->server, "[mod_geoip]: IPADDR_PTR: %s", ipaddr_ptr);
diff --git a/www-apache/mod_geoip2/mod_geoip2-1.2.7-r1.ebuild b/www-apache/mod_geoip2/mod_geoip2-1.2.7-r1.ebuild
new file mode 100644
index 000000000000..846517c8140f
--- /dev/null
+++ b/www-apache/mod_geoip2/mod_geoip2-1.2.7-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_geoip2/mod_geoip2-1.2.7-r1.ebuild,v 1.1 2013/01/03 19:15:55 pacho Exp $
+
+inherit apache-module eutils
+
+MY_P="${PN}_${PV}"
+MY_PN="${PN/2}"
+
+DESCRIPTION="Apache 2.x module for finding the country and city
+that a web request originated from"
+HOMEPAGE="http://www.maxmind.com/app/mod_geoip"
+SRC_URI="http://geolite.maxmind.com/download/geoip/api/mod_geoip2/${MY_P}.tar.gz"
+LICENSE="Apache-1.1"
+
+KEYWORDS="~x86 ~amd64"
+IUSE=""
+SLOT="0"
+
+DEPEND=">=dev-libs/geoip-1.4.8"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+# See apache-module.eclass for more information.
+APACHE2_MOD_CONF="30_${PN}"
+APACHE2_MOD_FILE="${S}/.libs/${MY_PN}.so"
+APXS2_ARGS="-l GeoIP -c ${MY_PN}.c"
+DOCFILES="INSTALL README README.php Changes"
+
+need_apache2
+
+src_unpack() {
+ unpack ${A} && cd "${S}"
+ epatch "${FILESDIR}/${P}-httpd24.patch"
+}