From c475a296aade7323ae84da0f1f26cec09c1f9598 Mon Sep 17 00:00:00 2001 From: joerg Date: Mon, 6 May 2013 14:42:53 +0000 Subject: Add missing include. Use C++11 STL for libc++ and when in C++11 mode. --- devel/monotone/distinfo | 4 +- .../monotone/patches/patch-src_automate__reader.hh | 12 ++++++ devel/monotone/patches/patch-src_hash__map.hh | 49 ++++++++++++++++++++++ 3 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 devel/monotone/patches/patch-src_automate__reader.hh create mode 100644 devel/monotone/patches/patch-src_hash__map.hh diff --git a/devel/monotone/distinfo b/devel/monotone/distinfo index 1e082e6e3bf..ff7e12a37b0 100644 --- a/devel/monotone/distinfo +++ b/devel/monotone/distinfo @@ -1,8 +1,10 @@ -$NetBSD: distinfo,v 1.49 2013/03/02 18:15:39 joerg Exp $ +$NetBSD: distinfo,v 1.50 2013/05/06 14:42:53 joerg Exp $ SHA1 (monotone-1.0.tar.bz2) = aac556bb26d92910b74b65450a0be6c5045e2052 RMD160 (monotone-1.0.tar.bz2) = 4c0813ae0c11f271dc88f42dd8814e474a67e988 Size (monotone-1.0.tar.bz2) = 3588074 bytes +SHA1 (patch-src_automate__reader.hh) = 90da65f7eb0ae329ad6324b3c747e2d449cb25cb SHA1 (patch-src_database.cc) = 7f8213917256c395d0cf994eb218647c3f44a63f +SHA1 (patch-src_hash__map.hh) = 03b3da72bc4a953ccc7b7ae0be4a2975e85ea0b3 SHA1 (patch-src_key__store.cc) = 4225dff8f1533794c0390822c8e17795bf805b6a SHA1 (patch-src_ssh__agent.cc) = 404c17a7c0194ee8185fa26f377112ae35fd1ca2 diff --git a/devel/monotone/patches/patch-src_automate__reader.hh b/devel/monotone/patches/patch-src_automate__reader.hh new file mode 100644 index 00000000000..8634792d70d --- /dev/null +++ b/devel/monotone/patches/patch-src_automate__reader.hh @@ -0,0 +1,12 @@ +$NetBSD: patch-src_automate__reader.hh,v 1.1 2013/05/06 14:42:54 joerg Exp $ + +--- src/automate_reader.hh.orig 2013-05-06 13:23:37.000000000 +0000 ++++ src/automate_reader.hh +@@ -12,6 +12,7 @@ + #ifndef __AUTOMATE_READER_HH__ + #define __AUTOMATE_READER_HH__ + ++#include + #include + + class automate_reader diff --git a/devel/monotone/patches/patch-src_hash__map.hh b/devel/monotone/patches/patch-src_hash__map.hh new file mode 100644 index 00000000000..07a471f58c3 --- /dev/null +++ b/devel/monotone/patches/patch-src_hash__map.hh @@ -0,0 +1,49 @@ +$NetBSD: patch-src_hash__map.hh,v 1.1 2013/05/06 14:42:54 joerg Exp $ + +--- src/hash_map.hh.orig 2013-05-06 13:12:19.000000000 +0000 ++++ src/hash_map.hh +@@ -50,7 +50,43 @@ namespace hashmap { + }; + } + +-#if HAVE_TR1_UNORDERED_MAP_AND_SET && HAVE_WORKING_TR1_UNORDERED_MAP_AND_SET ++#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L ++#define HASHMAP_PRESENT ++#include ++#include ++ ++namespace hashmap { ++ template<> ++ struct hash ++ { ++ size_t operator()(std::string const & s) const ++ { ++ return std::hash()(s); ++ } ++ }; ++ ++ template ++ class hash_map : public std::unordered_map<_Key, ++ _Value, ++ hash<_Key>, ++ equal_to<_Key> > ++ {}; ++ ++ template ++ class hash_set : public std::unordered_set<_Key, ++ hash<_Key>, ++ equal_to<_Key> > ++ {}; ++ ++ template ++ class hash_multimap : public std::unordered_multimap<_Key, ++ _Value, ++ hash<_Key>, ++ equal_to<_Key> > ++ {}; ++} ++ ++#elif HAVE_TR1_UNORDERED_MAP_AND_SET && HAVE_WORKING_TR1_UNORDERED_MAP_AND_SET + #define HASHMAP_PRESENT + #include + #include -- cgit v1.2.3