aboutsummaryrefslogtreecommitdiffstats
path: root/www/sarg
diff options
context:
space:
mode:
authorgarga <garga@FreeBSD.org>2013-01-08 18:25:00 +0800
committergarga <garga@FreeBSD.org>2013-01-08 18:25:00 +0800
commitc4d313c35f7a62fd3f7aa009761e96cf98206b8e (patch)
treea3a4c36cb4074657662362984a8891b65f29a97e /www/sarg
parentf025df1c6b9e8cc2023ecd654642515502e5d4bf (diff)
downloadfreebsd-ports-gnome-c4d313c35f7a62fd3f7aa009761e96cf98206b8e.tar.gz
freebsd-ports-gnome-c4d313c35f7a62fd3f7aa009761e96cf98206b8e.tar.zst
freebsd-ports-gnome-c4d313c35f7a62fd3f7aa009761e96cf98206b8e.zip
- Update to 2.3.4
- Add OPTIONS for ICONV, LDAP and PCRE
Diffstat (limited to 'www/sarg')
-rw-r--r--www/sarg/Makefile36
-rw-r--r--www/sarg/distinfo4
-rw-r--r--www/sarg/files/patch-Makefile.in16
-rw-r--r--www/sarg/files/patch-configure.in12
-rw-r--r--www/sarg/files/patch-fix_missing_href142
-rw-r--r--www/sarg/files/patch-log.c33
6 files changed, 40 insertions, 203 deletions
diff --git a/www/sarg/Makefile b/www/sarg/Makefile
index f25079e5530f..7da2cfcb745b 100644
--- a/www/sarg/Makefile
+++ b/www/sarg/Makefile
@@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= sarg
-PORTVERSION= 2.3.2
-PORTREVISION= 5
+PORTVERSION= 2.3.4
CATEGORIES= www
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
@@ -13,10 +12,9 @@ COMMENT= Squid log analyzer and HTML report generator
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/LICENSE
-OPTIONS_DEFINE= GD PHP NLS
-OPTIONS_DEFAULT=GD PHP NLS
+OPTIONS_DEFINE= GD PHP NLS PCRE LDAP ICONV
+OPTIONS_DEFAULT=GD PHP NLS PCRE LDAP ICONV
-GD_DESC= Enable GD support
PHP_DESC= Install PHP for reporting generating
USE_AUTOTOOLS= autoconf aclocal
@@ -24,7 +22,8 @@ USE_GMAKE= yes
GNU_CONFIGURE= yes
MAKE_JOBS_SAFE= yes
LDFLAGS+= -L${LOCALBASE}/lib
-CONFIGURE_ARGS= --sysconfdir="${ETCDIR}" \
+CONFIGURE_ARGS= CPPFLAGS=-I${LOCALBASE}/include \
+ --sysconfdir="${ETCDIR}" \
--enable-fontdir="${ETCDIR}/fonts" \
--enable-imagedir="${ETCDIR}/images"
@@ -35,14 +34,16 @@ MAN1= sarg.1
.if ${PORT_OPTIONS:MNLS}
PLIST_SUB+= NLS=""
USE_GETTEXT= yes
-USE_ICONV= yes
.else
PLIST_SUB+= NLS="@comment "
CONFIGURE_ARGS+=--disable-nls
.endif
.if ${PORT_OPTIONS:MGD}
+CONFIGURE_ARGS+=--with-gd
LIB_DEPENDS+= gd:${PORTSDIR}/graphics/gd
+.else
+CONFIGURE_ARGS+=--without-gd
.endif
.if ${PORT_OPTIONS:MPHP}
@@ -53,6 +54,27 @@ CONFIGURE_ARGS+=--disable-sargphp
PLIST_SUB+= PHP="@comment "
.endif
+.if ${PORT_OPTIONS:MPCRE}
+CONFIGURE_ARGS+=--with-pcre
+LIB_DEPENDS+= pcre:${PORTSDIR}/devel/pcre
+.else
+CONFIGURE_ARGS+=--without-pcre
+.endif
+
+.if ${PORT_OPTIONS:MLDAP}
+CONFIGURE_ARGS+=--with-ldap
+USE_OPENLDAP= yes
+.else
+CONFIGURE_ARGS+=--without-ldap
+.endif
+
+.if ${PORT_OPTIONS:MICONV}
+CONFIGURE_ARGS+=--with-iconv
+USE_ICONV= yes
+.else
+CONFIGURE_ARGS+=--without-iconv
+.endif
+
post-extract:
@${FIND} ${WRKSRC} -type d -exec ${CHMOD} 0755 {} \;
@${CHMOD} 0755 ${WRKSRC}/configure
diff --git a/www/sarg/distinfo b/www/sarg/distinfo
index a1b57771b20f..4af215665d32 100644
--- a/www/sarg/distinfo
+++ b/www/sarg/distinfo
@@ -1,2 +1,2 @@
-SHA256 (sarg-2.3.2.tar.gz) = b117f417da577e73e8d6b44d8f63c99ceb8cd34b72bc0c4a5af889bfacb5c8a5
-SIZE (sarg-2.3.2.tar.gz) = 1180411
+SHA256 (sarg-2.3.4.tar.gz) = 9448de524bd91dbf0eaa8ebd393bc34c716dfb98e4595c8f0166062b8fac9f76
+SIZE (sarg-2.3.4.tar.gz) = 1282009
diff --git a/www/sarg/files/patch-Makefile.in b/www/sarg/files/patch-Makefile.in
index 8708d5c1347b..595cbc457574 100644
--- a/www/sarg/files/patch-Makefile.in
+++ b/www/sarg/files/patch-Makefile.in
@@ -1,18 +1,20 @@
---- Makefile.in.orig 2011-06-20 04:12:39.000000000 +0900
-+++ Makefile.in 2012-02-02 18:04:28.000000000 +0900
-@@ -27,9 +27,9 @@
+--- Makefile.in.orig 2012-08-30 14:23:05.000000000 -0300
++++ Makefile.in 2012-11-20 11:50:32.000000000 -0200
+@@ -27,11 +27,11 @@
LIBS = @LIBS@ -lm
SRCDIR = .
VPATH = .
-INSTALL = cp
+INSTALL = @INSTALL@ -m 644 -S
-
+ XSL_MAN_STYLESHEET=@XSL_MAN_STYLESHEET@
+ XSL_HTML_STYLESHEET=@XSL_HTML_STYLESHEET@
+
-INSTALL_PROGRAM = $(INSTALL)
+INSTALL_PROGRAM = @INSTALL@ -m 755 -S -s
-
+
SRCS = util.c log.c report.c topuser.c email.c sort.c html.c \
- index.c getconf.c usage.c decomp.c ip2name.c \
-@@ -91,14 +91,11 @@
+ index.c getconf.c usage.c decomp.c ip2name.c ip2name_dns.c \
+@@ -93,14 +93,11 @@
mkdir -p $(DESTDIR)$(IMAGEDIR); \
fi
$(INSTALL_PROGRAM) sarg $(DESTDIR)$(bindir)/sarg
diff --git a/www/sarg/files/patch-configure.in b/www/sarg/files/patch-configure.in
deleted file mode 100644
index f99ea80e1f47..000000000000
--- a/www/sarg/files/patch-configure.in
+++ /dev/null
@@ -1,12 +0,0 @@
---- configure.in.orig 2012-01-23 11:17:59.000000000 -0200
-+++ configure.in 2012-01-23 11:18:08.000000000 -0200
-@@ -17,9 +17,6 @@
- dnl * ) AC_PROG_CXX ;;
- esac
-
--if test "${CC}" = "cc" ; then
-- CFLAGS="${CFLAGS} -g -O2 -Aa"
--fi
- CFLAGS="${CFLAGS} -Wall -Wno-sign-compare"
-
- dnl Check for supported compiler options
diff --git a/www/sarg/files/patch-fix_missing_href b/www/sarg/files/patch-fix_missing_href
deleted file mode 100644
index d7a5d3771588..000000000000
--- a/www/sarg/files/patch-fix_missing_href
+++ /dev/null
@@ -1,142 +0,0 @@
-Index: redirector.c
-===================================================================
---- redirector.c (revision 594)
-+++ redirector.c (revision 595)
-@@ -552,7 +552,7 @@
- else
- fputs("<tr><td class=\"data2\"></td><td class=\"data2\"></td>",fp_ou);
- fprintf(fp_ou,"<td class=\"data2\">%s-%s</td><td class=\"data2\">",data,hora);
-- output_html_link(fp_ou,url,100);
-+ output_html_link(fp_ou,NULL,url,100);
- fprintf(fp_ou,"</td><td class=\"data2\">%s</td></tr>\n",rule);
- }
- fclose(fp_in);
-Index: util.c
-===================================================================
---- util.c (revision 594)
-+++ util.c (revision 595)
-@@ -1724,16 +1724,18 @@
- so the A tag is not written around the host name.
-
- \param fp_ou The handle of the HTML file.
-+ \param scheme The scheme to print in the link (http:// if the pointer is null).
- \param url The host to display in the HTML file.
- \param maxlen The maximum number of characters to print into the host name.
- */
--void output_html_link(FILE *fp_ou,const char *url,int maxlen)
-+void output_html_link(FILE *fp_ou,const char *scheme,const char *url,int maxlen)
- {
- if (url[0]==ALIAS_PREFIX) {
- // this is an alias, no need for a A tag
- output_html_string(fp_ou,url+1,100);
- } else {
-- fputs("<a href=\"http://",fp_ou);
-+ if (scheme==NULL) scheme="http://";
-+ fprintf(fp_ou,"<a href=\"%s",scheme);
- output_html_url(fp_ou,url);
- fputs("\">",fp_ou);
- output_html_string(fp_ou,url,100);
-Index: denied.c
-===================================================================
---- denied.c (revision 594)
-+++ denied.c (revision 595)
-@@ -158,7 +158,7 @@
- output_html_url(fp_ou,url);
- fprintf(fp_ou,"\"><img src=\"%s/sarg-squidguard-block.png\"></a>&nbsp;",ImageFile);
- }
-- output_html_link(fp_ou,url,100);
-+ output_html_link(fp_ou,"",url,100); //the URL contains the scheme
- fputs("</td></tr>\n",fp_ou);
- }
- fclose(fp_in);
-Index: include/defs.h
-===================================================================
---- include/defs.h (revision 594)
-+++ include/defs.h (revision 595)
-@@ -253,7 +253,7 @@
- __attribute__((warn_unused_result)) int write_html_trailer(FILE *fp_ou);
- void output_html_string(FILE *fp_ou,const char *str,int maxlen);
- void output_html_url(FILE *fp_ou,const char *url);
--void output_html_link(FILE *fp_ou,const char *url,int maxlen);
-+void output_html_link(FILE *fp_ou,const char *scheme,const char *url,int maxlen);
- void debuga(const char *msg,...) __attribute__((format(printf,1,2)));
- void debugaz(const char *msg,...) __attribute__((format(printf,1,2)));
- void my_lltoa(unsigned long long int n, char *s, int ssize, int len);
-Index: download.c
-===================================================================
---- download.c (revision 594)
-+++ download.c (revision 595)
-@@ -156,7 +156,7 @@
- output_html_url(fp_ou,url);
- fprintf(fp_ou,"\"><img src=\"%s/sarg-squidguard-block.png\"></a>&nbsp;",ImageFile);
- }
-- output_html_link(fp_ou,url,100);
-+ output_html_link(fp_ou,"",url,100);//scheme is kept from the log file
- fputs("</td></tr>\n",fp_ou);
- }
- fclose(fp_in);
-Index: topsites.c
-===================================================================
---- topsites.c (revision 594)
-+++ topsites.c (revision 595)
-@@ -275,7 +275,7 @@
- fputs("\"><img src=\"../images/sarg-squidguard-block.png\"></a>&nbsp;",fp_ou);
- }
-
-- output_html_link(fp_ou,url,100);
-+ output_html_link(fp_ou,NULL,url,100);
- fputs("</td><td class=\"data\"",fp_ou);
- if (SortTableJs[0]) fprintf(fp_ou," sorttable_customkey=\"%"PRId64"\"",(uint64_t)twork1);
- fprintf(fp_ou,">%s</td>",fixnum(twork1,1));
-Index: authfail.c
-===================================================================
---- authfail.c (revision 594)
-+++ authfail.c (revision 595)
-@@ -189,7 +189,7 @@
- output_html_url(fp_ou,url);
- fputs("\"><img src=\"../images/sarg-squidguard-block.png\"></a>&nbsp;",fp_ou);
- }
-- output_html_link(fp_ou,url,100);
-+ output_html_link(fp_ou,"",url,100); //the original scheme is left in the URL
- fputs("</td></th>\n",fp_ou);
- }
- fclose(fp_in);
-Index: siteuser.c
-===================================================================
---- siteuser.c (revision 594)
-+++ siteuser.c (revision 595)
-@@ -146,7 +146,7 @@
- output_html_url(fp_ou,ourl);
- fputs("\"><img src=\"../images/sarg-squidguard-block.png\"></a>&nbsp;",fp_ou);
- }
-- output_html_link(fp_ou,ourl,100);
-+ output_html_link(fp_ou,NULL,ourl,100);
- fputs("</td>",fp_ou);
-
- if (BytesInSitesUsersReport) {
-Index: html.c
-===================================================================
---- html.c (revision 594)
-+++ html.c (revision 595)
-@@ -285,7 +285,7 @@
- output_html_url(fp_ou,url);
- fprintf(fp_ou,"\"><img src=\"%s/sarg-squidguard-block.png\"></a>&nbsp;",tmp6);
- }
-- output_html_link(fp_ou,url,100);
-+ output_html_link(fp_ou,NULL,url,100);
- fputs("</td>",fp_ou);
- }
-
-Index: dansguardian_report.c
-===================================================================
---- dansguardian_report.c (revision 594)
-+++ dansguardian_report.c (revision 595)
-@@ -155,7 +155,7 @@
- }
-
- fprintf(fp_ou,"<tr><td class=\"data2\">%s</td><td class=\"data2\">%s</td><td class=\"data2\">%s-%s</td><td class=\"data2\">",name,ip,date,hour);
-- output_html_link(fp_ou,url,100);
-+ output_html_link(fp_ou,NULL,url,100);
- fprintf(fp_ou,"</td><td class=\"data2\">%s</td></tr>\n",rule);
- }
- fclose(fp_in);
diff --git a/www/sarg/files/patch-log.c b/www/sarg/files/patch-log.c
deleted file mode 100644
index 71bc9d805e3b..000000000000
--- a/www/sarg/files/patch-log.c
+++ /dev/null
@@ -1,33 +0,0 @@
-X-Git-Url: http://sarg.git.sourceforge.net/git/gitweb.cgi?p=sarg%2Fsarg;a=blobdiff_plain;f=log.c;h=a6d6c61014836957c7b5313a282c6d746405c9b9;hp=ed200b3cb8531e5c1cbb78252714d693a6bc9ea3;hb=24eb624ea44bf4c82c602cea2195d85558787b47;hpb=b8523e5ded9d9d80d6330c6d346dc57f5cf147bf
-
-diff --git a/log.c b/log.c
-index ed200b3..a6d6c61 100644
---- log.c
-+++ log.c
-@@ -147,7 +147,7 @@ int main(int argc,char *argv[])
- unsigned long recs2=0UL;
- int OutputNonZero = REPORT_EVERY_X_LINES ;
- bool download_flag=false;
-- char *download_url=NULL;
-+ char download_url[MAXLEN];
- struct getwordstruct gwarea;
- longline line;
- time_t tnum;
-@@ -1331,7 +1331,7 @@ int main(int argc,char *argv[])
- */
- download_flag=is_download_suffix(full_url);
- if (download_flag) {
-- download_url=full_url;
-+ safe_strcpy(download_url,full_url,sizeof(download_url));
- download_count++;
- }
- } else
-@@ -1503,7 +1503,7 @@ int main(int argc,char *argv[])
-
- totregsg++;
-
-- if(!dataonly && download_flag && download_url && strstr(code,"DENIED") == 0) {
-+ if(!dataonly && download_flag && strstr(code,"DENIED") == 0) {
- ndownload = 1;
-
- if ( ! fp_Download_Unsort ) {