Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
Colortail works like the standard tail but it can optionally read
a color config file, where expressions are specified for coloring
the results.
Thus it can be used to quickly get an overview of interesting
activity by colorizing relevant lines brightred or some other color
of your choice.
+25
View File
@@ -0,0 +1,25 @@
# $NetBSD: Makefile,v 1.19 2012/10/08 09:57:18 asau Exp $
DISTNAME= colortail-0.3.0
CATEGORIES= misc
MASTER_SITES= http://joakimandersson.se/files/
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://joakimandersson.se/projects/colortail/
COMMENT= Colour-able replacement for tail(1)
USE_LANGUAGES= c c++
GNU_CONFIGURE= yes
CONFIGURE_ARGS+=--datadir=${PREFIX}/share/examples/colortail
INSTALLATION_DIRS= ${PKGMANDIR}/man1 share/examples/colortail
post-install:
${INSTALL_MAN} ${WRKSRC}/colortail.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
cd ${WRKSRC}/example-conf/ && \
${INSTALL_DATA} conf.kernel conf.messages conf.secure \
conf.xferlog conf.daemon ${DESTDIR}${PREFIX}/share/examples/colortail
.include "../../devel/libgetopt/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
+8
View File
@@ -0,0 +1,8 @@
@comment $NetBSD: PLIST,v 1.3 2009/06/14 18:07:19 joerg Exp $
bin/colortail
man/man1/colortail.1
share/examples/colortail/conf.daemon
share/examples/colortail/conf.kernel
share/examples/colortail/conf.messages
share/examples/colortail/conf.secure
share/examples/colortail/conf.xferlog
+16
View File
@@ -0,0 +1,16 @@
$NetBSD: distinfo,v 1.8 2011/11/26 17:16:53 joerg Exp $
SHA1 (colortail-0.3.0.tar.gz) = 5c55a9b0550868129d8ede133f6b34fa5356c5ce
RMD160 (colortail-0.3.0.tar.gz) = 9141fff0a26ec653b39f580749336cbd16c92492
Size (colortail-0.3.0.tar.gz) = 54329 bytes
SHA1 (patch-ColorTail.cc) = ff028051f92db984179fdf87465716a338910a5d
SHA1 (patch-Info.cc) = d6f3670381c030ac44df516a049f419ee6692031
SHA1 (patch-Usage.cc) = c1739c04c2d51a9bd5b1019f009f4cf52d2feafa
SHA1 (patch-aa) = b7e930ed1de83b9bba507fb5b3f7b9a500132257
SHA1 (patch-ab) = 927b8b6ef439cbf4d3d3e67b3f7c0a82b8df6584
SHA1 (patch-ac) = fed43fd42497b951dd237f86ef08337f76fef494
SHA1 (patch-ad) = 96a95b7ab3435465bca767a90645a0bc07a9d226
SHA1 (patch-ae) = 0c04839a28e2e4523cf058a03ee3a9ee87c904ee
SHA1 (patch-af) = d580a043185160cc26f78b9da849534b0c9ed58d
SHA1 (patch-ag) = 29222baff0953c1c78255092426926061ccd92c5
SHA1 (patch-main.cc) = 7e1ca6ef30e7962e3850179a3f59bf9db5aba1ac
+21
View File
@@ -0,0 +1,21 @@
$NetBSD: patch-ColorTail.cc,v 1.1 2011/11/26 17:16:53 joerg Exp $
--- ColorTail.cc.orig 2011-11-26 15:16:04.000000000 +0000
+++ ColorTail.cc
@@ -17,7 +17,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <iostream.h>
+#include <iostream>
#include <assert.h>
#include <unistd.h>
@@ -26,6 +26,7 @@
#include "OptionsParser.h"
#include "Colorizer.h"
+using namespace std;
// the constructor
ColorTail::ColorTail()
+19
View File
@@ -0,0 +1,19 @@
$NetBSD: patch-Info.cc,v 1.1 2011/11/26 17:16:53 joerg Exp $
--- Info.cc.orig 2011-11-26 15:16:33.000000000 +0000
+++ Info.cc
@@ -17,11 +17,13 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <iostream.h>
+#include <iostream>
#include "Info.h"
#include "config.h"
+using namespace std;
+
Info::Info()
{
}
+18
View File
@@ -0,0 +1,18 @@
$NetBSD: patch-Usage.cc,v 1.1 2011/11/26 17:16:53 joerg Exp $
--- Usage.cc.orig 2011-11-26 15:14:52.000000000 +0000
+++ Usage.cc
@@ -17,10 +17,12 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <iostream.h>
+#include <iostream>
#include "Usage.h"
+using namespace std;
+
Usage::Usage()
{
}
+41
View File
@@ -0,0 +1,41 @@
$NetBSD: patch-aa,v 1.3 2011/11/26 17:16:53 joerg Exp $
--- TailFile.cc.orig 1999-08-04 23:09:38.000000000 +0000
+++ TailFile.cc
@@ -17,7 +17,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <iostream.h>
+#include <iostream>
#include <string.h>
#include <stdio.h>
#include <sys/stat.h>
@@ -25,6 +25,8 @@
#include "TailFile.h"
+using namespace std;
+
TailFile::TailFile()
{
m_filename = NULL;
@@ -375,7 +377,7 @@ void TailFile::follow_print(int n, int v
// check if there isn't a follow buffer
if (m_follow_buffer == NULL)
{
- m_follow_buffer = new ostrstream();
+ m_follow_buffer = new std::ostrstream();
}
// make buffer
@@ -417,6 +419,9 @@ void TailFile::follow_print(int n, int v
int ch = fgetc(m_file);
// add the character to the string
+ if (ch == EOF)
+ clearerr(m_file); // required by POSIX and ANSI
+ else
m_follow_buffer->put(ch);
// check if return
+18
View File
@@ -0,0 +1,18 @@
$NetBSD: patch-ab,v 1.3 2011/11/26 17:16:53 joerg Exp $
--- CfgFileParser.h.orig 1999-08-03 19:40:52.000000000 +0000
+++ CfgFileParser.h
@@ -24,8 +24,12 @@
#include "config.h"
#include <sys/types.h>
+#if !defined(__NetBSD__) && !defined(__DragonFly__)
#include <regex.h>
-#include <fstream.h>
+#endif
+#include <fstream>
+
+using namespace std;
#ifdef HAVE_GNUREGEX_H
# include <gnuregex.h>
+96
View File
@@ -0,0 +1,96 @@
$NetBSD: patch-ac,v 1.1 2002/12/13 23:01:43 jschauma Exp $
--- /dev/null Fri Dec 13 17:52:18 2002
+++ colortail.1 Fri Dec 13 17:54:23 2002
@@ -0,0 +1,91 @@
+.TH COLORTAIL 1 "August 02, 2001" "System Utilities" colortail
+.SH NAME
+colortail \- output the last part of files, optionally with color
+
+.SH SYNOPSIS
+.B colortail
+[\fIOPTION\fR]... [\fIFILE\fR]...
+
+.SH DESCRIPTION
+Print last 10 lines of each FILE to standard output.
+With more than one FILE, precede each with a header giving the file name.
+
+\fBcolortail\fR works like tail but can optionally read one or more config files
+where it's specified which patterns results in which colors.
+
+\fBcolortail\fR uses regular expressions (see \fIregex(7)\fR) to determine
+which lines and parts of lines to print in which colors.
+
+.SH USAGE
+Most options are easily understandood. The only somewhat strange option is the
+\fI-k\fR option that specifies the config files so \fBcolortail\fR knows what
+should be printed in which color.
+
+If only one config file and one or more tail files is given the config file
+is treated as a global one, i.e.
+
+\fBcolortail\fR \fI-k\fR conf.global file1 file2 file3
+
+Multiple config files are separated with a , and if one tail file shouldn't
+have a config file just leave it blank, i.e.
+
+\fBcolortail\fR \fI-k\fR conf.file1,,conf.file3 file1 file2 file3
+
+.SH OPTIONS
+This program follow the usual GNU command line syntax, with long options
+starting with two dashes (`--'). A summary of options is included below.
+
+.TP
+.B \-f, \-\-follow
+output appended data as the file grows
+
+.TP
+.B \-h, \-\-help
+Show summary of options.
+.TP
+.B \-k, \-\-config=file, \-\-config=file1,file2,...
+color config files for the tail files. If only one config file it's global
+otherwise one config file for each tail file
+.TP
+\fB\-n, \-\-lines=\fR\fIN\fR
+output the last \fIN\fR lines, instead of last 10
+.TP
+.TP
+.B \-v, \-\-version
+output version information and exit
+
+.SH FILE FORMAT
+The file specified by the \fI-k\fR option tells colortail how to display the
+output according to regular expressions. The file mapps one or more regular
+expressions to one of the following colors: brightblue, brightred,
+brightwhite, blue, cyan, green, magenta, yellow. Comments start with a "#":
+
+COLOR brightred
+.br
+{
+.br
+# matches the word "root"
+.br
+^.*(root).*$
+.br
+}
+.br
+
+.SH VERSION
+0.3.0
+
+.SH BUGS
+
+Under certain circumstances \fBcolortail\fR may miss some characters when
+tailing forever. This bug also exists in \fItail(1)\fR. If you have found a
+bug, please send a mail to pt98jan@student.hk-r.se
+
+.SH SEE ALSO
+.BR regex (7),
+.BR tail (1)
+
+.SH AUTHOR
+.nr
+Joakim Andersson <pt98jan@student.hk-r.se> - colortail
+.br
+Jan Schaumann <jschauma@netmeister.org> - this man page
+21
View File
@@ -0,0 +1,21 @@
$NetBSD: patch-ad,v 1.3 2011/11/26 17:16:53 joerg Exp $
--- CfgFileParser.cc.orig 1999-08-03 19:40:44.000000000 +0000
+++ CfgFileParser.cc
@@ -20,10 +20,14 @@
#include "CfgFileParser.h"
#include <stdio.h>
-#include <fstream.h>
+#include <fstream>
#include <assert.h>
#include <string.h>
-#include <malloc.h>
+#include <stdlib.h>
+
+#include <iostream>
+
+using namespace std;
// ## class SearchData ##
+56
View File
@@ -0,0 +1,56 @@
$NetBSD: patch-ae,v 1.2 2011/11/26 17:16:53 joerg Exp $
--- Colorizer.cc.orig 1999-08-03 19:41:17.000000000 +0000
+++ Colorizer.cc
@@ -23,7 +23,8 @@
#include <assert.h>
#include <stdio.h>
-#include <strstream.h>
+#include <strstream>
+#include <cstring>
Colorizer::Colorizer()
@@ -111,7 +112,7 @@ char* Colorizer::colorize(char *str)
ListIterator<SearchData*> itr(*m_items_list);
// will contain the new string
- ostrstream newstr;
+ std::ostrstream newstr;
SearchData *current;
int i = 0;
@@ -172,7 +173,7 @@ char* Colorizer::colorize(char *str)
}
// write ansi reset str and a newline
- newstr << ANSI_RESET_STR << endl << ends;
+ newstr << ANSI_RESET_STR << std::endl << std::ends;
// return the new string
return newstr.str();
}
@@ -187,12 +188,12 @@ char* Colorizer::colorize(char *str)
// check if str ends in '\n'
if (str[strlen(str)] == '\n')
{
- newstr << str << ends;
+ newstr << str << std::ends;
}
else
{
// doesn't end in '\n'
- newstr << str << endl << ends;
+ newstr << str << std::endl << std::ends;
}
// return the new string
@@ -240,7 +241,7 @@ char* Colorizer::colorize(char *str)
// write newline and null
//newstr << endl << ends;
- newstr << ends;
+ newstr << std::ends;
// return the new string
+33
View File
@@ -0,0 +1,33 @@
$NetBSD: patch-af,v 1.2 2011/11/26 17:16:53 joerg Exp $
--- OptionsParser.cc.orig 1999-08-04 23:23:39.000000000 +0000
+++ OptionsParser.cc
@@ -17,8 +17,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <iostream.h>
-#include <strstream.h>
+#include <iostream>
+#include <strstream>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
@@ -27,6 +27,8 @@
#include "Info.h"
#include "Usage.h"
+using namespace std;
+
// methods for class Options
Options::Options()
@@ -130,7 +132,7 @@ Options* OptionsParser::parse(int argc,
int loop = 1;
while (loop)
{
- ostrstream filename;
+ std::ostrstream filename;
while (1)
{
+23
View File
@@ -0,0 +1,23 @@
$NetBSD: patch-ag,v 1.1 2004/01/11 21:22:41 jschauma Exp $
--- TailFile.h.orig 2004-01-11 16:15:51.000000000 -0500
+++ TailFile.h 2004-01-11 16:15:55.000000000 -0500
@@ -23,7 +23,8 @@
#include "Colorizer.h"
#include <stdio.h>
-#include <strstream.h>
+#include <iostream>
+#include <strstream>
#define MAX_CHARS_READ 1024
@@ -40,7 +41,7 @@
// the stream position
long m_position;
// the follow buffer, used in follow_print
- ostrstream *m_follow_buffer;
+ std::ostrstream *m_follow_buffer;
// private methods
void find_position(int n);
+12
View File
@@ -0,0 +1,12 @@
$NetBSD: patch-main.cc,v 1.1 2011/11/26 17:16:53 joerg Exp $
--- main.cc.orig 2011-11-26 15:17:12.000000000 +0000
+++ main.cc
@@ -18,6 +18,7 @@
*/
#include <stdio.h>
+#include <stdlib.h>
#include <signal.h>
#include "main.h"