summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Smith <smithj@gentoo.org>2005-07-09 04:43:37 +0000
committerJonathan Smith <smithj@gentoo.org>2005-07-09 04:43:37 +0000
commita9b7bade58976de60383c26c9043ba2bb3e30774 (patch)
treede924461e864870ded520d2edaa87974428ed1be /app-admin/webalizer
parentMarked ppc stable. (diff)
downloadgentoo-2-a9b7bade58976de60383c26c9043ba2bb3e30774.tar.gz
gentoo-2-a9b7bade58976de60383c26c9043ba2bb3e30774.tar.bz2
gentoo-2-a9b7bade58976de60383c26c9043ba2bb3e30774.zip
really discusting small hack to get non-english natural language suppor for #48449; fixed patching problem with USE=geoip for #98304; update to the output.c (now -readability patch for #78182
(Portage version: 2.0.51.22-r1)
Diffstat (limited to 'app-admin/webalizer')
-rw-r--r--app-admin/webalizer/ChangeLog12
-rw-r--r--app-admin/webalizer/Manifest29
-rw-r--r--app-admin/webalizer/files/digest-webalizer-2.01.10-r10 (renamed from app-admin/webalizer/files/digest-webalizer-2.01.10-r9)0
-rw-r--r--app-admin/webalizer/files/webalizer-db4-with-geoip.patch11
-rw-r--r--app-admin/webalizer/files/webalizer-language-list.txt136
-rw-r--r--app-admin/webalizer/files/webalizer-readability.patch164
-rw-r--r--app-admin/webalizer/webalizer-2.01.10-r10.ebuild (renamed from app-admin/webalizer/webalizer-2.01.10-r9.ebuild)68
7 files changed, 385 insertions, 35 deletions
diff --git a/app-admin/webalizer/ChangeLog b/app-admin/webalizer/ChangeLog
index 457cdc744641..4f0ed7a8d6dc 100644
--- a/app-admin/webalizer/ChangeLog
+++ b/app-admin/webalizer/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for app-admin/webalizer
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/webalizer/ChangeLog,v 1.37 2005/07/07 22:26:03 rl03 Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/webalizer/ChangeLog,v 1.38 2005/07/09 04:43:37 smithj Exp $
+
+*webalizer-2.01.10-r10 (09 Jul 2005)
+
+ 09 Jul 2005; Jonathan Smith <smithj@gentoo.org>
+ +files/webalizer-db4-with-geoip.patch, +files/webalizer-language-list.txt,
+ +files/webalizer-readability.patch, -webalizer-2.01.10-r9.ebuild,
+ +webalizer-2.01.10-r10.ebuild:
+ really discusting small hack to get non-english natural language suppor for
+ #48449; fixed patching problem with USE=geoip for #98304; update to the
+ output.c (now -readability patch for #78182
07 Jul 2005; Renat Lumpau <rl03@gentoo.org>
files/2.01.10/apache.webalizer, files/2.01.10/reconfig,
diff --git a/app-admin/webalizer/Manifest b/app-admin/webalizer/Manifest
index cbb4732693c8..d1e77af18d47 100644
--- a/app-admin/webalizer/Manifest
+++ b/app-admin/webalizer/Manifest
@@ -1,25 +1,18 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
-MD5 e07be0b4516c1e9044aa0c668866b570 webalizer-2.01.10-r8.ebuild 2486
-MD5 d74bed80f6183e16dcbd161ccde1ef3d webalizer-2.01.10-r5.ebuild 2553
-MD5 14458eba5bb33627ef3c18834ff20c8e webalizer-2.01.10-r9.ebuild 2826
-MD5 5833410c77eec8d9cff653e67949b5a6 webalizer-2.01.10-r4.ebuild 2056
MD5 6bec3240df3ecaec6cfe2b04f65832bf ChangeLog 5131
MD5 8583552359d0c1414cb52fa99fc5578c metadata.xml 284
-MD5 cc68675ea63960bbc80d15110e41bf74 files/webalizer-db4.patch 574
-MD5 05805530b2e87a3d55e0056a45e330f5 files/output.c.patch 8088
+MD5 5833410c77eec8d9cff653e67949b5a6 webalizer-2.01.10-r4.ebuild 2056
+MD5 d74bed80f6183e16dcbd161ccde1ef3d webalizer-2.01.10-r5.ebuild 2553
+MD5 e07be0b4516c1e9044aa0c668866b570 webalizer-2.01.10-r8.ebuild 2486
+MD5 fdefce9317419143dfa24dc667a80eae webalizer-2.01.10-r10.ebuild 3853
MD5 99b845afaf9f7417f82f508992e4a5ab files/digest-webalizer-2.01.10-r4 74
MD5 e1a2a43e4148a750fc8ef91e0af3ba99 files/digest-webalizer-2.01.10-r5 157
MD5 e1a2a43e4148a750fc8ef91e0af3ba99 files/digest-webalizer-2.01.10-r8 157
-MD5 e1a2a43e4148a750fc8ef91e0af3ba99 files/digest-webalizer-2.01.10-r9 157
+MD5 05805530b2e87a3d55e0056a45e330f5 files/output.c.patch 8088
+MD5 cc68675ea63960bbc80d15110e41bf74 files/webalizer-db4.patch 574
+MD5 94e47e69398034261ac6d26edab9eafb files/webalizer-language-list.txt 1520
+MD5 006af7bcfeb1e8648c1787c63d28470c files/webalizer-db4-with-geoip.patch 574
+MD5 766a26ff1600e3ea5359278a9dcd1025 files/webalizer-readability.patch 8345
+MD5 e1a2a43e4148a750fc8ef91e0af3ba99 files/digest-webalizer-2.01.10-r10 157
MD5 72cc13055db3923e3b42824671712ed1 files/2.01.10/apache.webalizer 274
-MD5 d121e2b8e931e69a97c720cf30251959 files/2.01.10/webalizer.conf 23895
MD5 7f29ecf09808176c22585f5205c6eceb files/2.01.10/reconfig 410
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.1 (GNU/Linux)
-
-iD8DBQFCzawEEzitwsaoONoRAlv8AKCanWThuDREfpIdA5ApO7zltqMMqgCggdcP
-xZYEvqw/JSgBO4gP5B6E9WI=
-=MK5K
------END PGP SIGNATURE-----
+MD5 d121e2b8e931e69a97c720cf30251959 files/2.01.10/webalizer.conf 23895
diff --git a/app-admin/webalizer/files/digest-webalizer-2.01.10-r9 b/app-admin/webalizer/files/digest-webalizer-2.01.10-r10
index 1e08bbd23fa0..1e08bbd23fa0 100644
--- a/app-admin/webalizer/files/digest-webalizer-2.01.10-r9
+++ b/app-admin/webalizer/files/digest-webalizer-2.01.10-r10
diff --git a/app-admin/webalizer/files/webalizer-db4-with-geoip.patch b/app-admin/webalizer/files/webalizer-db4-with-geoip.patch
new file mode 100644
index 000000000000..d31911153cf7
--- /dev/null
+++ b/app-admin/webalizer/files/webalizer-db4-with-geoip.patch
@@ -0,0 +1,11 @@
+--- configure.in 2000-10-06 09:51:49.000000000 +0200
++++ configure.in 2005-04-02 13:06:24.623616376 +0200
+@@ -81,7 +81,7 @@
+ if test "$HAVE_DB" = ""; then
+ AC_CHECK_FUNCS(dbopen)
+ if test $ac_cv_func_dbopen = no; then
+- AC_SEARCH_LIBS(dbopen, db db1, OPTS="-DUSE_DNS ${OPTS}"; HAVE_DB="yes")
++ AC_SEARCH_LIBS(__db185_open_4001,db-4.1, OPTS="-DUSE_DNS ${OPTS}"; HAVE_DB="yes")
+ if test "$HAVE_DB" = ""; then
+ AC_MSG_WARN(You must have a V1.85 compatable DB library!)
+ AC_MSG_WARN(DNS lookup code will be disabled...)
diff --git a/app-admin/webalizer/files/webalizer-language-list.txt b/app-admin/webalizer/files/webalizer-language-list.txt
new file mode 100644
index 000000000000..ed9e3232417b
--- /dev/null
+++ b/app-admin/webalizer/files/webalizer-language-list.txt
@@ -0,0 +1,136 @@
+aa afar
+ab abkhazian
+af afrikaans
+am amharic
+ar arabic
+as assamese
+ay aymara
+az azerbaijani
+ba bashkir
+be byelorussian
+bg bulgarian
+bh bihari
+bi bislama
+bn bengali
+bo tibetan
+br breton
+ca catalan
+co corsican
+cs czech
+cy welsh
+da danish
+de german
+dz bhutani
+el greek
+en english
+eo esperanto
+es spanish
+et estonian
+eu basque
+fa persian
+fi finnish
+fj fiji
+fo faeroese
+fr french
+fy frisian
+ga irish
+gd gaelic
+gl galician
+gn guarani
+gu gujarati
+ha hausa
+hi hindi
+hr croatian
+hu hungarian
+hy armenian
+ia interlingua
+ie interlingue
+ik inupiak
+in indonesian
+is icelandic
+it italian
+iw hebrew
+ja japanese
+ji yiddish
+jw javanese
+ka georgian
+kk kazakh
+kl greenlandic
+km cambodian
+kn kannada
+ko korean
+ks kashmiri
+ku kurdish
+ky kirghiz
+la latin
+ln lingala
+lo laothian
+lt lithuanian
+lv latvian
+mg malagasy
+mi maori
+mk macedonian
+ml malayalam
+mn mongolian
+mo moldavian
+mr marathi
+ms malay
+mt maltese
+my burmese
+na nauru
+ne nepali
+nl dutch
+no norwegian
+oc occitan
+om oromo afan
+or oriya
+pa punjabi
+pl polish
+ps pashto
+pt portuguese
+qu quechua
+rm rhaeto-romance
+rn kirundi
+ro romanian
+ru russian
+rw kinyarwanda
+sa sanskrit
+sd sindhi
+sg sangro
+sh serbo-croatian
+si singhalese
+sk slovak
+sl slovenian
+sm samoan
+sn shona
+so somali
+sq albanian
+sr serbian
+ss siswati
+st sesotho
+su sudanese
+sv swedish
+sw swahili
+ta tamil
+te tegulu
+tg tajik
+th thai
+ti tigrinya
+tk turkmen
+tl tagalog
+tn setswana
+to tonga
+tr turkish
+ts tsonga
+tt tatar
+tw twi
+uk ukrainian
+ur urdu
+uz uzbek
+vi vietnamese
+vo volapuk
+wo wolof
+xh xhosa
+yo yoruba
+zh chinese
+zu zulu
diff --git a/app-admin/webalizer/files/webalizer-readability.patch b/app-admin/webalizer/files/webalizer-readability.patch
new file mode 100644
index 000000000000..e3ebe3f55d2d
--- /dev/null
+++ b/app-admin/webalizer/files/webalizer-readability.patch
@@ -0,0 +1,164 @@
+This patch makes webalizer print byte counts in human readable format.
+ Tomas Janousek <tomi@nomi.cz>, Ondrej Novy <onovy@nomi.cz>
+
+--- output.c.old 2001-06-15 10:34:24.000000000 +0200
++++ output.c 2004-09-05 21:45:40.000000000 +0200
+@@ -140,6 +140,30 @@
+
+ FILE *out_fp;
+
++
++/*********************************************/
++/* FORMAT_NUM - output format of number */
++/*********************************************/
++char * format_num(double in)
++{
++ static char *units[] = { "B", "KB", "MB", "GB", "TB" };
++ char **unit, *tmp;
++ static char out[50];
++
++ /* convert it to X Y, where X is less than 1024 and Y is the unit */
++ for (unit = units; in > 1024 && unit < units+sizeof(units)/sizeof(*units)-1;
++ in /= 1024, ++unit);
++ snprintf(out, 40, "%.2f", in);
++
++ /* skip trailing zeros */
++ for (tmp = out + strlen(out) - 1; tmp > out && *tmp == '0'; *tmp-- = 0);
++ if (*tmp == '.') *tmp = 0;
++
++ strcat(out, "&nbsp;");
++ strcat(out, *unit);
++ return out;
++}
++
+ /*********************************************/
+ /* WRITE_HTML_HEAD - output top of HTML page */
+ /*********************************************/
+@@ -544,8 +568,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 +644,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 +738,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 +826,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 +911,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 +1094,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 +2064,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 +2430,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 +2451,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-r9.ebuild b/app-admin/webalizer/webalizer-2.01.10-r10.ebuild
index fd954f97cefa..07e332877709 100644
--- a/app-admin/webalizer/webalizer-2.01.10-r9.ebuild
+++ b/app-admin/webalizer/webalizer-2.01.10-r10.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2005 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-r9.ebuild,v 1.2 2005/07/07 22:26:03 rl03 Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/webalizer/webalizer-2.01.10-r10.ebuild,v 1.1 2005/07/09 04:43:37 smithj Exp $
# uses webapps to create directories with right permissions
# probably slight overkil but works well
@@ -16,7 +16,7 @@ SRC_URI="ftp://ftp.mrunix.net/pub/webalizer/${MY_P}-src.tar.bz2
LICENSE="GPL-2"
KEYWORDS="~x86 ~ppc ~sparc ~alpha ~hppa ~amd64 ~ppc64"
-IUSE="apache2 geoip"
+IUSE="apache2 geoip nls"
DEPEND="=sys-libs/db-4.1*
>=sys-libs/zlib-1.1.4
@@ -26,44 +26,69 @@ DEPEND="=sys-libs/db-4.1*
pkg_setup() {
webapp_pkg_setup
+
# prevents "undefined reference" errors... see bug #65163
if ! built_with_use media-libs/gd png; then
ewarn "media-libs/gd must be built with png for this package"
ewarn "to function."
die "recompile gd with USE=\"png\""
fi
+
+ # USE=nls has no real meaning if LINGUAS isn't set
+ if use nls && [ -z "${LINGUAS}" ]; then
+ ewarn "you must set LINGUAS in /etc/make.conf"
+ ewarn "if you want to USE=nls"
+ die "please either set LINGUAS or do not use nls"
+ fi
}
src_unpack() {
unpack ${A} ; cd ${S}
- # fix --enable-dns; our db1 headers are in /usr/include/db1
- # mv dns_resolv.c dns_resolv.c.orig
- # sed -e 's%^\(#include \)\(<db.h>\)\(.*\)%\1<db1/db.h>\3%' \
- # dns_resolv.c.orig > dns_resolv.c
+
sed -i -e "s,db_185.h,db.h," configure
+ # geoip patch messes up db4.1 patch, so both are dependent on geoip USE
+ # flag, even though both of the db patches do the _exact_ same thing
if use geoip; then
cd ${WORKDIR}
epatch ${WORKDIR}/geolizer_${MY_PV}-patch/geolizer.patch || die
+ cd ${S}
+ epatch ${FILESDIR}/${PN}-db4-with-geoip.patch || die
else
- # pretty printer for numbers
- cd ${S} && epatch ${FILESDIR}/output.c.patch || die
+ epatch ${FILESDIR}/${PN}-readability.patch || die
+ epatch ${FILESDIR}/${PN}-db4.patch || die
fi
-
- # this enables the package to use db4.1, fixing bug #65399
- epatch ${FILESDIR}/${PN}-db4.patch
}
src_compile() {
local myconf
+
+ # method of lookup established
if use geoip; then
- myconf="--enable-geoip"
+ myconf="${myconf} --enable-geoip"
else
- myconf="--enable-dns"
+ myconf="${myconf} --enable-dns"
fi
- myconf="${myconf} --with-db=/usr/include/db4.1/"
- autoconf # stupid broken configure file
- econf ${myconf} || die "econf failed"
+
+ # really dirty hack; necessary due to a really gross ./configure
+ # basically, it just sets the natural language the program uses
+ # unfortunatly, this program only allows for one lang, so only the first
+ # entry in LINGUAS is used
+ if use nls; then
+ local longlang
+ longlang="$(grep ^${LINGUAS:0:2} ${FILESDIR}/webalizer-language-list.txt)"
+ myconf="${myconf} --with-language=${longlang:3}"
+ else
+ myconf="${myconf} --with-language=english"
+ fi
+
+ # stupid broken configuration file
+ autoconf
+
+ econf \
+ --with-db=/usr/include/db4.1/ \
+ ${myconf} || die "econf failed"
+
emake || die "make failed"
}
@@ -99,5 +124,16 @@ pkg_postinst(){
einfo "You can also use cron to generate them e.g. every day."
einfo "They can be accessed via http://localhost/webalizer"
einfo
+
+ if [ ${#LINGUAS} -gt 2 ] && use nls; then
+ ewarn
+ ewarn "You have more than one language in LINGUAS"
+ ewarn "Due to the limitations of this packge, it was built"
+ ewarn "only with ${LINGUAS:0:2} support. If this is not what"
+ ewarn "you intended, please place the language you desire"
+ ewarn "_first_ in the list of LINGUAS in /etc/make.conf"
+ ewarn
+ fi
+
webapp_pkg_postinst
}