From 34bfa91566fd9bdb76eeca91f95ded6be48f1f02 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 29 Oct 2013 12:11:27 +0100 Subject: [PATCH] boost: add missing patches for 1.54. --- ....54.0-Fix-macro-for-int128-detection.patch | 31 +++++++++++++++++++ srcpkgs/boost/patches/fix-new-glibc.patch | 12 +++++++ 2 files changed, 43 insertions(+) create mode 100644 srcpkgs/boost/patches/boost-1.54.0-Fix-macro-for-int128-detection.patch create mode 100644 srcpkgs/boost/patches/fix-new-glibc.patch diff --git a/srcpkgs/boost/patches/boost-1.54.0-Fix-macro-for-int128-detection.patch b/srcpkgs/boost/patches/boost-1.54.0-Fix-macro-for-int128-detection.patch new file mode 100644 index 00000000000..7947dc6f109 --- /dev/null +++ b/srcpkgs/boost/patches/boost-1.54.0-Fix-macro-for-int128-detection.patch @@ -0,0 +1,31 @@ +--- boost/lexical_cast.hpp (revision 84136) ++++ boost/lexical_cast.hpp (revision 84965) +@@ -70,8 +70,8 @@ + #endif + +-#if (defined(BOOST_LCAST_HAS_INT128) && !defined(__GNUC__)) || GCC_VERSION > 40700 ++// GCC 4.6 has some issues with int128 and uint128. Issues were fixed in GCC 4.7 ++#if defined(BOOST_HAS_INT128) && (!defined(__GNUC__) || __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 6)) + #define BOOST_LCAST_HAS_INT128 + #endif +- + + namespace boost +--- libs/conversion/test/lexical_cast_integral_types_test.cpp (revision 83717) ++++ libs/conversion/test/lexical_cast_integral_types_test.cpp (revision 84965) +@@ -49,5 +49,5 @@ + #endif + +-#if (defined(BOOST_LCAST_HAS_INT128) && !defined(__GNUC__)) || GCC_VERSION > 40700 ++#if defined(BOOST_HAS_INT128) && (!defined(__GNUC__) || __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 6)) + #define BOOST_LCAST_HAS_INT128 + #endif +@@ -445,6 +445,6 @@ + + // Overflow test case from David W. Birdsall +- std::string must_owerflow_str = "160000000000000000000"; +- std::string must_owerflow_negative_str = "-160000000000000000000"; ++ std::string must_owerflow_str = (sizeof(T) < 16 ? "160000000000000000000" : "1600000000000000000000000000000000000000"); ++ std::string must_owerflow_negative_str = (sizeof(T) < 16 ? "-160000000000000000000" : "-1600000000000000000000000000000000000000"); + for (int i = 0; i < 15; ++i) { + BOOST_CHECK_THROW(lexical_cast(must_owerflow_str), bad_lexical_cast); diff --git a/srcpkgs/boost/patches/fix-new-glibc.patch b/srcpkgs/boost/patches/fix-new-glibc.patch new file mode 100644 index 00000000000..13223473b74 --- /dev/null +++ b/srcpkgs/boost/patches/fix-new-glibc.patch @@ -0,0 +1,12 @@ +--- boost/cstdint.hpp (revision 84805) ++++ boost/cstdint.hpp (revision 84950) +@@ -42,5 +42,8 @@ + // See https://svn.boost.org/trac/boost/ticket/3548 and http://sources.redhat.com/bugzilla/show_bug.cgi?id=10990 + // +-#if defined(BOOST_HAS_STDINT_H) && (!defined(__GLIBC__) || defined(__GLIBC_HAVE_LONG_LONG)) ++#if defined(BOOST_HAS_STDINT_H) \ ++ && (!defined(__GLIBC__) \ ++ || defined(__GLIBC_HAVE_LONG_LONG) \ ++ || (defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 17))))) + + // The following #include is an implementation artifact; not part of interface.