diff options
author | miwi <miwi@FreeBSD.org> | 2007-11-05 18:04:20 +0800 |
---|---|---|
committer | miwi <miwi@FreeBSD.org> | 2007-11-05 18:04:20 +0800 |
commit | 25140202fc745688c636a0eab6dffbaa9675daff (patch) | |
tree | 1d1ad5446c29bfe7700bf73440989819b7845a75 /devel/clint | |
parent | f3ff0cddb86ae96e3c4e6db5d060e87e06c30c99 (diff) | |
download | freebsd-ports-gnome-25140202fc745688c636a0eab6dffbaa9675daff.tar.gz freebsd-ports-gnome-25140202fc745688c636a0eab6dffbaa9675daff.tar.zst freebsd-ports-gnome-25140202fc745688c636a0eab6dffbaa9675daff.zip |
- Fix build with gcc 4.2
PR: 117789
Submitted by: Pietro Cerutti <gahr@gahr.ch>
Approved by: portmgr (pav)
Diffstat (limited to 'devel/clint')
-rw-r--r-- | devel/clint/Makefile | 11 | ||||
-rw-r--r-- | devel/clint/files/patch-doc-clint.texinfo (renamed from devel/clint/files/patch-doc::clint.texi) | 0 | ||||
-rw-r--r-- | devel/clint/files/patch-lib-python-mapbase.cc | 160 | ||||
-rw-r--r-- | devel/clint/files/patch-lib-python-mapref.cc | 20 | ||||
-rw-r--r-- | devel/clint/files/patch-lib-python-python.cc | 11 | ||||
-rw-r--r-- | devel/clint/files/patch-lib-python-python.h (renamed from devel/clint/files/patch-python.h) | 11 | ||||
-rw-r--r-- | devel/clint/files/patch-lib-python-seqbase_const_iter.cc (renamed from devel/clint/files/patch-seqbase_const_iter.cc) | 0 | ||||
-rw-r--r-- | devel/clint/files/patch-lib-python-seqbase_iter.cc (renamed from devel/clint/files/patch-seqbase_iter.cc) | 13 | ||||
-rw-r--r-- | devel/clint/files/patch-plugins-python-python_plugin.cc (renamed from devel/clint/files/patch-python_plugin.cc) | 0 | ||||
-rw-r--r-- | devel/clint/files/patch-src-clint.cc | 11 | ||||
-rw-r--r-- | devel/clint/files/patch-src-input.cc (renamed from devel/clint/files/patch-input.cc) | 0 | ||||
-rw-r--r-- | devel/clint/files/patch-src-utility.cc (renamed from devel/clint/files/patch-utility.cc) | 0 |
12 files changed, 221 insertions, 16 deletions
diff --git a/devel/clint/Makefile b/devel/clint/Makefile index 8268734c790b..e23d3a8a49d8 100644 --- a/devel/clint/Makefile +++ b/devel/clint/Makefile @@ -10,8 +10,7 @@ PORTNAME= clint PORTVERSION= 0.1.2 PORTREVISION= 4 CATEGORIES= devel -MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} -MASTER_SITE_SUBDIR= ${PORTNAME} +MASTER_SITES= SF MAINTAINER= ports@FreeBSD.org COMMENT= A static source code checker for C++ @@ -25,16 +24,10 @@ USE_LDCONFIG= yes INFO= clint -.include <bsd.port.pre.mk> - -.if ${OSVERSION} >= 700042 -BROKEN= Broken with gcc 4.2 -.endif - post-patch: @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/configure @${FIND} ${WRKSRC} -name "Makefile.in" | ${XARGS} ${REINPLACE_CMD} -e \ 's|-pedantic||g ; \ s|-ldl||g' -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/devel/clint/files/patch-doc::clint.texi b/devel/clint/files/patch-doc-clint.texinfo index b9518187f08e..b9518187f08e 100644 --- a/devel/clint/files/patch-doc::clint.texi +++ b/devel/clint/files/patch-doc-clint.texinfo diff --git a/devel/clint/files/patch-lib-python-mapbase.cc b/devel/clint/files/patch-lib-python-mapbase.cc new file mode 100644 index 000000000000..bc70fe618145 --- /dev/null +++ b/devel/clint/files/patch-lib-python-mapbase.cc @@ -0,0 +1,160 @@ +--- lib/python/mapbase.cc.orig 2007-11-03 16:17:47.000000000 +0100 ++++ lib/python/mapbase.cc 2007-11-03 16:18:22.000000000 +0100 +@@ -2,30 +2,30 @@ + #include "python.h" + + namespace python { +-export template<class T> +- MapBase<T>::MapBase<T> (PyObject *pyob, bool owned): Object(pyob, owned) { ++ template<class T> ++ MapBase<T>::MapBase (PyObject *pyob, bool owned): Object(pyob, owned) { + validate(); + } + +- export template<class T> +- MapBase<T>::MapBase<T> (const MapBase<T>& ob): Object(ob) { ++ template<class T> ++ MapBase<T>::MapBase (const MapBase<T>& ob): Object(ob) { + validate(); + } + // Assignment acquires new ownership of pointer + +- export template<class T> ++ template<class T> + MapBase<T>& MapBase<T>::operator= (const Object& rhs) { + return (*this = *rhs); + } + +- export template<class T> ++ template<class T> + MapBase<T>& MapBase<T>::operator= (PyObject* rhsp) { + if(ptr() == rhsp) return *this; + set (rhsp); + return *this; + } + // Membership +- export template<class T> ++ template<class T> + bool MapBase<T>::accepts (PyObject *pyob) const { + return pyob && PyMapping_Check(pyob); + } +@@ -33,7 +33,7 @@ + // Clear -- PyMapping Clear is missing + // + +- export template<class T> ++ template<class T> + void MapBase<T>::clear () { + List k = keys(); + for(List::iterator i = k.begin(); i != k.end(); i++) { +@@ -42,54 +42,54 @@ + } + + // Element Access +- export template<class T> ++ template<class T> + T MapBase<T>::operator[](const std::string& key) const { + return get_item(key); + } + +- export template<class T> ++ template<class T> + T MapBase<T>::operator[](const Object& key) const { + return get_item(key); + } + +- export template<class T> ++ template<class T> + mapref<T> MapBase<T>::operator[](const std::string& key) { + return mapref<T>(*this, key); + } + +- export template<class T> ++ template<class T> + mapref<T> MapBase<T>::operator[](const Object& key) { + return mapref<T>(*this, key); + } + +- export template<class T> ++ template<class T> + int MapBase<T>::length () const { + return PyMapping_Length (ptr()); + } + +- export template<class T> ++ template<class T> + int MapBase<T>::has_key (const std::string& s) const { + return PyMapping_HasKeyString (ptr(),const_cast<char*>(s.c_str())); + } + +- export template<class T> ++ template<class T> + int MapBase<T>::has_key (const Object& s) const { + return PyMapping_HasKey (ptr(), s.ptr()); + } + +- export template<class T> ++ template<class T> + T MapBase<T>::get_item (const std::string& s) const { + PyObject * tmp = (PyMapping_GetItemString (ptr(),const_cast<char*>(s.c_str()))); + if ( tmp == NULL ) { throw KeyError(s + " does not exist in " + this->as_string()); } + return T( asObject(tmp)); + } + +- export template<class T> ++ template<class T> + T MapBase<T>::get_item (const Object& s) const { + return T( asObject(PyObject_GetItem (ptr(), s.ptr()))); + } + +- export template<class T> ++ template<class T> + void MapBase<T>::set_item (const std::string& s, const Object& ob) { + if (PyMapping_SetItemString (ptr(), const_cast<char*>(s.c_str()), *ob) + == -1) +@@ -98,7 +98,7 @@ + } + } + +- export template<class T> ++ template<class T> + void MapBase<T>::set_item (const Object& s, const Object& ob) { + if (PyObject_SetItem (ptr(), s.ptr(), ob.ptr()) + == -1) +@@ -107,31 +107,31 @@ + } + } + +- export template<class T> ++ template<class T> + void MapBase<T>::del_item (const std::string& s) { + if (PyMapping_DelItemString (ptr(), const_cast<char*>(s.c_str())) == -1){ + throw Exception(); + } + } + +- export template<class T> ++ template<class T> + void MapBase<T>::del_item (const Object& s) { + if (PyMapping_DelItem (ptr(), *s) == -1){ + throw Exception(); + } + } + // Queries +- export template<class T> ++ template<class T> + List MapBase<T>::keys () const { + return List(PyMapping_Keys(ptr()), true); + } + +- export template<class T> ++ template<class T> + List MapBase<T>::values () const { // each returned item is a (key, value) pair + return List(PyMapping_Values(ptr()), true); + } + +- export template<class T> ++ template<class T> + List MapBase<T>::items () const { + return List(PyMapping_Items(ptr()), true); + } diff --git a/devel/clint/files/patch-lib-python-mapref.cc b/devel/clint/files/patch-lib-python-mapref.cc new file mode 100644 index 000000000000..c79b07df9bf9 --- /dev/null +++ b/devel/clint/files/patch-lib-python-mapref.cc @@ -0,0 +1,20 @@ +--- lib/python/mapref.cc.orig 2007-11-03 16:16:58.000000000 +0100 ++++ lib/python/mapref.cc 2007-11-03 16:17:25.000000000 +0100 +@@ -2,7 +2,7 @@ + + namespace python { + template <class T> +- mapref<T>::mapref<T> (MapBase<T>& map, const std::string& k) ++ mapref<T>::mapref (MapBase<T>& map, const std::string& k) + : s(map), the_item() + { + key = String(k); +@@ -10,7 +10,7 @@ + }; + + template <class T> +- mapref<T>::mapref<T> (MapBase<T>& map, const Object& k) ++ mapref<T>::mapref (MapBase<T>& map, const Object& k) + : s(map), key(k), the_item() + { + if(map.hasKey(key)) the_item = map.getItem(key); diff --git a/devel/clint/files/patch-lib-python-python.cc b/devel/clint/files/patch-lib-python-python.cc new file mode 100644 index 000000000000..3847bb6fb4ea --- /dev/null +++ b/devel/clint/files/patch-lib-python-python.cc @@ -0,0 +1,11 @@ +--- lib/python/python.cc.orig 2007-11-03 16:32:34.000000000 +0100 ++++ lib/python/python.cc 2007-11-03 16:33:48.000000000 +0100 +@@ -115,6 +115,8 @@ + } else { + return import_module(modname); + } ++ ++ return (NULL); + } + + // }}} diff --git a/devel/clint/files/patch-python.h b/devel/clint/files/patch-lib-python-python.h index 88e8ee15e347..e4be9dff23fc 100644 --- a/devel/clint/files/patch-python.h +++ b/devel/clint/files/patch-lib-python-python.h @@ -1,6 +1,6 @@ ---- 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 @@ +--- lib/python/python.h.orig 2001-04-16 21:53:21.000000000 +0200 ++++ lib/python/python.h 2007-11-03 16:31:32.000000000 +0100 +@@ -3,22 +3,42 @@ #pragma interface @@ -23,7 +23,10 @@ #include <Python.h> #include <string> #include <iterator> -@@ -12,13 +28,17 @@ + #include <utility> +-#include <strstream> ++#include <sstream> + #include "exceptions.h" #include "debug.h" // I hate #define macros, seee if I can remove this diff --git a/devel/clint/files/patch-seqbase_const_iter.cc b/devel/clint/files/patch-lib-python-seqbase_const_iter.cc index fde1b44e84e1..fde1b44e84e1 100644 --- a/devel/clint/files/patch-seqbase_const_iter.cc +++ b/devel/clint/files/patch-lib-python-seqbase_const_iter.cc diff --git a/devel/clint/files/patch-seqbase_iter.cc b/devel/clint/files/patch-lib-python-seqbase_iter.cc index 04de79ed65a0..e34b41f0b894 100644 --- a/devel/clint/files/patch-seqbase_iter.cc +++ b/devel/clint/files/patch-lib-python-seqbase_iter.cc @@ -1,5 +1,5 @@ ---- 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 +--- lib/python/seqbase_iter.cc.orig 2001-04-16 21:53:23.000000000 +0200 ++++ lib/python/seqbase_iter.cc 2007-11-03 16:39:31.000000000 +0100 @@ -61,7 +61,7 @@ return seqref<T>(*seq, count + i); } @@ -37,7 +37,7 @@ SeqBase<T>::iterator& SeqBase<T>::iterator::operator-=(int n) { count = count - n; return *this; -@@ -99,16 +99,16 @@ +@@ -99,21 +99,22 @@ } // prefix ++ @@ -58,3 +58,10 @@ SeqBase<T>::iterator SeqBase<T>::iterator::operator-- (int) { return iterator(seq, count--);} template<class T> + std::string SeqBase<T>::iterator::diagnose() const { +- std::ostrstream oss; ++ std::ostringstream oss; ++ //std::ostrstream oss; + oss << "iterator diagnosis " << seq << ", " << count << std::ends; + return std::string(oss.str()); + } diff --git a/devel/clint/files/patch-python_plugin.cc b/devel/clint/files/patch-plugins-python-python_plugin.cc index 15f50a49b9b5..15f50a49b9b5 100644 --- a/devel/clint/files/patch-python_plugin.cc +++ b/devel/clint/files/patch-plugins-python-python_plugin.cc diff --git a/devel/clint/files/patch-src-clint.cc b/devel/clint/files/patch-src-clint.cc new file mode 100644 index 000000000000..94b34d1d0a18 --- /dev/null +++ b/devel/clint/files/patch-src-clint.cc @@ -0,0 +1,11 @@ +--- src/clint.cc.orig 2007-11-03 16:42:29.000000000 +0100 ++++ src/clint.cc 2007-11-03 16:42:48.000000000 +0100 +@@ -25,7 +25,7 @@ + #include "plugin.h" + #include <stdexcept> + #include "rule.h" +-#include <iostream.h> ++#include <iostream> + #include <fstream> + #include "utility.h" + #include <debug.h> diff --git a/devel/clint/files/patch-input.cc b/devel/clint/files/patch-src-input.cc index 948a7e563837..948a7e563837 100644 --- a/devel/clint/files/patch-input.cc +++ b/devel/clint/files/patch-src-input.cc diff --git a/devel/clint/files/patch-utility.cc b/devel/clint/files/patch-src-utility.cc index 8e511b506d8e..8e511b506d8e 100644 --- a/devel/clint/files/patch-utility.cc +++ b/devel/clint/files/patch-src-utility.cc |