summaryrefslogtreecommitdiff
path: root/biology
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2013-05-06 14:22:42 +0000
committerjoerg <joerg@pkgsrc.org>2013-05-06 14:22:42 +0000
commit5e93c2e4644d2a9a5edd20ab4400e7be7152e8fa (patch)
tree2b24d082533dad81cb40f04dd10b55ca97076fd1 /biology
parenta3de8d8a01c010c4ce23cdb4b6551b3c96499448 (diff)
downloadpkgsrc-5e93c2e4644d2a9a5edd20ab4400e7be7152e8fa.tar.gz
When using C++11 or libc++, prefer <memory> and <unordered_map> without
the tr1 namespace.
Diffstat (limited to 'biology')
-rw-r--r--biology/openbabel/distinfo5
-rw-r--r--biology/openbabel/patches/patch-include_openbabel_obmolecformat.h25
-rw-r--r--biology/openbabel/patches/patch-include_openbabel_shared__ptr.h22
-rw-r--r--biology/openbabel/patches/patch-src_ops_unique.cpp23
4 files changed, 74 insertions, 1 deletions
diff --git a/biology/openbabel/distinfo b/biology/openbabel/distinfo
index 333c8103282..c9f5c1dd041 100644
--- a/biology/openbabel/distinfo
+++ b/biology/openbabel/distinfo
@@ -1,6 +1,9 @@
-$NetBSD: distinfo,v 1.2 2013/04/01 08:39:13 sbd Exp $
+$NetBSD: distinfo,v 1.3 2013/05/06 14:22:42 joerg Exp $
SHA1 (openbabel-2.3.0.tar.gz) = 408a4bddb7f052fd89c57ea51b4204b721856b16
RMD160 (openbabel-2.3.0.tar.gz) = 96dafa3c2aca544f79e08b5617ab0da845c28a16
Size (openbabel-2.3.0.tar.gz) = 14321281 bytes
SHA1 (patch-doc_CMakeLists.txt) = c17443388bc482c9b523323ff925c326c87f4816
+SHA1 (patch-include_openbabel_obmolecformat.h) = e12a42b67106899d5285651f27e4830e0cc42fe2
+SHA1 (patch-include_openbabel_shared__ptr.h) = 6678f49249eacacb61ddc14a4d9e6af1c479c67b
+SHA1 (patch-src_ops_unique.cpp) = 4ae8b0bbd3c3880bb971e59bcd90219762ca895c
diff --git a/biology/openbabel/patches/patch-include_openbabel_obmolecformat.h b/biology/openbabel/patches/patch-include_openbabel_obmolecformat.h
new file mode 100644
index 00000000000..d56444a1412
--- /dev/null
+++ b/biology/openbabel/patches/patch-include_openbabel_obmolecformat.h
@@ -0,0 +1,25 @@
+$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
diff --git a/biology/openbabel/patches/patch-include_openbabel_shared__ptr.h b/biology/openbabel/patches/patch-include_openbabel_shared__ptr.h
new file mode 100644
index 00000000000..459f34bda07
--- /dev/null
+++ b/biology/openbabel/patches/patch-include_openbabel_shared__ptr.h
@@ -0,0 +1,22 @@
+$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
diff --git a/biology/openbabel/patches/patch-src_ops_unique.cpp b/biology/openbabel/patches/patch-src_ops_unique.cpp
new file mode 100644
index 00000000000..071b02333c7
--- /dev/null
+++ b/biology/openbabel/patches/patch-src_ops_unique.cpp
@@ -0,0 +1,23 @@
+$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