From 27443d97cdccd2f081f85b03736f4516c7fe8382 Mon Sep 17 00:00:00 2001 From: hubertf Date: Wed, 24 Jan 2001 03:53:06 +0000 Subject: [PATCH] Add colortail-0.3.0: colour-able replacement for tail(1) Colortail works like the standard tail but it can optionally read a color config file where it's specified expressions that results in colors. It can be used to quickly get an overview of interesting activity by ie. colorize those brightred or some other color of your choose. Examples of the color configuration files are in $PREFIX/share/examples/colortail. XXX patch-aa replaced to work around a bug in this program that assumes non posix/ansi semantics of fgetc(): clearerr() must be used after EOF from fgetc() to read any new data. --- misc/colortail/Makefile | 24 ++++++++++++++++++++++++ misc/colortail/files/md5 | 3 +++ misc/colortail/files/patch-sum | 4 ++++ misc/colortail/patches/patch-aa | 16 ++++++++++++++++ misc/colortail/patches/patch-ab | 14 ++++++++++++++ misc/colortail/pkg/COMMENT | 1 + misc/colortail/pkg/DESCR | 7 +++++++ misc/colortail/pkg/PLIST | 8 ++++++++ 8 files changed, 77 insertions(+) create mode 100644 misc/colortail/Makefile create mode 100644 misc/colortail/files/md5 create mode 100644 misc/colortail/files/patch-sum create mode 100644 misc/colortail/patches/patch-aa create mode 100644 misc/colortail/patches/patch-ab create mode 100644 misc/colortail/pkg/COMMENT create mode 100644 misc/colortail/pkg/DESCR create mode 100644 misc/colortail/pkg/PLIST diff --git a/misc/colortail/Makefile b/misc/colortail/Makefile new file mode 100644 index 000000000000..6abd32415a56 --- /dev/null +++ b/misc/colortail/Makefile @@ -0,0 +1,24 @@ +# $NetBSD: Makefile,v 1.1.1.1 2001/01/24 03:53:06 hubertf Exp $ +# FreeBSD Id: ports/misc/colortail/Makefile,v 1.10 2000/06/28 17:20:27 alex Exp + +DISTNAME= colortail-0.3.0 +CATEGORIES= misc +MASTER_SITES= http://www.student.hk-r.se/~pt98jan/ + +MAINTAINER= zuntum@eik.pl +HOMEPAGE= http://www.student.hk-r.se/~pt98jan/colortail.html + +GNU_CONFIGURE= yes +CONFIGURE_ARGS+=--datadir=${PREFIX}/share/examples/colortail +DESCR_SRC= ${WRKDIR}/.DESCR_SRC + +post-install: + ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/colortail + cd ${WRKSRC}/example-conf/ && \ + ${INSTALL_DATA} conf.kernel conf.messages conf.secure \ + conf.xferlog conf.daemon ${PREFIX}/share/examples/colortail + ${SED} \ + -e 's|@PREFIX@|${PREFIX}|' \ + <${PKGDIR}/DESCR >${DESCR_SRC} + +.include "../../mk/bsd.pkg.mk" diff --git a/misc/colortail/files/md5 b/misc/colortail/files/md5 new file mode 100644 index 000000000000..2711fb2f2801 --- /dev/null +++ b/misc/colortail/files/md5 @@ -0,0 +1,3 @@ +$NetBSD: md5,v 1.1.1.1 2001/01/24 03:53:06 hubertf Exp $ + +MD5 (colortail-0.3.0.tar.gz) = 2589d3e372080f4052d1cc0d6550508f diff --git a/misc/colortail/files/patch-sum b/misc/colortail/files/patch-sum new file mode 100644 index 000000000000..0bb3045e7ad9 --- /dev/null +++ b/misc/colortail/files/patch-sum @@ -0,0 +1,4 @@ +$NetBSD: patch-sum,v 1.1.1.1 2001/01/24 03:53:06 hubertf Exp $ + +MD5 (patch-aa) = 4566f54d1b615346d046a1c13a096f94 +MD5 (patch-ab) = 8aca23aca5547e8c77ae5684c86ad695 diff --git a/misc/colortail/patches/patch-aa b/misc/colortail/patches/patch-aa new file mode 100644 index 000000000000..c711fb98b283 --- /dev/null +++ b/misc/colortail/patches/patch-aa @@ -0,0 +1,16 @@ +$NetBSD: patch-aa,v 1.1.1.1 2001/01/24 03:53:06 hubertf Exp $ + +--- TailFile.cc.orig Wed Jan 24 04:44:29 2001 ++++ TailFile.cc +@@ -417,7 +417,10 @@ + int ch = fgetc(m_file); + + // add the character to the string +- m_follow_buffer->put(ch); ++ if (ch == EOF) ++ clearerr(m_file); // required by POSIX and ANSI ++ else ++ m_follow_buffer->put(ch); + + // check if return + if (ch == '\n') diff --git a/misc/colortail/patches/patch-ab b/misc/colortail/patches/patch-ab new file mode 100644 index 000000000000..f62787566f07 --- /dev/null +++ b/misc/colortail/patches/patch-ab @@ -0,0 +1,14 @@ +$NetBSD: patch-ab,v 1.1.1.1 2001/01/24 03:53:06 hubertf Exp $ + +--- CfgFileParser.h.old Wed Jun 21 12:55:57 2000 ++++ CfgFileParser.h Wed Jun 21 12:56:09 2000 +@@ -24,7 +24,9 @@ + #include "config.h" + + #include ++#if !defined(__NetBSD__) + #include ++#endif + #include + + #ifdef HAVE_GNUREGEX_H diff --git a/misc/colortail/pkg/COMMENT b/misc/colortail/pkg/COMMENT new file mode 100644 index 000000000000..6011425457fe --- /dev/null +++ b/misc/colortail/pkg/COMMENT @@ -0,0 +1 @@ +colour-able replacement for tail(1) diff --git a/misc/colortail/pkg/DESCR b/misc/colortail/pkg/DESCR new file mode 100644 index 000000000000..9bb82163e890 --- /dev/null +++ b/misc/colortail/pkg/DESCR @@ -0,0 +1,7 @@ +Colortail works like the standard tail but it can optionally read +a color config file where it's specified expressions that results in colors. +It can be used to quickly get an overview of interesting activity by +ie. colorize those brightred or some other color of your choose. + +Examples of the color configuration files are +in @PREFIX@/share/examples/colortail. diff --git a/misc/colortail/pkg/PLIST b/misc/colortail/pkg/PLIST new file mode 100644 index 000000000000..1b072f5270de --- /dev/null +++ b/misc/colortail/pkg/PLIST @@ -0,0 +1,8 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2001/01/24 03:53:06 hubertf Exp $ +bin/colortail +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 +@dirrm share/examples/colortail