Fix a problem in using boost::spirit with utf-8 strings

This commit is contained in:
Petr Machata 2011-02-08 19:37:42 +01:00
parent d43949dd22
commit 7a52c341d7
2 changed files with 67 additions and 1 deletions

59
boost-1.46.0-spirit.patch Normal file
View File

@ -0,0 +1,59 @@
Index: boost/spirit/home/qi/nonterminal/detail/parameterized.hpp
===================================================================
--- boost/spirit/home/qi/nonterminal/detail/parameterized.hpp (revision 68724)
+++ boost/spirit/home/qi/nonterminal/detail/parameterized.hpp (revision 68725)
@@ -14,6 +14,7 @@
#include <boost/ref.hpp>
+#include <boost/spirit/home/support/handles_container.hpp>
#include <boost/spirit/home/qi/parser.hpp>
namespace boost { namespace spirit { namespace qi
@@ -59,4 +60,16 @@ namespace boost { namespace spirit { nam
};
}}}
+namespace boost { namespace spirit { namespace traits
+{
+ ///////////////////////////////////////////////////////////////////////////
+ template <typename Subject, typename Params, typename Attribute
+ , typename Context, typename Iterator>
+ struct handles_container<qi::parameterized_nonterminal<Subject, Params>
+ , Attribute, Context, Iterator>
+ : handles_container<typename remove_const<Subject>::type
+ , Attribute, Context, Iterator>
+ {};
+}}}
+
#endif
Index: boost/spirit/home/karma/nonterminal/detail/parameterized.hpp
===================================================================
--- boost/spirit/home/karma/nonterminal/detail/parameterized.hpp (revision 68724)
+++ boost/spirit/home/karma/nonterminal/detail/parameterized.hpp (revision 68725)
@@ -14,6 +14,7 @@
#include <boost/ref.hpp>
+#include <boost/spirit/home/support/handles_container.hpp>
#include <boost/spirit/home/karma/generator.hpp>
namespace boost { namespace spirit { namespace karma
@@ -60,4 +61,17 @@ namespace boost { namespace spirit { nam
};
}}}
+
+namespace boost { namespace spirit { namespace traits
+{
+ ///////////////////////////////////////////////////////////////////////////
+ template <typename Subject, typename Params, typename Attribute
+ , typename Context, typename Iterator>
+ struct handles_container<karma::parameterized_nonterminal<Subject, Params>
+ , Attribute, Context, Iterator>
+ : handles_container<typename remove_const<Subject>::type
+ , Attribute, Context, Iterator>
+ {};
+}}}
+
#endif

View File

@ -23,7 +23,7 @@ Name: boost
Summary: The free peer-reviewed portable C++ source libraries
Version: 1.46.0
%define version_enc 1_46_0_beta1
Release: 0.1.beta1%{?dist}
Release: 0.2.beta1%{?dist}
License: Boost
# The CMake build framework (set of CMakeLists.txt and module.cmake files) is
@ -91,6 +91,8 @@ Patch3: boost-1.46.0-signals-erase.patch
# https://svn.boost.org/trac/boost/ticket/5119
Patch4: boost-1.46.0-unordered-cctor.patch
Patch5: boost-1.46.0-spirit.patch
%bcond_with tests
%bcond_with docs_generated
@ -418,6 +420,7 @@ sed 's/_FEDORA_SONAME/%{sonamever}/' %{PATCH2} | %{__patch} -p0 --fuzz=0
# fixes
%patch3 -p1
%patch4 -p2
%patch5 -p0
%build
@ -831,6 +834,10 @@ find $RPM_BUILD_ROOT%{_includedir}/ \( -name '*.pl' -o -name '*.sh' \) -exec %{_
%{_bindir}/bjam
%changelog
* Tue Feb 8 2011 Petr Machata <pmachata@redhat.com> - 1.46.0-0.2.beta1
- spirit.patch: Fix a problem in using boost::spirit with utf-8
strings. Thanks to Hicham HAOUARI for digging up the fix.
* Thu Feb 3 2011 Petr Machata <pmachata@redhat.com> - 1.46.0-0.1.beta1
- Package 1.46.0-beta1
- Reintroduce the soname patch