View | Details | Raw Unified | Return to bug 227865 | Differences between
and this patch

Collapse All | Expand All

(-)sysutils/apachetop/Makefile (-16 / +14 lines)
Lines 2-39 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	apachetop
4
PORTNAME=	apachetop
5
PORTVERSION=	0.12.6
5
PORTVERSION=	0.18.4
6
PORTREVISION=	5
7
CATEGORIES=	sysutils
6
CATEGORIES=	sysutils
8
MASTER_SITES=	https://www.freebsd.systems/files/
9
7
10
MAINTAINER=	lukasz@wasikowski.net
8
MAINTAINER=	lukasz@wasikowski.net
11
COMMENT=	Apache realtime log stats
9
COMMENT=	Apache realtime log stats
12
10
13
LICENSE=	BSD3CLAUSE
11
LICENSE=	BSD3CLAUSE
12
LICENSE_FILE=	${WRKSRC}/LICENSE
14
13
15
GNU_CONFIGURE=	yes
14
HAS_CONFIGURE=		yes
16
USES=		ncurses readline
15
CONFIGURE_ARGS=	--mandir=${PREFIX}/man
17
16
17
USES=		autoreconf ncurses readline
18
USE_GITHUB=	yes
19
GH_ACCOUNT=	tessus
20
21
USE_CXXSTD=gnu++98
22
18
PLIST_FILES=	bin/${PORTNAME} man/man1/${PORTNAME}.1.gz
23
PLIST_FILES=	bin/${PORTNAME} man/man1/${PORTNAME}.1.gz
19
24
20
OPTIONS_DEFINE=	ADNS FAM PCRE
25
OPTIONS_DEFINE=	ADNS FAM PCRE
26
21
ADNS_DESC=	Asynchronous-capable DNS support
27
ADNS_DESC=	Asynchronous-capable DNS support
22
23
ADNS_LIB_DEPENDS=	libadns.so:dns/adns
28
ADNS_LIB_DEPENDS=	libadns.so:dns/adns
24
ADNS_CONFIGURE_ON=	--with-adns=${LOCALBASE}
29
ADNS_CONFIGURE_WITH=	adns=${LOCALBASE}
25
30
26
FAM_LIB_DEPENDS=	libfam.so:devel/fam
31
FAM_LIB_DEPENDS=	libfam.so:devel/fam
27
FAM_CONFIGURE_ON=	--with-fam=${LOCALBASE}
32
FAM_CONFIGURE_WITH=	fam=${LOCALBASE}
28
33
29
PCRE_LIB_DEPENDS=	libpcre.so:devel/pcre
34
PCRE_LIB_DEPENDS=	libpcre.so:devel/pcre
30
PCRE_COFNIGURE_ON=	--with-pcre=${LOCALBASE}
35
PCRE_COFNIGURE_WITH=	pcre=${LOCALBASE}
31
36
32
post-patch:
33
	@${REINPLACE_CMD} -E -e 's,struct (circle_struct),\1,g' \
34
		${WRKSRC}/src/hits_circle.*
35
	@${REINPLACE_CMD} -E -e 's,enum (adns_queryflags),\1,g' \
36
		${WRKSRC}/src/log.*
37
	@cd ${WRKSRC} && ${TOUCH} -r configure.ac aclocal.m4 stamp-h.in
38
39
.include <bsd.port.mk>
37
.include <bsd.port.mk>
(-)sysutils/apachetop/distinfo (-2 / +3 lines)
Lines 1-2 Link Here
1
SHA256 (apachetop-0.12.6.tar.gz) = 850062414517055eab2440b788b503d45ebe9b290d4b2e027a5f887ad70f3f29
1
TIMESTAMP = 1535255129
2
SIZE (apachetop-0.12.6.tar.gz) = 126930
2
SHA256 (tessus-apachetop-0.18.4_GH0.tar.gz) = 1cbbfd1bf12275fb21e0cb6068b9050b2fee8c276887054a015bf103a1ae9cc6
3
SIZE (tessus-apachetop-0.18.4_GH0.tar.gz) = 43047
(-)sysutils/apachetop/files/patch-apachetop.h (-11 lines)
Lines 1-11 Link Here
1
--- src/apachetop.h.orig	Tue Dec 30 01:03:05 2003
2
+++ src/apachetop.h	Tue Dec 30 01:03:32 2003
3
@@ -190,7 +190,7 @@
4
 #define DEBUG_OUTPUT "/tmp/atop.debug"
5
 
6
 #ifndef DEFAULT_LOGFILE
7
-# define DEFAULT_LOGFILE "/var/httpd/apache_log"
8
+# define DEFAULT_LOGFILE "/var/log/httpd-access.log"
9
 #endif
10
 #define DEFAULT_CIRCLE_SIZE 30
11
 #define DEFAULT_CIRCLE_MODE TIMED_CIRCLE
(-)sysutils/apachetop/files/patch-resolver.h (-13 lines)
Lines 1-13 Link Here
1
--- src/resolver.h.orig	2005-10-15 18:10:01.000000000 +0200
2
+++ src/resolver.h	2008-11-20 16:14:31.000000000 +0100
3
@@ -10,8 +10,8 @@
4
 class Resolver
5
 {
6
 	public:
7
-	Resolver::Resolver(void);
8
-	Resolver::~Resolver(void);
9
+	Resolver(void);
10
+	~Resolver(void);
11
 	int add_request(char *request, enum resolver_action act);
12
 
13
 
(-)sysutils/apachetop/files/patch-src_apachetop.cc (-20 lines)
Lines 1-20 Link Here
1
--- src/apachetop.cc.orig	2005-10-15 16:23:31 UTC
2
+++ src/apachetop.cc
3
@@ -271,7 +271,7 @@ int main(int argc, char *argv[])
4
 	hm->create(cf.circle_size);
5
 	/* }}} */
6
 
7
-	memset(&gstats, (char) NULL, sizeof(gstats));
8
+	memset(&gstats, 0, sizeof(gstats));
9
 	gstats.start = time(NULL);
10
 
11
 	signal(SIGINT, &catchsig);
12
@@ -465,7 +465,7 @@ int main(int argc, char *argv[])
13
 					continue;
14
 				}
15
 
16
-				*nextline = (char) NULL;
17
+				*nextline = '\0';
18
 				++nextline;
19
 
20
 				/* which parser? */
(-)sysutils/apachetop/files/patch-src_display.cc (-20 lines)
Lines 1-20 Link Here
1
--- src/display.cc.orig	2005-10-15 16:10:01 UTC
2
+++ src/display.cc
3
@@ -1191,7 +1191,7 @@ void display_histogram()
4
 
5
 		/* compose a row of hashes */
6
 		memset(line, ' ', hist_width);
7
-		line[hist_width] = (char)NULL;
8
+		line[hist_width] = '\0';
9
 		for(j = 0 ; j < hist_width ; ++j)
10
 		{
11
 			if (bar_height[j] > y_scale)
12
@@ -1203,7 +1203,7 @@ void display_histogram()
13
 	}
14
 
15
 	memset(horiz_line, '-', hist_width);
16
-	horiz_line[hist_width] = (char)NULL;
17
+	horiz_line[hist_width] = '\0';
18
 	mvprintw(HISTOGRAM_START + hist_height, 2, "0+%*s",
19
 	    hist_width, horiz_line);
20
 	
(-)sysutils/apachetop/files/patch-src_hits__circle.cc (-11 lines)
Lines 1-11 Link Here
1
--- src/hits_circle.cc.orig	2018-02-04 09:36:17 UTC
2
+++ src/hits_circle.cc
3
@@ -24,7 +24,7 @@ int Hits_Circle::create(unsigned int passed_size)
4
 	}
5
 
6
 	reqcount = bytecount = 0;
7
-	memset(rc_summary, (char) NULL, sizeof(rc_summary));
8
+	memset(rc_summary, 0, sizeof(rc_summary));
9
 
10
 	return 0;
11
 }
(-)sysutils/apachetop/files/patch-src_log.cc (-56 lines)
Lines 1-56 Link Here
1
--- src/log.cc.orig	2018-02-04 09:36:17 UTC
2
+++ src/log.cc
3
@@ -37,7 +37,7 @@ int CommonLogParser::parse(char *logline, struct logbi
4
 	if (!bufcp)
5
 		return -1;
6
 	
7
-	*bufcp = (char) NULL;
8
+	*bufcp = '\0';
9
 	++bufcp;
10
 
11
 	/* quickly figure out if this is an IP or a host. We do this by
12
@@ -172,7 +172,7 @@ int CommonLogParser::parse(char *logline, struct logbi
13
 	/* find the end of referrer and null it */
14
 	if (!(bufcp = strchr(bufsp, '"')))
15
 		return -1;
16
-	*bufcp = (char) NULL;
17
+	*bufcp = '\0';
18
 
19
 	/* unless they want to keep it, skip over the protocol, ie http:// */
20
 	if ((cf.preserve_ref_protocol == 0) && (bufcp = strstr(bufsp, "://")))
21
@@ -230,7 +230,7 @@ char *LogParser::processURL(char **buf) /* {{{ */
22
 		return NULL;
23
 
24
 	/* null the space in front of it */
25
-	*endptr = (char) NULL;
26
+	*endptr = '\0';
27
 
28
 	/* TODO maybe we can use the protocol someday.. */
29
 
30
@@ -258,7 +258,7 @@ int LogParser::mungeURL(char **url, int *length) /* {{
31
 	char *bufcp, *endptr, *workptr;
32
 
33
 	endptr = *url + *length;
34
-	*endptr = (char) NULL;
35
+	*endptr = '\0';
36
 
37
 	/* do we want to keep the query string? */
38
 	if (!cf.keep_querystring)
39
@@ -273,7 +273,7 @@ int LogParser::mungeURL(char **url, int *length) /* {{
40
 			if (workptr < endptr)
41
 			{
42
 				/* we're ok */
43
-				*workptr = (char) NULL;
44
+				*workptr = '\0';
45
 				bufcp = workptr+1;
46
 			}
47
 		}
48
@@ -308,7 +308,7 @@ int LogParser::mungeURL(char **url, int *length) /* {{
49
 			if (workptr == endptr)
50
 				bufcp = workptr;
51
 		}
52
-		*bufcp = (char) NULL;
53
+		*bufcp = '\0';
54
 	}
55
 
56
 
(-)sysutils/apachetop/pkg-descr (-1 / +1 lines)
Lines 1-4 Link Here
1
ApacheTop watches a logfile generated by Apache (in standard common or
1
ApacheTop watches a logfile generated by Apache (in standard common or
2
combined log format) and generates human-parsable output in realtime.
2
combined log format) and generates human-parsable output in realtime.
3
3
4
WWW: http://www.webta.org/projects/apachetop/
4
WWW: https://github.com/tessus/apachetop 

Return to bug 227865