Mon May 6 14:22:43 2013 UTC ()
When using C++11 or libc++, prefer <memory> and <unordered_map> without
the tr1 namespace.
(joerg)
diff -r1.2 -r1.3 pkgsrc/biology/openbabel/distinfo
diff -r0 -r1.1 pkgsrc/biology/openbabel/patches/patch-include_openbabel_obmolecformat.h
diff -r0 -r1.1 pkgsrc/biology/openbabel/patches/patch-include_openbabel_shared__ptr.h
diff -r0 -r1.1 pkgsrc/biology/openbabel/patches/patch-src_ops_unique.cpp
--- pkgsrc/biology/openbabel/distinfo 2013/04/01 08:39:13 1.2
+++ pkgsrc/biology/openbabel/distinfo 2013/05/06 14:22:42 1.3
| @@ -1,6 +1,9 @@ | | | @@ -1,6 +1,9 @@ |
1 | $NetBSD: distinfo,v 1.2 2013/04/01 08:39:13 sbd Exp $ | | 1 | $NetBSD: distinfo,v 1.3 2013/05/06 14:22:42 joerg Exp $ |
2 | | | 2 | |
3 | SHA1 (openbabel-2.3.0.tar.gz) = 408a4bddb7f052fd89c57ea51b4204b721856b16 | | 3 | SHA1 (openbabel-2.3.0.tar.gz) = 408a4bddb7f052fd89c57ea51b4204b721856b16 |
4 | RMD160 (openbabel-2.3.0.tar.gz) = 96dafa3c2aca544f79e08b5617ab0da845c28a16 | | 4 | RMD160 (openbabel-2.3.0.tar.gz) = 96dafa3c2aca544f79e08b5617ab0da845c28a16 |
5 | Size (openbabel-2.3.0.tar.gz) = 14321281 bytes | | 5 | Size (openbabel-2.3.0.tar.gz) = 14321281 bytes |
6 | SHA1 (patch-doc_CMakeLists.txt) = c17443388bc482c9b523323ff925c326c87f4816 | | 6 | SHA1 (patch-doc_CMakeLists.txt) = c17443388bc482c9b523323ff925c326c87f4816 |
| | | 7 | SHA1 (patch-include_openbabel_obmolecformat.h) = e12a42b67106899d5285651f27e4830e0cc42fe2 |
| | | 8 | SHA1 (patch-include_openbabel_shared__ptr.h) = 6678f49249eacacb61ddc14a4d9e6af1c479c67b |
| | | 9 | SHA1 (patch-src_ops_unique.cpp) = 4ae8b0bbd3c3880bb971e59bcd90219762ca895c |
$NetBSD: patch-include_openbabel_obmolecformat.h,v 1.1 2013/05/06 14:22:42 joerg Exp $
--- include/openbabel/obmolecformat.h.orig 2013-05-05 20:25:43.000000000 +0000
+++ include/openbabel/obmolecformat.h
@@ -23,7 +23,10 @@ GNU General Public License for more deta
#include <hash_map>
#endif
-#if __GNUC__ == 4 && __GNUC_MINOR__ >= 1
+#include <ciso646>
+#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
+#include <unordered_map>
+#elif __GNUC__ == 4 && __GNUC_MINOR__ >= 1
#include <tr1/unordered_map>
#elif defined(USE_BOOST)
#include <boost/tr1/unordered_map.hpp>
@@ -141,6 +144,8 @@ public:
#ifdef _MSC_VER
typedef stdext::hash_map<std::string, unsigned> NameIndexType;
+#elif defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
+ typedef std::unordered_map<std::string, unsigned> NameIndexType;
#elif (__GNUC__ == 4 && __GNUC_MINOR__ >= 1 && !defined(__APPLE_CC__)) || defined (USE_BOOST)
typedef std::tr1::unordered_map<std::string, unsigned> NameIndexType;
#else
$NetBSD: patch-include_openbabel_shared__ptr.h,v 1.1 2013/05/06 14:22:43 joerg Exp $
--- include/openbabel/shared_ptr.h.orig 2013-05-05 20:23:37.000000000 +0000
+++ include/openbabel/shared_ptr.h
@@ -21,10 +21,14 @@ GNU General Public License for more deta
#define shared_ptr boost::shared_ptr
#else
#include <memory>
- #if __GNUC__ == 4 //&& __GNUC_MINOR__ < 3 removed at the suggestion of Konstantin Tokarev
- #include <tr1/memory>
+ #if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
+ using std::shared_ptr;
+ #else
+ #if __GNUC__ == 4 //&& __GNUC_MINOR__ < 3 removed at the suggestion of Konstantin Tokarev
+ #include <tr1/memory>
+ #endif
+ using std::tr1::shared_ptr;
#endif
- using std::tr1::shared_ptr;
#endif
#endif // OB_SHARED_PTR_H
$NetBSD: patch-src_ops_unique.cpp,v 1.1 2013/05/06 14:22:43 joerg Exp $
--- src/ops/unique.cpp.orig 2013-05-05 20:34:38.000000000 +0000
+++ src/ops/unique.cpp
@@ -23,6 +23,9 @@ GNU General Public License for more deta
#include <openbabel/inchiformat.h>
#ifdef _MSC_VER
#include <unordered_map>
+#elif defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
+# include <unordered_map>
+using std::unordered_map;
#elif (__GNUC__ == 4 && __GNUC_MINOR__ >= 1 && !defined(__APPLE_CC__))
#include <tr1/unordered_map>
#else
@@ -35,7 +38,7 @@ GNU General Public License for more deta
#endif
using namespace std;
-#ifndef NO_UNORDERED_MAP
+#if !defined(NO_UNORDERED_MAP) && !defined(_LIBCPP_VERSION) && __cplusplus < 201103L
using std::tr1::unordered_map;
#endif
namespace OpenBabel