summaryrefslogtreecommitdiffstats
path: root/www/webalizer
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2005-09-04 15:46:50 +0000
committerdinoex <dinoex@FreeBSD.org>2005-09-04 15:46:50 +0000
commita528dd8634c69a78914943de834a87961d57f2fe (patch)
tree0c37861f183082cab701ac38b618d64fa9cf18d5 /www/webalizer
parent5eb85bfe97c2537b1cafef7f16ba493f00c96fe2 (diff)
downloadFreeBSD-ports-a528dd8634c69a78914943de834a87961d57f2fe.zip
FreeBSD-ports-a528dd8634c69a78914943de834a87961d57f2fe.tar.gz
- add geolizer patches
(merge from www/geolizer) Suggested by: Steve Clement, David Raison Reviewed by: Andrey Chernov
Diffstat (limited to 'www/webalizer')
-rw-r--r--www/webalizer/Makefile37
-rw-r--r--www/webalizer/distinfo2
-rw-r--r--www/webalizer/files/linklist.geo.patch18
-rw-r--r--www/webalizer/files/linklist.patch18
-rw-r--r--www/webalizer/files/output.geo.patch11
-rw-r--r--www/webalizer/files/output.patch11
-rw-r--r--www/webalizer/files/patch-ad9
-rw-r--r--www/webalizer/files/patch-linklist18
-rw-r--r--www/webalizer/pkg-plist3
9 files changed, 98 insertions, 29 deletions
diff --git a/www/webalizer/Makefile b/www/webalizer/Makefile
index 7d773bd..3cc38d5 100644
--- a/www/webalizer/Makefile
+++ b/www/webalizer/Makefile
@@ -9,9 +9,12 @@ PORTNAME= webalizer
PORTVERSION= 2.1.10
PORTREVISION= 5
CATEGORIES+= www
-MASTER_SITES= ftp://ftp.mrunix.net/pub/webalizer/ \
- ftp://ftp.dinoex.de/pub/FreeBSD/distfiles/
+MASTER_SITES= ftp://ftp.mrunix.net/pub/webalizer/:main \
+ ftp://ftp.dinoex.de/pub/FreeBSD/distfiles/:main \
+ http://sysd.org/proj/:geo
+PKGNAMESUFFIX?= ${WEBALIZER_SUFFIX}${PKGNAMESUFFIX2}
DISTNAME= ${PORTNAME}-2.01-10-src
+DISTFILES= ${DISTNAME}.tar.bz2:main
MAINTAINER?= dinoex@FreeBSD.org
COMMENT= A web server log file analysis program
@@ -19,6 +22,9 @@ COMMENT= A web server log file analysis program
.if !defined(LIB_DEPENDS)
LIB_DEPENDS= gd.4:${PORTSDIR}/${GD_PORT}
.endif
+.if defined(WITH_GEOIP)
+LIB_DEPENDS+= GeoIP.4:${PORTSDIR}/net/GeoIP
+.endif
USE_BZIP2= yes
GNU_CONFIGURE= yes
@@ -28,6 +34,25 @@ GD_PORT?= graphics/gd
CONFLICTS= geolizer-2*
+.if defined(WITH_GEOIP) || make(makesum) || defined(FETCH_ALL)
+DISTFILES+= geolizer_2.01-10-patch.20050520.tar.bz2:geo
+.endif
+
+.if defined(WITH_GEOIP)
+WEBALIZER_SUFFIX= -geoip
+CONFLICTS+= ${PKGNAMEPREFIX}webalizer-2*
+EXTRA_PATCHES+= ${WRKDIR}/geolizer_2.01-10-patch/geolizer.patch
+EXTRA_PATCHES+= ${FILESDIR}/output.geo.patch
+EXTRA_PATCHES+= ${FILESDIR}/linklist.geo.patch
+PATCH_STRIP= -p1
+PLIST_SUB+= WITH_GEOIP=""
+.else
+CONFLICTS+= ${PKGNAMEPREFIX}webalizer-geoip-2*
+EXTRA_PATCHES+= ${FILESDIR}/output.patch
+EXTRA_PATCHES+= ${FILESDIR}/linklist.patch
+PLIST_SUB+= WITH_GEOIP="@comment "
+.endif
+
.if defined(BATCH)
# no cosmetique spaces allowed
WEBALIZER_LANG?=english
@@ -45,6 +70,7 @@ MAKE_ARGS+= CFLAGS="${CFLAGS}"
MAN1= ${PKGNAMEPREFIX}webalizer.1
DOC1= CHANGES Copyright INSTALL \
README README.FIRST DNS.README country-codes.txt
+DOC2= INSTALL GeoIP.README
WRKSRC= ${WRKDIR}/${DISTNAME:S/-src$//}
PLIST_SUB+= PKGNAMEPREFIX=${PKGNAMEPREFIX}
SUPP_LANG= catalan chinese croatian czech danish dutch english \
@@ -109,6 +135,13 @@ post-install:
.for i in msfree.png sample.conf webalizer.png
@${INSTALL_DATA} ${WRKSRC}/${i} ${EXAMPLESDIR}/${i}
.endfor
+.if defined(WITH_GEOIP)
+ ${MKDIR} ${DOCSDIR}/geolizer
+.for i in ${DOC2}
+ @${INSTALL_DATA} ${WRKDIR}/geolizer_2.01-10-patch/${i} \
+ ${DOCSDIR}/geolizer/${i}
+.endfor
+.endif
.endif
.include <bsd.port.post.mk>
diff --git a/www/webalizer/distinfo b/www/webalizer/distinfo
index eb37018..d1aa8de 100644
--- a/www/webalizer/distinfo
+++ b/www/webalizer/distinfo
@@ -1,2 +1,4 @@
MD5 (webalizer-2.01-10-src.tar.bz2) = 26d0a3c142423678daed2d6f579525d8
SIZE (webalizer-2.01-10-src.tar.bz2) = 252664
+MD5 (geolizer_2.01-10-patch.20050520.tar.bz2) = 570bf2717be8981678dc9b4af2d321fb
+SIZE (geolizer_2.01-10-patch.20050520.tar.bz2) = 35836
diff --git a/www/webalizer/files/linklist.geo.patch b/www/webalizer/files/linklist.geo.patch
new file mode 100644
index 0000000..16d5a66
--- /dev/null
+++ b/www/webalizer/files/linklist.geo.patch
@@ -0,0 +1,18 @@
+--- linklist.c.orig Sun Sep 4 07:40:09 2005
++++ linklist.c Sun Sep 4 07:42:19 2005
+@@ -190,12 +190,12 @@
+ int add_glist(char *str, GLISTPTR *list)
+ {
+ GLISTPTR newptr,cptr,pptr;
+- char temp_buf[256];
++ char temp_buf[LINKLIST_MAX_STRING];
+ char *name=temp_buf;
+
+ /* make local copy of string */
+- strncpy(temp_buf,str,255);
+- temp_buf[255]=0;
++ strncpy(temp_buf,str,LINKLIST_MAX_STRING - 1);
++ temp_buf[LINKLIST_MAX_STRING - 1]=0;
+
+ while (!isspace((int)*name)&&*name!=0) name++;
+ if (*name==0) name=temp_buf;
diff --git a/www/webalizer/files/linklist.patch b/www/webalizer/files/linklist.patch
new file mode 100644
index 0000000..f901a29
--- /dev/null
+++ b/www/webalizer/files/linklist.patch
@@ -0,0 +1,18 @@
+--- linklist.c.orig Sat Jun 23 11:12:40 2001
++++ linklist.c Sat Jun 23 11:19:54 2001
+@@ -190,12 +190,12 @@
+ int add_glist(char *str, GLISTPTR *list)
+ {
+ GLISTPTR newptr,cptr,pptr;
+- char temp_buf[80];
++ char temp_buf[LINKLIST_MAX_STRING];
+ char *name=temp_buf;
+
+ /* make local copy of string */
+- strncpy(temp_buf,str,79);
+- temp_buf[79]=0;
++ strncpy(temp_buf,str,LINKLIST_MAX_STRING - 1);
++ temp_buf[LINKLIST_MAX_STRING - 1]=0;
+
+ while (!isspace((unsigned char)*name)&&*name!=0) name++;
+ if (*name==0) name=temp_buf;
diff --git a/www/webalizer/files/output.geo.patch b/www/webalizer/files/output.geo.patch
new file mode 100644
index 0000000..6d2ba5e
--- /dev/null
+++ b/www/webalizer/files/output.geo.patch
@@ -0,0 +1,11 @@
+--- output.c.orig Sun Sep 4 07:40:09 2005
++++ output.c Sun Sep 4 07:47:06 2005
+@@ -2037,7 +2044,7 @@
+ while ( (*domain!='.')&&(domain!=hptr->string)) domain--;
+ if (domain==hptr->string)
+ country=NULL;
+- else if (isdigit((int)*++domain))
++ else if (isdigit((unsigned char)*++domain))
+ {
+ #ifdef USE_GEOIP
+ if (use_geoip)
diff --git a/www/webalizer/files/output.patch b/www/webalizer/files/output.patch
new file mode 100644
index 0000000..c964ada
--- /dev/null
+++ b/www/webalizer/files/output.patch
@@ -0,0 +1,11 @@
+--- output.c.orig Fri Sep 29 07:51:42 2000
++++ output.c Sat Oct 14 17:18:55 2000
+@@ -1932,7 +1939,7 @@
+ {
+ domain = hptr->string+strlen(hptr->string)-1;
+ while ( (*domain!='.')&&(domain!=hptr->string)) domain--;
+- if ((domain==hptr->string)||(isdigit((int)*++domain)))
++ if ((domain==hptr->string)||(isdigit((unsigned char)*++domain)))
+ {
+ ctry[0].count+=hptr->count;
+ ctry[0].files+=hptr->files;
diff --git a/www/webalizer/files/patch-ad b/www/webalizer/files/patch-ad
index 4ef6e9f..8656c8b 100644
--- a/www/webalizer/files/patch-ad
+++ b/www/webalizer/files/patch-ad
@@ -22,12 +22,3 @@
r_reg--;
}
}
-@@ -1932,7 +1939,7 @@
- {
- domain = hptr->string+strlen(hptr->string)-1;
- while ( (*domain!='.')&&(domain!=hptr->string)) domain--;
-- if ((domain==hptr->string)||(isdigit((int)*++domain)))
-+ if ((domain==hptr->string)||(isdigit((unsigned char)*++domain)))
- {
- ctry[0].count+=hptr->count;
- ctry[0].files+=hptr->files;
diff --git a/www/webalizer/files/patch-linklist b/www/webalizer/files/patch-linklist
index 7320ad7..7e2ca02 100644
--- a/www/webalizer/files/patch-linklist
+++ b/www/webalizer/files/patch-linklist
@@ -1,21 +1,3 @@
---- linklist.c.orig Sat Jun 23 11:12:40 2001
-+++ linklist.c Sat Jun 23 11:19:54 2001
-@@ -190,12 +190,12 @@
- int add_glist(char *str, GLISTPTR *list)
- {
- GLISTPTR newptr,cptr,pptr;
-- char temp_buf[80];
-+ char temp_buf[LINKLIST_MAX_STRING];
- char *name=temp_buf;
-
- /* make local copy of string */
-- strncpy(temp_buf,str,79);
-- temp_buf[79]=0;
-+ strncpy(temp_buf,str,LINKLIST_MAX_STRING - 1);
-+ temp_buf[LINKLIST_MAX_STRING - 1]=0;
-
- while (!isspace((unsigned char)*name)&&*name!=0) name++;
- if (*name==0) name=temp_buf;
--- linklist.h.orig Fri Sep 29 05:50:30 2000
+++ linklist.h Sat Jun 23 11:15:57 2001
@@ -1,12 +1,18 @@
diff --git a/www/webalizer/pkg-plist b/www/webalizer/pkg-plist
index 2f52e5a..de8eda0 100644
--- a/www/webalizer/pkg-plist
+++ b/www/webalizer/pkg-plist
@@ -2,6 +2,9 @@ bin/%%PKGNAMEPREFIX%%webalizer
@exec ln -f %B/%%PKGNAMEPREFIX%%webalizer %B/%%PKGNAMEPREFIX%%webazolver
@unexec rm -f %B/%%PKGNAMEPREFIX%%webazolver
etc/%%PKGNAMEPREFIX%%webalizer.conf-dist
+%%PORTDOCS%%%%WITH_GEOIP%%%%DOCSDIR%%/geolizer/GeoIP.README
+%%PORTDOCS%%%%WITH_GEOIP%%%%DOCSDIR%%/geolizer/INSTALL
+%%PORTDOCS%%%%WITH_GEOIP%%@dirrm %%DOCSDIR%%/geolizer
%%PORTDOCS%%%%DOCSDIR%%/CHANGES
%%PORTDOCS%%%%DOCSDIR%%/Copyright
%%PORTDOCS%%%%DOCSDIR%%/DNS.README
OpenPOWER on IntegriCloud