summaryrefslogtreecommitdiff
path: root/meta-pkgs
diff options
context:
space:
mode:
Diffstat (limited to 'meta-pkgs')
-rw-r--r--meta-pkgs/boost/distinfo3
-rw-r--r--meta-pkgs/boost/patches/patch-boost_functional_hash_hash.hpp40
2 files changed, 42 insertions, 1 deletions
diff --git a/meta-pkgs/boost/distinfo b/meta-pkgs/boost/distinfo
index 8ff967e258a..6322030cd6c 100644
--- a/meta-pkgs/boost/distinfo
+++ b/meta-pkgs/boost/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.47 2012/08/27 08:49:08 adam Exp $
+$NetBSD: distinfo,v 1.48 2012/08/31 12:20:56 adam Exp $
SHA1 (boost_1_51_0.tar.bz2) = 52ef06895b97cc9981b8abf1997c375ca79f30c5
RMD160 (boost_1_51_0.tar.bz2) = e92733c82785a38049f2d6a8126eadd3f8ac0c40
@@ -14,4 +14,5 @@ SHA1 (patch-aq) = e5c7b72ffa2942ce401f3d9bf05498fd761df17a
SHA1 (patch-ar) = 2fec2c51272cc4ee376e6538d8f1fd8561a7f0a3
SHA1 (patch-boost_foreach.hpp) = 7cd26c4983873bcac284ad400950e341c559f9a8
SHA1 (patch-boost_foreach_fwd.hpp) = 5accd68d559213a9677f7d1204e72dd082a42a41
+SHA1 (patch-boost_functional_hash_hash.hpp) = 343a1201f6e0edf46471f28c09f2997dc7fb7ba0
SHA1 (patch-libs_filesystem_src_unique_path.cpp) = 3666663305bba85871f2ef291dc117158c678643
diff --git a/meta-pkgs/boost/patches/patch-boost_functional_hash_hash.hpp b/meta-pkgs/boost/patches/patch-boost_functional_hash_hash.hpp
new file mode 100644
index 00000000000..e00795f79cc
--- /dev/null
+++ b/meta-pkgs/boost/patches/patch-boost_functional_hash_hash.hpp
@@ -0,0 +1,40 @@
+$NetBSD: patch-boost_functional_hash_hash.hpp,v 1.1 2012/08/31 12:20:56 adam Exp $
+
+Allow hashing enums.
+
+--- boost/functional/hash/hash.hpp.orig 2012-07-15 23:28:30.000000000 +0000
++++ boost/functional/hash/hash.hpp
+@@ -15,6 +15,8 @@
+ #include <boost/functional/hash/detail/hash_float.hpp>
+ #include <string>
+ #include <boost/limits.hpp>
++#include <boost/type_traits/is_enum.hpp>
++#include <boost/utility/enable_if.hpp>
+
+ #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+ #include <boost/type_traits/is_pointer.hpp>
+@@ -90,6 +92,10 @@ namespace boost
+ template <typename T>
+ typename boost::hash_detail::ulong_numbers<T>::type hash_value(T);
+
++ template <typename T>
++ typename boost::enable_if<boost::is_enum<T>, std::size_t>::type
++ hash_value(T);
++
+ #if !BOOST_WORKAROUND(__DMC__, <= 0x848)
+ template <class T> std::size_t hash_value(T* const&);
+ #else
+@@ -179,6 +185,13 @@ namespace boost
+ return hash_detail::hash_value_unsigned(v);
+ }
+
++ template <typename T>
++ typename boost::enable_if<boost::is_enum<T>, std::size_t>::type
++ hash_value(T v)
++ {
++ return static_cast<std::size_t>(v);
++ }
++
+ // Implementation by Alberto Barbati and Dave Harris.
+ #if !BOOST_WORKAROUND(__DMC__, <= 0x848)
+ template <class T> std::size_t hash_value(T* const& v)