--- a/base-specs/boost.spec Thu Jan 12 22:34:55 2012 +0000
+++ b/base-specs/boost.spec Fri Jan 13 19:39:15 2012 +0000
@@ -24,11 +24,14 @@
# Ticket #6161
Patch1: boost-01-putenv.diff
Patch2: boost-gpp-01-cstdint.diff
+# Tickect #6131
+Patch3: boost-1.48.0-foreach.patch
URL: http://www.boost.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%prep
%setup -q -n %{name}_%{major}_%{minor}_%{patchlevel}
+%patch3 -p1
%if %cc_is_gcc
%patch2 -p0
%else
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/boost-1.48.0-foreach.patch Fri Jan 13 19:39:15 2012 +0000
@@ -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; }
+