ports/62432: Update port: misc/colortail

KATO Tsuguru tkato at prontomail.com
Fri Feb 6 13:10:59 UTC 2004


>Number:         62432
>Category:       ports
>Synopsis:       Update port: misc/colortail
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Feb 06 05:10:11 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     KATO Tsuguru
>Release:        FreeBSD 4.9-RELEASE-p1 i386
>Organization:
>Environment:
>Description:
- Fix build on -current

New file:
files/patch-TailFile.cc
files/patch-TailFile.h

>How-To-Repeat:
>Fix:

diff -urN /usr/ports/misc/colortail/Makefile misc/colortail/Makefile
--- /usr/ports/misc/colortail/Makefile	Thu Feb  5 18:31:06 2004
+++ misc/colortail/Makefile	Thu Feb  5 19:48:54 2004
@@ -17,16 +17,10 @@
 USE_GETOPT_LONG=	yes
 GNU_CONFIGURE=	yes
 
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} >= 502000
-BROKEN=		"Does not compile"
-.endif
-
 post-install:
 .if !defined(NOPORTDOCS)
 	@${MKDIR} ${EXAMPLESDIR}
 	${INSTALL_DATA} ${WRKSRC}/example-conf/conf* ${EXAMPLESDIR}
 .endif
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff -urN /usr/ports/misc/colortail/files/patch-Colorizer.cc misc/colortail/files/patch-Colorizer.cc
--- /usr/ports/misc/colortail/files/patch-Colorizer.cc	Tue Nov 26 09:34:06 2002
+++ misc/colortail/files/patch-Colorizer.cc	Thu Feb  5 19:54:53 2004
@@ -1,14 +1,56 @@
 
 $FreeBSD: ports/misc/colortail/files/patch-Colorizer.cc,v 1.1 2002/11/26 00:34:06 naddy Exp $
 
---- Colorizer.cc.orig	Tue Nov 26 01:12:35 2002
-+++ Colorizer.cc	Tue Nov 26 01:12:49 2002
+--- Colorizer.cc.orig	Wed Aug  4 04:41:17 1999
++++ Colorizer.cc	Thu Feb  5 19:49:47 2004
 @@ -23,7 +23,7 @@
  
  #include <assert.h>
  #include <stdio.h>
 -#include <strstream.h>
-+#include <iostream.h>
++#include <strstream>
  
  
  Colorizer::Colorizer()
+@@ -111,7 +111,7 @@
+    ListIterator<SearchData*> itr(*m_items_list);
+ 
+    // will contain the new string
+-   ostrstream newstr;
++   std::ostrstream newstr;
+    
+    SearchData *current;
+    int i = 0;
+@@ -172,7 +172,7 @@
+ 	    }
+ 
+ 	    // 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 +187,12 @@
+       // 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 +240,7 @@
+       
+       // write newline and null
+       //newstr << endl << ends;
+-      newstr << ends;
++      newstr << std::ends;
+       
+       
+       // return the new string
diff -urN /usr/ports/misc/colortail/files/patch-OptionsParser.cc misc/colortail/files/patch-OptionsParser.cc
--- /usr/ports/misc/colortail/files/patch-OptionsParser.cc	Sun Feb 16 10:15:21 2003
+++ misc/colortail/files/patch-OptionsParser.cc	Thu Feb  5 19:50:59 2004
@@ -1,20 +1,20 @@
---- OptionsParser.cc.orig	Thu Aug  5 01:23:39 1999
-+++ OptionsParser.cc	Tue Jan 28 13:11:52 2003
-@@ -136,6 +136,8 @@
- 	       {
- 		  if (optarg[pos] == ',')
- 		  {
-+		     filename.put('\0');
-+
- 		     // found seperator
- 		     // set filename in options class
- 		     o->cfg_filenames[o->nr_cfg_files] = filename.str();
-@@ -152,6 +154,8 @@
+--- OptionsParser.cc.orig	Thu Aug  5 08:23:39 1999
++++ OptionsParser.cc	Thu Feb  5 19:49:47 2004
+@@ -18,7 +18,7 @@
+ */
+ 
+ #include <iostream.h>
+-#include <strstream.h>
++#include <strstream>
+ #include <string.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+@@ -130,7 +130,7 @@
+ 	    int loop = 1;
+ 	    while (loop)
+ 	    {
+-	       ostrstream filename;
++	       std::ostrstream filename;
  
- 		  if (optarg[pos] == '\0')
- 		  {
-+		     filename.put('\0');
-+
- 		     // found end of string
- 		     // set filename in options class
- 		     o->cfg_filenames[o->nr_cfg_files] = filename.str();
+ 	       while (1)
+ 	       {
diff -urN /usr/ports/misc/colortail/files/patch-TailFile.cc misc/colortail/files/patch-TailFile.cc
--- /usr/ports/misc/colortail/files/patch-TailFile.cc	Thu Jan  1 09:00:00 1970
+++ misc/colortail/files/patch-TailFile.cc	Thu Feb  5 19:51:11 2004
@@ -0,0 +1,21 @@
+--- TailFile.cc.orig	Thu Aug  5 08:09:38 1999
++++ TailFile.cc	Thu Feb  5 19:49:47 2004
+@@ -375,7 +375,7 @@
+    // 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 +417,9 @@
+       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
diff -urN /usr/ports/misc/colortail/files/patch-TailFile.h misc/colortail/files/patch-TailFile.h
--- /usr/ports/misc/colortail/files/patch-TailFile.h	Thu Jan  1 09:00:00 1970
+++ misc/colortail/files/patch-TailFile.h	Thu Feb  5 19:51:18 2004
@@ -0,0 +1,21 @@
+--- TailFile.h.orig	Wed Aug  4 04:42:33 1999
++++ TailFile.h	Thu Feb  5 19:49:47 2004
+@@ -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);
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list