summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Trygve Kalleberg <karltk@gentoo.org>2002-09-08 21:29:42 +0000
committerKarl Trygve Kalleberg <karltk@gentoo.org>2002-09-08 21:29:42 +0000
commit6d0e17ad6284bd532a6fe2fc7a3178c1faf811fc (patch)
treef780ca5c05c4516adb5ae67c842cb52823c85367 /app-misc/colortail
parentAdded app-misc/colortail-0.3.0-r3 (diff)
downloadgentoo-2-6d0e17ad6284bd532a6fe2fc7a3178c1faf811fc.tar.gz
gentoo-2-6d0e17ad6284bd532a6fe2fc7a3178c1faf811fc.tar.bz2
gentoo-2-6d0e17ad6284bd532a6fe2fc7a3178c1faf811fc.zip
Fixes #6991.
Diffstat (limited to 'app-misc/colortail')
-rw-r--r--app-misc/colortail/ChangeLog16
-rw-r--r--app-misc/colortail/colortail-0.3.0-r3.ebuild65
-rw-r--r--app-misc/colortail/files/0.3.0/ansi-c++-gcc-3.2.diff345
-rw-r--r--app-misc/colortail/files/digest-colortail-0.3.0-r31
4 files changed, 419 insertions, 8 deletions
diff --git a/app-misc/colortail/ChangeLog b/app-misc/colortail/ChangeLog
index d519830e2dfd..619f853c70c1 100644
--- a/app-misc/colortail/ChangeLog
+++ b/app-misc/colortail/ChangeLog
@@ -1,30 +1,30 @@
# ChangeLog for app-misc/colortail
# Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL
-# $Header: /var/cvsroot/gentoo-x86/app-misc/colortail/ChangeLog,v 1.5 2002/07/21 21:29:41 owen Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-misc/colortail/ChangeLog,v 1.6 2002/09/08 21:29:42 karltk Exp $
+
+*colortail-0.3.0-r3 (08 Sep 2002)
+
+ 08 Sep 2002; Karl Trygve Kalleberg <karltk@gentoo.org> colortail-0.3.0-r3.ebuild files/digest-colortail-0.3.0-r3:
+ Add gcc-3.2 patch that gets applied if compiled with gccs more recent
+ than 2.95.3.
*colortail-0.3.0-r2 (14 Jul 2002)
21 Jul 2002; Owen Stampflee <owen@gentoo.org> :
-
Changed KEYWORDS="*" to KEYWORDS="x86 ppc"
-
- 14 Jul 2002; Brandon Low <lostlogic@gentoo.org> colortail-0.3.0-r2 :
-
+ 14 Jul 2002; Brandon Low <lostlogic@gentoo.org> colortail-0.3.0-r2.ebuild :
Fixed for gcc-3, cleaned up made pretty added SLOT KEYWORD RDEPEND
LICENSE to ebuild.
-
Removed old versions.
*colortail-0.3.0-r1 (14 May 2002)
14 May 2002; Grant Goodyear <g2boojum@gentoo.org> :
-
Added a symlink from /usr/bin/wrappers/tail to /usr/bin/colortail.
*colortail-0.3.0 (12 Feb 2002)
12 Feb 2002; mike polniak <mikpolniak@adelphia.net> colortail-0.3.0.ebuild :
-
Colortail lets you custom color your log files and works like tail.
diff --git a/app-misc/colortail/colortail-0.3.0-r3.ebuild b/app-misc/colortail/colortail-0.3.0-r3.ebuild
new file mode 100644
index 000000000000..2bc29b5fbef9
--- /dev/null
+++ b/app-misc/colortail/colortail-0.3.0-r3.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/app-misc/colortail/colortail-0.3.0-r3.ebuild,v 1.1 2002/09/08 21:29:42 karltk Exp $
+
+S=${WORKDIR}/${P}
+DESCRIPTION="Colortail custom colors your log files and works like tail"
+SRC_URI="http://www.student.hk-r.se/~pt98jan/colortail-0.3.0.tar.gz"
+HOMEPAGE="http://www.student.hk-r.se/~pt98jan/colortail.html"
+
+DEPEND="virtual/glibc"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="x86 ppc"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ # 2002-09-08: karltk
+ # This bit of trickery conditionally applies the gcc-3.2 patch
+ # if the desired compiler is not the 2.95.x series. It is assumed
+ # that if it's not 2.95, it is 3.0.x or newer.
+ if [ -z "${CXX}" ] ; then
+ CXX=g++
+ fi
+ if [ "`${CXX} -dumpversion | cut -d. -f1,2`" != "2.95" ] ; then
+ # Both 3.1.x and 3.2 work with the patch.
+ patch -p1 < ${FILESDIR}/${PV}/ansi-c++-gcc-3.2.diff || die
+ fi
+ ${CXX} -dumpversion > .gentoo-compiler-version
+}
+
+src_compile() {
+ if [ -z "${CXX}" ] ; then
+ CXX=g++
+ fi
+ if [ "`cat .gentoo-compiler-version`" != "`${CXX} -dumpversion`" ] ; then
+ eerror "You must unpack and compile with the same CXX setting"
+ die
+ fi
+ econf || die
+ make || die
+}
+
+src_install() {
+
+ make DESTDIR=${D} install || die
+ dodoc README example-conf/conf*
+ dodir /usr/bin/wrappers
+ dosym /usr/bin/colortail /usr/bin/wrappers/tail
+}
+
+pkg_postinst() {
+ einfo
+ if grep /usr/bin/wrappers /etc/profile > /dev/null
+ then
+ einfo "/etc/profile already updated for wrappers"
+ else
+ einfo "Add this to the end of your ${ROOT}etc/profile:"
+ einfo
+ einfo "#Put /usr/bin/wrappers in path before /usr/bin"
+ einfo 'export PATH=/usr/bin/wrappers:${PATH}'
+ fi
+ einfo
+}
diff --git a/app-misc/colortail/files/0.3.0/ansi-c++-gcc-3.2.diff b/app-misc/colortail/files/0.3.0/ansi-c++-gcc-3.2.diff
new file mode 100644
index 000000000000..2b0e7a32c41a
--- /dev/null
+++ b/app-misc/colortail/files/0.3.0/ansi-c++-gcc-3.2.diff
@@ -0,0 +1,345 @@
+diff -Naur colortail-0.3.0/CfgFileParser.cc colortail-0.3.0-new/CfgFileParser.cc
+--- colortail-0.3.0/CfgFileParser.cc Tue Aug 3 14:40:44 1999
++++ colortail-0.3.0-new/CfgFileParser.cc Sat Aug 24 16:03:58 2002
+@@ -19,12 +19,12 @@
+
+ #include "CfgFileParser.h"
+
+-#include <stdio.h>
+-#include <fstream.h>
++#include <iostream>
+ #include <assert.h>
+-#include <string.h>
++#include <string>
+ #include <malloc.h>
+
++using namespace std;
+
+ // ## class SearchData ##
+
+@@ -499,7 +499,7 @@
+
+
+
+-int CfgFileParser::parse(char *filename)
++int CfgFileParser::parse(const char *filename)
+ {
+ // parses the cfg file and sets up the list of SearchData elements
+ // returns number of SearchData items created
+diff -Naur colortail-0.3.0/CfgFileParser.h colortail-0.3.0-new/CfgFileParser.h
+--- colortail-0.3.0/CfgFileParser.h Tue Aug 3 14:40:52 1999
++++ colortail-0.3.0-new/CfgFileParser.h Sat Aug 24 16:03:21 2002
+@@ -25,7 +25,8 @@
+
+ #include <sys/types.h>
+ #include <regex.h>
+-#include <fstream.h>
++#include <iostream>
++#include <fstream>
+
+ #ifdef HAVE_GNUREGEX_H
+ # include <gnuregex.h>
+@@ -80,7 +81,7 @@
+ {
+ private:
+ List<SearchData*> *m_items_list;
+- ifstream m_infile;
++ std::ifstream m_infile;
+ char *m_filename;
+ int m_line;
+
+@@ -97,7 +98,7 @@
+ CfgFileParser();
+ ~CfgFileParser();
+
+- int parse(char *filename);
++ int parse(const char *filename);
+ List<SearchData*>* get_items_list();
+ };
+
+diff -Naur colortail-0.3.0/ColorTail.cc colortail-0.3.0-new/ColorTail.cc
+--- colortail-0.3.0/ColorTail.cc Tue Aug 3 14:41:02 1999
++++ colortail-0.3.0-new/ColorTail.cc Sat Aug 24 15:28:21 2002
+@@ -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()
+diff -Naur colortail-0.3.0/Colorizer.cc colortail-0.3.0-new/Colorizer.cc
+--- colortail-0.3.0/Colorizer.cc Tue Aug 3 14:41:17 1999
++++ colortail-0.3.0-new/Colorizer.cc Sat Aug 24 16:07:33 2002
+@@ -22,9 +22,10 @@
+ #include "TailFile.h"
+
+ #include <assert.h>
+-#include <stdio.h>
+-#include <strstream.h>
++#include <iostream>
++#include <string>
+
++using namespace std;
+
+ Colorizer::Colorizer()
+ {
+@@ -58,7 +59,7 @@
+ }
+
+
+-Colorizer::Colorizer(char *cfg_file)
++Colorizer::Colorizer(const char *cfg_file)
+ {
+ // other constructor
+
+@@ -85,7 +86,7 @@
+ free_items();
+ }
+
+-char* Colorizer::colorize(char *str)
++const char* Colorizer::colorize(const char *str)
+ {
+ // colorize the string, returns a new string containing
+ // the colorized version of str
+@@ -111,7 +112,7 @@
+ ListIterator<SearchData*> itr(*m_items_list);
+
+ // will contain the new string
+- ostrstream newstr;
++ ostringstream newstr;
+
+ SearchData *current;
+ int i = 0;
+@@ -174,7 +175,7 @@
+ // write ansi reset str and a newline
+ newstr << ANSI_RESET_STR << endl << ends;
+ // return the new string
+- return newstr.str();
++ return newstr.str().c_str();
+ }
+ }
+ }
+@@ -196,7 +197,7 @@
+ }
+
+ // return the new string
+- return newstr.str();
++ return newstr.str().c_str();
+ }
+
+ // did we find submatches?
+@@ -250,7 +251,7 @@
+ // cout << "DEBUG: " << bla << " END DEBUG" << endl;
+
+
+- return newstr.str();
++ return newstr.str().c_str();
+
+ }
+
+diff -Naur colortail-0.3.0/Colorizer.h colortail-0.3.0-new/Colorizer.h
+--- colortail-0.3.0/Colorizer.h Tue Aug 3 14:41:25 1999
++++ colortail-0.3.0-new/Colorizer.h Sat Aug 24 16:07:43 2002
+@@ -35,10 +35,10 @@
+ Colorizer();
+
+ public:
+- Colorizer(char *cfg_file);
++ Colorizer(const char *cfg_file);
+ ~Colorizer();
+
+- char* colorize(char *str);
++ const char* colorize(const char *str);
+ };
+
+
+diff -Naur colortail-0.3.0/Info.cc colortail-0.3.0-new/Info.cc
+--- colortail-0.3.0/Info.cc Tue Aug 3 14:41:38 1999
++++ colortail-0.3.0-new/Info.cc Sat Aug 24 15:58:29 2002
+@@ -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()
+ {
+ }
+diff -Naur colortail-0.3.0/OptionsParser.cc colortail-0.3.0-new/OptionsParser.cc
+--- colortail-0.3.0/OptionsParser.cc Wed Aug 4 18:23:39 1999
++++ colortail-0.3.0-new/OptionsParser.cc Sat Aug 24 15:59:41 2002
+@@ -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 <sstream>
+ #include <string.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+@@ -27,6 +27,7 @@
+ #include "Info.h"
+ #include "Usage.h"
+
++using namespace std;
+ // methods for class Options
+
+ Options::Options()
+@@ -130,7 +131,7 @@
+ int loop = 1;
+ while (loop)
+ {
+- ostrstream filename;
++ ostringstream filename;
+
+ while (1)
+ {
+@@ -138,7 +139,7 @@
+ {
+ // found seperator
+ // set filename in options class
+- o->cfg_filenames[o->nr_cfg_files] = filename.str();
++ o->cfg_filenames[o->nr_cfg_files] = filename.str().c_str();
+
+ // increase the nr_cfg_files counter
+ (o->nr_cfg_files)++;
+@@ -154,7 +155,7 @@
+ {
+ // found end of string
+ // set filename in options class
+- o->cfg_filenames[o->nr_cfg_files] = filename.str();
++ o->cfg_filenames[o->nr_cfg_files] = filename.str().c_str();
+
+ // increase the nr_cfg_files counter
+ (o->nr_cfg_files)++;
+diff -Naur colortail-0.3.0/OptionsParser.h colortail-0.3.0-new/OptionsParser.h
+--- colortail-0.3.0/OptionsParser.h Wed Aug 4 18:33:08 1999
++++ colortail-0.3.0-new/OptionsParser.h Sat Aug 24 16:00:42 2002
+@@ -77,7 +77,7 @@
+ int color;
+ int rows;
+ int verbose;
+- char *cfg_filenames[MAX_FILES];
++ const char *cfg_filenames[MAX_FILES];
+ int nr_cfg_files;
+ int global_cfg_file;
+
+diff -Naur colortail-0.3.0/TailFile.cc colortail-0.3.0-new/TailFile.cc
+--- colortail-0.3.0/TailFile.cc Wed Aug 4 18:09:38 1999
++++ colortail-0.3.0-new/TailFile.cc Sat Aug 24 16:08:12 2002
+@@ -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 @@
+ // check if there isn't a follow buffer
+ if (m_follow_buffer == NULL)
+ {
+- m_follow_buffer = new ostrstream();
++ m_follow_buffer = new ostringstream();
+ }
+
+ // make buffer
+@@ -454,7 +456,7 @@
+ m_follow_buffer->put('\0');
+
+ // get the string
+- char *str = m_follow_buffer->str();
++ const char *str = m_follow_buffer->str().c_str();
+
+ // print the line
+ print_to_stdout(str);
+@@ -560,7 +562,7 @@
+ // delete buf;
+ }
+
+-void TailFile::print_to_stdout(char *str)
++void TailFile::print_to_stdout(const char *str)
+ {
+ // checks if there is a colorizer. If so the string is colorized
+ // before it's printed. If not the string isn't colorized.
+@@ -575,7 +577,7 @@
+ if (m_colorizer)
+ {
+ // colorize the string
+- char *buf = m_colorizer->colorize(str);
++ const char *buf = m_colorizer->colorize(str);
+ // print the new colorized string
+ cout << buf;
+ // free the mem
+diff -Naur colortail-0.3.0/TailFile.h colortail-0.3.0-new/TailFile.h
+--- colortail-0.3.0/TailFile.h Tue Aug 3 14:42:33 1999
++++ colortail-0.3.0-new/TailFile.h Sat Aug 24 16:06:00 2002
+@@ -23,7 +23,7 @@
+ #include "Colorizer.h"
+
+ #include <stdio.h>
+-#include <strstream.h>
++#include <sstream>
+
+ #define MAX_CHARS_READ 1024
+
+@@ -40,12 +40,12 @@
+ // the stream position
+ long m_position;
+ // the follow buffer, used in follow_print
+- ostrstream *m_follow_buffer;
++ std::ostringstream *m_follow_buffer;
+
+ // private methods
+ void find_position(int n);
+ long end_of_file_position();
+- void print_to_stdout(char *str);
++ void print_to_stdout(const char *str);
+
+ // methods
+ public:
+diff -Naur colortail-0.3.0/Usage.cc colortail-0.3.0-new/Usage.cc
+--- colortail-0.3.0/Usage.cc Wed Aug 4 18:44:37 1999
++++ colortail-0.3.0-new/Usage.cc Sat Aug 24 16:08:35 2002
+@@ -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()
+ {
+ }
diff --git a/app-misc/colortail/files/digest-colortail-0.3.0-r3 b/app-misc/colortail/files/digest-colortail-0.3.0-r3
new file mode 100644
index 000000000000..643425941152
--- /dev/null
+++ b/app-misc/colortail/files/digest-colortail-0.3.0-r3
@@ -0,0 +1 @@
+MD5 2589d3e372080f4052d1cc0d6550508f colortail-0.3.0.tar.gz 54329