[boost] Add fixes for 756005 and 757385

Petr Machata pmachata at fedoraproject.org
Tue Nov 29 14:44:42 UTC 2011


commit 76982ecb0f26546ac283a07079552a9bc365fbb9
Author: Petr Machata <pmachata at redhat.com>
Date:   Tue Nov 29 15:43:40 2011 +0100

    Add fixes for 756005 and 757385

 boost-1.48.0-foreach.patch                 |   60 ++++++++++++++++++++++++++++
 boost-1.48.0-lexical_cast-incomplete.patch |   37 +++++++++++++++++
 boost.spec                                 |   16 +++++++-
 3 files changed, 112 insertions(+), 1 deletions(-)
---
diff --git a/boost-1.48.0-foreach.patch b/boost-1.48.0-foreach.patch
new file mode 100644
index 0000000..12cf088
--- /dev/null
+++ b/boost-1.48.0-foreach.patch
@@ -0,0 +1,60 @@
+Index: /trunk/boost/foreach_fwd.hpp
+===================================================================
+--- /trunk/boost/foreach_fwd.hpp	(revision 62661)
++++ /trunk/boost/foreach_fwd.hpp	(revision 75540)
+@@ -15,4 +15,6 @@
+ #define BOOST_FOREACH_FWD_HPP
+ 
++#include <utility> // for std::pair
++
+ // This must be at global scope, hence the uglified name
+ enum boost_foreach_argument_dependent_lookup_hack
+@@ -26,4 +28,7 @@
+ namespace foreach
+ {
++    template<typename T>
++    std::pair<T, T> in_range(T begin, T end);
++
+     ///////////////////////////////////////////////////////////////////////////////
+     // boost::foreach::tag
+@@ -47,4 +52,22 @@
+ } // namespace foreach
+ 
++// Workaround for unfortunate https://svn.boost.org/trac/boost/ticket/6131
++namespace BOOST_FOREACH
++{
++    using foreach::in_range;
++    using foreach::tag;
++
++    template<typename T>
++    struct is_lightweight_proxy
++      : foreach::is_lightweight_proxy<T>
++    {};
++
++    template<typename T>
++    struct is_noncopyable
++      : foreach::is_noncopyable<T>
++    {};
++
++} // namespace BOOST_FOREACH
++
+ } // namespace boost
+ 
+Index: /trunk/boost/foreach.hpp
+===================================================================
+--- /trunk/boost/foreach.hpp	(revision 75077)
++++ /trunk/boost/foreach.hpp	(revision 75540)
+@@ -166,5 +166,5 @@
+ //   at the global namespace for your type.
+ template<typename T>
+-inline boost::foreach::is_lightweight_proxy<T> *
++inline boost::BOOST_FOREACH::is_lightweight_proxy<T> *
+ boost_foreach_is_lightweight_proxy(T *&, BOOST_FOREACH_TAG_DEFAULT) { return 0; }
+ 
+@@ -191,5 +191,5 @@
+ //   at the global namespace for your type.
+ template<typename T>
+-inline boost::foreach::is_noncopyable<T> *
++inline boost::BOOST_FOREACH::is_noncopyable<T> *
+ boost_foreach_is_noncopyable(T *&, BOOST_FOREACH_TAG_DEFAULT) { return 0; }
+ 
diff --git a/boost-1.48.0-lexical_cast-incomplete.patch b/boost-1.48.0-lexical_cast-incomplete.patch
new file mode 100644
index 0000000..d917b62
--- /dev/null
+++ b/boost-1.48.0-lexical_cast-incomplete.patch
@@ -0,0 +1,37 @@
+diff -up boost_1_48_0/boost/lexical_cast.hpp\~ boost_1_48_0/boost/lexical_cast.hpp
+--- boost_1_48_0/boost/lexical_cast.hpp~	2011-11-08 19:12:23.000000000 +0100
++++ boost_1_48_0/boost/lexical_cast.hpp	2011-11-29 01:27:29.368064527 +0100
+@@ -1599,6 +1599,18 @@ namespace boost
+         };
+ 
+         template<typename T>
++        struct is_char
++        {
++            BOOST_STATIC_CONSTANT(bool, value = false );
++        };
++
++        template<>
++        struct is_char<char>
++        {
++            BOOST_STATIC_CONSTANT(bool, value = true );
++        };
++
++        template<typename T>
+         struct is_char_or_wchar
+         {
+         private:
+@@ -1732,11 +1744,7 @@ namespace boost
+                                  is_arithmetic<src >::value,
+                                  ::boost::type_traits::ice_and<
+                                      is_pointer<src >::value,
+-                                     is_char_or_wchar<removed_ptr_t >::value,
+-                                     ::boost::type_traits::ice_eq<
+-                                        sizeof(char_type),
+-                                        sizeof(removed_ptr_t)
+-                                     >::value
++                                     is_char<removed_ptr_t >::value
+                                  >::value
+                              >::value
+                         );
+
+Diff finished.  Tue Nov 29 01:27:49 2011
diff --git a/boost.spec b/boost.spec
index 0e2d21d..6bf08b2 100644
--- a/boost.spec
+++ b/boost.spec
@@ -28,7 +28,7 @@ Name: boost
 Summary: The free peer-reviewed portable C++ source libraries
 Version: 1.48.0
 %define version_enc 1_48_0
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: Boost and MIT and Python
 
 # The CMake build framework (set of CMakeLists.txt and module.cmake files) is
@@ -102,6 +102,14 @@ Patch4: boost-1.48.0-fix-non-utf8-files.patch
 # http://www.boost.org/boost-build2/doc/html/bbv2/overview.html
 Patch5: boost-1.48.0-add-bjam-man-page.patch
 
+# https://bugzilla.redhat.com/show_bug.cgi?id=757385
+# https://svn.boost.org/trac/boost/ticket/6182
+Patch6: boost-1.48.0-lexical_cast-incomplete.patch
+
+# https://bugzilla.redhat.com/show_bug.cgi?id=756005
+# https://svn.boost.org/trac/boost/ticket/6131
+Patch7: boost-1.48.0-foreach.patch
+
 %bcond_with tests
 %bcond_with docs_generated
 
@@ -457,6 +465,8 @@ sed 's/_FEDORA_SONAME/%{sonamever}/' %{PATCH1} | %{__patch} -p0 --fuzz=0
 %patch3 -p0
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
+%patch7 -p2
 
 %build
 # Support for building tests.
@@ -950,6 +960,10 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man1/bjam.1*
 
 %changelog
+* Tue Nov 29 2011 Petr Machata <pmachata at redhat.com> - 1.48.0-2
+- Add an upstream patch for BOOST_FOREACH declaration issue #756005
+- Add a proposed patch for error in boost lexical_cast #757385
+
 * Sat Nov 19 2011 Denis Arnaud <denis.arnaud_fedora at m4x.org> - 1.48.0-1
 - Upgrade to Boost-1.48.0, adding two new header-only components
   (Container and Move) and a new library (Locale).


More information about the scm-commits mailing list