From patchwork Fri Sep 28 03:40:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: boost: Support enums in hash Date: Fri, 28 Sep 2012 03:40:42 -0000 From: Khem Raj X-Patchwork-Id: 37411 Message-Id: <1348803644-20961-1-git-send-email-raj.khem@gmail.com> To: openembedded-core@lists.openembedded.org Fixes builds which were building fine with previous versions of boost Signed-off-by: Khem Raj --- meta/recipes-support/boost/boost_1.51.0.bb | 6 ++- meta/recipes-support/boost/files/hash_enums.patch | 45 +++++++++++++++++++++ 2 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-support/boost/files/hash_enums.patch diff --git a/meta/recipes-support/boost/boost_1.51.0.bb b/meta/recipes-support/boost/boost_1.51.0.bb index 1564b0e..b95049f 100644 --- a/meta/recipes-support/boost/boost_1.51.0.bb +++ b/meta/recipes-support/boost/boost_1.51.0.bb @@ -2,8 +2,10 @@ include boost.inc LIC_FILES_CHKSUM = "file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c" -PR = "${INC_PR}.0" +PR = "${INC_PR}.1" -SRC_URI += "file://arm-intrinsics.patch" +SRC_URI += "file://arm-intrinsics.patch \ + file://hash_enums.patch \ + " SRC_URI[md5sum] = "4b6bd483b692fd138aef84ed2c8eb679" SRC_URI[sha256sum] = "fb2d2335a29ee7fe040a197292bfce982af84a645c81688a915c84c925b69696" diff --git a/meta/recipes-support/boost/files/hash_enums.patch b/meta/recipes-support/boost/files/hash_enums.patch new file mode 100644 index 0000000..368da96 --- /dev/null +++ b/meta/recipes-support/boost/files/hash_enums.patch @@ -0,0 +1,45 @@ +Allow hashing of enums. +Fixes errors like + +/opt/poky/1.3.0-1/sysroots/i586-poky-linux/usr/include/boost/functional/hash/extensions.hpp:257:34: error: no matching function for call to 'hash_value(const myspace::idx&)' + +Upstream-Status: Pending +Singed-off-by: Khem Raj + +Index: boost_1_51_0/boost/functional/hash/hash.hpp +=================================================================== +--- boost_1_51_0.orig/boost/functional/hash/hash.hpp 2012-07-15 16:28:30.000000000 -0700 ++++ boost_1_51_0/boost/functional/hash/hash.hpp 2012-09-26 14:00:57.738364002 -0700 +@@ -15,6 +15,8 @@ + #include + #include + #include ++#include ++#include + + #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + #include +@@ -89,6 +91,9 @@ + typename boost::hash_detail::long_numbers::type hash_value(T); + template + typename boost::hash_detail::ulong_numbers::type hash_value(T); ++ template ++ typename boost::enable_if, std::size_t>::type ++ hash_value(T); + + #if !BOOST_WORKAROUND(__DMC__, <= 0x848) + template std::size_t hash_value(T* const&); +@@ -178,7 +183,12 @@ + { + return hash_detail::hash_value_unsigned(v); + } +- ++ template ++ typename boost::enable_if, std::size_t>::type ++ hash_value(T v) ++ { ++ return static_cast(v); ++ } + // Implementation by Alberto Barbati and Dave Harris. + #if !BOOST_WORKAROUND(__DMC__, <= 0x848) + template std::size_t hash_value(T* const& v)