diff options
author | Anders Rune Jensen <arj@gentoo.org> | 2004-07-06 23:17:12 +0000 |
---|---|---|
committer | Anders Rune Jensen <arj@gentoo.org> | 2004-07-06 23:17:12 +0000 |
commit | 6f71feb2c7d7b43e8151689e01e8378da2df7c2a (patch) | |
tree | ea1183c0dd9aef070222d45a5a925da6058fc7fd /app-admin | |
parent | Added ~sparc (diff) | |
download | historical-6f71feb2c7d7b43e8151689e01e8378da2df7c2a.tar.gz historical-6f71feb2c7d7b43e8151689e01e8378da2df7c2a.tar.bz2 historical-6f71feb2c7d7b43e8151689e01e8378da2df7c2a.zip |
patch
Diffstat (limited to 'app-admin')
-rw-r--r-- | app-admin/webalizer/ChangeLog | 6 | ||||
-rw-r--r-- | app-admin/webalizer/Manifest | 17 | ||||
-rw-r--r-- | app-admin/webalizer/files/output.c.patch | 157 | ||||
-rw-r--r-- | app-admin/webalizer/webalizer-2.01.10-r5.ebuild | 5 |
4 files changed, 170 insertions, 15 deletions
diff --git a/app-admin/webalizer/ChangeLog b/app-admin/webalizer/ChangeLog index 65b8907a4857..5fc07842b8d7 100644 --- a/app-admin/webalizer/ChangeLog +++ b/app-admin/webalizer/ChangeLog @@ -1,7 +1,11 @@ # ChangeLog for app-admin/webalizer # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/webalizer/ChangeLog,v 1.26 2004/06/29 19:52:46 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/webalizer/ChangeLog,v 1.27 2004/07/06 23:17:12 arj Exp $ + 07 Jul 2004; Anders Rune Jensen <arj@gentoo.org> webalizer-2.01.10-r5.ebuild, + webalizer-2.01.10-r5.ebuild: + Pretty printer patch from Ondrej Novy <onovy@nomi.cz>. + 29 Jun 2004; Aron Griffis <agriffis@gentoo.org> webalizer-2.01.10-r4.ebuild, webalizer-2.01.10-r5.ebuild: sync IUSE (+apache2) diff --git a/app-admin/webalizer/Manifest b/app-admin/webalizer/Manifest index b220530ebc43..69693b3b7112 100644 --- a/app-admin/webalizer/Manifest +++ b/app-admin/webalizer/Manifest @@ -1,18 +1,9 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - -MD5 b3aaddafb70a5f178bf2a2552174db54 ChangeLog 3474 +MD5 befab9531fb7ce3ecc713758874d551b ChangeLog 3639 MD5 aa1e0b2898261e1a69ca61b5afbf0c6d metadata.xml 431 MD5 9786083b9f1a8bf3626a2050bc43c5aa webalizer-2.01.10-r4.ebuild 2053 -MD5 e40d4a83a5430f925a61b360dedd16ba webalizer-2.01.10-r5.ebuild 2408 +MD5 ce53b55044833915cf0f8a1243f7ba68 webalizer-2.01.10-r5.ebuild 2478 MD5 99b845afaf9f7417f82f508992e4a5ab files/digest-webalizer-2.01.10-r4 74 MD5 e1a2a43e4148a750fc8ef91e0af3ba99 files/digest-webalizer-2.01.10-r5 157 -MD5 64aecf82b558b91245a82f410b27986a files/2.01.10/apache.webalizer 334 +MD5 05805530b2e87a3d55e0056a45e330f5 files/output.c.patch 8088 +MD5 bb80d72389a599d8f2aabaa609407a4a files/2.01.10/apache.webalizer 333 MD5 43ba0f621ebb8fd776052f4ef30f20d5 files/2.01.10/webalizer.conf 23910 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.9.8 (GNU/Linux) - -iD8DBQFA4vOLHTu7gpaalycRAiwIAKD1bov/Ea2jvFrMSmRGlAGX5TpslQCg84YJ -56XY/EL63bqPKT3P8azpuA0= -=naoK ------END PGP SIGNATURE----- diff --git a/app-admin/webalizer/files/output.c.patch b/app-admin/webalizer/files/output.c.patch new file mode 100644 index 000000000000..9cf52580223f --- /dev/null +++ b/app-admin/webalizer/files/output.c.patch @@ -0,0 +1,157 @@ +--- output.c.orig 2001-06-15 10:34:24.000000000 +0200 ++++ output.c 2004-07-03 14:32:01.000000000 +0200 +@@ -140,6 +140,26 @@ + + FILE *out_fp; + ++ ++/*********************************************/ ++/* FORMAT_NUM - output format of number */ ++/*********************************************/ ++char * format_num(double in) ++{ ++ static char *jednotky[] = { ++ " B", " kB", " MB", " GB", " TB" ++ }; ++ char **jednotka, *tmp; ++ static char out[100]; ++ for (jednotka = jednotky; in > 1024 && jednotka < jednotky+4; in /= 1024, ++jednotka); ++ snprintf(out, 45, "%.2f", in); ++ for (tmp = out + strlen(out) - 1; tmp > out && *tmp == '0'; *tmp-- = 0); ++ if (*tmp == '.') *tmp = 0; ++ strcat(out, *jednotka); ++ return out; ++} ++ ++ + /*********************************************/ + /* WRITE_HTML_HEAD - output top of HTML page */ + /*********************************************/ +@@ -544,8 +564,8 @@ + "</FONT></TD></TR>\n",msg_h_total, msg_h_visits, t_visit); + /* Total XFer */ + fprintf(out_fp,"<TR><TD WIDTH=380><FONT SIZE=\"-1\">%s</FONT></TD>\n" \ +- "<TD ALIGN=right COLSPAN=2><FONT SIZE=\"-1\"><B>%.0f</B>" \ +- "</FONT></TD></TR>\n",msg_mtot_tx,t_xfer/1024); ++ "<TD ALIGN=right COLSPAN=2><FONT SIZE=\"-1\"><B>%s</B>" \ ++ "</FONT></TD></TR>\n",msg_mtot_tx,format_num(t_xfer)); + fprintf(out_fp,"<TR><TH HEIGHT=4></TH></TR>\n"); + /**********************************************/ + /* Unique Sites */ +@@ -620,10 +640,11 @@ + /* Max/Avg KBytes per Day */ + fprintf(out_fp,"<TR>" \ + "<TD><FONT SIZE=\"-1\">%s</FONT></TD>\n" \ +- "<TD ALIGN=right WIDTH=65><FONT SIZE=\"-1\"><B>%.0f</B></FONT></TD>\n" \ +- "<TD WIDTH=65 ALIGN=right><FONT SIZE=-1><B>%.0f</B>" \ +- "</FONT></TD></TR>\n",msg_mtot_mkd, +- (t_xfer/1024)/days_in_month,max_xfer/1024); ++ "<TD ALIGN=right WIDTH=65><FONT SIZE=\"-1\"><B>%s</B></FONT></TD>\n", ++ msg_mtot_mkd,format_num(t_xfer/days_in_month)); ++ fprintf(out_fp,"<TD WIDTH=65 ALIGN=right><FONT SIZE=-1><B>%s</B>" \ ++ "</FONT></TD></TR>\n",format_num(max_xfer)); ++ + fprintf(out_fp,"<TR><TH HEIGHT=4></TH></TR>\n"); + /**********************************************/ + /* response code totals */ +@@ -713,9 +734,9 @@ + "<TD ALIGN=right><FONT SIZE=\"-2\">%3.02f%%</FONT></TD>\n", + tm_site[i],PCENT(tm_site[i],t_site)); + fprintf(out_fp,"<TD ALIGN=right>" \ +- "<FONT SIZE=\"-1\"><B>%.0f</B></FONT></TD>\n" \ ++ "<FONT SIZE=\"-1\"><B>%s</B></FONT></TD>\n" \ + "<TD ALIGN=right><FONT SIZE=\"-2\">%3.02f%%</FONT></TD></TR>\n", +- tm_xfer[i]/1024,PCENT(tm_xfer[i],t_xfer)); ++ format_num(tm_xfer[i]),PCENT(tm_xfer[i],t_xfer)); + } + fprintf(out_fp,"<TR><TH HEIGHT=4></TH></TR>\n"); + fprintf(out_fp,"</TABLE>\n"); +@@ -801,11 +822,13 @@ + th_page[i]/days_in_month,th_page[i], + PCENT(th_page[i],t_page)); + fprintf(out_fp, +- "<TD ALIGN=right><FONT SIZE=\"-1\"><B>%.0f</B></FONT></TD>\n" \ +- "<TD ALIGN=right><FONT SIZE=\"-1\"><B>%.0f</B></FONT></TD>\n" \ ++ "<TD ALIGN=right><FONT SIZE=\"-1\"><B>%s</B></FONT></TD>\n", ++ format_num(th_xfer[i]/days_in_month)); ++ fprintf(out_fp, ++ "<TD ALIGN=right><FONT SIZE=\"-1\"><B>%s</B></FONT></TD>\n" \ + "<TD ALIGN=right><FONT SIZE=\"-2\">%3.02f%%</FONT></TD></TR>\n", +- (th_xfer[i]/days_in_month)/1024,th_xfer[i]/1024, +- PCENT(th_xfer[i],t_xfer)); ++ format_num(th_xfer[i]), ++ PCENT(th_xfer[i],t_xfer)); + avg_file += th_file[i]/days_in_month; + avg_xfer+= (th_xfer[i]/days_in_month)/1024; + } +@@ -884,14 +907,15 @@ + "<TD ALIGN=right><FONT SIZE=\"-2\">%3.02f%%</FONT></TD>\n" \ + "<TD ALIGN=right><FONT SIZE=\"-1\"><B>%lu</B></FONT></TD>\n" \ + "<TD ALIGN=right><FONT SIZE=\"-2\">%3.02f%%</FONT></TD>\n" \ +- "<TD ALIGN=right><FONT SIZE=\"-1\"><B>%.0f</B></FONT></TD>\n" \ ++ "<TD ALIGN=right><FONT SIZE=\"-1\"><B>%s</B></FONT></TD>\n" \ + "<TD ALIGN=right><FONT SIZE=\"-2\">%3.02f%%</FONT></TD>\n" \ + "<TD ALIGN=right><FONT SIZE=\"-1\"><B>%lu</B></FONT></TD>\n" \ + "<TD ALIGN=right><FONT SIZE=\"-2\">%3.02f%%</FONT></TD>\n" \ + "<TD ALIGN=left NOWRAP><FONT SIZE=\"-1\">", + i+1,hptr->count, + (t_hit==0)?0:((float)hptr->count/t_hit)*100.0,hptr->files, +- (t_file==0)?0:((float)hptr->files/t_file)*100.0,hptr->xfer/1024, ++ (t_file==0)?0:((float)hptr->files/t_file)*100.0, ++ format_num(hptr->xfer), + (t_xfer==0)?0:((float)hptr->xfer/t_xfer)*100.0,hptr->visit, + (t_visit==0)?0:((float)hptr->visit/t_visit)*100.0); + +@@ -1066,12 +1090,12 @@ + "<TD ALIGN=center><FONT SIZE=\"-1\"><B>%d</B></FONT></TD>\n" \ + "<TD ALIGN=right><FONT SIZE=\"-1\"><B>%lu</B></FONT></TD>\n" \ + "<TD ALIGN=right><FONT SIZE=\"-2\">%3.02f%%</FONT></TD>\n" \ +- "<TD ALIGN=right><FONT SIZE=\"-1\"><B>%.0f</B></FONT></TD>\n"\ ++ "<TD ALIGN=right><FONT SIZE=\"-1\"><B>%s</B></FONT></TD>\n"\ + "<TD ALIGN=right><FONT SIZE=\"-2\">%3.02f%%</FONT></TD>\n" \ + "<TD ALIGN=left NOWRAP><FONT SIZE=\"-1\">", + i+1,uptr->count, + (t_hit==0)?0:((float)uptr->count/t_hit)*100.0, +- uptr->xfer/1024, ++ format_num(uptr->xfer), + (t_xfer==0)?0:((float)uptr->xfer/t_xfer)*100.0); + + if (uptr->flag==OBJ_GRP) +@@ -2036,14 +2060,14 @@ + "<TD ALIGN=right><FONT SIZE=\"-2\">%3.02f%%</FONT></TD>\n" \ + "<TD ALIGN=right><FONT SIZE=\"-1\"><B>%lu</B></FONT></TD>\n" \ + "<TD ALIGN=right><FONT SIZE=\"-2\">%3.02f%%</FONT></TD>\n" \ +- "<TD ALIGN=right><FONT SIZE=\"-1\"><B>%.0f</B></FONT></TD>\n" \ ++ "<TD ALIGN=right><FONT SIZE=\"-1\"><B>%s</B></FONT></TD>\n" \ + "<TD ALIGN=right><FONT SIZE=\"-2\">%3.02f%%</FONT></TD>\n" \ + "<TD ALIGN=left NOWRAP><FONT SIZE=\"-1\">%s</FONT></TD></TR>\n", + i+1,top_ctrys[i]->count, + (t_hit==0)?0:((float)top_ctrys[i]->count/t_hit)*100.0, + top_ctrys[i]->files, + (t_file==0)?0:((float)top_ctrys[i]->files/t_file)*100.0, +- top_ctrys[i]->xfer/1024, ++ format_num(top_ctrys[i]->xfer), + (t_xfer==0)?0:((float)top_ctrys[i]->xfer/t_xfer)*100.0, + top_ctrys[i]->desc); + } +@@ -2402,8 +2426,9 @@ + hist_visit[s_mth]/days_in_month); + fprintf(out_fp,"<TD ALIGN=right><FONT SIZE=\"-1\">%lu</FONT></TD>\n", + hist_site[s_mth]); +- fprintf(out_fp,"<TD ALIGN=right><FONT SIZE=\"-1\">%.0f</FONT></TD>\n", +- hist_xfer[s_mth]); ++ fprintf(out_fp,"<TD ALIGN=right><FONT SIZE=\"-1\">%s</FONT></TD>\n", ++/* hist_xfer[s_mth]);*/ ++ format_num(hist_xfer[s_mth]*1024)); + fprintf(out_fp,"<TD ALIGN=right><FONT SIZE=\"-1\">%lu</FONT></TD>\n", + hist_visit[s_mth]); + fprintf(out_fp,"<TD ALIGN=right><FONT SIZE=\"-1\">%lu</FONT></TD>\n", +@@ -2422,7 +2447,7 @@ + fprintf(out_fp,"<TR><TH BGCOLOR=\"%s\" COLSPAN=6 ALIGN=left>" \ + "<FONT SIZE=\"-1\">%s</FONT></TH>\n",GREY,msg_h_totals); + fprintf(out_fp,"<TH BGCOLOR=\"%s\" ALIGN=right>" \ +- "<FONT SIZE=\"-1\">%.0f</FONT></TH>\n",GREY,gt_xfer); ++ "<FONT SIZE=\"-1\">%s</FONT></TH>\n",GREY,format_num(gt_xfer*1024)); + fprintf(out_fp,"<TH BGCOLOR=\"%s\" ALIGN=right>" \ + "<FONT SIZE=\"-1\">%.0f</FONT></TH>\n",GREY,gt_visits); + fprintf(out_fp,"<TH BGCOLOR=\"%s\" ALIGN=right>" \ diff --git a/app-admin/webalizer/webalizer-2.01.10-r5.ebuild b/app-admin/webalizer/webalizer-2.01.10-r5.ebuild index c24aa6bb689e..394140ba901f 100644 --- a/app-admin/webalizer/webalizer-2.01.10-r5.ebuild +++ b/app-admin/webalizer/webalizer-2.01.10-r5.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/webalizer/webalizer-2.01.10-r5.ebuild,v 1.8 2004/06/30 17:08:01 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/webalizer/webalizer-2.01.10-r5.ebuild,v 1.9 2004/07/06 23:17:12 arj Exp $ inherit eutils @@ -35,6 +35,9 @@ src_unpack() { ( cd ${WORKDIR} && unpack geolizer_${MY_PV}-patch.20040216.tar.bz2 ) epatch ${WORKDIR}/geolizer_${MY_PV}-patch/geolizer.patch || die fi + + # pretty printer for numbers + epatch ${FILESDIR}/output.c.patch || die } src_compile() { |