Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Nov 2006 22:48:51 -0800 (PST)
From:      Peter Johnson <johnson.peter@gmail.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/106110: [PATCH] devel/clint: Fix BROKENness
Message-ID:  <20061201064851.9405D18E0F@cvs.tortall.net>
Resent-Message-ID: <200612010650.kB16o8cI005754@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         106110
>Category:       ports
>Synopsis:       [PATCH] devel/clint: Fix BROKENness
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 01 06:50:08 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Peter Johnson
>Release:        FreeBSD 6.1-RELEASE i386
>Organization:
>Environment:
System: FreeBSD 6.1-RELEASE
>Description:
Fix bugs that caused compiler errors and runtime crashes on recent
FreeBSD versions.  The compiler errors have the port currently marked
BROKEN.
>How-To-Repeat:
Port is marked BROKEN on 5.x.
>Fix:
See attached patch.  Two of the new patches fix runtime errors regarding
the use of closedir(3) (calling it with a NULL argument), the rest are
C++ build fixes.

--- clint-unbreak.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/devel/clint/Makefile,v
retrieving revision 1.19
diff -u -r1.19 Makefile
--- Makefile	14 Aug 2006 22:55:06 -0000	1.19
+++ Makefile	1 Dec 2006 06:42:37 -0000
@@ -8,7 +8,7 @@
 
 PORTNAME=	clint
 PORTVERSION=	0.1.2
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	devel
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	${PORTNAME}
@@ -26,11 +26,6 @@
 
 .include <bsd.port.pre.mk>
 
-.if ${OSVERSION} >= 502126
-BROKEN=		Does not compile on FreeBSD >= 5.x
-USE_GCC=	3.3
-.endif
-
 post-patch:
 	@${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/configure
 	@${FIND} ${WRKSRC} -name "Makefile.in" | ${XARGS} ${REINPLACE_CMD} -e \
Index: files/patch-python.h
===================================================================
RCS file: /home/ncvs/ports/devel/clint/files/patch-python.h,v
retrieving revision 1.1
diff -u -r1.1 patch-python.h
--- files/patch-python.h	7 Sep 2002 03:13:23 -0000	1.1
+++ files/patch-python.h	1 Dec 2006 06:42:37 -0000
@@ -1,6 +1,29 @@
---- lib/python/python.h.orig	Fri Sep  6 21:53:18 2002
-+++ lib/python/python.h	Fri Sep  6 21:56:38 2002
-@@ -12,13 +12,17 @@
+--- lib/python/python.h.orig	Mon Apr 16 12:53:21 2001
++++ lib/python/python.h	Thu Nov 30 22:25:14 2006
+@@ -3,6 +3,22 @@
+ 
+ #pragma interface
+ 
++#include <ctype.h>
++#undef isalnum
++#undef isalpha
++#undef iscntrl
++#undef isdigit
++#undef isgraph
++#undef islower
++#undef isprint
++#undef ispunct
++#undef isspace
++#undef isupper
++#undef isxdigit
++#undef tolower
++#undef toupper
++#include <iostream>
++
+ #include <Python.h>
+ #include <string>
+ #include <iterator>
+@@ -12,13 +28,17 @@
  #include "debug.h"
  
  // I hate #define macros, seee if I can remove this
@@ -11,13 +34,13 @@
 -#  define STANDARD_LIBRARY_HAS_ITERATOR_TRAITS 0
 +#  undef STANDARD_LIBRARY_HAS_RANDOM_ACCESS_ITERATOR
 +#  define STANDARD_LIBRARY_HAS_RANDOM_ACCESS_ITERATOR 0
++#endif
++
++#if defined (__GNUG__) && (__GNUG__ >= 3)
++#  undef STANDARD_LIBRARY_HAS_RANDOM_ACCESS_ITERATOR
  #endif
  
 -#if STANDARD_LIBRARY_HAS_ITERATOR_TRAITS
-+#if defined (__GNUG__) && (__GNUG__ >= 3)
-+#  undef STANDARD_LIBRARY_HAS_RANDOM_ACCESS_ITERATOR
-+#endif
-+
 +#if STANDARD_LIBRARY_HAS_RANDOM_ACCESS_ITERATOR
  #  define random_access_iterator_parent(itemtype) std::random_access_iterator<itemtype, int>
  #else
Index: files/patch-python_plugin.cc
===================================================================
RCS file: files/patch-python_plugin.cc
diff -N files/patch-python_plugin.cc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-python_plugin.cc	1 Dec 2006 06:42:37 -0000
@@ -0,0 +1,15 @@
+--- plugins/python/python_plugin.cc.orig	Mon Apr 16 13:23:28 2001
++++ plugins/python/python_plugin.cc	Thu Nov 30 22:35:49 2006
+@@ -51,11 +51,11 @@
+             rules.push_back( rule );
+          }
+       }
++      closedir(curdir);
+    } else {
+       // There is something wrong with the directory. Probably doesn't
+       // exist
+    }
+-   closedir(curdir);
+    return;
+ }
+ 
Index: files/patch-seqbase_const_iter.cc
===================================================================
RCS file: files/patch-seqbase_const_iter.cc
diff -N files/patch-seqbase_const_iter.cc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-seqbase_const_iter.cc	1 Dec 2006 06:42:37 -0000
@@ -0,0 +1,60 @@
+--- lib/python/seqbase_const_iter.cc.orig	Mon Apr 16 12:53:23 2001
++++ lib/python/seqbase_const_iter.cc	Thu Nov 30 22:11:19 2006
+@@ -61,7 +61,7 @@
+       return seq->getItem(count + i);
+    }
+ 
+-   template<class T>
++   template<class T> typename
+    SeqBase<T>::const_iterator::const_iterator& SeqBase<T>::const_iterator::operator=(const const_iterator& other) {
+       if (this == &other) return *this;
+       seq = other.seq;
+@@ -69,23 +69,23 @@
+       return *this;
+    }
+ 
+-   template<class T>
++   template<class T> typename
+    SeqBase<T>::const_iterator::const_iterator SeqBase<T>::const_iterator::operator+(int n) const {
+       return const_iterator(seq, count + n);
+    }
+ 
+-   template<class T>
++   template<class T> typename
+    SeqBase<T>::const_iterator::const_iterator SeqBase<T>::const_iterator::operator-(int n) const {
+       return const_iterator(seq, count - n);
+    }
+ 
+-   template<class T>
++   template<class T> typename
+    SeqBase<T>::const_iterator::const_iterator& SeqBase<T>::const_iterator::operator+=(int n) {
+       count = count + n;
+       return *this;
+    }
+ 
+-   template<class T>
++   template<class T> typename
+   SeqBase<T>::const_iterator::const_iterator& SeqBase<T>::const_iterator::operator-=(int n) {
+       count = count - n;
+       return *this;
+@@ -98,16 +98,16 @@
+       return count - other.count;
+    }
+    // prefix ++
+-   template<class T>
++   template<class T> typename
+    SeqBase<T>::const_iterator::const_iterator& SeqBase<T>::const_iterator::operator++ () { count++; return *this;}
+    // postfix ++
+-   template<class T>
++   template<class T> typename
+    SeqBase<T>::const_iterator::const_iterator SeqBase<T>::const_iterator::operator++ (int) { return const_iterator(seq, count++);}
+    // prefix --
+-   template<class T>
++   template<class T> typename
+    SeqBase<T>::const_iterator::const_iterator& SeqBase<T>::const_iterator::operator-- () { count--; return *this;}
+    // postfix --
+-   template<class T>
++   template<class T> typename
+    SeqBase<T>::const_iterator::const_iterator SeqBase<T>::const_iterator::operator-- (int) { return const_iterator(seq, count--);}
+ 
+ }
Index: files/patch-seqbase_iter.cc
===================================================================
RCS file: files/patch-seqbase_iter.cc
diff -N files/patch-seqbase_iter.cc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-seqbase_iter.cc	1 Dec 2006 06:42:37 -0000
@@ -0,0 +1,60 @@
+--- lib/python/seqbase_iter.cc.orig	Mon Apr 16 12:53:23 2001
++++ lib/python/seqbase_iter.cc	Thu Nov 30 22:09:39 2006
+@@ -61,7 +61,7 @@
+          return seqref<T>(*seq, count + i);
+       }
+ 
+-   template<class T>
++   template<class T> typename
+       SeqBase<T>::iterator&  SeqBase<T>::iterator::operator=(const iterator& other) {
+          if (this == &other) return *this;
+          seq = other.seq;
+@@ -69,23 +69,23 @@
+          return *this;
+       }
+ 
+-   template<class T>
++   template<class T> typename
+       SeqBase<T>::iterator  SeqBase<T>::iterator::operator+(int n) const {
+          return iterator(seq, count + n);
+       }
+ 
+-   template<class T>
++   template<class T> typename
+       SeqBase<T>::iterator  SeqBase<T>::iterator::operator-(int n) const {
+          return iterator(seq, count - n);
+       }
+ 
+-   template<class T>
++   template<class T> typename
+       SeqBase<T>::iterator&  SeqBase<T>::iterator::operator+=(int n) {
+          count = count + n;
+          return *this;
+       }
+ 
+-   template<class T>
++   template<class T> typename
+       SeqBase<T>::iterator&  SeqBase<T>::iterator::operator-=(int n) {
+          count = count - n;
+          return *this;
+@@ -99,16 +99,16 @@
+       }
+ 
+    // prefix ++
+-   template<class T>
++   template<class T> typename
+       SeqBase<T>::iterator&  SeqBase<T>::iterator::operator++ () { count++; return *this;}
+    // postfix ++
+-   template<class T>
++   template<class T> typename
+       SeqBase<T>::iterator  SeqBase<T>::iterator::operator++ (int) { return iterator(seq, count++);}
+    // prefix --
+-   template<class T>
++   template<class T> typename
+       SeqBase<T>::iterator&  SeqBase<T>::iterator::operator-- () { count--; return *this;}
+    // postfix --
+-   template<class T>
++   template<class T> typename
+       SeqBase<T>::iterator SeqBase<T>::iterator::operator-- (int) { return iterator(seq, count--);}
+ 
+    template<class T>
Index: files/patch-utility.cc
===================================================================
RCS file: files/patch-utility.cc
diff -N files/patch-utility.cc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-utility.cc	1 Dec 2006 06:42:37 -0000
@@ -0,0 +1,18 @@
+--- src/utility.cc.orig	Mon Apr 16 13:19:36 2001
++++ src/utility.cc	Thu Nov 30 22:31:32 2006
+@@ -40,6 +40,7 @@
+                filelist.push_back(filename);
+             }
+          }
++         closedir(curdir);
+       } else {
+          // There is something wrong with the directory. Probably
+          // doesn't exist
+@@ -47,7 +48,6 @@
+          // directory
+          // throw std::invalid_argument("get_plugin_list: something is wrong with the directory " + directory);
+       }
+-      closedir(curdir);
+       return;
+    }
+ 
--- clint-unbreak.patch ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061201064851.9405D18E0F>